instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
facelessuser__wcmatch-227
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "wcmatch/__meta__.py" }, { "changes": { "added_entities": [ "wcmatch/_wcmatch.py:WcRegexp.filter" ], "added_modules": null, ...
facelessuser/wcmatch
0af3bc548f0228ffd226a4333c35f9b37ac4398a
Maybe add a compile function Wcmatch caches patterns, but for instance, it doesn't cache pattern expansion. So if a pattern uses something like `{1..100}`, you'd get 100 patterns cached, so the expansion would still happen every time, but the parsing of each pattern would not. We currently do this because we don't want...
diff --git a/README.md b/README.md index 247d8e7..5a9225b 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ https://facelessuser.github.io/wcmatch/ MIT -[github-ci-image]: https://github.com/facelessuser/wcmatch/workflows/build/badge.svg?branch=main&event=push +[github-ci-image]: https://github.com/faceless...
facelessuser__wcmatch-25
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "wcmatch/_wcparse.py:WcParse._handle_star", "wcmatch/_wcparse.py:WcParse.root", "wcmatch/_wcparse.py:WcParse.parse" ], "edited_modules": [ "wcmatch/_wcparse.py:WcParse...
facelessuser/wcmatch
eac64b1fa24887478b98f1e38cb49ab1004994f3
Odd behavior with wcmatch.glob.glob()? Hello there. I was very pleased to see a python module that attempted to codify the extended glob pattern matching that one gets with the Bash command line. Great stuff! However, in making use of it, I found a weird scenario. Consider this piece of code run under Python 3....
diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelog.md index e990e91..9fa3a10 100644 --- a/docs/src/markdown/changelog.md +++ b/docs/src/markdown/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2.0.4 + +- **FIX**: Fix issue where negated patterns would trigger before end of path. +- **FIX**: Fix ...
facelessuser__wcmatch-31
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "wcmatch/__meta__.py" }, { "changes": { "added_entities": [ "wcmatch/_wcparse.py:WcParse._restrict_extended_slash" ], "added_...
facelessuser/wcmatch
4f7e9c815a755d4af2540d60902ed177d27ade81
Properly handle dots in EXTGLOB EXTGLOB should not be treated as `*` which do not match dots except when DOTGLOB is allowed. Also, it should not restrict `.` and `..` from being matched. `!(...)` should be a simple wildcard match that is allowed to match dots.
diff --git a/.coveragerc b/.coveragerc index e4993bd..980b3d8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,7 @@ [run] omit= - backrefs/pep562.py + wcmatch/pep562.py [report] omit= - backrefs/pep562.py + wcmatch/pep562.py diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelo...
facelessuser__wcmatch-45
[ { "changes": { "added_entities": [ "wcmatch/wcmatch.py:WcMatch.on_reset" ], "added_modules": null, "edited_entities": [ "wcmatch/wcmatch.py:WcMatch.__init__", "wcmatch/wcmatch.py:WcMatch._walk", "wcmatch/wcmatch.py:WcMatch.imatch" ], "edited_mo...
facelessuser/wcmatch
d153e7007cc73b994ae1ba553dc4584039f5c212
Add on_reset to WcMatch class and deprecate kill and reset ~~Add a public API call to check if an abort has been requested in the WcMatch class. This will allow a user to identify a request to abort has occurred, and allow them to gracefully terminate any work they are doing in any of the hooks, such as `on_match`.~~ ...
diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelog.md index 5e0bb17..92de27d 100644 --- a/docs/src/markdown/changelog.md +++ b/docs/src/markdown/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 3.1.0 + +- **NEW**: Deprecated `WcMatch` class methods `kill` and `reset`. `WcMatch` should be broken wi...
facelessuser__wcmatch-47
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "wcmatch/_wcparse.py:WcPathSplit.__init__", "wcmatch/_wcparse.py:WcPathSplit.split", "wcmatch/_wcparse.py:WcParse.__init__", "wcmatch/_wcparse.py:WcParse.root", "wcmatch/_...
facelessuser/wcmatch
d7f2cb6e0f59160d9119015e87c1426c564eef9a
Add `BASEMATCH` flag to glob Add a flag to glob to enable a feature that performs a "base match". What this means is that when a pattern is given that contains no path separators (`some*.pattern`), the filename will be treated as a recursive search: (`**/some*.pattern`). Basically it would allow you do do something ...
diff --git a/docs/src/dictionary/en-custom.txt b/docs/src/dictionary/en-custom.txt index 6d93036..4ae8b4f 100644 --- a/docs/src/dictionary/en-custom.txt +++ b/docs/src/dictionary/en-custom.txt @@ -21,6 +21,7 @@ Wildcard XORed accessor amongst +basename boolean builtin centric diff --git a/docs/src/markdown/change...
facelessuser__wcmatch-49
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "wcmatch/__meta__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "wcmatch/_wcparse...
facelessuser/wcmatch
6d6ffd49a520ec56b1aa13fd2a8c2007b76555e4
Negative patterns should probably not treat dots or symlinks special To be completely effective, negate patterns should probably not treat symlinks or dots special. It makes it difficult to negate a range like this: positive: `./*/*.py` -> negative `**/test/*` It is similarly difficult with symlinks. Since negate...
diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelog.md index 6d6bdc7..462326d 100644 --- a/docs/src/markdown/changelog.md +++ b/docs/src/markdown/changelog.md @@ -1,10 +1,14 @@ # Changelog -## 3.1.0 +## 4.0.0 - **NEW**: Deprecated `WcMatch` class methods `kill` and `reset`. `WcMatch` should ...
facelessuser__wcmatch-52
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "wcmatch/_wcparse.py:WcParse.__init__", "wcmatch/_wcparse.py:WcParse.parse" ], "edited_modules": [ "wcmatch/_wcparse.py:WcParse" ] }, "file": "wcmatch/_wcparse.p...
facelessuser/wcmatch
5a2c758eee58eae65284b07ea745f6c47c02a2b2
Reverse match convention of translate exclusion patterns One thing I regret was outputting exclusion patterns in translate as matches that are `True` if the folder is not excluded. This utilizes lookaheads to first check for anything that would exclude the file, and then grabs the filepath. This is slower than if we ha...
diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelog.md index f2c08e1..64916a3 100644 --- a/docs/src/markdown/changelog.md +++ b/docs/src/markdown/changelog.md @@ -9,6 +9,7 @@ - **NEW**: Exclusion patterns (enabled with `NEGATE`) now always enable `DOTALL` in the exclusion patterns. They also will...
facelessuser__wcmatch-86
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "wcmatch/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "wcmatch/_wcparse...
facelessuser/wcmatch
3a9f0ab75cd700236132946e2d5ca11484ceac1f
Add ability to change the current working directory when globbing This would add a parameter, maybe `cwd`, `start`, or something similar. The parameter would allow a user to glob from a different location than they are currently in. We could probably extend `globmatch` with `REALPATH` to evaluate the location as well.
diff --git a/docs/src/markdown/changelog.md b/docs/src/markdown/changelog.md index 1bc1ea0..de5b1b7 100644 --- a/docs/src/markdown/changelog.md +++ b/docs/src/markdown/changelog.md @@ -1,5 +1,15 @@ # Changelog +## 5.1.0 + +- **NEW**: Add new parameter to `glob` related functions (except in `pathlib`) called `root_di...
fact-project__pyfact-70
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fact/io.py:to_h5py", "fact/io.py:initialize_h5py", "fact/io.py:append_to_h5py" ], "edited_modules": [ "fact/io.py:to_h5py", "fact/io.py:initialize_h5py", ...
fact-project/pyfact
58e9bdbae66a65f16f900fe65560d3c83592c4b5
to_h5py converts lists in dataframes to strings This is because if dtype is object, than str is assumend.
diff --git a/.travis.yml b/.travis.yml index ff5dd0e..071380c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ before_install: # The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda - sudo rm -rf /dev/shm - sudo ln -s /run/shm /dev/shm + - pip inst...
facultyai__marshmallow-dataframe-15
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/marshmallow_dataframe/dataframe.py:Dtypes.from_pandas_dtypes", "src/marshmallow_dataframe/dataframe.py:_dtype_to_field", "src/marshmallow_dataframe/dataframe.py:RecordsDataFrameSchem...
facultyai/marshmallow-dataframe
bc95e84ca99a00b38107e747b0b7a9ed83362b04
Support categorical columns Right now categorical columns are always recognised as a string dtype, which could be wrong. In addition, we are not validating that the deserialised values are one of the category options.
diff --git a/src/marshmallow_dataframe/dataframe.py b/src/marshmallow_dataframe/dataframe.py index 66369c5..7e612a9 100644 --- a/src/marshmallow_dataframe/dataframe.py +++ b/src/marshmallow_dataframe/dataframe.py @@ -1,3 +1,5 @@ +from collections import defaultdict + import pandas as pd import numpy as np import mar...
facultyai__marshmallow-dataframe-19
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/marshmallow_dataframe/split.py:SplitDataFrameSchemaMeta.get_fields", "src/marshmallow_dataframe/split.py:SplitDataFrameSchema.validate_index_data_length" ], "edited_modules": [ ...
facultyai/marshmallow-dataframe
36253b6b2006839f83621c7eee83d0a544a3dce8
Should index be mandatory on split format? Hi, and thanks for the work on this package ! I am also trying to get that working nicely together... I recently encountered : ``` {'index': ['Missing data for required field.']} ``` But I expected index to be optional (when not present assume range(n), same as panda...
diff --git a/src/marshmallow_dataframe/split.py b/src/marshmallow_dataframe/split.py index b988e67..9fc4db4 100644 --- a/src/marshmallow_dataframe/split.py +++ b/src/marshmallow_dataframe/split.py @@ -31,7 +31,11 @@ class SplitDataFrameSchemaMeta(DataFrameSchemaMeta): else dtype_to_field(index_dtype) ...
fair-software__howfairis-307
[ { "changes": { "added_entities": [ "howfairis/compliance.py:Compliance.badge_image_url", "howfairis/compliance.py:Compliance.color" ], "added_modules": null, "edited_entities": [ "howfairis/compliance.py:Compliance.calc_badge" ], "edited_modules": [ ...
fair-software/howfairis
0d69e5ef85ba9a4005b5a03bf7da2bedc29ec38c
Compliance add public method to get color of the badge Relevant code: https://github.com/fair-software/howfairis/blob/738f2f9a0c5fc4409199af9bb189bc86b8dfaa47/howfairis/compliance.py#L78-L87
diff --git a/CHANGELOG.md b/CHANGELOG.md index a0bcbac..b59e214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- Compliance.color() [#301](https://github.com/fair-software/howfairis/issues/301...
fair-workflows__fairworkflows-113
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairworkflows/fairstep.py:FairStep.publish_as_nanopub" ], "edited_modules": [ "fairworkflows/fairstep.py:FairStep" ] }, "file": "fairworkflows/fairstep.py" }, { ...
fair-workflows/fairworkflows
5d0f463ef6d9c124af8f9c0bf987986bb2589c5d
Add more arguments to publish_as_nanopub method The `Nanopub.from_assertion` method that the `publish_as_nanopub` method is based on accepts arguments `attributed_to`, `attribute_to_profile`, and `nanopub_author`. We should allow the user to pass those arguments also to `publish_as_nanopub` so when publishing a workflo...
diff --git a/fairworkflows/fairstep.py b/fairworkflows/fairstep.py index f3222a4..10c6c1f 100644 --- a/fairworkflows/fairstep.py +++ b/fairworkflows/fairstep.py @@ -257,14 +257,21 @@ class FairStep(RdfWrapper): if shacl: self.shacl_validate() - def publish_as_nanopub(self, use_test_server=Fal...
fair-workflows__fairworkflows-154
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "fairworkflows/config.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairworkflow...
fair-workflows/fairworkflows
71d839bb698035d93f80c5f8f55e3424c1904fc8
Steps without URI are reffered to as <None> in workflow RDF. ```python step1 = FairStep() workflow = FairWorkflow() workflow.add(step1) print(workflow) ``` prints: ``` Workflow URI = None @prefix pplan: <http://purl.org/net/p-plan#> . @prefix pwo: <http://purl.org/spar/pwo/> . _:Nc4cbc97adddf4b6396c0ff1849...
diff --git a/examples/noodles_fw.ipynb b/examples/noodles_fw.ipynb index b969ec4..139376d 100644 --- a/examples/noodles_fw.ipynb +++ b/examples/noodles_fw.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "worth-borough", + "id": "regulated-intermediate", "metadata": {}, "source":...
fair-workflows__fairworkflows-167
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairworkflows/fairstep.py:FairStep.from_function" ], "edited_modules": [ "fairworkflows/fairstep.py:FairStep" ] }, "file": "fairworkflows/fairstep.py" }, { "cha...
fair-workflows/fairworkflows
2f898c7a670b1aada421286213fc827b073ac56a
Inputs should not be bound to workflow instantiated with is_fairworkflow Now we do this, we already bind input variable values to the workflow when we instantiate it. ```python @is_fairworkflow(label='My Workflow') def my_workflow(in1, in2): """ A simple addition, subtraction workflow """ return...
diff --git a/fairworkflows/fairstep.py b/fairworkflows/fairstep.py index b42e21d..2d7fff0 100644 --- a/fairworkflows/fairstep.py +++ b/fairworkflows/fairstep.py @@ -169,14 +169,13 @@ class FairStep(RdfWrapper): @classmethod def from_function(cls, func: Callable): """ - Generates a plex rdf dec...
fair-workflows__fairworkflows-172
[ { "changes": { "added_entities": [ "fairworkflows/fairworkflow.py:_validate_decorated_function" ], "added_modules": [ "fairworkflows/fairworkflow.py:_validate_decorated_function" ], "edited_entities": [ "fairworkflows/fairworkflow.py:is_fairworkflow" ]...
fair-workflows/fairworkflows
571bd94be1754f35116997eb6fe68b8779a1e3c7
Restrict fair workflows to only consist of is_fairstep-decorated functions Defining a fair workflow using `@is_fairworkflow` decorator should throw an error if there are functions in it that are not decorated with `@is_fairstep`
diff --git a/fairworkflows/fairworkflow.py b/fairworkflows/fairworkflow.py index 540498c..b0af8ab 100644 --- a/fairworkflows/fairworkflow.py +++ b/fairworkflows/fairworkflow.py @@ -536,9 +536,7 @@ def is_fairworkflow(label: str = None, is_pplan_plan: bool = True): num_params = len(inspect.signature(func).param...
fair-workflows__nanopub-129
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "nanopub/_version.py" }, { "changes": { "added_entities": [ "nanopub/publication.py:Publication._handle_publication_attributed_to" ...
fair-workflows/nanopub
d69ef1a4dde037bef7ba1df3a098ccf4b296f886
Allow pubinfo to be optionally attributed to a different id than in profile ```Nanotate``` tool has an unusual requirement (with regards to the normal way of signing nanopubs) in which it will sign with its own keys, but still wishes to attribute the publication to other ORCIDs. At present this is not possible, as only...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a94fe..e2fcc2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Vers...
fair-workflows__nanopub-140
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "nanopub/setup_nanopub_profile.py:validate_orcid_id" ], "edited_modules": [ "nanopub/setup_nanopub_profile.py:validate_orcid_id" ] }, "file": "nanopub/setup_nanopub_prof...
fair-workflows/nanopub
859c68baed45027eba70fc222e08ccb3cedfa96b
Deprecation warning coming from click When running test: ```tests/test_setup_profile.py::test_provided_keypair_copied_to_nanopub_dir``` There is a deprecation warning: ``` /usr/local/lib/python3.9/site-packages/click/core.py:1048: DeprecationWarning: Parameter callbacks take 3 args, (ctx, param, value). The 2-arg st...
diff --git a/nanopub/setup_nanopub_profile.py b/nanopub/setup_nanopub_profile.py index 6c98360..93b6750 100755 --- a/nanopub/setup_nanopub_profile.py +++ b/nanopub/setup_nanopub_profile.py @@ -21,10 +21,11 @@ RSA = 'RSA' ORCID_ID_REGEX = r'^https://orcid.org/(\d{4}-){3}\d{3}(\d|X)$' -def validate_orcid_id(ctx, orc...
fair-workflows__nanopub-91
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "nanopub/java_wrapper.py:JavaWrapper._run_command" ], "edited_modules": [ "nanopub/java_wrapper.py:JavaWrapper" ] }, "file": "nanopub/java_wrapper.py" }, { "chan...
fair-workflows/nanopub
9982d70c49d1e632eed793c98db92f57de8b1dab
Catch FileNotFoundError if profile is not setup yet We do not check for FileNotFoundErrors here: (but they are raised if user did not setup profile) https://github.com/fair-workflows/nanopub/blob/5a142abae96fc48cd5255cb5781aab6f3f670bc6/nanopub/profile.py#L78
diff --git a/CHANGELOG.md b/CHANGELOG.md index dd98edd..f973eec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Not released] +### Changed +* Improved error message by pointing to documentation instead of Readme upon...
fairlearn__fairlearn-1013
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "fairlearn/metrics/_metric_frame.py" } ]
fairlearn/fairlearn
d8a222a809a29ec1038038da4711b397dd0b1abb
Tests are failing with pandas 1.4.0 In #1011 @britneyting encountered the following issue in Python 3.9 tests using pandas 1.4.0 which I can reproduce locally: ``` =================================== FAILURES =================================== ___________________ TestSingleFeature.test_from_dict_failure ___________...
diff --git a/fairlearn/metrics/_metric_frame.py b/fairlearn/metrics/_metric_frame.py index c055dee..19bef45 100644 --- a/fairlearn/metrics/_metric_frame.py +++ b/fairlearn/metrics/_metric_frame.py @@ -22,7 +22,8 @@ _VALID_ERROR_STRING = ['raise', 'coerce'] _VALID_GROUPING_FUNCTION = ['min', 'max'] _SF_DICT_CONVERSI...
fairlearn__fairlearn-1502
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/reductions/_moments/error_rate.py:ErrorRate.gamma" ], "edited_modules": [ "fairlearn/reductions/_moments/error_rate.py:ErrorRate" ] }, "file": "fairlearn/redu...
fairlearn/fairlearn
eac3b59fc2ad6bb0758a73abfd2d6fd964cfbb59
ErrorRate.load_data does not use what is passed as argument for control_features param The signature of `ErrorRate.load_data` is: `load_data(self, X, y, *, sensitive_features, control_features=None)`. The `control_features` param is however not used / ignored inside the method. Should this param be deprecated or remov...
diff --git a/docs/user_guide/mitigation/reductions.rst b/docs/user_guide/mitigation/reductions.rst index df1707c..319ee40 100644 --- a/docs/user_guide/mitigation/reductions.rst +++ b/docs/user_guide/mitigation/reductions.rst @@ -194,7 +194,7 @@ the predicted labels. ... y_pred=...
fairlearn__fairlearn-596
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/postprocessing/_interpolated_thresholder.py:InterpolatedThresholder.predict" ], "edited_modules": [ "fairlearn/postprocessing/_interpolated_thresholder.py:InterpolatedThres...
fairlearn/fairlearn
b07209058322d36e0962e25f82cd720ada650cde
Can't use sklearn.Pipeline with GridSearch. Hello, I may be wrong, but GridSearch does not allow [sklearn.Pipeline](https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html) for its estimator. This would be a useful feature have! ## How to reproduce. In `test/unit/reductions/grid_search/...
diff --git a/AUTHORS.md b/AUTHORS.md index f5778a5..3927aca 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -3,6 +3,7 @@ All names are sorted alphabetically by last name. Contributors, please add your name to the list when you submit a patch to the project. - [Sarah Bird](https://github.com/slbird) +- [Frederic Brancha...
fairlearn__fairlearn-636
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/metrics/_metric_frame.py:MetricFrame._process_features" ], "edited_modules": [ "fairlearn/metrics/_metric_frame.py:MetricFrame" ] }, "file": "fairlearn/metric...
fairlearn/fairlearn
fe8e5e2ae768986edada56fd086cded207d6d49c
MetricFrame: missing error message #### Describe the bug #### Steps/Code to Reproduce ![image](https://user-images.githubusercontent.com/10245648/98857843-7bce5e00-2414-11eb-8ed8-1b123440f733.png) ``` from fairlearn.metrics import MetricFrame from sklearn.metrics import balanced_accuracy_score MetricFra...
diff --git a/fairlearn/metrics/_metric_frame.py b/fairlearn/metrics/_metric_frame.py index 1dd33d0..e8644f9 100644 --- a/fairlearn/metrics/_metric_frame.py +++ b/fairlearn/metrics/_metric_frame.py @@ -512,7 +512,7 @@ class MetricFrame: result.append(GroupFeature(base_name, column, i, None)) el...
fairlearn__fairlearn-644
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/metrics/_group_metric_set.py:_create_group_metric_set" ], "edited_modules": [ "fairlearn/metrics/_group_metric_set.py:_create_group_metric_set" ] }, "file": "...
fairlearn/fairlearn
3460635aef0ec6c55408b112e5fef0266c1a7b67
Creating group metric sets for regression fails #### Describe the bug Unable to create group metric set for `regression` prediction types. #### Steps/Code to Reproduce Try to create a `regression` group metric set. ```python dash_dict = _create_group_metric_set(y_true=y, ...
diff --git a/AUTHORS.md b/AUTHORS.md index 3927aca..9cdf0bc 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -28,3 +28,4 @@ All names are sorted alphabetically by last name. Contributors, please add your - [Hilde Weerts](https://github.com/hildeweerts) - [Vincent Xu](https://github.com/vingu) - [Beth Zeranski](https://gi...
fairlearn__fairlearn-727
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/metrics/_group_metric_set.py:_create_group_metric_set" ], "edited_modules": [ "fairlearn/metrics/_group_metric_set.py:_create_group_metric_set" ] }, "file": "...
fairlearn/fairlearn
db19ea68bc201c8065d20c962cc8792800288c78
fairlearn.metrics._group_metric_set._create_group_metric_set fails for regression since y_true contains values other than [0, 1] #### Describe the bug I'm trying to run some fairness analysis on some of our models, where we can produce either classification or regression models. With regression, I found that it was fa...
diff --git a/fairlearn/metrics/_group_metric_set.py b/fairlearn/metrics/_group_metric_set.py index 83eafde..a6590f0 100644 --- a/fairlearn/metrics/_group_metric_set.py +++ b/fairlearn/metrics/_group_metric_set.py @@ -27,6 +27,7 @@ _BIN_LABELS = 'binLabels' _FEATURE_BIN_NAME = 'featureBinName' _PREDICTION_TYPE = 'pred...
fairlearn__fairlearn-762
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/_input_validation.py:_merge_columns" ], "edited_modules": [ "fairlearn/_input_validation.py:_merge_columns" ] }, "file": "fairlearn/_input_validation.py" },...
fairlearn/fairlearn
e8cc63784de5410805c156715175fc60e2cd5653
MetricFrame and multiple/named sensitive features I was writing an example notebook, and I encountered something which I found strange. Basically, this works: ``` python multi_metric = MetricFrame( { "average precision": skm.average_precision_score, "roc-auc": skm.roc_auc_score, "cou...
diff --git a/CHANGES.md b/CHANGES.md index e5206ff..7d2bc95 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changes +### v0.6.2 + +* Bugfix for `_merge_columns()` when using multiple sensitive features with + long names. This previously caused groups to get merged if the concatenation + of their string...
fairlearn__fairlearn-906
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/utils/_input_validation.py:_validate_and_reformat_input" ], "edited_modules": [ "fairlearn/utils/_input_validation.py:_validate_and_reformat_input" ] }, "file...
fairlearn/fairlearn
d6c4ae10f2c3b0d638995cf2460a718c74d713e4
Bug in mitigation using Fairlearn on Azure AutoML models <!-- Before submitting a bug, please make sure the issue hasn't been already addressed by searching through the past issues. If your issue is a usage question, please submit it in one of these other channels instead: - StackOverflow with the `fairlearn` ta...
diff --git a/CHANGES.md b/CHANGES.md index 6d54605..cb8fb19 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ### v0.7.1 +* Relaxed checks made on `X` in `_validate_and_reformat_input()` since that + is the concern of the underlying estimator and not Fairlearn ### v0.7.0 diff --git a/fairlearn/utils/_...
fairlearn__fairlearn-968
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fairlearn/metrics/_extra_metrics.py:_get_labels_for_confusion_matrix" ], "edited_modules": [ "fairlearn/metrics/_extra_metrics.py:_get_labels_for_confusion_matrix" ] }, ...
fairlearn/fairlearn
94229647dda802a59bcbfe7f6d64295d64e96efa
BUG: sklearn.confusion_matrix does not work with None anymore #### Describe the bug The following tests fail in the marked lines: - https://github.com/fairlearn/fairlearn/blob/94229647dda802a59bcbfe7f6d64295d64e96efa/test/unit/metrics/test_extra_metrics.py#L420 - https://github.com/fairlearn/fairlearn/blob/94229647...
diff --git a/fairlearn/metrics/_extra_metrics.py b/fairlearn/metrics/_extra_metrics.py index 474116e..e970f28 100644 --- a/fairlearn/metrics/_extra_metrics.py +++ b/fairlearn/metrics/_extra_metrics.py @@ -61,7 +61,7 @@ def _get_labels_for_confusion_matrix(labels, pos_label): # Ensure unique_labels has two elements...
falconry__falcon-1151
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/hooks.py:before", "falcon/hooks.py:after", "falcon/hooks.py:_wrap_with_after", "falcon/hooks.py:_wrap_with_before" ], "edited_modules": [ "falcon/hooks...
falconry/falcon
0c6b6deb8692b06c677893f97c89cc3870595853
Support passing args to hooks See also: https://stackoverflow.com/questions/27028029/how-to-pass-arguments-to-falcon-before-hook
diff --git a/docs/api/hooks.rst b/docs/api/hooks.rst index 16284c6..c8dbbd6 100644 --- a/docs/api/hooks.rst +++ b/docs/api/hooks.rst @@ -33,12 +33,43 @@ decorate the resource class: @falcon.before(extract_project_id) class Message(object): - def on_post(self, req, resp): + def on_post(self, re...
falconry__falcon-1174
[ { "changes": { "added_entities": [ "falcon/request.py:Request.get_param_as_uuid" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" } ]
falconry/falcon
919fd3f5a3129d04f1c7d23f5eff440ec4598e35
Add a get_param_as_uuid method to `falcon.Request` It would be great to be able to get a parameter and to cast it to an UUID, raising a HTTPBadRequest otherwise.
diff --git a/falcon/request.py b/falcon/request.py index b1f92e1..5bc5d41 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -26,7 +26,8 @@ except AttributeError: import io NativeStream = io.BufferedReader -from wsgiref.validate import InputWrapper # NOQA: I202 +from uuid import UUID # NOQA: I202 +...
falconry__falcon-1226
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API.add_static_route" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" }, { "changes": { "added_entities": null, ...
falconry/falcon
76b15bb05daae4aeab5c75307386d3b0394fde42
Add default file name in the StaticRoute Consider adding the ability to specify a default filename for a static route. I'm not sure if it would be best to send the file or raise an `HTTPMovedPermanently` (or a `HTTPPermanentRedirect`). Probably for performance reasons the redirect would be best (but in this case...
diff --git a/falcon/api.py b/falcon/api.py index c1ef8fa..65e0d76 100644 --- a/falcon/api.py +++ b/falcon/api.py @@ -371,7 +371,7 @@ class API(object): self._router.add_route(uri_template, method_map, resource, *args, **kwargs) - def add_static_route(self, prefix, directory...
falconry__falcon-1436
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API.__call__" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" }, { "changes": { "added_entities": null, "added...
falconry/falcon
563e8feec576af1e4788f60320edcd94cd407c24
feat: Add a way for Middleware process_request() to indicate whether routing should proceed or the response should just be rendered immediately We can either set an attribute on `resp`, or simply support returning a truthy value to indicate whether or not the routing should be short-circuited. Other ideas? Should we...
diff --git a/CHANGES.rst b/CHANGES.rst index b22c3a1..fe28a82 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -59,6 +59,9 @@ New & Improved - Added a new ``headers`` property to the ``Response`` class. - Removed the ``six`` and ``python-mimeparse`` dependencies. +- Added a new ``complete`` property to the ``Response`...
falconry__falcon-1447
[ { "changes": { "added_entities": [ "falcon/request.py:Request.get_cookie_values" ], "added_modules": null, "edited_entities": [ "falcon/request.py:Request.__init__", "falcon/request.py:Request.cookies" ], "edited_modules": [ "falcon/request.py:...
falconry/falcon
35d5220c7ee359ac6b03788107a194644eb00344
Optimize request cookie parsing In 1.3, the request cookie parser was changed to parse individual cookies so that malformed ones could be skipped, rather than giving up on parsing the entire header. However, this is significantly slower than parsing the entire header value in one shot, esp. since the SimpleCookie parse...
diff --git a/CHANGES.rst b/CHANGES.rst index bf705ab..54c3a28 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -61,6 +61,9 @@ Breaking Changes Falcon detects that it is running on the wsgiref server. If you need to normalize stream semantics between wsgiref and a production WSGI server, ``Request.bounded_stream``...
falconry__falcon-1658
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/response.py:ResponseOptions.__init__" ], "edited_modules": [ "falcon/response.py:ResponseOptions" ] }, "file": "falcon/response.py" }, { "changes": { ...
falconry/falcon
ae8aa3c1c0274e33b097de40a49e01f09e972d55
Test failure on windows Tests on windows have some failures and errors. The summary is `47 failed, 2094 passed, 79 skipped, 1 warning, 16 errors in 1885.17s (0:31:25)` The errors output is here: https://gist.github.com/CaselIT/16792866e7dd2c545b186207976e060e Some failues are related to asgi, while other are ...
diff --git a/falcon/response.py b/falcon/response.py index 6652971..12a9ba9 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -1069,5 +1069,6 @@ class ResponseOptions: self.default_media_type = DEFAULT_MEDIA_TYPE self.media_handlers = Handlers() - mimetypes.init() + if not mi...
falconry__falcon-1722
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "falcon/__init__.py" }, { "changes": { "added_entities": [ "falcon/middlewares.py:CORSMiddleware.__init__" ], "added_modules"...
falconry/falcon
0fc91cbf028779cf0f7a8761dded149683429adb
Additional options to the internal cors middleware The current cors middleware is a bit too limited for use in anything other than the most simple setups. As discussed on gitter, I think we could add a bit more options, without complicating it too much. In particular I think that the `App.cors_enable` flag should s...
diff --git a/docs/api/cors.rst b/docs/api/cors.rst index 18e0e73..59b85cb 100644 --- a/docs/api/cors.rst +++ b/docs/api/cors.rst @@ -16,12 +16,17 @@ By default, Falcon's built-in CORS support is disabled, so that any cross-origin requests will be blocked by the browser. Passing ``cors_enable=True`` will cause the fra...
falconry__falcon-1829
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/app.py:App.add_sink" ], "edited_modules": [ "falcon/app.py:App" ] }, "file": "falcon/app.py" }, { "changes": { "added_entities": [ "falcon/...
falconry/falcon
58a1360283d8819a340f34bac4b14e551b00359d
Improve docs and checks for sink when using ASGI Currently there is no documentation or checks in `add_sink` that require an async function when using the asgi app. This is a follow up of https://github.com/falconry/falcon/pull/1769#discussion_r531449969 cc @vytas7
diff --git a/falcon/app.py b/falcon/app.py index 2ee701e..8f639cb 100644 --- a/falcon/app.py +++ b/falcon/app.py @@ -21,7 +21,7 @@ import traceback from falcon import app_helpers as helpers, routing import falcon.constants -from falcon.errors import HTTPBadRequest +from falcon.errors import CompatibilityError, HTTP...
falconry__falcon-2239
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "examples/look/look/app.py:create_app" ], "edited_modules": [ "examples/look/look/app.py:create_app" ] }, "file": "examples/look/look/app.py" }, { "changes": { ...
falconry/falcon
f1a7f2df7e4bdb4dce047c17b74ad72cffc2a55d
Fill in the "Query Strings" section of tutorial.rst Right now it just says "coming soon".
diff --git a/docs/user/tutorial.rst b/docs/user/tutorial.rst index b4589af..9e483d3 100644 --- a/docs/user/tutorial.rst +++ b/docs/user/tutorial.rst @@ -1174,7 +1174,7 @@ Go ahead and edit your ``images.py`` file to look something like this: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile(...
falconry__falcon-2366
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/asgi/multipart.py:MultipartForm._iterate_parts" ], "edited_modules": [ "falcon/asgi/multipart.py:MultipartForm" ] }, "file": "falcon/asgi/multipart.py" }, { ...
falconry/falcon
06fdf2885d70149803dbc47324ae8c951b7e58b3
Multipart form parser should not require CRLF after the closing `--` It seems that appending `CRLF` after the closing `--` is not strictly required by [RFC 2046](https://www.rfc-editor.org/rfc/rfc2046) if the client does not include any trailing epilogue, although it is a common convention that nearly all clients foll...
diff --git a/docs/changes/4.0.0.rst b/docs/changes/4.0.0.rst index 4a54346..f706049 100644 --- a/docs/changes/4.0.0.rst +++ b/docs/changes/4.0.0.rst @@ -372,6 +372,13 @@ Fixed :class:`~falcon.media.multipart.MultipartParseOptions`. To that end, a proper :meth:`~falcon.media.Handlers.copy` method has been implemen...
falconry__falcon-494
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.get_header_as_datetime" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" }, { "changes": { "a...
falconry/falcon
92560ebafb8dc20f8aaa6e072536185622c5a88e
Support obsolete HTTP date formats In looking at [RFC 7231](http://tools.ietf.org/html/rfc7231#section-7.1.1.1), Falcon date parsing is actually restricted to IMF-fixdate and does not support the other two obsolete formats. Should we support those formats? Doing so may have minor performance implications for little ben...
diff --git a/falcon/request.py b/falcon/request.py index 6acb1e6..116af67 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -617,12 +617,13 @@ class Request(object): try: http_date = self.get_header(header, required=required) - return util.http_date_to_dt(http_date) + ...
falconry__falcon-505
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.range" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" } ]
falconry/falcon
9dc3d87259b8fc50abc638a42b20e1eaa04d0cbc
Make "bytes" prefix in Range header value required Currently, range header values without a "bytes" prefix are allowed. Change the code to always require a "bytes" prefix.
diff --git a/falcon/request.py b/falcon/request.py index 0663c21..be8aabf 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -343,6 +343,9 @@ class Request(object): value = self.env['HTTP_RANGE'] if value.startswith('bytes='): value = value[6:] + else: + ...
falconry__falcon-538
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/routing/compiled.py:CompiledRouter._compile_tree", "falcon/routing/compiled.py:CompiledRouterNode.conflicts_with" ], "edited_modules": [ "falcon/routing/compiled.py:Co...
falconry/falcon
0af00afd67d92dbf9c6a721d0a1d1218408c1eb7
URI template conflicts after router update I have been abusing the route order a bit, and would like to know if there is a way to do this with the new router, or if this is actually a bug. ```python application = falcon.API() application.add_route('/action1', Action1Handler()) application.add_route('/action2', Ac...
diff --git a/falcon/routing/compiled.py b/falcon/routing/compiled.py index 1a2f903..79a7bac 100644 --- a/falcon/routing/compiled.py +++ b/falcon/routing/compiled.py @@ -29,74 +29,6 @@ class CompiledRouter(object): tree for each look-up, it generates inlined, bespoke Python code to perform the search, then com...
falconry__falcon-540
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.get_header" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" } ]
falconry/falcon
3791b3a1c9e210e2e04a8a57f64561101685ef0e
Request.get_header raises the wrong exception Found an issue that is making exception-handling not very intuitive when dealing with required headers... ``` try: my_header = req.get_header('My-Header', required=True) except falcon.HTTPMissingHeader: print 'Missing header' except falcon.HTTPMissingParam: p...
diff --git a/falcon/request.py b/falcon/request.py index b16e154..74915a0 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -599,7 +599,7 @@ class Request(object): if not required: return None - raise HTTPMissingParam(name) + raise HTTPMissingHeader(name) ...
falconry__falcon-541
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.get_header" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" }, { "changes": { "added_entitie...
falconry/falcon
6912cdc1232754f8e8be4bd25ce150f9485012c2
Has compile_uri_template been removed? I can't see it in the code any more.
diff --git a/doc/api/routing.rst b/doc/api/routing.rst index b76ba4f..c0ce2d2 100644 --- a/doc/api/routing.rst +++ b/doc/api/routing.rst @@ -43,4 +43,4 @@ A custom routing engine may be specified when instantiating api = API(router=fancy) .. automodule:: falcon.routing - :members: create_http_method_map, Com...
falconry__falcon-597
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/util/uri.py:decode" ], "edited_modules": [ "falcon/util/uri.py:decode" ] }, "file": "falcon/util/uri.py" } ]
falconry/falcon
dcbde2512cac6f282bc209702c7477379c9546c1
Falcon crashes on decoding query string When Falcon receives a request with query string that cannot be percent decoded (e.g. `x=%`), it crashes resulting in a rather unexpected 502 response. Traceback (most recent call last): File "/opt/ads/venv/local/lib/python2.7/site-packages/falcon/api.py", line 154, in __...
diff --git a/falcon/util/uri.py b/falcon/util/uri.py index f014e5a..2359672 100644 --- a/falcon/util/uri.py +++ b/falcon/util/uri.py @@ -178,9 +178,12 @@ if six.PY2: tokens = decoded_uri.split('%') decoded_uri = tokens[0] for token in tokens[1:]: - char, byte = _HEX_TO_BYTE[token[:...
falconry__falcon-651
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API.__call__", "falcon/api.py:API._call_rsrc_mw" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" } ]
falconry/falcon
a8154de497b3ec5d6e5579026e74e9073e353819
Pass params to process_resource This is needed for feature parity with global *before* hooks. We can use a shim to avoid breaking existing middleware.
diff --git a/falcon/api.py b/falcon/api.py index cdc2c66..1a6b944 100644 --- a/falcon/api.py +++ b/falcon/api.py @@ -178,7 +178,8 @@ class API(object): # e.g. a 404. responder, params, resource = self._get_responder(req) - self._call_rsrc_mw(middleware_stack, req, resp...
falconry__falcon-664
[ { "changes": { "added_entities": [ "falcon/errors.py:HTTPUnprocessableEntity.__init__" ], "added_modules": [ "falcon/errors.py:HTTPUnprocessableEntity" ], "edited_entities": null, "edited_modules": null }, "file": "falcon/errors.py" }, { "chang...
falconry/falcon
3a6ce66edb68261f66bd74f2f0f756900da78225
Adding HTTP_422, Unprocessable Entity I guess we need such response support.
diff --git a/doc/api/errors.rst b/doc/api/errors.rst index 26a5960..6cabdfa 100644 --- a/doc/api/errors.rst +++ b/doc/api/errors.rst @@ -36,5 +36,5 @@ Predefined Errors HTTPBadRequest, HTTPUnauthorized, HTTPForbidden, HTTPNotFound, HTTPMethodNotAllowed, HTTPNotAcceptable, HTTPConflict, HTTPLe...
falconry__falcon-676
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.client_accepts_msgpack" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" } ]
falconry/falcon
37f175f120aaea587c521715ed4815122446a953
Request.client_accepts_msgpack only supports 'application/x-msgpack' The use of the 'x-' prefix is now discouraged for media types. We should update this Request property to also return True for 'application/msgpack', and verify the change with additional tests.
diff --git a/falcon/request.py b/falcon/request.py index 54be8c0..bd83227 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -353,7 +353,8 @@ class Request(object): @property def client_accepts_msgpack(self): - return self.client_accepts('application/x-msgpack') + return (self.client_ac...
falconry__falcon-698
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "falcon/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API...
falconry/falcon
4f5d704c6f2ffa168846641afb8acad1101ee394
Missing Content-Type on 404 Response Greetings, I've started [testing my webapps with wsgiref.validate](http://blog.dscpl.com.au/2015/05/returning-string-as-iterable-from-wsgi.html), and discovered that Falcon's 404 responses (and possible others) don't conform to the WSGI spec. The `Content-Type` header is require...
diff --git a/doc/api/cookies.rst b/doc/api/cookies.rst index 84d8669..69c89d8 100644 --- a/doc/api/cookies.rst +++ b/doc/api/cookies.rst @@ -84,7 +84,7 @@ You can also instruct the client to remove a cookie with the # Clear the bad cookie resp.unset_cookie('bad_cookie') -.. _cookie-secure-at...
falconry__falcon-723
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/routing/compiled.py:CompiledRouter._compile_tree" ], "edited_modules": [ "falcon/routing/compiled.py:CompiledRouter" ] }, "file": "falcon/routing/compiled.py" ...
falconry/falcon
ac03888ad750598175fa1591ef11ec8ae31b0dc0
Path segment in one route's URI template masks the field expression in another route The following test demonstrates the issue. The assertion fails since the resulting status code is 404, rather than 200. "/v2.0/thing" should route to `/{version}/thing` instead of `/v2.0`. ```py def test_string_vs_var(self): s...
diff --git a/falcon/routing/compiled.py b/falcon/routing/compiled.py index 5f8f951..9177edb 100644 --- a/falcon/routing/compiled.py +++ b/falcon/routing/compiled.py @@ -95,7 +95,7 @@ class CompiledRouter(object): else: return None, None, None - def _compile_tree(self, nodes, indent=1, level=0...
falconry__falcon-727
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.__init__", "falcon/request.py:RequestOptions.__init__" ], "edited_modules": [ "falcon/request.py:Request", "falcon/request.py:RequestOptions...
falconry/falcon
7bffb3342fea9fff5677c43e89e7e6eccfc388ed
Add an option to RequestOptions to toggle parsing of form params Add an option to RequestOptions to enable/disable parsing form params as currently implemented. It would be disabled by default (breaking change, but easy to work around). This would mitigate the problems people have experienced re the request stream bein...
diff --git a/falcon/request.py b/falcon/request.py index c7322b4..eac9b95 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -167,19 +167,13 @@ class Request(object): Note: If an HTML form is POSTed to the API using the - *application/x-www-form-urlencoded* media ty...
falconry__falcon-755
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API._get_responder" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" }, { "changes": { "added_entities": null, ...
falconry/falcon
f44fba57ef88ec9c11223c2765d49fb3573305a0
router.find() cannot return None Contrary to http://falcon.readthedocs.org/en/latest/api/routing.html it seems like custom routers `.find()` method cannot return None. AFAICT, `_get_responder()` unpacks `self._router.find(path)` without checking for a None return value and thus an exception occurs. However, returning...
diff --git a/falcon/api.py b/falcon/api.py index 5b51de0..7957ca0 100644 --- a/falcon/api.py +++ b/falcon/api.py @@ -483,7 +483,18 @@ class API(object): path = req.path method = req.method - resource, method_map, params = self._router.find(path) + + route = self._router.find(path) + + ...
falconry__falcon-762
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "falcon/request.py" } ]
falconry/falcon
3584dfd4d3653f2165cbd1e6832ea5d250a5d319
Also convert '1' and '0' as booleans from query string I see that [tests](https://github.com/falconry/falcon/blob/master/tests/test_query_params.py#L194) specifically exclude `0` and `1` from valid values to be converted to boolean by `Request.get_param_as_bool` method. I'd like to discuss this situation :) I see...
diff --git a/falcon/request.py b/falcon/request.py index 5b4634a..6516154 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -43,8 +43,8 @@ SimpleCookie = http_cookies.SimpleCookie DEFAULT_ERROR_LOG_FORMAT = (u'{0:%Y-%m-%d %H:%M:%S} [FALCON] [ERROR]' u' {1} {2}{3} => ') -TRUE_STRI...
falconry__falcon-801
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/responders.py:create_default_options" ], "edited_modules": [ "falcon/responders.py:create_default_options" ] }, "file": "falcon/responders.py" }, { "chan...
falconry/falcon
10d1b7e770045b95ff5cb0cc3b4adfcc583049e2
Default OPTIONS responder does not set Content-Length to "0" Per RFC 7231: > A server MUST generate a Content-Length field with a value of "0" if no payload body is to be sent in the response.
diff --git a/falcon/responders.py b/falcon/responders.py index b5f6186..34da807 100644 --- a/falcon/responders.py +++ b/falcon/responders.py @@ -58,5 +58,6 @@ def create_default_options(allowed_methods): def on_options(req, resp, **kwargs): resp.status = HTTP_204 resp.set_header('Allow', allowed)...
falconry__falcon-820
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/request.py:Request.__init__", "falcon/request.py:Request._parse_form_urlencoded", "falcon/request.py:RequestOptions.__init__" ], "edited_modules": [ "falcon/re...
falconry/falcon
50b1759ee7f7b54a872c01c85152f8648e350399
Add option to opt-out from comma separated value parsing I'm porting a project to Falcon and I stumbled upon an issue regarding its parsing of CSV values inside URIs. Let's say I have filtering engine that accepts queries such as this: http://great.dude/api/cars?query=added:yesterday,today+spoilers:red I obvi...
diff --git a/falcon/request.py b/falcon/request.py index 597ac80..7359991 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -284,6 +284,7 @@ class Request(object): self._params = parse_query_string( self.query_string, keep_blank_qs_values=self.options.k...
falconry__falcon-839
[ { "changes": { "added_entities": [ "falcon/request.py:Request.get_param_as_dict" ], "added_modules": null, "edited_entities": [ "falcon/request.py:Request.get_param_as_date" ], "edited_modules": [ "falcon/request.py:Request" ] }, "file": ...
falconry/falcon
2177a7a44c62f9159125049b232eb3cf668a69cd
Implement get_param_as_dict() This helper would deserialize JSON into a `dict`. For example: `thing=%7B%22name%22%3A%20%22value%22%2C%20%22another%22%3A%20%22field%22%2C%20%22some%22%3A%20%22thing%22%7D` ...would be interpreted by req.get_param_as_dict as: ```json {"name": "value", "another": "field", "some":...
diff --git a/falcon/request.py b/falcon/request.py index 53edeae..597ac80 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -11,6 +11,7 @@ # limitations under the License. from datetime import datetime +import json try: # NOTE(kgrifs): In Python 2.6 and 2.7, socket._fileobject is a @@ -1030,7 +1031,...
falconry__falcon-843
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/routing/compiled.py:CompiledRouter.add_route" ], "edited_modules": [ "falcon/routing/compiled.py:CompiledRouter" ] }, "file": "falcon/routing/compiled.py" } ]
falconry/falcon
0f64e94a5ab49b58b9efa8462fe8c0369428243d
Add test for hyphens and other non-arg-friendly chars in URI template field names Currently we only check up-front in `add_route()` for field names that start with a digit or contain whitespace. This can lead to cryptic errors later on when requests are routed to responders.
diff --git a/falcon/api.py b/falcon/api.py index 3b5539b..557de77 100644 --- a/falcon/api.py +++ b/falcon/api.py @@ -40,17 +40,17 @@ class API(object): class ExampleComponent(object): def process_request(self, req, resp): - \"""Process the request before ro...
falconry__falcon-851
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/http_error.py:HTTPError.__init__", "falcon/http_error.py:HTTPError.to_dict", "falcon/http_error.py:HTTPError.to_xml" ], "edited_modules": [ "falcon/http_error....
falconry/falcon
a9f1813bbd85ae58dd3d81aaea53a6db58032c3b
Error title should default to HTTP status When the title is set to `None`, `HTTPError` should default to simply reusing the description passed in with the code in the `status` argument, i.e.: ```py self.title = status_code[4:] ```
diff --git a/falcon/http_error.py b/falcon/http_error.py index 1e9143e..6b7cd1e 100644 --- a/falcon/http_error.py +++ b/falcon/http_error.py @@ -40,8 +40,7 @@ class HTTPError(Exception): returns ``True``, but child classes may override it in order to return ``False`` when an empty HTTP body is...
falconry__falcon-868
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "falcon/request.py:Request" ] }, "file": "falcon/request.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited...
falconry/falcon
fd5a0ba5874c68e2a61470180455c8e05c3d3d66
Make it easier to add custom attributes to slotted classes Users of the framework sometimes want to assign additional variables to the `Request`, `Response`, or other "slotted" classes. This can be allowed without hurting efficiency by adding a `'__dict__'` string to the `__slots__` declarations. From the Python [d...
diff --git a/falcon/request.py b/falcon/request.py index 30a2bd3..dd49159 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -243,6 +243,7 @@ class Request(object): 'options', '_cookies', '_cached_access_route', + '__dict__', ) # Child classes may override this diff ...
falconry__falcon-869
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/util/uri.py:_create_str_encoder" ], "edited_modules": [ "falcon/util/uri.py:_create_str_encoder" ] }, "file": "falcon/util/uri.py" } ]
falconry/falcon
e0f059378b113dcc40e7de7fb16b4f4a104a74f1
resp.location double-encodes urlencoded strings I've got a URL which contains a url-encoded URL as a parameter, and when setting resp.location, that results in it being double-encoded: resp.location = "http://something?redirect_uri=http%3A%2F%2Fsite" This should result in: Location: http://something?redirect_uri...
diff --git a/falcon/util/uri.py b/falcon/util/uri.py index fc1acd9..47726da 100644 --- a/falcon/util/uri.py +++ b/falcon/util/uri.py @@ -60,6 +60,7 @@ def _create_char_encoder(allowed_chars): def _create_str_encoder(is_value): allowed_chars = _UNRESERVED if is_value else _ALL_ALLOWED + allowed_chars_plus_per...
falconry__falcon-889
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API.__call__", "falcon/api.py:API._get_responder" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" }, { "changes": ...
falconry/falcon
18beacf2a84720d5c4de071122eeba3fe5a7f83f
Expose routing metadata Per a [discussion][1] on the mailing list, it can be useful to introspect the URI template that is associated with a given resource. One way to implement this would be to check for an attribute and fill it in as part of the `add_route` logic. For example: ```python class Thing(object): ...
diff --git a/docs/api/routing.rst b/docs/api/routing.rst index c0ce2d2..f579920 100644 --- a/docs/api/routing.rst +++ b/docs/api/routing.rst @@ -24,14 +24,15 @@ A custom router is any class that implements the following interface: """ def find(self, uri): - """Search for a route that ...
falconry__falcon-890
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/api.py:API.__call__" ], "edited_modules": [ "falcon/api.py:API" ] }, "file": "falcon/api.py" }, { "changes": { "added_entities": null, "added...
falconry/falcon
c2cb7091e28680671cb9092bf5f8a1840f6e6308
Middleware post process error handling When middleware is added to the api and we have a post_process on it, any exceptions thrown in the responder are not aggregated to an appropriate response. Instead, they are ignored and the post_process attempts to run on as though nothing happened. It does not matter whether a...
diff --git a/docs/api/middleware.rst b/docs/api/middleware.rst index f947b7f..b6e9036 100644 --- a/docs/api/middleware.rst +++ b/docs/api/middleware.rst @@ -47,7 +47,7 @@ Falcon's middleware interface is defined as follows: method as keyword arguments. """ - def process_respon...
falconry__falcon-909
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "falcon/response.py:Response" ] }, "file": "falcon/response.py" } ]
falconry/falcon
67d61029847cbf59e4053c8a424df4f9f87ad36f
Add support to Response for the Accept-Ranges header Should be fairly straightforward (see also: https://tools.ietf.org/html/rfc7233#section-2.3)
diff --git a/falcon/response.py b/falcon/response.py index 6e73436..eabced5 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -625,6 +625,24 @@ class Response(object): """, lambda v: ', '.join(v)) + accept_ranges = header_property( + 'Accept-Ranges', + """Sets the Accept-R...
falconry__falcon-920
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "falcon/request.py" } ]
falconry/falcon
0fd502cdfe11942871b823c5c6204a52ef2b8428
Add additional values on get_param_as_bool like ON, OFF Hello, How about add to get_param_as_bool values TRUE_STRINGS = [ ... , "on" ] FALSE_STRINGS = [..., "off" ] This is related to default value in checkbox on Internet Explorer. Thanx.
diff --git a/falcon/request.py b/falcon/request.py index 5557fa7..b5fbc68 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -46,8 +46,8 @@ SimpleCookie = http_cookies.SimpleCookie DEFAULT_ERROR_LOG_FORMAT = (u'{0:%Y-%m-%d %H:%M:%S} [FALCON] [ERROR]' u' {1} {2}{3} => ') -TRUE_STRI...
falconry__falcon-993
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "falcon/responders.py:create_default_options" ], "edited_modules": [ "falcon/responders.py:create_default_options" ] }, "file": "falcon/responders.py" } ]
falconry/falcon
673bb2e13613f04462a5515ba41f84dbab142970
Default OPTIONS responder does not set Content-Length to "0" Per RFC 7231: > A server MUST generate a Content-Length field with a value of "0" if no payload body is to be sent in the response.
diff --git a/falcon/responders.py b/falcon/responders.py index da093e4..f4dce2f 100644 --- a/falcon/responders.py +++ b/falcon/responders.py @@ -17,7 +17,7 @@ from falcon.errors import HTTPBadRequest from falcon.errors import HTTPMethodNotAllowed from falcon.errors import HTTPNotFound -from falcon.status_codes impor...
farridav__django-jazzmin-113
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "jazzmin/templatetags/jazzmin.py:get_side_menu" ], "edited_modules": [ "jazzmin/templatetags/jazzmin.py:get_side_menu" ] }, "file": "jazzmin/templatetags/jazzmin.py" }...
farridav/django-jazzmin
b6d354b8956ed1bf2dd4ab17bf827b73603e6df1
Side menu does not display models in some cases When a user does not have `view_user` permission, but overwrites `has_xxxx_permission` in `UserAdmin`, as follows: ```python @admin.register(User) class UserAdmin(admin.ModelAdmin): def has_add_permission(self, request): return True def has_chan...
diff --git a/jazzmin/templates/admin/base.html b/jazzmin/templates/admin/base.html index d2447bd..833281d 100644 --- a/jazzmin/templates/admin/base.html +++ b/jazzmin/templates/admin/base.html @@ -171,10 +171,15 @@ <li class="nav-header">{{ app.name }}</li> ...
fastavro__fastavro-773
[ { "changes": { "added_entities": [ "fastavro/io/parser.py:Parser._process_record" ], "added_modules": null, "edited_entities": [ "fastavro/io/parser.py:Parser.__init__", "fastavro/io/parser.py:Parser._parse" ], "edited_modules": [ "fastavro/io/...
fastavro/fastavro
7410c5d75578d7379e133b69c40d19fa3a37d94f
RecursionError: maximum recursion depth exceeded when trying to serialize payload with a schema that has recurse relationships using avro json It is not possible to `serialize` payloads with a schema that have recursive relationships using `avro-json`. When using `avro binary` it works as expected. - python version:...
diff --git a/fastavro/io/parser.py b/fastavro/io/parser.py index d518170..a918871 100644 --- a/fastavro/io/parser.py +++ b/fastavro/io/parser.py @@ -35,6 +35,7 @@ from ..schema import extract_record_type class Parser: def __init__(self, schema, named_schemas, action_function): self.schema = schema + ...
fastmonkeys__stellar-76
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stellar/operations.py:_get_pid_column" ], "edited_modules": [ "stellar/operations.py:_get_pid_column" ] }, "file": "stellar/operations.py" } ]
fastmonkeys/stellar
79f0353563c35fa6ae46a2f00886ab1dd31c4492
ValueError: invalid literal for int() with base 10: '6beta1' Related to following issue: #67 I'm using Postgres 9.6beta1 on Linux. The error happens when I try to take a snapshot.
diff --git a/stellar/operations.py b/stellar/operations.py index d1394ea..e5ba60d 100644 --- a/stellar/operations.py +++ b/stellar/operations.py @@ -1,4 +1,5 @@ import logging +import re import sqlalchemy_utils @@ -27,7 +28,7 @@ def get_engine_url(raw_conn, database): def _get_pid_column(raw_conn): # Some d...
fastscape-lem__fastscape-32
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fastscape/processes/grid.py:UniformRectilinearGrid2D.initialize" ], "edited_modules": [ "fastscape/processes/grid.py:UniformRectilinearGrid2D" ] }, "file": "fastscape/p...
fastscape-lem/fastscape
6e717d56412c47c082c35db52f29eaa77b24c91a
grid__area computed value is wrong It is currently computed as the product of total lengths along this x and y axes, which doesn't account of the "outer" area delineated by nodes (cell centers) and cell edges. It should be cell area times the total number of grid nodes.
diff --git a/fastscape/processes/grid.py b/fastscape/processes/grid.py index d5510d5..01d4567 100644 --- a/fastscape/processes/grid.py +++ b/fastscape/processes/grid.py @@ -67,8 +67,8 @@ class UniformRectilinearGrid2D: def initialize(self): self._set_length_or_spacing() self.size = np.prod(self.s...
fat-forensics__fat-forensics-41
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "fatf/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fatf/utils/data/occ...
fat-forensics/fat-forensics
3f68ecb278da7a5ae8e11db186be5ce11fdf61ef
Merging segments and setting segmentation do not update the internal segment count ## Python version - [ ] 2.x - [ ] 3.6.x - [X] 3.7.x ## Package versions - fat-forensics: 0.1.1 ## Description Merging segments and setting segmentation do not update the internal segment count: * [`fatf.utils.data.segmentat...
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1e1182..00e07c7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,23 +15,24 @@ jobs: with: path: doc/sphinx_gallery_auto key: ${{ runner.os }}-${{ hashFiles('examples/**') }} - - name: S...
fatiando__boule-146
[ { "changes": { "added_entities": [ "boule/_triaxialellipsoid.py:TriaxialEllipsoid.equatorial_flattening", "boule/_triaxialellipsoid.py:TriaxialEllipsoid.meridional_flattening", "boule/_triaxialellipsoid.py:TriaxialEllipsoid.geocentric_radius" ], "added_modules": null, ...
fatiando/boule
aa97c274a61e3c496656719a4c7d4cfc4916af87
Add geocentric surface radius calculation to TriaxialEllipsoid **Description of the desired feature:** <!-- Add as much detail as you can in your description below. If possible, include an example of how you would like to use this feature (even better if it's a code example). --> #72 added a `TriaxialEllipsoid`...
diff --git a/boule/_triaxialellipsoid.py b/boule/_triaxialellipsoid.py index 8a951ad..d3fe2d6 100644 --- a/boule/_triaxialellipsoid.py +++ b/boule/_triaxialellipsoid.py @@ -184,3 +184,114 @@ class TriaxialEllipsoid: * self.semimedium_axis * self.semiminor_axis ) + + @property + ...
fatiando__boule-37
[ { "changes": { "added_entities": [ "boule/ellipsoid.py:Ellipsoid.geocentric_radius" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "boule/ellipsoid.py:Ellipsoid" ] }, "file": "boule/ellipsoid.py" } ]
fatiando/boule
79c25ec62643f2bff0942f5222cfc81210cdebd2
Provide function that returns the radius as a function of latitude It would be very useful to be able to compute the radius of the reference ellipsoid as a function of latitude (geocentric or geodetic). The use case I am thinking of is the following. Most spherical harmonic models of planetary topography provide th...
diff --git a/boule/ellipsoid.py b/boule/ellipsoid.py index de6e4e1..441d9d6 100644 --- a/boule/ellipsoid.py +++ b/boule/ellipsoid.py @@ -146,6 +146,94 @@ class Ellipsoid: ) return result + def geocentric_radius(self, latitude, geodetic=True): + r""" + Distance from the center of the...
fatiando__boule-52
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "boule/sphere.py:Sphere.normal_gravity", "boule/sphere.py:Sphere._gravity_sphere", "boule/sphere.py:Sphere._centrifugal_force" ], "edited_modules": [ "boule/sphere.py:...
fatiando/boule
7afacbf0b70661ae74de78d9f9bcdb4ff065701a
Fix normal gravity of Sphere Is the centrifugal acceleration for the sphere we have implemented correct? Shouldn't it be projected to the normal of the sphere? This is where it gets a bit confusing. The "gravity" we want is the gradient of the combined potential. But how does that translate to the combined acceleration...
diff --git a/boule/sphere.py b/boule/sphere.py index c099e62..166c15f 100644 --- a/boule/sphere.py +++ b/boule/sphere.py @@ -12,11 +12,11 @@ from . import Ellipsoid @attr.s(frozen=True) class Sphere(Ellipsoid): """ - Reference spherical ellipsoid + Reference sphere (zero flattening ellipsoids) - Repre...
fatiando__boule-83
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "boule/ellipsoid.py:Ellipsoid.normal_gravity" ], "edited_modules": [ "boule/ellipsoid.py:Ellipsoid" ] }, "file": "boule/ellipsoid.py" }, { "changes": { "ad...
fatiando/boule
bc13c2ee71cf074202722b49f91bd9dc52f3a1fd
Check if normal gravity is computed on internal point **Description of the desired feature** The normal gravity formulas used on `boule.Ellipsoid.normal_gravity()` and `boule.Sphere.normal_gravity()` are valid only for points outside the ellipsoid. Would be nice to add a warning in case the given point falls inside...
diff --git a/boule/ellipsoid.py b/boule/ellipsoid.py index b75498b..a71cf6a 100644 --- a/boule/ellipsoid.py +++ b/boule/ellipsoid.py @@ -453,6 +453,13 @@ class Ellipsoid: The normal gravity in mGal. """ + # Warn if height is negative + if np.any(height < 0): + warn( + ...
fatiando__harmonica-172
[ { "changes": { "added_entities": [ "harmonica/forward/utils.py:distance_geodetic", "harmonica/forward/utils.py:geodetic_distance_core" ], "added_modules": [ "harmonica/forward/utils.py:distance_geodetic", "harmonica/forward/utils.py:geodetic_distance_core" ...
fatiando/harmonica
9fddc07d796c0f3d9c8d6e251c4078cb3604210d
Compute distances in geodetic coordinates **Description of the desired feature** Currently Harmonica has functions to compute distances between points defined in Cartesian coordinates or in spherical geocentric coordinates. Would be nice if we add a function to compute Euclidean distances between points whose coordi...
diff --git a/doc/references.rst b/doc/references.rst index 7ebd8eb..013ca31 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -12,4 +12,5 @@ References .. [Hofmann-WellenhofMoritz2006] Hofmann-Wellenhof, B., & Moritz, H. (2006). Physical Geodesy (2nd, corr. ed. 2006 edition ed.). Wien ; New York: Springer. ...
fatiando__harmonica-98
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "harmonica/forward/point_mass.py:point_mass_gravity" ], "edited_modules": [ "harmonica/forward/point_mass.py:point_mass_gravity" ] }, "file": "harmonica/forward/point_ma...
fatiando/harmonica
191f32cf26b6887027fa7e1f712a97639eb6b165
Raise error if masses array has not the same number of elements as points **Description of the desired feature** On the point mass forward model would be nice to check if the `masses` has the same number of elements as the points coordinates inside `points`. On the tesseroid forward model this is done, but for some ...
diff --git a/harmonica/forward/point_mass.py b/harmonica/forward/point_mass.py index 353b57d..eff34cd 100644 --- a/harmonica/forward/point_mass.py +++ b/harmonica/forward/point_mass.py @@ -178,9 +178,15 @@ def point_mass_gravity( cast = np.broadcast(*coordinates[:3]) result = np.zeros(cast.size, dtype=dtype) ...
fatiando__pooch-115
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pooch/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:crea...
fatiando/pooch
55e8845dd3bf5b6f02cbe674d92f03645dacd6d4
Use logging instead of warnings for user feedback **Description of the desired feature** Pooch currently uses warnings to give feedback to users when a file is being downloaded, an archive unpacked, etc. The logging module from the Python standard library is a better fit for this purpose. * More easily adjust how...
diff --git a/doc/api/index.rst b/doc/api/index.rst index 24e7b17..4b61738 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -26,6 +26,7 @@ Utilities make_registry file_hash check_version + get_logger Downloaders ----------- diff --git a/doc/usage.rst b/doc/usage.rst index ea387f6..2482493 ...
fatiando__pooch-138
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:Pooch.load_registry" ], "edited_modules": [ "pooch/core.py:Pooch" ] }, "file": "pooch/core.py" } ]
fatiando/pooch
fabe3e22de63487f9e3dae14c2848680704cca0f
Check for empty lines in registry files **Description of the desired feature** Pooch reads in the files and their hashes from *registry files* using `Pooch.load_registry`. Right now, it fails if there is a blank line anywhere in the file (see https://github.com/fatiando/pooch/blob/master/pooch/core.py#L444). Idea...
diff --git a/pooch/core.py b/pooch/core.py index e205b67..6fcfd3b 100644 --- a/pooch/core.py +++ b/pooch/core.py @@ -490,20 +490,21 @@ class Pooch: line = line.decode("utf-8") elements = line.strip().split() - if len(elements) > 3 or len(elements) < 2: + ...
fatiando__pooch-171
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/utils.py:make_local_storage" ], "edited_modules": [ "pooch/utils.py:make_local_storage" ] }, "file": "pooch/utils.py" } ]
fatiando/pooch
193e04678f5be30e9370fb5671f7a0cde0824d77
Crash on import when running in parallel **Description of the problem** <!-- Please be as detailed as you can when describing an issue. The more information we have, the easier it will be for us to track this down. --> We recommend a workflow of keeping a `Pooch` as a global variable by calling `pooch.create` at...
diff --git a/pooch/utils.py b/pooch/utils.py index 841ad0c..fa88114 100644 --- a/pooch/utils.py +++ b/pooch/utils.py @@ -253,12 +253,21 @@ def make_local_storage(path, env=None, version=None): try: if not os.path.exists(path): action = "create" - os.makedirs(path) + # Wh...
fatiando__pooch-173
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:retrieve", "pooch/core.py:create", "pooch/core.py:Pooch.fetch" ], "edited_modules": [ "pooch/core.py:retrieve", "pooch/core.py:create", ...
fatiando/pooch
dd56cd016268ee54473c5c511ab186c4c35923ee
Delay cache folder creation to Pooch.fetch **Description of the desired feature** <!-- Please be as detailed as you can in your description. If possible, include an example of how you would like to use this feature (even better if it's a code example). --> `pooch.create` tries to ensure that the cache folder ...
diff --git a/pooch/core.py b/pooch/core.py index 8a09770..9b3ea19 100644 --- a/pooch/core.py +++ b/pooch/core.py @@ -13,6 +13,7 @@ from .utils import ( parse_url, get_logger, make_local_storage, + cache_location, hash_matches, temporary_file, os_cache, @@ -200,9 +201,10 @@ def retrieve(...
fatiando__pooch-180
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:Pooch.load_registry" ], "edited_modules": [ "pooch/core.py:Pooch" ] }, "file": "pooch/core.py" } ]
fatiando/pooch
01341a9dc8de352112296131326ddaae6a7135f9
Comments in registry file? It could be worthwhile to support comments in registry files. For simplicity comments one could require that they need to be on a new line: ``` # this ressource c137.csv 19uheidhlkjdwhoiwuhc0uhcwljchw9ochwochw89dcgw9dcgwc # that ressource cronen.csv 1upodh2ioduhw9celdjhlfvhksgdwikdgcow...
diff --git a/AUTHORS.md b/AUTHORS.md index 9f353a8..e644199 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -4,6 +4,7 @@ The following people have made contributions to the project (in alphabetical order by last name) and are considered "The Pooch Developers": * [Anderson Banihirwe](https://github.com/andersy005) - The...
fatiando__pooch-214
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:Pooch.load_registry" ], "edited_modules": [ "pooch/core.py:Pooch" ] }, "file": "pooch/core.py" }, { "changes": { "added_entities": null, ...
fatiando/pooch
62bc211b5405e86fbdc2c3b2008c233b48c195ee
Handle hash capitalization Windows users will likely hit an issue when making a data manifest file as most guidance online shows finding the SHA256 of a file in power shell like this: ``` Get-FileHash myfile.bin | Format-List ``` Which then produces output like ``` Algorithm : SHA256 Hash : 7268E3A01D...
diff --git a/README.rst b/README.rst index b5f3e90..e0e711f 100644 --- a/README.rst +++ b/README.rst @@ -143,6 +143,7 @@ For **package developers** including sample data in their projects: Projects using Pooch -------------------- +* `seaborn-image <https://github.com/SarthakJariwala/seaborn-image>`__ * `scikit-im...
fatiando__pooch-23
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:create", "pooch/core.py:Pooch.fetch", "pooch/core.py:Pooch._download_file" ], "edited_modules": [ "pooch/core.py:create", "pooch/core.py:Pooch" ...
fatiando/pooch
ea607a2f9ff4c8e3dc03d7eb350555dd544709d4
pooch.create should test for write access to directories and have a failback for failures See realworld implementation problem with Unidata/MetPy#933 `pooch.create` can fail to write to whatever cache directory it is presented with. A failback mechanism should exist, like what does with `matplotlib` when it attempt...
diff --git a/pooch/core.py b/pooch/core.py index 7093b7c..1967913 100644 --- a/pooch/core.py +++ b/pooch/core.py @@ -2,9 +2,10 @@ Functions to download, verify, and update a sample dataset. """ import os +import sys from pathlib import Path import shutil -from tempfile import NamedTemporaryFile +import tempfile f...
fatiando__pooch-291
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:create", "pooch/core.py:Pooch.__init__", "pooch/core.py:Pooch.fetch" ], "edited_modules": [ "pooch/core.py:create", "pooch/core.py:Pooch" ...
fatiando/pooch
52240b98ffa6ab13c20d9e801443b435aee4d286
Local-only/strict mode The problem I'm trying to solve is that for a CI build, if the PR is changing a file but neglects to update the hash in the registry, the behavior is to silently (with default logging) re-download the file from the remote source. If there are no other tests depending on the datafile (😱) then the...
diff --git a/pooch/core.py b/pooch/core.py index 6e29758..b9cb127 100644 --- a/pooch/core.py +++ b/pooch/core.py @@ -263,6 +263,7 @@ def create( registry=None, urls=None, retry_if_failed=0, + allow_updates=True, ): """ Create a :class:`~pooch.Pooch` with sensible defaults to fetch data file...
fatiando__pooch-30
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:create", "pooch/core.py:Pooch.__init__", "pooch/core.py:Pooch._download_file", "pooch/core.py:Pooch.load_registry" ], "edited_modules": [ "pooch...
fatiando/pooch
1ff4910849be2db6dec33c5d3c3828f2e9addb74
Data in more than one remote source Right now, we assume that all the sample data is in the same remote source. This might not be the case for many projects if they are using publicly available data. It would be great to be able to specify the a remote URL for individual entries in the registry (which should probably n...
diff --git a/doc/usage.rst b/doc/usage.rst index 5a94d9e..841924c 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -145,6 +145,9 @@ data files based on the given version string. The remote URL will also be update Notice that there is a format specifier ``{version}`` in the URL that Pooch substitutes for you. +Vers...
fatiando__pooch-315
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/core.py:Pooch.load_registry" ], "edited_modules": [ "pooch/core.py:Pooch" ] }, "file": "pooch/core.py" } ]
fatiando/pooch
9a59ff3065eff0da319504fe912f55af5500ed25
Registry files cannot handle file names containing spaces **Description of the problem:** The way that `registry.txt` files are parsed [here](https://github.com/fatiando/pooch/blob/main/pooch/core.py#L659) does not allow filenames to contain spaces. This could be fixed by implementing advanced parsing that allows es...
diff --git a/AUTHORS.md b/AUTHORS.md index 2374903..5266106 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -10,6 +10,7 @@ order by last name) and are considered "The Pooch Developers": * [Mark Harfouche](https://github.com/hmaarrfk) - Ramona Optics Inc. - [0000-0002-4657-4603](https://orcid.org/0000-0002-4657-4603) * [D...
fatiando__pooch-316
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/processors.py:ExtractorProcessor.__call__", "pooch/processors.py:Unzip._extract_file", "pooch/processors.py:Untar._extract_file" ], "edited_modules": [ "pooch/p...
fatiando/pooch
65d74c959591b742e22e286df44707322428b865
Repeated fetching with differing Untar processors yields wrong results **Description of the problem:** The use case is to download an archive, unpack it and get access to individual files within that archive through the `members` parameter of `pooch.Untar`. When doing so, the `members` argument of the first call is ...
diff --git a/pooch/processors.py b/pooch/processors.py index a5f7f20..dbe1a91 100644 --- a/pooch/processors.py +++ b/pooch/processors.py @@ -79,17 +79,36 @@ class ExtractorProcessor: # pylint: disable=too-few-public-methods else: archive_dir = fname.rsplit(os.path.sep, maxsplit=1)[0] ...
fatiando__pooch-325
[ { "changes": { "added_entities": [ "pooch/core.py:Pooch.load_registry_from_doi" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pooch/core.py:Pooch" ] }, "file": "pooch/core.py" }, { "changes": { "added_entities": ...
fatiando/pooch
1dfa3d51afaf47e9b560a03b4062e39ccfb2892b
Populate registry via data repository API **Description of the desired feature:** When implementing #318, I realized that the DOI support in pooch currently does not allow to automatically populate the pooch's registry using the API, although the information (incl. checksums) is readily available (checked DataVerse ...
diff --git a/doc/protocols.rst b/doc/protocols.rst index e0ca431..94fe456 100644 --- a/doc/protocols.rst +++ b/doc/protocols.rst @@ -103,3 +103,24 @@ figshare dataset: ``doi:10.6084/m9.figshare.c.4362224.v1``. Attempting to download files from a figshare collection will raise an error. See `issue #274 <h...
fatiando__pooch-343
[ { "changes": { "added_entities": [ "pooch/downloaders.py:FigshareRepository._parse_version_from_doi" ], "added_modules": null, "edited_entities": [ "pooch/downloaders.py:FigshareRepository.api_response" ], "edited_modules": [ "pooch/downloaders.py:Figs...
fatiando/pooch
cd62dd3a5e51faa91b820192e2f9f3075aa4010e
Fetching from figshare DOIs always gets the latest version **Description of the problem:** <!-- Please be as detailed as you can when describing an issue. The more information we have, the easier it will be for us to track this down. --> Pooch uses the figshare API to find the download URL for a particular file ...
diff --git a/pooch/downloaders.py b/pooch/downloaders.py index 7df2e15..f391fb1 100644 --- a/pooch/downloaders.py +++ b/pooch/downloaders.py @@ -11,6 +11,7 @@ import os import sys import ftplib +import warnings import requests from .utils import parse_url @@ -855,6 +856,22 @@ class FigshareRepository(DataReposi...
fatiando__pooch-365
[ { "changes": { "added_entities": [ "pooch/processors.py:ExtractorProcessor.suffix", "pooch/processors.py:ExtractorProcessor._all_members", "pooch/processors.py:Unzip.suffix", "pooch/processors.py:Unzip._all_members", "pooch/processors.py:Untar.suffix", "pooc...
fatiando/pooch
1204d76761fff69d8572582b7894f96b8b8d84eb
If Unzip/Untar fails because of a non-existent member, calling without members won't work **Description of the problem:** Unfortunately #316 still doesn't quite fix the problem of dealing with members in archives. It creates a race condition where calling with members before calling without them will cause the `memb...
diff --git a/pooch/processors.py b/pooch/processors.py index dbe1a91..16670f9 100644 --- a/pooch/processors.py +++ b/pooch/processors.py @@ -8,6 +8,7 @@ """ Post-processing hooks """ +import abc import os import bz2 import gzip @@ -19,9 +20,9 @@ from tarfile import TarFile from .utils import get_logger -clas...
fatiando__pooch-97
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pooch/downloaders.py:HTTPDownloader.__init__", "pooch/downloaders.py:HTTPDownloader.__call__" ], "edited_modules": [ "pooch/downloaders.py:HTTPDownloader" ] }, ...
fatiando/pooch
5ecdc7290834e1a87fd0c76bb1ecc13b239f25f2
Add progress bar for downloads **Description of the desired feature** Add a progress bar for downloads using, say, [tqdm](https://github.com/tqdm/tqdm) or [python-progressbar](https://github.com/WoLpH/python-progressbar). Getting this level of feedback is nice especially if you're on a slow connection. Currently...
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index dc65525..df24826 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -83,6 +83,10 @@ jobs: Python37: python.version: '3.7' PYTHON: '3.7' + Python37-optional: + python.version: '3.7' + PYTHON: '3.7' + ...
fatiando__verde-198
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "verde/blockreduce.py:BlockReduce.__init__", "verde/blockreduce.py:BlockReduce._block_coordinates", "verde/blockreduce.py:BlockMean.__init__" ], "edited_modules": [ "v...
fatiando/verde
6cf9619e40c5f6d69bbfd5a089ec73a4e502af0b
Support n-dimensional coordinates in BlockReduce **Description of the desired feature** The `verde.BlockReduce` class implements the useful `filter` method, which takes `coordinates` and `data` and reduce the number of observation points based on a `reduction` function (like `numpy.median` for example). It returns t...
diff --git a/verde/blockreduce.py b/verde/blockreduce.py index 2ececfe..c92ddd6 100644 --- a/verde/blockreduce.py +++ b/verde/blockreduce.py @@ -76,6 +76,10 @@ class BlockReduce(BaseEstimator): # pylint: disable=too-few-public-methods If True, then the returned coordinates correspond to the center of each ...
fatiando__verde-240
[ { "changes": { "added_entities": [ "verde/base/base_classes.py:BaseGridder._get_dims" ], "added_modules": null, "edited_entities": [ "verde/base/base_classes.py:BaseGridder.grid", "verde/base/base_classes.py:BaseGridder.scatter", "verde/base/base_classes.p...
fatiando/verde
516f21bc23eefaecb7067828a3b2ae6436da278f
Generalize BaseGridder docstrings **Description of the desired feature** Class `verde.BaseGridder` is used to create a broad type of data interpolators. When subclassing it, we just need to define only certain methods for each specific type of interpolation, while many other methods are used directly from the origi...
diff --git a/verde/base/base_classes.py b/verde/base/base_classes.py index 503f9ab..bc581c8 100644 --- a/verde/base/base_classes.py +++ b/verde/base/base_classes.py @@ -83,6 +83,10 @@ class BaseGridder(BaseEstimator): """ + # The default dimension names for generated outputs + # (pd.DataFrame, xr.Dataset...
fatiando__verde-255
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "verde/base/least_squares.py:least_squares" ], "edited_modules": [ "verde/base/least_squares.py:least_squares" ] }, "file": "verde/base/least_squares.py" } ]
fatiando/verde
f768bab72da5f85fd7b8e662de9c255e672ff229
Add optional argument to avoid overwriting Jacobian in least square **Description of the desired feature** The `verde.base.least_squares` solves a linear problem with Tikhonov zero order regularization by rescaling the Jacobian matrix to unit variance columns, so the damping parameter is independent of the units of ...
diff --git a/verde/base/least_squares.py b/verde/base/least_squares.py index 81ec3b3..e2b738a 100644 --- a/verde/base/least_squares.py +++ b/verde/base/least_squares.py @@ -7,7 +7,7 @@ from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LinearRegression, Ridge -def least_squares(jacob...
fatiando__verde-264
[ { "changes": { "added_entities": [ "verde/base/base_classes.py:project_coordinates" ], "added_modules": [ "verde/base/base_classes.py:project_coordinates" ], "edited_entities": [ "verde/base/base_classes.py:BaseGridder.grid", "verde/base/base_classes...
fatiando/verde
491608ea3b4a4783cc47b79f8544facad3b6c0de
Projections getting more than two coordinates **Description of the problem** When using any subclass of `BaseGridder` to predict values through the `grid`, `scatter` or `profile` methods, we can optionally pass a `projection` in order to get, for example, a regular grid on geographic coordinates even if the gridder ...
diff --git a/verde/base/base_classes.py b/verde/base/base_classes.py index c0e944f..40e15fb 100644 --- a/verde/base/base_classes.py +++ b/verde/base/base_classes.py @@ -300,7 +300,9 @@ class BaseGridder(BaseEstimator): if projection is None: data = check_data(self.predict(coordinates)) el...
fatiando__verde-280
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "verde/coordinates.py:rolling_window" ], "edited_modules": [ "verde/coordinates.py:rolling_window" ] }, "file": "verde/coordinates.py" } ]
fatiando/verde
b807423014d603746eb10778d919bde30a831e41
Raise specific error if no spacing nor shape is passed to rolling window **Description of the desired feature** The `verde.rolling_window` function has two positional arguments: `coordinates` and `size`, but it also needs one of the `spacing` or `shape` default arguments, which are set to `None` by default. If by a...
diff --git a/verde/coordinates.py b/verde/coordinates.py index b43ebd3..941df0a 100644 --- a/verde/coordinates.py +++ b/verde/coordinates.py @@ -1015,11 +1015,21 @@ def rolling_window( [20. 20. 20. 20. 20. 20. 20. 20. 20.] """ + # Check if shape or spacing were passed + if shape is None and spacing is...
fatiando__verde-357
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "doc/gallery_src/checkerboard.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "ed...
fatiando/verde
e5675dd442459c36a97ed8690305676f777cb75f
Deprecate BaseGridder.scatter **Description of the desired feature** The `BaseGridder.scatter` enables every Verde gridder class to predict values on a random set of scattered points making use of the `verde.scatter_points()` function. This method doesn't have too many use cases, and even if we want to predict on a ...
diff --git a/doc/gallery_src/checkerboard.py b/doc/gallery_src/checkerboard.py index c17a832..277e0ac 100644 --- a/doc/gallery_src/checkerboard.py +++ b/doc/gallery_src/checkerboard.py @@ -9,8 +9,8 @@ Checkerboard function ===================== The :class:`verde.synthetic.CheckerBoard` class generates synthetic dat...
fatiando__verde-406
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "verde/__init__.py:test" ], "edited_modules": [ "verde/__init__.py:test" ] }, "file": "verde/__init__.py" }, { "changes": { "added_entities": null, "...
fatiando/verde
0a4478ad8bfaa5ca80753b09b37417cc1935624e
Block reduction error when block size > coordinate variation **Description of the problem:** <!-- Please be as detailed as you can when describing an issue. The more information we have, the easier it will be for us to track this down. --> I'm attempting to block-reduce some data along a single flight line. The fl...
diff --git a/verde/__init__.py b/verde/__init__.py index 661d38a..ddb1903 100644 --- a/verde/__init__.py +++ b/verde/__init__.py @@ -93,6 +93,7 @@ def test(doctest=True, verbose=True, coverage=False, figures=True): "will be removed in v2.0.0. " f"Use 'pytest --pyargs {package}' to run the tests.", ...
faucetsdn__beka-19
[ { "changes": { "added_entities": [ "beka/beka.py:Beka.listening_on" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "beka/beka.py:Beka" ] }, "file": "beka/beka.py" } ]
faucetsdn/beka
a9e33b75342afa0a8e96d8b3475df8b6a5611af3
Comparing Bekas It'd be great to be able to compare Bekas, using (for example): self.local_address = local_address self.bgp_port = bgp_port self.local_as = local_as self.router_id = router_id That way we can decide whether we need to start a new Beka or not by comparing it to an...
diff --git a/beka/beka.py b/beka/beka.py index 8985684..2907ceb 100644 --- a/beka/beka.py +++ b/beka/beka.py @@ -97,3 +97,6 @@ class Beka(object): self.stream_server.stop() for peering in self.peerings: peering.shutdown() + + def listening_on(self, address, port): + return s...
faucetsdn__chewie-107
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "chewie/eap_state_machine.py:FullEAPStateMachine.initialize_state" ], "edited_modules": [ "chewie/eap_state_machine.py:FullEAPStateMachine" ] }, "file": "chewie/eap_stat...
faucetsdn/chewie
652649dbd62a5bd4c1b9285c198c6b992c374a0f
RADIUS Attribute 'State' should be cleared on new authentications Basically, if the server sends the State attribute we need to return it with the next Access-Request unmodified, unless it is a new authentication attempt. https://tools.ietf.org/html/rfc2865#section-5.24 https://tools.ietf.org/html/rfc5080#section...
diff --git a/chewie/eap_state_machine.py b/chewie/eap_state_machine.py index a518209..a9fbea4 100644 --- a/chewie/eap_state_machine.py +++ b/chewie/eap_state_machine.py @@ -525,6 +525,8 @@ class FullEAPStateMachine: self.eap_logoff = False + self.radius_state_attribute = None + @log_method ...
faucetsdn__chewie-109
[ { "changes": { "added_entities": [ "chewie/radius.py:RadiusPacket.validate_response_authenticator", "chewie/radius.py:RadiusPacket.validate_message_authenticator" ], "added_modules": null, "edited_entities": [ "chewie/radius.py:Radius.parse", "chewie/radiu...
faucetsdn/chewie
652649dbd62a5bd4c1b9285c198c6b992c374a0f
If Message-Authenticator doesn't exist we should still check the request_authenticator https://github.com/faucetsdn/chewie/blob/master/chewie/radius.py#L151 correct logic should be: ``` if message_authenticator: validate message_authenticator if request_authenticator: validate request_authenticator `...
diff --git a/chewie/radius.py b/chewie/radius.py index 31370e5..bded60e 100644 --- a/chewie/radius.py +++ b/chewie/radius.py @@ -52,25 +52,29 @@ class Radius: MessageParseError: if packed_message cannot be parsed """ try: - code, packet_id, length, response_authenticator = stru...