instance_id stringlengths 10 57 | patch stringlengths 261 37.7k | repo stringlengths 7 53 | base_commit stringlengths 40 40 | hints_text stringclasses 301
values | test_patch stringlengths 212 2.22M | problem_statement stringlengths 23 37.7k | version stringclasses 1
value | environment_setup_commit stringlengths 40 40 | FAIL_TO_PASS listlengths 1 4.94k | PASS_TO_PASS listlengths 0 7.82k | meta dict | created_at stringlengths 25 25 | license stringclasses 8
values | __index_level_0__ int64 0 6.41k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Open-EO__openeo-python-client-231 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 831591f..d475e07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `DataCube.dimension_labels()` (EP-4008)
- Add `Connection.load_result()` (EP-4008)
- Add proper support... | Open-EO/openeo-python-client | e0a58e85978ed06cdc0647f68a98c35bcc92fdc9 | diff --git a/tests/rest/datacube/test_processbuilder.py b/tests/rest/datacube/test_processbuilder.py
index 9528a20..405aa97 100644
--- a/tests/rest/datacube/test_processbuilder.py
+++ b/tests/rest/datacube/test_processbuilder.py
@@ -275,10 +275,10 @@ def test_apply_dimension_bandmath_lambda(con100):
def test_apply... | ProcessBuilder __getitem__ support
from https://github.com/openEOPlatform/documentation/issues/10
```python
def fit_function(x:ProcessBuilder, parameters):
pi = math.pi
a0 = array_element(parameters, 0)
a1 = array_element(parameters, 1)
a2 = array_element(parameters, 2)
return a0 + a1*cos(2... | 0.0 | e0a58e85978ed06cdc0647f68a98c35bcc92fdc9 | [
"tests/rest/datacube/test_processbuilder.py::test_getitem_array_element_index",
"tests/rest/datacube/test_processbuilder.py::test_getitem_array_element_label"
] | [
"tests/rest/datacube/test_processbuilder.py::test_apply_callback_absolute_str",
"tests/rest/datacube/test_processbuilder.py::test_apply_callback_absolute_pgnode",
"tests/rest/datacube/test_processbuilder.py::test_apply_callback_absolute_lambda_method",
"tests/rest/datacube/test_processbuilder.py::test_apply_c... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-09-06 16:04:05+00:00 | apache-2.0 | 406 | |
OpenFreeEnergy__openfe-26 | diff --git a/.gitignore b/.gitignore
index 525811b7..e13f9d46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# custom ignores
+.xxrun
+
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
diff --git a/openfe/setup/scorer.py b/openfe/setup/scorer.py
index de12be0d..f4e3d082 100644
--- a/openfe/s... | OpenFreeEnergy/openfe | 3ab18e7b98d09980b4c8c19320762bee9abcb244 | diff --git a/openfe/tests/setup/__init__.py b/openfe/tests/setup/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/openfe/tests/setup/conftest.py b/openfe/tests/setup/conftest.py
new file mode 100644
index 00000000..d74d1b89
--- /dev/null
+++ b/openfe/tests/setup/conftest.py
@@ -0,0 +1,8 @@
+import... | Implement Scorer Base Implementation
```python
s = Scorer(stuff)
m = Mapper.suggest_mapping(m1, m2)
f : float = s.score(m)
``` | 0.0 | 3ab18e7b98d09980b4c8c19320762bee9abcb244 | [
"openfe/tests/setup/test_scorer.py::TestScorer::test_abstract_error",
"openfe/tests/setup/test_scorer.py::TestScorer::test_concrete_scorer",
"openfe/tests/setup/test_scorer.py::TestScorer::test_concrete_annotator"
] | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2022-01-26 16:13:56+00:00 | mit | 407 | |
OpenGeoVis__omfvista-13 | diff --git a/omfvista/lineset.py b/omfvista/lineset.py
index 5461ea6..2b978dc 100644
--- a/omfvista/lineset.py
+++ b/omfvista/lineset.py
@@ -7,15 +7,13 @@ __all__ = [
__displayname__ = 'Line Set'
-import vtk
-from vtk.util import numpy_support as nps
-import pyvista
-
import numpy as np
+import pyvista
from om... | OpenGeoVis/omfvista | 1fdbaa786e7dd632675b34c348925add9b39c521 | diff --git a/tests/element_test.py b/tests/element_test.py
index 99fcc74..4cf5fdc 100644
--- a/tests/element_test.py
+++ b/tests/element_test.py
@@ -222,7 +222,7 @@ class TestElements(unittest.TestCase):
def test_wrap_surface(self):
surf = omfvista.wrap(SURFACE)
- self.assertTrue(isinstance(surf,... | omf Project origin value is ignored.
Great library.
According to the [omf docs](https://omf.readthedocs.io/en/latest/content/projects.html) all geometry should be offset by the Project origin. omfvista does not appear to do this.
| 0.0 | 1fdbaa786e7dd632675b34c348925add9b39c521 | [
"tests/element_test.py::TestElements::test_wrap_pointset",
"tests/element_test.py::TestElements::test_wrap_surface",
"tests/element_test.py::TestElements::test_wrap_volume"
] | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-10-03 05:12:40+00:00 | bsd-3-clause | 408 | |
OpenMDAO__dymos-1018 | diff --git a/dymos/utils/introspection.py b/dymos/utils/introspection.py
index 73497d24..775fa29b 100644
--- a/dymos/utils/introspection.py
+++ b/dymos/utils/introspection.py
@@ -227,7 +227,10 @@ def _configure_constraint_introspection(phase):
con['shape'] = control_shape
con['units'... | OpenMDAO/dymos | 37bb5dd5e11467af36d0364d771ed7be4dbc18cc | diff --git a/dymos/examples/brachistochrone/test/test_brachistochrone_birkhoff_constraints.py b/dymos/examples/brachistochrone/test/test_brachistochrone_birkhoff_constraints.py
new file mode 100644
index 00000000..f47c5cfe
--- /dev/null
+++ b/dymos/examples/brachistochrone/test/test_brachistochrone_birkhoff_constraints... | Overlapping constraints in Birkhoff transcription
### Description
Adding a boundary constraint and a path constraint for variables of any type other than state causes the error.
The lines of code when added to the brachistochrone problem throw the error
`RuntimeError: <model> <class Group>: Indices for aliases [... | 0.0 | 37bb5dd5e11467af36d0364d771ed7be4dbc18cc | [
"dymos/examples/brachistochrone/test/test_brachistochrone_birkhoff_constraints.py::TestBrachistochroneBirkhoffConstraints::test_brachistochrone_control_no_prefix",
"dymos/examples/brachistochrone/test/test_brachistochrone_birkhoff_constraints.py::TestBrachistochroneBirkhoffConstraints::test_brachistochrone_contro... | [] | {
"failed_lite_validators": [
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-11-15 17:47:13+00:00 | apache-2.0 | 409 | |
OpenMDAO__dymos-1021 | diff --git a/dymos/transcriptions/pseudospectral/birkhoff.py b/dymos/transcriptions/pseudospectral/birkhoff.py
index 08d3aabb..df914ead 100644
--- a/dymos/transcriptions/pseudospectral/birkhoff.py
+++ b/dymos/transcriptions/pseudospectral/birkhoff.py
@@ -211,34 +211,24 @@ class Birkhoff(TranscriptionBase):
"""... | OpenMDAO/dymos | bc67ea54d56a77a9ba0259ed85aa7f4c14d5c320 | diff --git a/dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py b/dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py
index d5a87e48..e3047f54 100644
--- a/dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py
+++ b/dymos/exa... | Polynomial controls don't work with Birkhoff transcription
### Description
Attempting to use a polynomial control causes an error during configure. This occurs only in the Birkhoff transcription and only with polynomial controls
`AttributeError: 'Phase' object has no attribute 'ode_all'`
### Example
https://github.... | 0.0 | bc67ea54d56a77a9ba0259ed85aa7f4c14d5c320 | [
"dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py::TestBrachistochronePolynomialControl::test_brachistochrone_polynomial_control_birkhoff",
"dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py::TestBrachistochronePolynomialControlBoundaryConstrain... | [
"dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py::TestBrachistochronePolynomialControl::test_brachistochrone_polynomial_control_gauss_lobatto",
"dymos/examples/brachistochrone/test/test_doc_brachistochrone_polynomial_controls.py::TestBrachistochronePolynomialControl::test_brach... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2023-11-16 16:52:49+00:00 | apache-2.0 | 410 | |
Ouranosinc__xclim-336 | diff --git a/HISTORY.rst b/HISTORY.rst
index 66f7cba4..556b131c 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -5,6 +5,7 @@ History
0.13.x (2020-01-10)
-------------------
* Reverted #311, removing the `_rolling` util function. Added optimal keywords to `rolling()` calls.
+* Fixed `ensembles.create_ensemble` errors f... | Ouranosinc/xclim | 26d99831e33e989da59b0a7e2471e66231111784 | diff --git a/tests/test_ensembles.py b/tests/test_ensembles.py
index 55d11020..3bd9d27f 100644
--- a/tests/test_ensembles.py
+++ b/tests/test_ensembles.py
@@ -58,6 +58,7 @@ class TestEnsembleStats:
def test_create_ensemble(self):
ens = ensembles.create_ensemble(self.nc_files_simple)
assert len(en... | build failing against xarray master
ensembles creation tests seems to be failing with the travis build w/ xarray@master
We might want to take a minute to try to see why and try to get ahead of this... | 0.0 | 26d99831e33e989da59b0a7e2471e66231111784 | [
"tests/test_ensembles.py::TestEnsembleStats::test_calc_mean_std_min_max",
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc[True]",
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_nans",
"tests/test_ensembles.py::TestEnsembleStats::test_create_ensemble",
"tests/test_ensembles.py::TestE... | [
"tests/test_ensembles.py::TestEnsembleStats::test_no_time",
"tests/test_ensembles.py::TestEnsembleStats::test_checktimes"
] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2020-01-07 17:41:34+00:00 | apache-2.0 | 411 | |
Ouranosinc__xclim-339 | diff --git a/HISTORY.rst b/HISTORY.rst
index 2da52984..50dd6f92 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -10,6 +10,7 @@ History
* Fixed `ensembles.create_ensemble` errors for builds against xarray master branch.
* Reformatted code to make better use of Python3.6 conventions (f-strings and object signatures).
* ... | Ouranosinc/xclim | 0790e8c7cc4b5d933a034f1a6da1cdc1072c2e01 | diff --git a/tests/test_ensembles.py b/tests/test_ensembles.py
index 60f94f58..34aa4aa7 100644
--- a/tests/test_ensembles.py
+++ b/tests/test_ensembles.py
@@ -137,10 +137,13 @@ class TestEnsembleStats:
out1 = ensembles.ensemble_percentiles(ens, values=(25, 75))
assert np.all(out1["tg_mean_p75"] > out1... | Optimize/improve xclim ensemble stats utilities
There are currently functional versions of the following utilities but they could use improvement / polishing:
```python
xclim.utils.utils.create_ensemble()
xclim.utils.ensemble_percentiles()
xclim.utils.calc_percentiles_simple()
xclim.utils.calc_percentiles_blocks(... | 0.0 | 0790e8c7cc4b5d933a034f1a6da1cdc1072c2e01 | [
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[False]",
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[True]",
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc_dask[None]"
] | [
"tests/test_ensembles.py::TestEnsembleStats::test_checktimes",
"tests/test_ensembles.py::TestEnsembleStats::test_create_ensemble",
"tests/test_ensembles.py::TestEnsembleStats::test_no_time",
"tests/test_ensembles.py::TestEnsembleStats::test_calc_perc[False]",
"tests/test_ensembles.py::TestEnsembleStats::tes... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-01-08 23:14:03+00:00 | apache-2.0 | 412 | |
OxfordIonTrapGroup__oitg-38 | diff --git a/oitg/threshold.py b/oitg/threshold.py
index b74c080..7d4bf82 100644
--- a/oitg/threshold.py
+++ b/oitg/threshold.py
@@ -1,114 +1,156 @@
import numpy as np
-from scipy.optimize import least_squares
+from scipy.optimize import minimize
from scipy.stats import poisson
+from scipy.special import gammainc
... | OxfordIonTrapGroup/oitg | 768b2d5be8cf189b192d025877518a227171177f | diff --git a/test/test_threshold.py b/test/test_threshold.py
index 8d9f1dd..af7eb79 100755
--- a/test/test_threshold.py
+++ b/test/test_threshold.py
@@ -3,36 +3,32 @@ from oitg.threshold import *
class ThresholdTest(unittest.TestCase):
- def test_threshold(self):
- bright = 4e4
- dark = 2e4
- ... | Account for spontaneous shelving and deshelving in threshold.py
As per title.
Currently [threshold.py](https://github.com/OxfordIonTrapGroup/oitg/blob/master/oitg/threshold.py) assumes poissonian statistics. This is innacurate for longer readout durations. | 0.0 | 768b2d5be8cf189b192d025877518a227171177f | [
"test/test_threshold.py::ThresholdTest::test_optimise_readout",
"test/test_threshold.py::ThresholdTest::test_optimise_t_bin"
] | [] | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-05-15 17:31:38+00:00 | mit | 413 | |
PEtab-dev__libpetab-python-136 | diff --git a/petab/lint.py b/petab/lint.py
index ba9ad8f..e13f540 100644
--- a/petab/lint.py
+++ b/petab/lint.py
@@ -292,7 +292,12 @@ def check_observable_df(observable_df: pd.DataFrame) -> None:
noise = getattr(row, NOISE_FORMULA)
try:
- sp.sympify(noise)
+ sympified_noise = s... | PEtab-dev/libpetab-python | 902f34967ecc60230339006dc21e233578075dc6 | diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml
index 1c92a34..2aee552 100644
--- a/.github/workflows/ci_tests.yml
+++ b/.github/workflows/ci_tests.yml
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
- python-vers... | Reduce tests to min+max python?
takes quite some time to start+run all ... | 0.0 | 902f34967ecc60230339006dc21e233578075dc6 | [
"tests/test_lint.py::test_check_observable_df"
] | [
"tests/test_lint.py::test_assert_measured_observables_present_in_model",
"tests/test_lint.py::test_condition_table_is_parameter_free",
"tests/test_lint.py::test_measurement_table_has_timepoint_specific_mappings",
"tests/test_lint.py::test_observable_table_has_nontrivial_noise_formula",
"tests/test_lint.py::... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2022-04-28 14:13:04+00:00 | mit | 414 | |
PEtab-dev__libpetab-python-152 | diff --git a/petab/problem.py b/petab/problem.py
index 517b91c..f523803 100644
--- a/petab/problem.py
+++ b/petab/problem.py
@@ -87,8 +87,9 @@ class Problem:
@staticmethod
def from_files(
- sbml_file: Union[str, Path, None] = None,
- condition_file: Union[str, Path, None] = None,
+ ... | PEtab-dev/libpetab-python | 7a0b77ef6d968a4600497763df0ca791caa24768 | diff --git a/tests/test_petab.py b/tests/test_petab.py
index 62e74e8..0e0c4e0 100644
--- a/tests/test_petab.py
+++ b/tests/test_petab.py
@@ -1,8 +1,10 @@
import copy
import pickle
import tempfile
+from io import StringIO
from math import nan
from pathlib import Path
+from tempfile import TemporaryDirectory
impo... | Add support for multiple condition files per petab.Problem
Allowed in YAML file, but not implemented in library. | 0.0 | 7a0b77ef6d968a4600497763df0ca791caa24768 | [
"tests/test_petab.py::test_problem_from_yaml_v1_empty",
"tests/test_petab.py::test_problem_from_yaml_v1_multiple_files"
] | [
"tests/test_petab.py::test_split_parameter_replacement_list",
"tests/test_petab.py::test_get_measurement_parameter_ids",
"tests/test_petab.py::test_serialization",
"tests/test_petab.py::test_get_priors_from_df",
"tests/test_petab.py::test_startpoint_sampling",
"tests/test_petab.py::test_create_parameter_d... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-05-24 20:18:04+00:00 | mit | 415 | |
PEtab-dev__libpetab-python-156 | diff --git a/petab/parameters.py b/petab/parameters.py
index f794530..8dbf441 100644
--- a/petab/parameters.py
+++ b/petab/parameters.py
@@ -55,18 +55,8 @@ def get_parameter_df(
return None
parameter_df = pd.concat(dfs)
- # Remove identical parameter definitions
- parameter_df.drop... | PEtab-dev/libpetab-python | 5a87f8370aa5be56ed39b986801e7e36b18d94cb | diff --git a/tests/test_parameters.py b/tests/test_parameters.py
index 1727a73..5527133 100644
--- a/tests/test_parameters.py
+++ b/tests/test_parameters.py
@@ -81,11 +81,11 @@ def test_get_parameter_df():
PARAMETER_ID: ['id3'],
PARAMETER_NAME: ['name3']
})
- parameter_dfs['sub... | Parameters dropped when using subset parameter files
On branch `develop`: When supplying multiple parameter files to `parameters.get_parameter_df`, parameters will be dropped if they only differ from other parameters by their `parameterId`.
___
Example using parameter files from [demo_parameters.zip](https://github.c... | 0.0 | 5a87f8370aa5be56ed39b986801e7e36b18d94cb | [
"tests/test_parameters.py::test_get_parameter_df"
] | [
"tests/test_parameters.py::test_get_optimization_parameter_scaling",
"tests/test_parameters.py::test_get_optimization_parameters",
"tests/test_parameters.py::test_write_parameter_df",
"tests/test_parameters.py::test_normalize_parameter_df",
"tests/test_parameters.py::test_scale_unscale"
] | {
"failed_lite_validators": [
"has_git_commit_hash"
],
"has_test_patch": true,
"is_lite": false
} | 2022-06-14 08:27:45+00:00 | mit | 416 | |
PEtab-dev__libpetab-python-184 | diff --git a/petab/C.py b/petab/C.py
index 09553ce..08c27d9 100644
--- a/petab/C.py
+++ b/petab/C.py
@@ -234,6 +234,12 @@ SCATTER_PLOT = 'ScatterPlot'
#: Supported plot types
PLOT_TYPES_SIMULATION = [LINE_PLOT, BAR_PLOT, SCATTER_PLOT]
+#: Supported xScales
+X_SCALES = [LIN, LOG, LOG10]
+
+#: Supported yScales
+Y_SC... | PEtab-dev/libpetab-python | a0817db21c884217aee5771790c2b23eafc89549 | diff --git a/tests/test_visualization.py b/tests/test_visualization.py
index fc33676..2d7d7f7 100644
--- a/tests/test_visualization.py
+++ b/tests/test_visualization.py
@@ -6,9 +6,11 @@ from tempfile import TemporaryDirectory
import matplotlib.pyplot as plt
import pytest
+import petab
from petab.C import *
from p... | Implement validation of PEtab visualization files
- [x] Implement consistency checks
- [x] plotId
- [x] [plotName]
- [x] plotTypeSimulation
- [x] plotTypeData
- [x] datasetId
- [x] [xValues]
- [x] [xOffset]
- [x] [xLabel]
- [x] [xScale]
- [x] [yValues]
- [x] [yOffset]
- [x] [yLabel]... | 0.0 | a0817db21c884217aee5771790c2b23eafc89549 | [
"tests/test_visualization.py::test_visualization_with_vis_and_sim",
"tests/test_visualization.py::test_visualization_replicates",
"tests/test_visualization.py::test_visualization_scatterplot",
"tests/test_visualization.py::test_visualization_small_visu_file_w_datasetid",
"tests/test_visualization.py::test_v... | [] | {
"failed_lite_validators": [
"has_issue_reference",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-12-06 11:21:53+00:00 | mit | 417 | |
PEtab-dev__libpetab-python-235 | diff --git a/petab/core.py b/petab/core.py
index 05deb16..0e7b7da 100644
--- a/petab/core.py
+++ b/petab/core.py
@@ -71,7 +71,7 @@ def write_simulation_df(df: pd.DataFrame, filename: Union[str, Path]) -> None:
def get_visualization_df(
- visualization_file: Union[str, Path, pd.DataFrame, None]
+ visualiz... | PEtab-dev/libpetab-python | 4e6a0189eedf7078de8a674c200819cbdc26c83b | diff --git a/tests/test_petab.py b/tests/test_petab.py
index 89053fb..b836880 100644
--- a/tests/test_petab.py
+++ b/tests/test_petab.py
@@ -353,36 +353,32 @@ def test_flatten_timepoint_specific_output_overrides():
OBSERVABLE_FORMULA: [
"observableParameter1_obs1 + observableParameter2_obs... | `flatten_timepoint_specific_output_overrides` does not support observableParameter overrides as placeholders in noise formulae
`flatten_timepoint_specific_output_overrides` does not support `observableParameter` placeholders in noise formulae.
Related to https://github.com/PEtab-dev/libpetab-python/pull/231 | 0.0 | 4e6a0189eedf7078de8a674c200819cbdc26c83b | [
"tests/test_petab.py::test_flatten_timepoint_specific_output_overrides"
] | [
"tests/test_petab.py::test_split_parameter_replacement_list",
"tests/test_petab.py::test_get_measurement_parameter_ids",
"tests/test_petab.py::test_serialization",
"tests/test_petab.py::test_get_priors_from_df",
"tests/test_petab.py::test_startpoint_sampling",
"tests/test_petab.py::test_startpoint_samplin... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-12-14 14:41:38+00:00 | mit | 418 | |
PEtab-dev__libpetab-python-92 | diff --git a/petab/lint.py b/petab/lint.py
index fe353ac..ba9ad8f 100644
--- a/petab/lint.py
+++ b/petab/lint.py
@@ -108,6 +108,10 @@ def check_condition_df(
check_ids(df.index.values, kind='condition')
+ if not df.index.is_unique:
+ raise AssertionError("Non-unique condition IDs: "
+ ... | PEtab-dev/libpetab-python | f6fd4896f557497a16afe3773467eb06a2614a79 | diff --git a/tests/test_lint.py b/tests/test_lint.py
index 2756226..eccbed2 100644
--- a/tests/test_lint.py
+++ b/tests/test_lint.py
@@ -494,3 +494,36 @@ def test_check_observable_df():
bad_observable_df.index = ['obs1', 'obs1']
with pytest.raises(AssertionError):
lint.check_observable_df(bad_observa... | no lint error for non-unique condition ids
`petab.lint.check_condition_df` does not check whether index entries are unique, but this is required according to documentation. | 0.0 | f6fd4896f557497a16afe3773467eb06a2614a79 | [
"tests/test_lint.py::test_condition_ids_are_unique"
] | [
"tests/test_lint.py::test_assert_measured_observables_present_in_model",
"tests/test_lint.py::test_condition_table_is_parameter_free",
"tests/test_lint.py::test_measurement_table_has_timepoint_specific_mappings",
"tests/test_lint.py::test_observable_table_has_nontrivial_noise_formula",
"tests/test_lint.py::... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-29 13:42:30+00:00 | mit | 419 | |
PGijsbers__gama-64 | diff --git a/docs/source/releases.rst b/docs/source/releases.rst
index abed928..b311f77 100644
--- a/docs/source/releases.rst
+++ b/docs/source/releases.rst
@@ -1,6 +1,21 @@
Release Notes
=============
+Version 19.11.0
+---------------
+Features:
+ - `gama.__version__` can now be used to retrieve gama's version.
+ ... | PGijsbers/gama | 62317c2f574efee8b3a5b83272bb40219a0bf0ee | diff --git a/tests/unit/test_preprocessing.py b/tests/unit/test_preprocessing.py
index 31c6c7c..812c579 100644
--- a/tests/unit/test_preprocessing.py
+++ b/tests/unit/test_preprocessing.py
@@ -14,7 +14,8 @@ def test_format_x_y():
X_np, y_np = load_digits(return_X_y=True)
X_df, y_df = pd.DataFrame(X_np), pd.Da... | Centralize version, make it attribute of module
There are currently two issues with keeping track of gama's version:
- it is located in two files (gama\gama.py and setup.py)
- it is not directly available with `import gama; gama.__version__`
todo: create a `__version__` file and refer to it from `gama\__init__.p... | 0.0 | 62317c2f574efee8b3a5b83272bb40219a0bf0ee | [
"tests/unit/test_preprocessing.py::test_format_x_y"
] | [] | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2019-11-07 14:03:35+00:00 | apache-2.0 | 420 | |
PMEAL__OpenPNM-1794 | diff --git a/DEV_GUIDE.md b/DEV_GUIDE.md
index d61dd84b1..586f567e6 100644
--- a/DEV_GUIDE.md
+++ b/DEV_GUIDE.md
@@ -54,18 +54,19 @@ For our changelog generator to work well, the only thing you need to remember is
When merging your branch onto `dev`, as the merge message, describe what your pull request does concise... | PMEAL/OpenPNM | 86411dbd0af894ac569ab2cb09d2d33441cd8716 | diff --git a/tests/unit/algorithms/AdvectionDiffusionTest.py b/tests/unit/algorithms/AdvectionDiffusionTest.py
index e4dc21e0c..46404808c 100644
--- a/tests/unit/algorithms/AdvectionDiffusionTest.py
+++ b/tests/unit/algorithms/AdvectionDiffusionTest.py
@@ -2,6 +2,7 @@ import numpy as np
import openpnm as op
from nump... | Outflow BC and other BC types must be prevented to coexist in a given set of pores | 0.0 | 86411dbd0af894ac569ab2cb09d2d33441cd8716 | [
"tests/unit/algorithms/AdvectionDiffusionTest.py::AdvectionDiffusionTest::test_setup",
"tests/unit/algorithms/AdvectionDiffusionTest.py::AdvectionDiffusionTest::test_conductance_gets_updated_when_pressure_changes",
"tests/unit/algorithms/AdvectionDiffusionTest.py::AdvectionDiffusionTest::test_powerlaw_advection... | [
"tests/unit/algorithms/GenericTransportTest.py::GenericTransportTest::test_results",
"tests/unit/algorithms/GenericTransportTest.py::GenericTransportTest::test_set_solver",
"tests/unit/algorithms/GenericTransportTest.py::GenericTransportTest::test_remove_boundary_conditions",
"tests/unit/algorithms/GenericTra... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-28 22:26:57+00:00 | mit | 421 | |
PMEAL__OpenPNM-1844 | diff --git a/openpnm/algorithms/ReactiveTransport.py b/openpnm/algorithms/ReactiveTransport.py
index 15ea1402a..ba99b6399 100644
--- a/openpnm/algorithms/ReactiveTransport.py
+++ b/openpnm/algorithms/ReactiveTransport.py
@@ -66,6 +66,7 @@ class ReactiveTransportSettings(GenericSettings):
**The following parameters... | PMEAL/OpenPNM | 11530fa4ce00a80700429710bad3b26bc540d600 | diff --git a/tests/unit/network/CubicTest.py b/tests/unit/network/CubicTest.py
index 5aaa271f7..889048aed 100644
--- a/tests/unit/network/CubicTest.py
+++ b/tests/unit/network/CubicTest.py
@@ -10,6 +10,16 @@ class CubicTest:
def teardown_class(self):
pass
+ def test_spacing_could_not_be_found(self):
... | network.spacing breaks for 1D networks with only two pores
```python
import openpnm as op
net = op.network.Cubic([2, 1, 1], spacing=1)
print(net.spacing)
``` | 0.0 | 11530fa4ce00a80700429710bad3b26bc540d600 | [
"tests/unit/network/CubicTest.py::CubicTest::test_spacing_1D"
] | [
"tests/unit/network/CubicTest.py::CubicTest::test_spacing_could_not_be_found",
"tests/unit/network/CubicTest.py::CubicTest::test_spacing_2D",
"tests/unit/network/CubicTest.py::CubicTest::test_spacing_3D",
"tests/unit/network/CubicTest.py::CubicTest::test_spacing_2D_uneven",
"tests/unit/network/CubicTest.py:... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-02-11 15:54:31+00:00 | mit | 422 | |
PMEAL__OpenPNM-2160 | diff --git a/openpnm/models/geometry/misc.py b/openpnm/models/geometry/misc.py
index fa4df4578..f300a85bb 100644
--- a/openpnm/models/geometry/misc.py
+++ b/openpnm/models/geometry/misc.py
@@ -1,6 +1,5 @@
r"""
-Helper methods for openpnm.geometry module.
-
+Helper methods for openpnm.models.geometry module
"""
di... | PMEAL/OpenPNM | ddefbc73da05c936dcea0373cb89cb92121a35b0 | diff --git a/tests/unit/models/misc/MiscTest.py b/tests/unit/models/misc/MiscTest.py
index 884e76b3e..b93a60e77 100644
--- a/tests/unit/models/misc/MiscTest.py
+++ b/tests/unit/models/misc/MiscTest.py
@@ -288,6 +288,17 @@ class MiscTest:
model=mods.basic_math.invert)
assert net['pore.ent... | Add a function for fitting PSD to experimental histograms
Following the discussion had in #2112, it might be a good idea to offer a function like the one I proposed.
Not quite sure how to implement this though...it doesn't quite fit with the pore-scale modeling framework. | 0.0 | ddefbc73da05c936dcea0373cb89cb92121a35b0 | [
"tests/unit/models/misc/MiscTest.py::MiscTest::test_match_histograms"
] | [
"tests/unit/models/misc/MiscTest.py::MiscTest::test_constant",
"tests/unit/models/misc/MiscTest.py::MiscTest::test_product",
"tests/unit/models/misc/MiscTest.py::MiscTest::test_generic_function",
"tests/unit/models/misc/MiscTest.py::MiscTest::test_scaled",
"tests/unit/models/misc/MiscTest.py::MiscTest::test... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-13 16:52:47+00:00 | mit | 423 | |
PMEAL__OpenPNM-2162 | diff --git a/openpnm/core/Base.py b/openpnm/core/Base.py
index d1e2840ad..7b66f3993 100644
--- a/openpnm/core/Base.py
+++ b/openpnm/core/Base.py
@@ -251,6 +251,14 @@ class Base(dict):
raise KeyError(key)
return vals
+ def __delitem__(self, key):
+ try:
+ super().__delitem__(... | PMEAL/OpenPNM | aa445a2acec85ebf1e8f358e641fa5e2c4e141b7 | diff --git a/tests/unit/core/BaseTest.py b/tests/unit/core/BaseTest.py
index f82d99875..18ed0ae18 100644
--- a/tests/unit/core/BaseTest.py
+++ b/tests/unit/core/BaseTest.py
@@ -930,6 +930,19 @@ class BaseTest:
with pytest.raises(KeyError):
pn.get_conduit_data('blah')
+ def test_del_nested_dic... | Add the ability to delete hirarchical dictionary keys in one go
# Intended
```python
del geo['throat.conduit_lengths'] # this currently doesn't work
```
# Current
```python
del geo['throat.conduit_lengths.pore1']
del geo['throat.conduit_lengths.pore2']
del geo['throat.conduit_lengths.throat']
``` | 0.0 | aa445a2acec85ebf1e8f358e641fa5e2c4e141b7 | [
"tests/unit/core/BaseTest.py::BaseTest::test_del_nested_dicts"
] | [
"tests/unit/core/BaseTest.py::BaseTest::test_clear_model_data",
"tests/unit/core/BaseTest.py::BaseTest::test_clear_model_data_when_model_returns_dictionary",
"tests/unit/core/BaseTest.py::BaseTest::test_pores",
"tests/unit/core/BaseTest.py::BaseTest::test_pores_one_label",
"tests/unit/core/BaseTest.py::Base... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-13 21:31:10+00:00 | mit | 424 | |
PMEAL__OpenPNM-2173 | diff --git a/openpnm/algorithms/GenericAlgorithm.py b/openpnm/algorithms/GenericAlgorithm.py
index c2551b1ab..70bc915b5 100644
--- a/openpnm/algorithms/GenericAlgorithm.py
+++ b/openpnm/algorithms/GenericAlgorithm.py
@@ -21,7 +21,7 @@ class GenericAlgorithmSettings:
@docstr.get_sections(base='GenericAlgorithm', sect... | PMEAL/OpenPNM | 486ed107160e587096d85cf308af7eadb5bef390 | diff --git a/tests/unit/algorithms/IPTest.py b/tests/unit/algorithms/IPTest.py
index 4803639bd..efdf7e3f8 100644
--- a/tests/unit/algorithms/IPTest.py
+++ b/tests/unit/algorithms/IPTest.py
@@ -57,7 +57,7 @@ class IPTest:
alg.set_inlets(pores=self.net.pores("top"))
alg.run()
alg.apply_trapping... | Algorithms probably don't need to inherit from the Base class
We did some digging and the algorithms rarely call any of the ``Base`` methods like ``num_pores`` etc. I think we might be able to just define ``GenericAlgorithm`` as a direct subclass of ``dict`` and that would free up the algorithms quite a bit. For inst... | 0.0 | 486ed107160e587096d85cf308af7eadb5bef390 | [
"tests/unit/algorithms/ReactiveTransportTest.py::ReactiveTransportTest::test_remove_source"
] | [
"tests/unit/algorithms/IPTest.py::IPTest::test_set_inlets_overwrite",
"tests/unit/algorithms/IPTest.py::IPTest::test_run",
"tests/unit/algorithms/IPTest.py::IPTest::test_results",
"tests/unit/algorithms/IPTest.py::IPTest::test_trapping",
"tests/unit/algorithms/IPTest.py::IPTest::test_plot_intrusion_curve",
... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-17 16:30:12+00:00 | mit | 425 | |
PMEAL__OpenPNM-2186 | diff --git a/openpnm/models/geometry/throat_volume.py b/openpnm/models/geometry/throat_volume.py
index 3cdfff587..13d4322f4 100644
--- a/openpnm/models/geometry/throat_volume.py
+++ b/openpnm/models/geometry/throat_volume.py
@@ -163,8 +163,8 @@ def lens(target, throat_diameter='throat.diameter',
"""
network =... | PMEAL/OpenPNM | 4588835e40c14421dcc6c34b555595147006c417 | diff --git a/tests/unit/models/geometry/ThroatVolumeTest.py b/tests/unit/models/geometry/ThroatVolumeTest.py
index 0b612fac4..f459dd600 100644
--- a/tests/unit/models/geometry/ThroatVolumeTest.py
+++ b/tests/unit/models/geometry/ThroatVolumeTest.py
@@ -26,13 +26,13 @@ class ThroatVolumeTest:
net.add_model(prop... | Throat lens volume is higher that throat volume when pore sizes are >=0.8*max_pore_size.
**Describe the bug**
Throat lens volume is higher that throat volume when pore sizes are >=0.8*max_pore_size. Throat lens_volume should always be less than throat volume (as they are corrections on volume calculations). Lens va... | 0.0 | 4588835e40c14421dcc6c34b555595147006c417 | [
"tests/unit/models/geometry/ThroatVolumeTest.py::ThroatVolumeTest::test_lens_and_pendular_ring"
] | [
"tests/unit/models/geometry/ThroatVolumeTest.py::ThroatVolumeTest::test_cylinder",
"tests/unit/models/geometry/ThroatVolumeTest.py::ThroatVolumeTest::test_cube",
"tests/unit/models/geometry/ThroatVolumeTest.py::ThroatVolumeTest::test_rectangle",
"tests/unit/models/geometry/ThroatVolumeTest.py::ThroatVolumeTes... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_media"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-22 14:30:55+00:00 | mit | 426 | |
PMEAL__porespy-378 | diff --git a/porespy/filters/__funcs__.py b/porespy/filters/__funcs__.py
index f24d97b24..d971f21b4 100644
--- a/porespy/filters/__funcs__.py
+++ b/porespy/filters/__funcs__.py
@@ -1712,11 +1712,8 @@ def chunked_func(func,
strel = kwargs[item]
break
halo = np.array(strel.shape... | PMEAL/porespy | 933b1fe1a93cce068aae088c4cf0c569182dc42a | diff --git a/test/unit/test_filters.py b/test/unit/test_filters.py
index 47773ff69..07989d3f3 100644
--- a/test/unit/test_filters.py
+++ b/test/unit/test_filters.py
@@ -424,6 +424,16 @@ class FilterTest():
b = ps.filters.fftmorphology(im, strel=s, mode='erosion')
assert np.all(a == b)
+ def test_... | chunked_func should deal with funcs that return a result of different shape than the input
for instance, the convolve function can return an image wtih padding around the outside that breaks the chunking later on in the function | 0.0 | 933b1fe1a93cce068aae088c4cf0c569182dc42a | [
"test/unit/test_filters.py::FilterTest::test_chunked_func_w_ill_defined_filter"
] | [
"test/unit/test_filters.py::FilterTest::test_im_in_not_im_out",
"test/unit/test_filters.py::FilterTest::test_porosimetry_compare_modes_2D",
"test/unit/test_filters.py::FilterTest::test_porosimetry_npts_10",
"test/unit/test_filters.py::FilterTest::test_porosimetry_compare_modes_3D",
"test/unit/test_filters.p... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-02-17 02:32:36+00:00 | mit | 427 | |
PMEAL__porespy-809 | diff --git a/porespy/networks/_snow2.py b/porespy/networks/_snow2.py
index 5aa197559..404ef5d99 100644
--- a/porespy/networks/_snow2.py
+++ b/porespy/networks/_snow2.py
@@ -244,4 +244,4 @@ def _parse_pad_width(pad_width, shape):
else:
raise Exception("pad_width components can't have 2+ elements")
... | PMEAL/porespy | 63ce07d4a1c0337bc5942a33777fae81adc6aba9 | diff --git a/test/unit/test_snow2.py b/test/unit/test_snow2.py
index be6057dbb..c22273b01 100644
--- a/test/unit/test_snow2.py
+++ b/test/unit/test_snow2.py
@@ -108,10 +108,11 @@ class Snow2Test:
]
for case, out_desired in test_cases_2d:
try:
- out = ps.networks._parse_pad_... | boundary_width in snow2 breaks when trying to specify padding on both ends of all axes
This works:
`b = ps.networks.snow2(im, boundary_width=[[5, 15], 10])`
This breaks:
`b = ps.networks.snow2(im, boundary_width=[[5, 15], [10, 10]])`
The complaint is coming from `np.pad`: `TypeError: `pad_width` must be of inte... | 0.0 | 63ce07d4a1c0337bc5942a33777fae81adc6aba9 | [
"test/unit/test_snow2.py::Snow2Test::test_parse_pad_width_2d",
"test/unit/test_snow2.py::Snow2Test::test_parse_pad_width_3d"
] | [
"test/unit/test_snow2.py::Snow2Test::test_single_phase_2d_serial",
"test/unit/test_snow2.py::Snow2Test::test_return_all_serial",
"test/unit/test_snow2.py::Snow2Test::test_multiphase_2d",
"test/unit/test_snow2.py::Snow2Test::test_single_phase_3d",
"test/unit/test_snow2.py::Snow2Test::test_multiphase_3d",
"... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2023-03-15 19:17:20+00:00 | mit | 428 | |
PMEAL__porespy-863 | diff --git a/porespy/metrics/_funcs.py b/porespy/metrics/_funcs.py
index d1001a351..e44651570 100644
--- a/porespy/metrics/_funcs.py
+++ b/porespy/metrics/_funcs.py
@@ -1104,7 +1104,7 @@ def pc_curve(im, sizes=None, pc=None, seq=None,
return pc_curve
-def satn_profile(satn, s, axis=0, span=10, mode='tile'):
+d... | PMEAL/porespy | 2b340e9cd1c6923f375496b0c040ea614d75e4d5 | diff --git a/test/unit/test_metrics.py b/test/unit/test_metrics.py
index 993b3fd81..8879d3846 100644
--- a/test/unit/test_metrics.py
+++ b/test/unit/test_metrics.py
@@ -256,6 +256,61 @@ class MetricsTest():
assert hasattr(pc, 'pc')
assert hasattr(pc, 'snwp')
+ def test_satn_profile_axis(self):
+ ... | Update `satn_profile` to accept an already thresholded image | 0.0 | 2b340e9cd1c6923f375496b0c040ea614d75e4d5 | [
"test/unit/test_metrics.py::MetricsTest::test_satn_profile_axis",
"test/unit/test_metrics.py::MetricsTest::test_satn_profile_span",
"test/unit/test_metrics.py::MetricsTest::test_satn_profile_threshold",
"test/unit/test_metrics.py::MetricsTest::test_satn_profile_exception"
] | [
"test/unit/test_metrics.py::MetricsTest::test_porosity",
"test/unit/test_metrics.py::MetricsTest::test_tpcf_fft_2d",
"test/unit/test_metrics.py::MetricsTest::test_tpcf_fft_3d",
"test/unit/test_metrics.py::MetricsTest::test_tpcf_fft_3d_scaled",
"test/unit/test_metrics.py::MetricsTest::test_two_point_correlat... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2023-07-10 14:38:02+00:00 | mit | 429 | |
PMEAL__porespy-865 | diff --git a/porespy/filters/_size_seq_satn.py b/porespy/filters/_size_seq_satn.py
index 6b83bc26d..ace920e73 100644
--- a/porespy/filters/_size_seq_satn.py
+++ b/porespy/filters/_size_seq_satn.py
@@ -8,6 +8,7 @@ __all__ = [
'size_to_satn',
'seq_to_satn',
'pc_to_satn',
+ 'pc_to_seq',
'satn_to_seq... | PMEAL/porespy | ff3029fad904dab8ac6f5acf02e3270a704cb07f | diff --git a/test/unit/test_filters_size_seq_satn.py b/test/unit/test_filters_size_seq_satn.py
index 2aca65070..b3ea28425 100644
--- a/test/unit/test_filters_size_seq_satn.py
+++ b/test/unit/test_filters_size_seq_satn.py
@@ -249,6 +249,17 @@ class SeqTest():
assert satn[0, 0] == 0.0
assert satn[0, 1] ... | Add a `pc_to_seq` function
Not sure why we don't have this already. The only complication is that it does not work with ibip results since the Pcs are not filled sequentially. Not sure how to inidcate this. | 0.0 | ff3029fad904dab8ac6f5acf02e3270a704cb07f | [
"test/unit/test_filters_size_seq_satn.py::SeqTest::test_pc_to_seq",
"test/unit/test_metrics.py::MetricsTest::test_pc_map_to_pc_curve_drainage_with_trapping_and_residual",
"test/unit/test_metrics.py::MetricsTest::test_pc_map_to_pc_curve_invasion_with_trapping",
"test/unit/test_metrics.py::MetricsTest::test_pc_... | [
"test/unit/test_filters_size_seq_satn.py::SeqTest::test_satn_to_seq",
"test/unit/test_filters_size_seq_satn.py::SeqTest::test_satn_to_seq_uninvaded",
"test/unit/test_filters_size_seq_satn.py::SeqTest::test_satn_to_seq_modes",
"test/unit/test_filters_size_seq_satn.py::SeqTest::test_size_to_seq_modes",
"test/... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-07-10 15:07:56+00:00 | mit | 430 | |
PSLmodels__microdf-153 | diff --git a/.github/workflows/check_jupyterbook.yml b/.github/workflows/check_jupyterbook.yml
index d2174d5..49f4e0d 100644
--- a/.github/workflows/check_jupyterbook.yml
+++ b/.github/workflows/check_jupyterbook.yml
@@ -15,7 +15,7 @@ jobs:
with:
activate-environment: microdf
environment-... | PSLmodels/microdf | a2422e8b0bf20eca60a9bf39e8a3ad14d98a62e9 | diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml
index 04146a8..daeab97 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -1,4 +1,4 @@
-name: Build and test [Python 3.6, 3.7, 3.8]
+name: Build and test [Python 3.7, 3.8, 3.9]
on: [p... | Test Python 3.9
Pending https://github.com/PSLmodels/Tax-Calculator/pull/2522 | 0.0 | a2422e8b0bf20eca60a9bf39e8a3ad14d98a62e9 | [
"microdf/tests/test_weighted.py::test_gini"
] | [
"microdf/tests/test_weighted.py::test_weighted_quantile",
"microdf/tests/test_weighted.py::test_weighted_median",
"microdf/tests/test_weighted.py::test_weighted_mean",
"microdf/tests/test_weighted.py::test_weighted_sum"
] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-12-24 19:06:35+00:00 | mit | 431 | |
PSLmodels__microdf-166 | diff --git a/microdf/generic.py b/microdf/generic.py
index 2b72bbd..654cba5 100644
--- a/microdf/generic.py
+++ b/microdf/generic.py
@@ -12,21 +12,29 @@ class MicroSeries(pd.Series):
:type weights: np.array
"""
super().__init__(*args, **kwargs)
- self.weights = weights
+ self.se... | PSLmodels/microdf | db688dbab9b0fc84bbd7d5d096084ff8d6a9ff13 | diff --git a/microdf/tests/test_generic.py b/microdf/tests/test_generic.py
index 063e679..0cd6c57 100644
--- a/microdf/tests/test_generic.py
+++ b/microdf/tests/test_generic.py
@@ -2,6 +2,33 @@ import numpy as np
import microdf as mdf
+def test_df_init():
+ arr = np.array([0, 1, 1])
+ w = np.array([3, 0, 9])... | MicroSeries(list) causes TypeError: __init__() got an unexpected keyword argument 'column'
This crashes my ipython session:
```
import microdf as mdf
mdf.Series([1, 2, 3])
```
Error is long, includes `TypeError: __init__() got an unexpected keyword argument 'column'` | 0.0 | db688dbab9b0fc84bbd7d5d096084ff8d6a9ff13 | [
"microdf/tests/test_generic.py::test_df_init",
"microdf/tests/test_generic.py::test_series_getitem"
] | [
"microdf/tests/test_generic.py::test_sum",
"microdf/tests/test_generic.py::test_mean"
] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-02-07 19:22:30+00:00 | mit | 432 | |
PSLmodels__microdf-188 | diff --git a/microdf/generic.py b/microdf/generic.py
index 9c19d0d..f6a91ad 100644
--- a/microdf/generic.py
+++ b/microdf/generic.py
@@ -239,6 +239,19 @@ class MicroSeries(pd.Series):
b50 = self.bottom_50_pct_share()
return t10 / b50
+ @vector_function
+ def cumsum(self) -> pd.Series:
+ ... | PSLmodels/microdf | 995a0c703af8bcc84809915df155336d9473d043 | diff --git a/microdf/tests/test_generic.py b/microdf/tests/test_generic.py
index ca55fc8..aadd6b0 100644
--- a/microdf/tests/test_generic.py
+++ b/microdf/tests/test_generic.py
@@ -1,4 +1,4 @@
-from microdf.generic import MicroDataFrame
+from microdf.generic import MicroDataFrame, MicroSeries
import numpy as np
impor... | Changing a MicroDataFrame's index makes its columns Series instead of MicroSeries
```
d = mdf.MicroDataFrame(dict(x=[1, 2, 3]), weights=[4, 5, 6])
d.x.__class__
```
>microdf.generic.MicroSeries
```
d = mdf.MicroDataFrame(dict(x=[1, 2, 3]), weights=[4, 5, 6])
d.index = [1, 2, 3]
d.x.__class__
```
>pandas.core.... | 0.0 | 995a0c703af8bcc84809915df155336d9473d043 | [
"microdf/tests/test_generic.py::test_set_index",
"microdf/tests/test_generic.py::test_reset_index",
"microdf/tests/test_generic.py::test_cumsum",
"microdf/tests/test_generic.py::test_rank"
] | [
"microdf/tests/test_generic.py::test_df_init",
"microdf/tests/test_generic.py::test_series_getitem",
"microdf/tests/test_generic.py::test_sum",
"microdf/tests/test_generic.py::test_mean",
"microdf/tests/test_generic.py::test_poverty_count",
"microdf/tests/test_generic.py::test_median",
"microdf/tests/te... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-02-25 09:09:41+00:00 | mit | 433 | |
PSLmodels__microdf-219 | diff --git a/microdf/generic.py b/microdf/generic.py
index 4b31aba..b0906cf 100644
--- a/microdf/generic.py
+++ b/microdf/generic.py
@@ -373,6 +373,11 @@ class MicroSeries(pd.Series):
def __pos__(self, other):
return MicroSeries(super().__pos__(other), weights=self.weights)
+ def __repr__(self):
+ ... | PSLmodels/microdf | 8802af33cdae9b37733a33aa307ee991246b0716 | diff --git a/microdf/tests/test_generic.py b/microdf/tests/test_generic.py
index 3dfaffa..3a1a58e 100644
--- a/microdf/tests/test_generic.py
+++ b/microdf/tests/test_generic.py
@@ -200,3 +200,9 @@ def test_subset():
df_no_z_diff_weights = df_no_z.copy()
df_no_z_diff_weights.weights += 1
assert not df[["x... | Subsetting a MicroDataFrame doesn't subset weights
Example:
```
d = mdf.MicroDataFrame({"x": [1, 2, 3], "y": [1, 2, 2]}, weights=[4, 5, 6])
d2 = d[d.y > 1]
d2.shape # (2, 2)
d2.weights.shape # (3,)
```
Among other things, this breaks commands like `d[d.y > 1].mean()` with:
>TypeError: Axis must be specified w... | 0.0 | 8802af33cdae9b37733a33aa307ee991246b0716 | [
"microdf/tests/test_generic.py::test_value_subset"
] | [
"microdf/tests/test_generic.py::test_df_init",
"microdf/tests/test_generic.py::test_series_getitem",
"microdf/tests/test_generic.py::test_sum",
"microdf/tests/test_generic.py::test_mean",
"microdf/tests/test_generic.py::test_poverty_count",
"microdf/tests/test_generic.py::test_median",
"microdf/tests/te... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2021-03-29 11:35:13+00:00 | mit | 434 | |
PagerDuty__pdpyras-54 | diff --git a/pdpyras.py b/pdpyras.py
index 506440d..2143baf 100644
--- a/pdpyras.py
+++ b/pdpyras.py
@@ -211,7 +211,7 @@ def tokenize_url_path(url, baseurl='https://api.pagerduty.com'):
:type method: str
:type url: str
:type baseurl: str
- :rtype: tuple
+ :rtype: tuple
"""
urlnparams = u... | PagerDuty/pdpyras | 4fb715ab215a500262cb61005b1a9c70ba190179 | diff --git a/test_pdpyras.py b/test_pdpyras.py
index 76217fd..a2d1899 100755
--- a/test_pdpyras.py
+++ b/test_pdpyras.py
@@ -91,12 +91,15 @@ class EventsSessionTest(SessionTest):
'https://events.pagerduty.com/v2/enqueue',
parent.request.call_args[0][1])
self.assertDictCont... | EventsAPISession uses `X-Routing-Key` instead of setting `routing_key` in payload
EventsAPISession uses the `X-Routing-Key` header to specify the routing key and does not set the `routing_key` parameter in the REST Payload.
API specification requires that the `routing_key` parameter is a required parameter.
https... | 0.0 | 4fb715ab215a500262cb61005b1a9c70ba190179 | [
"test_pdpyras.py::EventsSessionTest::test_send_event"
] | [
"test_pdpyras.py::APISessionTest::test_find",
"test_pdpyras.py::APISessionTest::test_iter_all",
"test_pdpyras.py::APISessionTest::test_oauth_headers",
"test_pdpyras.py::APISessionTest::test_persist",
"test_pdpyras.py::APISessionTest::test_postprocess",
"test_pdpyras.py::APISessionTest::test_profiler_key",... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-03-09 04:58:55+00:00 | mit | 435 | |
Parallel-in-Time__pySDC-235 | diff --git a/pySDC/implementations/convergence_controller_classes/adaptivity.py b/pySDC/implementations/convergence_controller_classes/adaptivity.py
index b26fec527..06fc27f07 100644
--- a/pySDC/implementations/convergence_controller_classes/adaptivity.py
+++ b/pySDC/implementations/convergence_controller_classes/adapt... | Parallel-in-Time/pySDC | 994530de81e58b85952343cd34e3ba7890cc1975 | diff --git a/pySDC/tests/test_projects/test_resilience/test_piline.py b/pySDC/tests/test_projects/test_resilience/test_piline.py
index 62afc601f..5a2896de0 100644
--- a/pySDC/tests/test_projects/test_resilience/test_piline.py
+++ b/pySDC/tests/test_projects/test_resilience/test_piline.py
@@ -6,3 +6,10 @@ def test_main(... | Default methods in convergence controller
It looks like the default methods of the `AdaptivityResidual` class are [never called](https://parallel-in-time.org/pySDC/coverage/d_c28af68f8f845bbd_adaptivity_py.html#t290). The same for the [`BasicRestartingMPI`](https://parallel-in-time.org/pySDC/coverage/d_c28af68f8f845bbd... | 0.0 | 994530de81e58b85952343cd34e3ba7890cc1975 | [
"pySDC/tests/test_projects/test_resilience/test_piline.py::test_main",
"pySDC/tests/test_projects/test_resilience/test_piline.py::test_residual_adaptivity"
] | [] | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-01-02 15:07:01+00:00 | bsd-2-clause | 436 | |
Parquery__icontract-112 | diff --git a/icontract/_checkers.py b/icontract/_checkers.py
index 1b27f5a..1dc79d3 100644
--- a/icontract/_checkers.py
+++ b/icontract/_checkers.py
@@ -66,6 +66,27 @@ def _kwargs_from_call(param_names: List[str], kwdefaults: Dict[str, Any], args:
return mapping
+def _not_check(check: Any, contract: Contract) ... | Parquery/icontract | 013cb1bb0294097eaa8c43776bfd4d73342a1655 | diff --git a/tests/test_invariant.py b/tests/test_invariant.py
index 114649e..302bb5d 100644
--- a/tests/test_invariant.py
+++ b/tests/test_invariant.py
@@ -9,6 +9,7 @@ from typing import Optional # pylint: disable=unused-import
import icontract
import tests.error
+import tests.mock
class TestOK(unittest.Test... | catch exceptions in boolyness of check
This is very much related to #97
Consider this:
```
$ cat i.py
from icontract import require, ensure
import numpy as np
@require(lambda x: np.array([True, False]))
def frobulate(x: int) -> int:
return x
$ python -c "import i; i.frobulate(1)" ... | 0.0 | 013cb1bb0294097eaa8c43776bfd4d73342a1655 | [
"tests/test_invariant.py::TestInvalid::test_no_boolyness",
"tests/test_postcondition.py::TestInvalid::test_no_boolyness",
"tests/test_precondition.py::TestInvalid::test_no_boolyness"
] | [
"tests/test_invariant.py::TestOK::test_class_method",
"tests/test_invariant.py::TestOK::test_init",
"tests/test_invariant.py::TestOK::test_instance_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_private_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_protected_method",
... | {
"failed_lite_validators": [
"has_issue_reference",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2019-05-11 06:28:25+00:00 | mit | 437 | |
Parquery__icontract-137 | diff --git a/icontract/_checkers.py b/icontract/_checkers.py
index de92e3e..af1bceb 100644
--- a/icontract/_checkers.py
+++ b/icontract/_checkers.py
@@ -2,7 +2,8 @@
import contextlib
import functools
import inspect
-from typing import Callable, Any, Iterable, Optional, Tuple, List, Mapping, MutableMapping, Dict
+imp... | Parquery/icontract | 0bf4b66fd1590fc18a73208b69a0a17b228dd79b | diff --git a/tests/test_invariant.py b/tests/test_invariant.py
index 583cd96..d45172c 100644
--- a/tests/test_invariant.py
+++ b/tests/test_invariant.py
@@ -146,6 +146,17 @@ class TestOK(unittest.TestCase):
_ = A()
+ def test_no_dict_pollution(self) -> None:
+ testSelf = self
+
+ @icontrac... | Class invariant changes __dict__ unexpectedly
Usually `__dict__` can be used to compare if two instances have equal attributes. Adding an class invariant falsifies a `__eq__` method which is based on this assumption:
```Python
from icontract import invariant
@invariant(lambda self: all(" " not in n for n... | 0.0 | 0bf4b66fd1590fc18a73208b69a0a17b228dd79b | [
"tests/test_invariant.py::TestOK::test_no_dict_pollution"
] | [
"tests/test_invariant.py::TestOK::test_class_method",
"tests/test_invariant.py::TestOK::test_init",
"tests/test_invariant.py::TestOK::test_instance_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_private_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_protected_method",
... | {
"failed_lite_validators": [
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-05-06 16:14:40+00:00 | mit | 438 | |
Parquery__icontract-151 | diff --git a/README.rst b/README.rst
index 12c3b36..62fdfc3 100644
--- a/README.rst
+++ b/README.rst
@@ -711,6 +711,19 @@ in progress and removed once the invariants checking finished. As long as the du
``__dbc_invariant_check_is_in_progress__`` is present, the wrappers that check invariants simply return the result o... | Parquery/icontract | f99d7436e3ef1fee8b83f7dc6b2ea8500ebdfa68 | diff --git a/tests/test_recursion.py b/tests/test_recursion.py
index 3ca0eb5..db46ebf 100644
--- a/tests/test_recursion.py
+++ b/tests/test_recursion.py
@@ -227,6 +227,23 @@ class TestInvariant(unittest.TestCase):
some_instance.another_func()
self.assertListEqual(['some_func', 'another_func', 'some_fu... | AttributeError in contract caused by method call in constructor
When a method is called in the constructor, an `AttributeError` is raised in the contract. Here is a reproducer:
```Python
from icontract import invariant
@invariant(lambda self: all(" " not in part for part in self.parts))
class ID:
def __i... | 0.0 | f99d7436e3ef1fee8b83f7dc6b2ea8500ebdfa68 | [
"tests/test_recursion.py::TestInvariant::test_member_function_call_in_constructor"
] | [
"tests/test_recursion.py::TestPrecondition::test_ok",
"tests/test_recursion.py::TestPrecondition::test_recover_after_exception",
"tests/test_recursion.py::TestPostcondition::test_ok",
"tests/test_recursion.py::TestPostcondition::test_recover_after_exception",
"tests/test_recursion.py::TestInvariant::test_ok... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-09-14 21:35:50+00:00 | mit | 439 | |
Parquery__icontract-166 | diff --git a/.travis.yml b/.travis.yml
index 32624d8..7155fe1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ python:
- "3.5"
- "3.6"
- "3.7"
- - "3.8"
+ - "3.8.5"
install:
- pip3 install -e .[dev]
- pip3 install coveralls
diff --git a/icontract/_recompute.py b/icontract/_recompute.py
index... | Parquery/icontract | 9e8451b28b9cb5bdd02c1ae0b194af58ea80854d | diff --git a/tests_3_8/__init__.py b/tests_3_8/__init__.py
new file mode 100644
index 0000000..774c18e
--- /dev/null
+++ b/tests_3_8/__init__.py
@@ -0,0 +1,7 @@
+"""
+Test Python 3.8-specific features.
+
+For example, one such feature is walrus operator used in named expressions.
+We have to exclude these tests running... | Violating contract with assignment expression produces NotImplementedError
An assignment expression in a lambda expression in a contract produces a `NotImplementedError` from `incontract._recompute` when a call violates the contract. A call that conforms to the contract does not produce the error. Using Python 3.8.5... | 0.0 | 9e8451b28b9cb5bdd02c1ae0b194af58ea80854d | [
"tests_3_8/test_represent.py::TestReprValues::test_named_expression"
] | [] | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-09 20:27:33+00:00 | mit | 440 | |
Parquery__icontract-168 | diff --git a/README.rst b/README.rst
index 80615a0..927040a 100644
--- a/README.rst
+++ b/README.rst
@@ -164,7 +164,8 @@ We consider the following methods to be "public":
* All methods not prefixed with ``_``
* All magic methods (prefix ``__`` and suffix ``__``)
-Class methods can not observe the invariant since th... | Parquery/icontract | cb64cef40abccd3b212ca14987244e71782ee146 | diff --git a/tests/test_invariant.py b/tests/test_invariant.py
index d45172c..e8e7a67 100644
--- a/tests/test_invariant.py
+++ b/tests/test_invariant.py
@@ -5,7 +5,7 @@
import time
import unittest
-from typing import Optional # pylint: disable=unused-import
+from typing import Dict, Iterator, Mapping, Optional, An... | Invariant on subclass of generic Mapping produces ValueError
An `invariant` decorator on a subclass of a generic `typing.Mapping` class produces a `ValueError`. Using Python 3.8.5 and icontract 2.3.7.
Example file `foo.py`:
``` python
from icontract import invariant
from typing import Dict, Iterator, Mapping
... | 0.0 | cb64cef40abccd3b212ca14987244e71782ee146 | [
"tests/test_invariant.py::TestOK::test_new_exempted"
] | [
"tests/test_invariant.py::TestOK::test_class_method",
"tests/test_invariant.py::TestOK::test_init",
"tests/test_invariant.py::TestOK::test_instance_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_private_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_protected_method",
... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-16 15:45:25+00:00 | mit | 441 | |
Parquery__icontract-170 | diff --git a/icontract/_recompute.py b/icontract/_recompute.py
index 00faac1..0427994 100644
--- a/icontract/_recompute.py
+++ b/icontract/_recompute.py
@@ -88,6 +88,44 @@ class Visitor(ast.NodeVisitor):
self.recomputed_values[node] = node.value
return node.value
+ if sys.version_info >= ... | Parquery/icontract | 38968d2d4b79f44522417f40e9d8cfd6b5762870 | diff --git a/tests_3_6/__init__.py b/tests_3_6/__init__.py
new file mode 100644
index 0000000..c706c20
--- /dev/null
+++ b/tests_3_6/__init__.py
@@ -0,0 +1,12 @@
+"""
+Test Python 3.6-specific features.
+
+For example, one such feature is literal string interpolation.
+"""
+
+import sys
+
+if sys.version_info < (3, 6):... | Violating contract with f-string produces NotImplementedError
An f-string in a lambda expression in a contract produces a `NotImplementedError` from `incontract._recompute` when a call violates the contract. A call that conforms to the contract does not produce the error. Using Python 3.8.5 and icontract 2.3.7.
E... | 0.0 | 38968d2d4b79f44522417f40e9d8cfd6b5762870 | [
"tests_3_6/test_represent.py::TestLiteralStringInterpolation::test_ascii_formatting",
"tests_3_6/test_represent.py::TestLiteralStringInterpolation::test_conversion_and_format_spec",
"tests_3_6/test_represent.py::TestLiteralStringInterpolation::test_format_spec",
"tests_3_6/test_represent.py::TestLiteralString... | [] | {
"failed_lite_validators": [
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-19 11:22:22+00:00 | mit | 442 | |
Parquery__icontract-172 | diff --git a/icontract/_checkers.py b/icontract/_checkers.py
index 83fa17b..90d4a44 100644
--- a/icontract/_checkers.py
+++ b/icontract/_checkers.py
@@ -441,6 +441,32 @@ def _find_self(param_names: List[str], args: Tuple[Any, ...], kwargs: Dict[str,
return kwargs["self"]
+def _decorate_new_with_invariants(new_... | Parquery/icontract | e23b0df674b18842f38a1da4e1835c9217c7c84a | diff --git a/tests/test_invariant.py b/tests/test_invariant.py
index e8e7a67..d47cf44 100644
--- a/tests/test_invariant.py
+++ b/tests/test_invariant.py
@@ -5,7 +5,7 @@
import time
import unittest
-from typing import Dict, Iterator, Mapping, Optional, Any # pylint: disable=unused-import
+from typing import Dict, I... | Invariant on subclass of NamedTuple produces TypeError
An `invariant` decorator on a subclass of `typing.NamedTuple` produces a `TypeError`. Using Python 3.8.5 and icontract 2.3.7.
Example file `foo.py`:
``` python
from typing import NamedTuple
from icontract import invariant
@invariant(lambda self: self.fir... | 0.0 | e23b0df674b18842f38a1da4e1835c9217c7c84a | [
"tests_3_8/test_invariant.py::TestOK::test_on_named_tuple",
"tests_3_8/test_invariant.py::TestViolation::test_on_named_tuple"
] | [
"tests/test_invariant.py::TestOK::test_class_method",
"tests/test_invariant.py::TestOK::test_init",
"tests/test_invariant.py::TestOK::test_instance_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_private_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_protected_method",
... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2020-11-21 07:26:32+00:00 | mit | 443 | |
Parquery__icontract-176 | diff --git a/README.rst b/README.rst
index 9fb69cb..db5af98 100644
--- a/README.rst
+++ b/README.rst
@@ -639,6 +639,78 @@ Here is an example of the error given as a callable:
If you left ``enabled`` argument to its default ``__debug__``, the contract will *not* be verified in
``-O`` mode.)
+Variable Positio... | Parquery/icontract | 021f478672e480372d277d45384e3e65d1639d1a | diff --git a/tests/test_args_and_kwargs_in_contract.py b/tests/test_args_and_kwargs_in_contract.py
new file mode 100644
index 0000000..e94343c
--- /dev/null
+++ b/tests/test_args_and_kwargs_in_contract.py
@@ -0,0 +1,239 @@
+# pylint: disable=missing-docstring
+# pylint: disable=no-self-use
+# pylint: disable=invalid-na... | *args and **kwargs not supported
Given the following code snippet:
```py
from icontract import require
def test_args():
@require(lambda *args: args)
def args(*args, **kwargs):
pass
args(0, x=0)
def test_kwargs():
@require(lambda **kwargs: kwargs)
def args(*args, **kwargs):
... | 0.0 | 021f478672e480372d277d45384e3e65d1639d1a | [
"tests/test_args_and_kwargs_in_contract.py::TestArgs::test_args_with_named_and_variable_positional_arguments",
"tests/test_args_and_kwargs_in_contract.py::TestArgs::test_args_with_only_variable_positional_arguments",
"tests/test_args_and_kwargs_in_contract.py::TestArgs::test_args_with_uncommon_variable_position... | [] | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-12-02 08:05:42+00:00 | mit | 444 | |
Parquery__icontract-187 | diff --git a/README.rst b/README.rst
index d5660c1..08b5f1f 100644
--- a/README.rst
+++ b/README.rst
@@ -29,8 +29,9 @@ It also gives a base for a flourishing of a wider ecosystem:
`Hypothesis <https://hypothesis.readthedocs.io/en/latest/>`_ strategies based on the contracts,
* together with IDE integrations suc... | Parquery/icontract | 8d7639edb5fe2bb305e214203dc2fb8b3207fa9d | diff --git a/tests/test_invariant.py b/tests/test_invariant.py
index d47cf44..6a0e1fd 100644
--- a/tests/test_invariant.py
+++ b/tests/test_invariant.py
@@ -62,6 +62,46 @@ class TestOK(unittest.TestCase):
inst = SomeClass()
self.assertEqual(100, inst.x)
+ def test_static_method(self) -> None:
+ ... | KeyError in contract caused by staticmethod and class invariant
```Python
from icontract import invariant
@invariant(lambda self: all(" " not in part for part in self.parts))
class ID:
def __init__(self, identifier: str) -> None:
self.parts = identifier.split(self.separator())
@staticmethod
... | 0.0 | 8d7639edb5fe2bb305e214203dc2fb8b3207fa9d | [
"tests/test_invariant.py::TestOK::test_inherited_static_method",
"tests/test_invariant.py::TestOK::test_static_method"
] | [
"tests/test_invariant.py::TestOK::test_class_method",
"tests/test_invariant.py::TestOK::test_init",
"tests/test_invariant.py::TestOK::test_instance_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_private_method",
"tests/test_invariant.py::TestOK::test_inv_broken_before_protected_method",
... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-23 13:47:23+00:00 | mit | 445 | |
Parquery__pyicontract-lint-25 | diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py
index b35a405..8639113 100644
--- a/icontract_lint/__init__.py
+++ b/icontract_lint/__init__.py
@@ -2,6 +2,7 @@
import collections
import enum
import json
+import os
import pathlib
import re
import sys
@@ -589,9 +590,10 @@ def output_verbose(err... | Parquery/pyicontract-lint | 388bc70a37d046379f0496f6d3eed7b33d5dcdc0 | diff --git a/tests/test_icontract_lint.py b/tests/test_icontract_lint.py
index f66931e..be91d62 100644
--- a/tests/test_icontract_lint.py
+++ b/tests/test_icontract_lint.py
@@ -2,6 +2,7 @@
# pylint: disable=missing-docstring
import io
+import os
import pathlib
import sys
import tempfile
@@ -725,8 +726,9 @@ class... | Running pyicontract-lint without linting errors should notify success
Hi @mristin , it's me again :)
Just an enhancement proposal: when I got the package to run I had no linting errors and therefore the package would not give any output, even in `--verbose` mode. I had to run it with `--verbose json` mode to get the f... | 0.0 | 388bc70a37d046379f0496f6d3eed7b33d5dcdc0 | [
"tests/test_main.py::TestMain::test_verbose_no_errors"
] | [
"tests/test_icontract_lint.py::TestCheckUnreadableFile::test_parse_failure",
"tests/test_icontract_lint.py::TestCheckUnreadableFile::test_read_failure",
"tests/test_icontract_lint.py::TestCheckFile::test_disabled",
"tests/test_icontract_lint.py::TestCheckFile::test_inv_invalid_arg",
"tests/test_icontract_li... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-08-25 19:10:38+00:00 | mit | 446 | |
Parquery__pyicontract-lint-28 | diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py
index 8639113..9dced7a 100644
--- a/icontract_lint/__init__.py
+++ b/icontract_lint/__init__.py
@@ -351,25 +351,6 @@ class _LintVisitor(_AstroidVisitor):
else:
raise NotImplementedError("Unhandled pytype: {}".format(pytype))
- ... | Parquery/pyicontract-lint | 76ece692dac02dd926a5c1c30fd5933899ffeefc | diff --git a/tests/test_icontract_lint.py b/tests/test_icontract_lint.py
index be91d62..d09c398 100644
--- a/tests/test_icontract_lint.py
+++ b/tests/test_icontract_lint.py
@@ -82,22 +82,33 @@ class TestCheckUnreadableFile(unittest.TestCase):
self.assertEqual(str(pth), errors[0].filename)
-class TestCh... | Error linting file w/o icontract
I'm trying out icontract and this linter. I get a fatal error in [this file](https://github.com/pymor/pymor/blob/contracts_type-hints/src/pymor/algorithms/rules.py)
[pip freeze output](https://github.com/Parquery/pyicontract-lint/files/5429910/freeze.txt)
```
pyicontract-lint ./src... | 0.0 | 76ece692dac02dd926a5c1c30fd5933899ffeefc | [
"tests/test_icontract_lint.py::TestUninferrableDecorator::test_astroid_inferrence_error"
] | [
"tests/test_icontract_lint.py::TestCheckUnreadableFile::test_parse_failure",
"tests/test_icontract_lint.py::TestCheckUnreadableFile::test_read_failure",
"tests/test_icontract_lint.py::TestUninferrableDecorator::test_astroid_name_inference_error",
"tests/test_icontract_lint.py::TestCheckFile::test_disabled",
... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_media"
],
"has_test_patch": true,
"is_lite": false
} | 2020-10-23 18:36:04+00:00 | mit | 447 | |
Parquery__pyicontract-lint-35 | diff --git a/icontract_lint/__init__.py b/icontract_lint/__init__.py
index 0b9a53d..d4f2312 100644
--- a/icontract_lint/__init__.py
+++ b/icontract_lint/__init__.py
@@ -35,6 +35,7 @@ class ErrorID(enum.Enum):
SNAPSHOT_INVALID_ARG = "snapshot-invalid-arg"
SNAPSHOT_WO_CAPTURE = "snapshot-wo-capture"
SNAPSH... | Parquery/pyicontract-lint | ceacf96c6a59173b0f9b0611403c7f6315377963 | diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py
index f55eed3..ba3120c 100644
--- a/tests/test_snapshot.py
+++ b/tests/test_snapshot.py
@@ -34,6 +34,29 @@ class TestSnapshot(unittest.TestCase):
errors = icontract_lint.check_file(path=pth)
self.assertListEqual([], errors)
... | Snapshot capture function expects at most one argument
The docs show how you can use snapshots to capture multiple arguments and combine them into one set. However when I try the same idea the code runs without error, but the linter throws the error:
```Snapshot capture function expects at most one argument, but got... | 0.0 | ceacf96c6a59173b0f9b0611403c7f6315377963 | [
"tests/test_snapshot.py::TestSnapshot::test_invalid_arg",
"tests/test_snapshot.py::TestSnapshot::test_multiple_args_and_no_name",
"tests/test_snapshot.py::TestSnapshot::test_multiple_args_are_ok"
] | [
"tests/test_snapshot.py::TestSnapshot::test_valid",
"tests/test_snapshot.py::TestSnapshot::test_without_capture",
"tests/test_snapshot.py::TestSnapshot::test_without_post"
] | {
"failed_lite_validators": [
"has_hyperlinks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-03-12 08:08:44+00:00 | mit | 448 | |
Parquery__pylddwrap-13 | diff --git a/lddwrap/__init__.py b/lddwrap/__init__.py
index d1a2d87..520bc07 100644
--- a/lddwrap/__init__.py
+++ b/lddwrap/__init__.py
@@ -252,10 +252,18 @@ def _cmd_output_parser(cmd_out: str) -> List[Dependency]:
"""
dependencies = [] # type: List[Dependency]
- for line in [
- line.strip(... | Parquery/pylddwrap | b13a44564ec9cee8f623c5a26d888dfd8fa26ca8 | diff --git a/tests/test_ldd.py b/tests/test_ldd.py
index 45e6c8d..2a47981 100644
--- a/tests/test_ldd.py
+++ b/tests/test_ldd.py
@@ -2,6 +2,7 @@
"""Test lddwrap."""
# pylint: disable=missing-docstring,too-many-public-methods
import pathlib
+import tempfile
import textwrap
import unittest
from typing import Any, L... | pylddwrap 1.1.0 fails to handle statically linked libraries
I have noticed that with the latest release of 1.1.0, the `lddwrap.list_dependencies` fails when using it on a statically linked library:
```
my_static_lib.so:
statically linked
```
with the error message:
> RuntimeError: Unexpected mem ad... | 0.0 | b13a44564ec9cee8f623c5a26d888dfd8fa26ca8 | [
"tests/test_ldd.py::TestParseOutputWithoutUnused::test_parse_static",
"tests/test_ldd.py::TestAgainstMockLdd::test_with_static_library"
] | [
"tests/test_ldd.py::TestParseOutputWithoutUnused::test_parse_line",
"tests/test_ldd.py::TestParseOutputWithoutUnused::test_parse_wrong_line",
"tests/test_ldd.py::TestAgainstMockLdd::test_bin_dir",
"tests/test_ldd.py::TestAgainstMockLdd::test_bin_dir_with_empty_unused",
"tests/test_ldd.py::TestAgainstMockLdd... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2020-12-02 20:39:00+00:00 | mit | 449 | |
Parquery__swagger-to-141 | diff --git a/swagger_to/intermediate.py b/swagger_to/intermediate.py
index c4dc496..8a26b91 100644
--- a/swagger_to/intermediate.py
+++ b/swagger_to/intermediate.py
@@ -432,12 +432,7 @@ def _recursively_strip_descriptions(schema_dict: MutableMapping[str, Any]) -> Mu
new_schema_dict = collections.OrderedDict() # t... | Parquery/swagger-to | d0427c9f56e0a30a04e0777eb874954c99f1c90a | diff --git a/tests/cases/intermediate/definitions_item_description_as_object/endpoints.json b/tests/cases/intermediate/definitions_item_description_as_object/endpoints.json
new file mode 100644
index 0000000..1298ed4
--- /dev/null
+++ b/tests/cases/intermediate/definitions_item_description_as_object/endpoints.json
@@ -... | ValueError: Expected the value in a schema to be a string, but got: <class 'swagger_to.swagger.RawDict'>
if definitions properties has name with description, will cause this issue
```
DeviceDefineInfoRes:
type: object
discriminator: ''
properties:
createPerson:
type: string
cre... | 0.0 | d0427c9f56e0a30a04e0777eb874954c99f1c90a | [
"tests/test_intermediate.py::TestIntermediate::test_that_it_does_not_break"
] | [
"tests/test_elm_client.py::TestElmClient::test_that_it_works",
"tests/test_elm_client.py::TestEscapeElmString::test_that_it_works",
"tests/test_go_server.py::TestEscapeStr::test_empty",
"tests/test_go_server.py::TestEscapeStr::test_that_it_works",
"tests/test_go_server.py::TestGoServer::test_that_it_works",... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_media"
],
"has_test_patch": true,
"is_lite": false
} | 2023-01-26 04:04:36+00:00 | mit | 450 | |
Parquery__temppathlib-12 | diff --git a/pylint.rc b/pylint.rc
index a70a9ba..9ecb8f0 100644
--- a/pylint.rc
+++ b/pylint.rc
@@ -7,5 +7,5 @@ generated-members=bottle\.request\.forms\.decode,bottle\.request\.query\.decode
max-line-length=120
[MESSAGES CONTROL]
-disable=too-few-public-methods,abstract-class-little-used,len-as-condition,bad-cont... | Parquery/temppathlib | 21fd2b96fb2fb13c4e64d5bf2783327b11bafe4e | diff --git a/tests/test_temppathlib.py b/tests/test_temppathlib.py
index 6cd1e7c..cdf6988 100644
--- a/tests/test_temppathlib.py
+++ b/tests/test_temppathlib.py
@@ -94,6 +94,14 @@ class TestTmpDirIfNecessary(unittest.TestCase):
finally:
shutil.rmtree(str(basedir))
+ def test_prefix(self) -> N... | Support `prefix` option also with `TmpDirIfNecessary`?
Maybe `TmpDirIfNecessary` should also support the `prefix` option, to give a temporary directory a certain prefix (if no directory is provided already? | 0.0 | 21fd2b96fb2fb13c4e64d5bf2783327b11bafe4e | [
"tests/test_temppathlib.py::TestTmpDirIfNecessary::test_prefix",
"tests/test_temppathlib.py::TestTmpDirIfNecessary::test_suffix"
] | [
"tests/test_temppathlib.py::TestRemovingTree::test_no_enter",
"tests/test_temppathlib.py::TestRemovingTree::test_that_it_works",
"tests/test_temppathlib.py::TestTmpDirIfNecessary::test_with_base_tmp_dir",
"tests/test_temppathlib.py::TestTmpDirIfNecessary::test_with_path_str",
"tests/test_temppathlib.py::Tes... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-03-15 19:13:03+00:00 | mit | 451 | |
PaulSchweizer__flowpipe-127 | diff --git a/flowpipe/node.py b/flowpipe/node.py
index 7fc825d..a9671e9 100644
--- a/flowpipe/node.py
+++ b/flowpipe/node.py
@@ -436,8 +436,13 @@ class FunctionNode(INode):
metadata = copy.deepcopy(self.metadata)
metadata.update(kwargs.pop("metadata", {}))
graph = kwargs.pop('graph', 'default... | PaulSchweizer/flowpipe | 06cade8408791fde0ab422c19d5d8e73facbc234 | diff --git a/tests/test_convert_function_to_node.py b/tests/test_convert_function_to_node.py
index 2d84466..e99a8dc 100644
--- a/tests/test_convert_function_to_node.py
+++ b/tests/test_convert_function_to_node.py
@@ -182,3 +182,20 @@ def test_node_reserved_names():
def function(func, name, identifier, inputs,
... | Add sub output plugs through Node decorator
This should be made possible:
```python
@Node(outputs=["out.a", "out.b"])
MyNode():
pass
```
Resulting in a node like this:
```
+-----------+
| MyNode |
+-----------+
| out %
| out.a o
| out.b o
+-----------+
``` | 0.0 | 06cade8408791fde0ab422c19d5d8e73facbc234 | [
"tests/test_convert_function_to_node.py::test_create_node_with_sub_output_plugs"
] | [
"tests/test_convert_function_to_node.py::test_input_plugs_are_taken_from_func_inputs",
"tests/test_convert_function_to_node.py::test_name_is_taken_from_func_name_if_not_provided",
"tests/test_convert_function_to_node.py::test_name_can_be_provided_as_kwarg",
"tests/test_convert_function_to_node.py::test_doc_is... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-02-23 16:26:46+00:00 | mit | 452 | |
PaulSchweizer__flowpipe-147 | diff --git a/flowpipe/__init__.py b/flowpipe/__init__.py
index a14309f..a48b2ba 100644
--- a/flowpipe/__init__.py
+++ b/flowpipe/__init__.py
@@ -1,4 +1,5 @@
"""Flow-based programming with python."""
from .graph import Graph
from .node import INode, Node
-from .plug import InputPlug, OutputPlug, SubInputPlug, SubOutp... | PaulSchweizer/flowpipe | d2a17a3d9abeef0a7c48bee11bc6ff4630e5bd7c | diff --git a/tests/test_inputpluggroup.py b/tests/test_inputpluggroup.py
new file mode 100644
index 0000000..f5011bc
--- /dev/null
+++ b/tests/test_inputpluggroup.py
@@ -0,0 +1,126 @@
+import pytest
+from flowpipe import Graph, InputPlugGroup, Node
+
+
+@Node(outputs=["out"])
+def DemoNode(in_):
+ """
+ +--------... | Utility to distribute data into subgraphs
**Is your feature request related to a problem? Please describe.**
I often have subgraphs with several nodes that will take the same input from outside the subgraph (e.g. several nodes taking the same file from a file-reading node). This is not well supported as of now, all op... | 0.0 | d2a17a3d9abeef0a7c48bee11bc6ff4630e5bd7c | [
"tests/test_inputpluggroup.py::test_connect_groupinput_to_output",
"tests/test_inputpluggroup.py::test_connect_output_to_groupinput",
"tests/test_inputpluggroup.py::test_rshift_connect_groupinput_to_output",
"tests/test_inputpluggroup.py::test_rshift_connect_output_to_groupinput",
"tests/test_inputpluggroup... | [] | {
"failed_lite_validators": [
"has_hyperlinks",
"has_media",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-12-25 13:31:27+00:00 | mit | 453 | |
PennChopMicrobiomeProgram__illqc-17 | diff --git a/illqclib/main.py b/illqclib/main.py
index e8503bf..396d282 100644
--- a/illqclib/main.py
+++ b/illqclib/main.py
@@ -67,7 +67,7 @@ class Trimmomatic(object):
"ILLUMINACLIP:%s:2:30:10:8:true" % self._adapter_fp,
"LEADING:%d" % self.config["leading"],
"TRAILING:%d" % sel... | PennChopMicrobiomeProgram/illqc | bc504d4c93300db446ab7b70cb0660f682d07687 | diff --git a/test/test_main.py b/test/test_main.py
index 7a75113..803ed7b 100644
--- a/test/test_main.py
+++ b/test/test_main.py
@@ -26,17 +26,19 @@ class ConfigTests(unittest.TestCase):
class TrimmomaticTests(unittest.TestCase):
+ config_vals = {
+ "trimmomatic_jar_fp": "trimmomatic-0.30.jar",
+ ... | Cannot configure setting for sliding window
Python needs a tuple value for this setting, but JSON does not support tuple types. Suggest converting to value tuple before line 70:
https://github.com/PennChopMicrobiomeProgram/illqc/blob/master/illqclib/main.py#L70 | 0.0 | bc504d4c93300db446ab7b70cb0660f682d07687 | [
"test/test_main.py::TrimmomaticTests::test_make_command_sliding_window_as_list"
] | [
"test/test_main.py::TrimmomaticTests::test_make_command"
] | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2017-03-04 12:40:47+00:00 | mit | 454 | |
PennyLaneAI__pennylane-3624 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index fc59a61f5..6adf859bb 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -160,13 +160,22 @@
from the queue instead of updating their metadata to have an `"owner"`.
[(#3282)](https://github.com/PennyLaneA... | PennyLaneAI/pennylane | efe3c077efdd366121fd8eee322250cf498a5653 | diff --git a/tests/math/test_is_independent.py b/tests/math/test_is_independent.py
index cdeaf3062..5e933eaa9 100644
--- a/tests/math/test_is_independent.py
+++ b/tests/math/test_is_independent.py
@@ -115,11 +115,10 @@ class TestIsIndependentAutograd:
seed = 921
rnd_args = _get_random_args(args, self.... | [BUG] qml.chem.molecular_hamiltonian sets random number generator seed
### Expected behavior
When using the argument `shots=100` to a device one expects variation in the output. This variation depends on the random number generator that is used internally in the device.
Setting on controlling the seed of the RNG i... | 0.0 | efe3c077efdd366121fd8eee322250cf498a5653 | [
"tests/qchem/test_hartree_fock.py::test_scf_leaves_random_seed_unchanged",
"tests/templates/test_layers/test_random.py::TestInterfaces::test_list_lists",
"tests/templates/test_layers/test_random.py::TestInterfaces::test_autograd"
] | [
"tests/qchem/test_hartree_fock.py::test_nuclear_energy[symbols0-geometry0-e_ref0]",
"tests/qchem/test_hartree_fock.py::test_nuclear_energy[symbols1-geometry1-e_ref1]",
"tests/qchem/test_hartree_fock.py::test_nuclear_energy[symbols2-geometry2-e_ref2]",
"tests/qchem/test_hartree_fock.py::test_nuclear_energy_gra... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-01-11 11:50:38+00:00 | apache-2.0 | 455 | |
PennyLaneAI__pennylane-3744 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 33b1663d1..3b7fdf41a 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -9,7 +9,7 @@
* The `qml.math` module now also contains a submodule for
fast Fourier transforms, `qml.math.fft`.
[(#1440)](https:/... | PennyLaneAI/pennylane | 58790391e4eb53886254f80a4d5c428b4d146fc7 | diff --git a/tests/gradients/test_parameter_shift.py b/tests/gradients/test_parameter_shift.py
index 15e30190e..dcf42475d 100644
--- a/tests/gradients/test_parameter_shift.py
+++ b/tests/gradients/test_parameter_shift.py
@@ -1298,6 +1298,37 @@ class TestParameterShiftRule:
assert gradA == pytest.approx(expecte... | Parameter-shift rule of variance does not recycle unshifted evaluation
### Feature details
Save repeated evaluations at unshifted parameters when using `param_shift` together with gradient recipes that involve unshifted evaluations. Consider the setup
```python
import pennylane as qml
import numpy as np
dev = qm... | 0.0 | 58790391e4eb53886254f80a4d5c428b4d146fc7 | [
"tests/gradients/test_parameter_shift.py::TestParameterShiftRule::test_recycling_unshifted_tape_result",
"tests/returntypes/paramshift/test_parameter_shift_new.py::TestParameterShiftRule::test_recycling_unshifted_tape_result"
] | [
"tests/gradients/test_parameter_shift.py::TestGetOperationRecipe::test_custom_recipe_first_order[RX-frequencies0-None]",
"tests/gradients/test_parameter_shift.py::TestGetOperationRecipe::test_custom_recipe_first_order[RX-frequencies1-shifts1]",
"tests/gradients/test_parameter_shift.py::TestGetOperationRecipe::t... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-02-09 13:38:13+00:00 | apache-2.0 | 456 | |
PennyLaneAI__pennylane-4295 | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 7667e77f5..5c4a4b0d9 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -14,6 +14,11 @@
<h3>Bug fixes 🐛</h3>
+* Raise a warning if control indicators are hidden when calling `qml.draw_mpl`
+ [(#4295)](... | PennyLaneAI/pennylane | 6e0d11a8025007f4295b78733e318bd343710c5a | diff --git a/tests/drawer/test_mpldrawer.py b/tests/drawer/test_mpldrawer.py
index 28cd5a94c..26bb683ff 100644
--- a/tests/drawer/test_mpldrawer.py
+++ b/tests/drawer/test_mpldrawer.py
@@ -19,6 +19,7 @@ page in the developement guide.
"""
# pylint: disable=protected-access,wrong-import-position
+import warnings
im... | [BUG] draw_mpl misses controls for multi-target-wire ops with interspersed wires
### Expected behavior
All control and target wires are indicated in some way, or the draw function fails.
### Actual behavior
The control wire sandwiched between target wires is hidden behind a box drawing, For example, the attached ima... | 0.0 | 6e0d11a8025007f4295b78733e318bd343710c5a | [
"tests/drawer/test_mpldrawer.py::TestCTRL::test_ctrl_raises_warning_with_overlap[control_wires0-target_wires0]",
"tests/drawer/test_mpldrawer.py::TestCTRL::test_ctrl_raises_warning_with_overlap[control_wires1-target_wires1]",
"tests/drawer/test_mpldrawer.py::TestCTRL::test_ctrl_raises_warning_with_overlap[contr... | [
"tests/drawer/test_mpldrawer.py::TestInitialization::test_figsize_wires[2-2]",
"tests/drawer/test_mpldrawer.py::TestInitialization::test_figsize_wires[2-3]",
"tests/drawer/test_mpldrawer.py::TestInitialization::test_figsize_wires[3-2]",
"tests/drawer/test_mpldrawer.py::TestInitialization::test_figsize_wires[3... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2023-06-23 14:38:34+00:00 | apache-2.0 | 457 | |
PermutaTriangle__Tilings-469 | diff --git a/tilings/strategies/factor.py b/tilings/strategies/factor.py
index 694cc83..1b13955 100644
--- a/tilings/strategies/factor.py
+++ b/tilings/strategies/factor.py
@@ -260,6 +260,22 @@ class FactorWithInterleavingStrategy(FactorStrategy):
self.tracked = tracked
self.cols, self.rows = self.int... | PermutaTriangle/Tilings | 244371dc498344f859942b160ca99bbba24b884f | diff --git a/tests/strategies/test_encoding.py b/tests/strategies/test_encoding.py
index b5584ed..d46b725 100644
--- a/tests/strategies/test_encoding.py
+++ b/tests/strategies/test_encoding.py
@@ -244,6 +244,26 @@ def partition_ignoreparent_workable(strategy):
]
+def partition_ignoreparent_workable_tracked(str... | AssertionError: rule not in the spec and not empty
```
AssertionError: rule not in the spec and not empty
+-+-+
|1|\|
+-+-+
|\| |
+-+-+
1: Av(0123)
\: Av(01)
\: Av+(01)
Crossing obstructions:
0123: (0, 0), (0, 1), (0, 1), (0, 1)
0123: (0, 0), (0, 1), (0, 1), (1, 1)
0123: (0, 1), (0, 1), (0, 1), (1, 1)
Req... | 0.0 | 244371dc498344f859942b160ca99bbba24b884f | [
"tests/strategies/test_encoding.py::test_json_encoding[strategy147]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy149]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy151]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy153]",
"tests/strategies/test_encod... | [
"tests/strategies/test_encoding.py::test_json_encoding[strategy0]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy1]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy2]",
"tests/strategies/test_encoding.py::test_json_encoding[strategy3]",
"tests/strategies/test_encoding.py::... | {
"failed_lite_validators": [
"has_hyperlinks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-05-12 15:41:30+00:00 | bsd-3-clause | 458 | |
Picterra__picterra-python-61 | diff --git a/src/picterra/__main__.py b/src/picterra/__main__.py
index 1dc840f..c2004a2 100644
--- a/src/picterra/__main__.py
+++ b/src/picterra/__main__.py
@@ -262,4 +262,5 @@ def main():
exit("\033[91m%s\033[00m" % e)
-main()
+if __name__ == '__main__':
+ main()
diff --git a/src/picterra/nongeo.py b/s... | Picterra/picterra-python | c8199141b11c9bb2b74ffa09e923c1c371f44e0f | diff --git a/tests/test_nongeo.py b/tests/test_nongeo.py
index a8af5e8..9dc5ba0 100644
--- a/tests/test_nongeo.py
+++ b/tests/test_nongeo.py
@@ -1,6 +1,6 @@
import pytest
import tempfile
-from picterra.nongeo import _nongeo_latlng2xy
+from picterra.nongeo import _nongeo_latlng2xy, _load_polygons
from picterra import... | Fix picterra.nongeo_result_to_pixel to work with list of Polygons
Currently, `picterra.nongeo_result_to_pixel` only works with MultiPolygon (e.g. obtained through the API).
It doesn't work with a list of Polygon such as what you get when exporting from the UI.
We should fix this by making it work with both when l... | 0.0 | c8199141b11c9bb2b74ffa09e923c1c371f44e0f | [
"tests/test_nongeo.py::test_nongeo_latlng2xy[latlng0-xy0]",
"tests/test_nongeo.py::test_nongeo_latlng2xy[latlng1-xy1]",
"tests/test_nongeo.py::test_nongeo_latlng2xy[latlng2-xy2]",
"tests/test_nongeo.py::test_nongeo_latlng2xy[latlng3-xy3]",
"tests/test_nongeo.py::test_nongeo_result_to_pixel",
"tests/test_n... | [] | {
"failed_lite_validators": [
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-08 19:12:42+00:00 | mit | 459 | |
PlasmaControl__DESC-613 | diff --git a/desc/random.py b/desc/random.py
new file mode 100644
index 000000000..e40213d43
--- /dev/null
+++ b/desc/random.py
@@ -0,0 +1,198 @@
+"""Utilities for creating random surfaces and profiles."""
+
+import numpy as np
+import scipy.optimize
+import scipy.stats
+from numpy.random import default_rng
+
+from des... | PlasmaControl/DESC | 61797b69e6991b0284e76e0e493d9240edc779e0 | diff --git a/tests/test_random.py b/tests/test_random.py
new file mode 100644
index 000000000..c2390a275
--- /dev/null
+++ b/tests/test_random.py
@@ -0,0 +1,81 @@
+"""Tests for random surfaces, profiles etc."""
+import numpy as np
+import pytest
+
+from desc.equilibrium import Equilibrium
+from desc.grid import LinearG... | Add utilites to create "random" equilibria
For database studies, testing, examples etc, it would be nice to be able to generate some "random" equilibria that satisfy certain basic criteria, such as major/minor radius, field strength, beta, etc.
- [ ] Random surface with approximate shape that ideally doesn't self in... | 0.0 | 61797b69e6991b0284e76e0e493d9240edc779e0 | [
"tests/test_random.py::test_random_pressure",
"tests/test_random.py::test_random_surface"
] | [] | {
"failed_lite_validators": [
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2023-08-07 18:21:19+00:00 | mit | 460 | |
PlasmaPy__PlasmaPy-138 | diff --git a/plasmapy/physics/transport.py b/plasmapy/physics/transport.py
index 75073cbd..8af344d3 100644
--- a/plasmapy/physics/transport.py
+++ b/plasmapy/physics/transport.py
@@ -8,21 +8,22 @@
from .parameters import Debye_length
-@check_quantity({"n_e": {"units": units.m**-3},
- "T": {"units":... | PlasmaPy/PlasmaPy | 47925baeaac18c58c758b4ab50fabb44087cd800 | diff --git a/plasmapy/physics/tests/test_transport.py b/plasmapy/physics/tests/test_transport.py
index 3e5333a0..a1553e55 100644
--- a/plasmapy/physics/tests/test_transport.py
+++ b/plasmapy/physics/tests/test_transport.py
@@ -18,37 +18,37 @@ def test_Coulomb_logarithm():
particles = ('e', 'p')
for i in ran... | Check consistency of argument ordering in physics
Here are a few example signatures straight from `physics.transport`:
```
def Coulomb_logarithm(n_e, T, particles, V=None):
def Debye_length(T_e, n_e):
def Debye_number(T_e, n_e):
def upper_hybrid_frequency(B, n_e):
```
It would be nice to ensure that non-keywor... | 0.0 | 47925baeaac18c58c758b4ab50fabb44087cd800 | [
"plasmapy/physics/tests/test_transport.py::test_Coulomb_logarithm"
] | [] | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2017-10-03 13:09:48+00:00 | bsd-3-clause | 461 | |
PlasmaPy__PlasmaPy-2133 | diff --git a/CITATION.cff b/CITATION.cff
index 49523acb..0a89a7df 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -112,6 +112,10 @@ authors:
family-names: Carroll
alias: seanwilliamcarroll
+- given-names: Sarthak
+ family-names: Choudhary
+ alias: martha889
+
- given-names: Christian
family-names: Clauss
... | PlasmaPy/PlasmaPy | 6b5ba036221a5487719827b7211ee7b551eb3a83 | diff --git a/plasmapy/analysis/tests/test_nullpoint.py b/plasmapy/analysis/tests/test_nullpoint.py
index 2c87e3ad..6e854d66 100644
--- a/plasmapy/analysis/tests/test_nullpoint.py
+++ b/plasmapy/analysis/tests/test_nullpoint.py
@@ -289,7 +289,6 @@ def test_null_point_find3():
@pytest.mark.slow()
-@pytest.mark.xfail... | Fix xfailing tests in `test_nullpoint.py` for NumPy 1.24+
We started getting the following failures when we started using NumPy 1.24 (though there's a small chance that it's from a different package). I'm not sure what caused the change, but for the time I'm marking these tests as xfailing in #2098. We'd probably need... | 0.0 | 6b5ba036221a5487719827b7211ee7b551eb3a83 | [
"plasmapy/analysis/tests/test_nullpoint.py::test_null_point_find4",
"plasmapy/analysis/tests/test_nullpoint.py::test_null_point_find8",
"plasmapy/analysis/tests/test_nullpoint.py::Test_classify_null_point::test_classify_null_point_vals[kwargs2-Spiral"
] | [
"plasmapy/analysis/tests/test_nullpoint.py::test_trilinear_coeff_cal",
"plasmapy/analysis/tests/test_nullpoint.py::test_trilinear_jacobian",
"plasmapy/analysis/tests/test_nullpoint.py::test_trilinear_approx",
"plasmapy/analysis/tests/test_nullpoint.py::Test_reduction::test_reduction_vals[kwargs0-True]",
"pl... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2023-05-12 10:39:20+00:00 | bsd-3-clause | 462 | |
PlasmaPy__PlasmaPy-228 | diff --git a/plasmapy/mathematics/mathematics.py b/plasmapy/mathematics/mathematics.py
index b20ed5e2..58c10e5f 100644
--- a/plasmapy/mathematics/mathematics.py
+++ b/plasmapy/mathematics/mathematics.py
@@ -3,6 +3,7 @@
import numpy as np
from scipy import special
from astropy import units as u
+from scipy.special im... | PlasmaPy/PlasmaPy | 82eece6d5648641af1878f6846240dbf2a37a190 | diff --git a/plasmapy/mathematics/tests/test_dispersion.py b/plasmapy/mathematics/tests/test_dispersion.py
index 9dabb8e6..1c7eb3ca 100644
--- a/plasmapy/mathematics/tests/test_dispersion.py
+++ b/plasmapy/mathematics/tests/test_dispersion.py
@@ -15,7 +15,7 @@
(0, 1j * np.sqrt(π)),
(1, -1.076_159_013_825_536_... | Use Dawson function for dispersion
`plasma_dispersion_func` under `mathematics.py` currently uses `erf()` along with some other terms. This can be simplified to Dawson function, [dawsn](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.dawsn.html), and may even offer some minor speedups if scipy implem... | 0.0 | 82eece6d5648641af1878f6846240dbf2a37a190 | [
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_func[(1.2+4.4j)-(-0.05424615706922327+0.20796058435985562j)]",
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_func[9.2j-0.10806460304119532j]",
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_fu... | [
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_func[0-1.7724538509055159j]",
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_func[1-(-1.0761590138255368+0.6520493321732922j)]",
"plasmapy/mathematics/tests/test_dispersion.py::test_plasma_dispersion_func[1j-0.7578721... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_hyperlinks",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2018-01-07 15:28:48+00:00 | bsd-3-clause | 463 | |
PlasmaPy__PlasmaPy-743 | diff --git a/changelog/743.feature.rst b/changelog/743.feature.rst
new file mode 100644
index 00000000..52ebf1bc
--- /dev/null
+++ b/changelog/743.feature.rst
@@ -0,0 +1,1 @@
+Added units to reprs of .formulary.magnetostatics classes.
\ No newline at end of file
diff --git a/docs/about/credits.rst b/docs/about/credits.... | PlasmaPy/PlasmaPy | dfeea4ef1c4816433afee82c4da423cb91861cc9 | diff --git a/plasmapy/formulary/tests/test_magnetostatics.py b/plasmapy/formulary/tests/test_magnetostatics.py
index 5531cdcb..5f71331e 100644
--- a/plasmapy/formulary/tests/test_magnetostatics.py
+++ b/plasmapy/formulary/tests/test_magnetostatics.py
@@ -32,6 +32,11 @@ def test_value2(self):
assert np.all(np.i... | Add units to Magnetostatics reprs
Objects from the Magnetostatics module currently show up in reprs without units, because they're being cast to floats on class construction. It would be nice to have them save the input units, or at the very least, to display the units they're saving their inputs to, in their reprs and... | 0.0 | dfeea4ef1c4816433afee82c4da423cb91861cc9 | [
"plasmapy/formulary/tests/test_magnetostatics.py::Test_GeneralWire::test_repr",
"plasmapy/formulary/tests/test_magnetostatics.py::Test_FiniteStraightWire::test_repr",
"plasmapy/formulary/tests/test_magnetostatics.py::Test_InfiniteStraightWire::test_repr",
"plasmapy/formulary/tests/test_magnetostatics.py::Test... | [
"plasmapy/formulary/tests/test_magnetostatics.py::Test_MagneticDipole::test_value1",
"plasmapy/formulary/tests/test_magnetostatics.py::Test_MagneticDipole::test_value2",
"plasmapy/formulary/tests/test_magnetostatics.py::Test_GeneralWire::test_not_callable",
"plasmapy/formulary/tests/test_magnetostatics.py::Te... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-01-29 20:05:04+00:00 | bsd-3-clause | 464 | |
PostHog__posthog-python-30 | diff --git a/posthog/client.py b/posthog/client.py
index 0588082..22157cf 100644
--- a/posthog/client.py
+++ b/posthog/client.py
@@ -330,8 +330,8 @@ class Client(object):
except IndexError:
return default
- if feature_flag.get("is_simple_flag") and feature_flag.get("rollout_pe... | PostHog/posthog-python | 372fb74637bbcdc0c1de70f9f11b2b5d754553f0 | diff --git a/posthog/test/test_client.py b/posthog/test/test_client.py
index e4971db..9c867a0 100644
--- a/posthog/test/test_client.py
+++ b/posthog/test/test_client.py
@@ -325,14 +325,28 @@ class TestClient(unittest.TestCase):
self.assertTrue(client.feature_enabled("beta-feature", "distinct_id"))
@mock... | Library does not properly handle feature flags with no % rollout
See sentry issue https://sentry.io/organizations/posthog/issues/2220836956/?project=1899813. If a feature flag is enabled for everyone without a % rollout, the client crashes. Notice that this is different from a 100% rollout which works fine.
```
u... | 0.0 | 372fb74637bbcdc0c1de70f9f11b2b5d754553f0 | [
"posthog/test/test_client.py::TestClient::test_feature_enabled_simple_with_none_rollout_percentage",
"posthog/test/test_client.py::TestClient::test_feature_enabled_simple_without_rollout_percentage"
] | [
"posthog/test/test_client.py::TestClient::test_advanced_capture",
"posthog/test/test_client.py::TestClient::test_advanced_identify",
"posthog/test/test_client.py::TestClient::test_advanced_page",
"posthog/test/test_client.py::TestClient::test_advanced_set",
"posthog/test/test_client.py::TestClient::test_adv... | {
"failed_lite_validators": [
"has_hyperlinks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-05-14 11:50:01+00:00 | mit | 465 | |
PostHog__posthog-python-32 | diff --git a/example.py b/example.py
index 7121430..08d64e6 100644
--- a/example.py
+++ b/example.py
@@ -6,7 +6,7 @@ import time
import posthog
# You can find this key on the /setup page in PostHog
-posthog.api_key = ""
+posthog.project_api_key = ""
posthog.personal_api_key = ""
# Where you host PostHog, with n... | PostHog/posthog-python | fe6d0dc1ecc2df09ee2fbd3f79e8843c03622b70 | diff --git a/posthog/test/test_client.py b/posthog/test/test_client.py
index 9c867a0..3c9ea4a 100644
--- a/posthog/test/test_client.py
+++ b/posthog/test/test_client.py
@@ -43,6 +43,22 @@ class TestClient(unittest.TestCase):
self.assertEqual(msg["properties"]["$lib"], "posthog-python")
self.assertEqua... | posthog.project_api_key doesn't work
According to the docs (https://posthog.com/docs/libraries/python#installation) `posthog.api_key` has been deprecated in favour of `posthog.project_api_key`.
However, when I use `project_api_key` with the current version, 1.3.1, it does not work, while `api_key` does. | 0.0 | fe6d0dc1ecc2df09ee2fbd3f79e8843c03622b70 | [
"posthog/test/test_client.py::TestClient::test_basic_capture_with_project_api_key"
] | [
"posthog/test/test_client.py::TestClient::test_advanced_capture",
"posthog/test/test_client.py::TestClient::test_advanced_identify",
"posthog/test/test_client.py::TestClient::test_advanced_page",
"posthog/test/test_client.py::TestClient::test_advanced_set",
"posthog/test/test_client.py::TestClient::test_adv... | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-05-18 13:09:54+00:00 | mit | 466 | |
PrefectHQ__prefect-3518 | diff --git a/changes/issue3517.yaml b/changes/issue3517.yaml
new file mode 100644
index 0000000000..f0e161d288
--- /dev/null
+++ b/changes/issue3517.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix `get flow-runs` and `describe flow-runs` CLI commands querying of removed `duration` field - [#3517](https://github.com/PrefectHQ/pref... | PrefectHQ/prefect | 8563cbb4b0a9e5db99045fb46717cac6ba172af5 | diff --git a/tests/cli/test_describe.py b/tests/cli/test_describe.py
index b06dfb87ba..a56c746142 100644
--- a/tests/cli/test_describe.py
+++ b/tests/cli/test_describe.py
@@ -263,7 +263,6 @@ def test_describe_flow_runs(monkeypatch, cloud_api):
scheduled_start_time
start_time
end_t... | "Bad request for URL" when running "prefect get flow-runs"
## Description
I see the following error when running `prefect get flow-runs`:
```
Traceback (most recent call last):
File "/home/jc/.local/bin/prefect", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/dist-packages/click/core.... | 0.0 | 8563cbb4b0a9e5db99045fb46717cac6ba172af5 | [
"tests/core/test_flow.py::test_timeout_actually_stops_execution[mproc]"
] | [
"tests/cli/test_describe.py::test_describe_init",
"tests/cli/test_describe.py::test_describe_help",
"tests/cli/test_get.py::test_get_init",
"tests/cli/test_get.py::test_get_help",
"tests/cli/test_get.py::test_get_logs_fails_no_name_or_id",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_no... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-10-16 14:11:13+00:00 | apache-2.0 | 467 | |
PrefectHQ__prefect-3551 | diff --git a/changes/pr3548.yaml b/changes/pr3548.yaml
new file mode 100644
index 0000000000..f9b4d08522
--- /dev/null
+++ b/changes/pr3548.yaml
@@ -0,0 +1,5 @@
+enhancement:
+ - "`RenameFlowRunTask`: use default `flow_run_id` value from context - [#3548](https://github.com/PrefectHQ/prefect/pull/3548)"
+
+contributor... | PrefectHQ/prefect | bd6e47379594d4e26e6810380482320eeee714ae | diff --git a/tests/agent/test_local_agent.py b/tests/agent/test_local_agent.py
index 4c2d4d657d..5abedcfe12 100644
--- a/tests/agent/test_local_agent.py
+++ b/tests/agent/test_local_agent.py
@@ -87,18 +87,22 @@ def test_local_agent_uses_ip_if_dockerdesktop_hostname(monkeypatch):
assert "IP" in agent.labels
-de... | Change "PYTHONPATH" construct for local agent
## Current behavior
Local agent has the "--import-path" feature, but its now availible only for unix enviroment, because PYTHONPATH is concatenated with ":"
current_env["PYTHONPATH"] = ":".join(python_path)
## Proposed behavior
Use "os.pathsep" instead ":", to get th... | 0.0 | bd6e47379594d4e26e6810380482320eeee714ae | [
"tests/tasks/prefect/test_flow_run_rename.py::test_flow_run_id_defaults_from_context",
"tests/tasks/prefect/test_flow_run_rename.py::test_missing_flow_run_id",
"tests/utilities/test_serialization.py::TestJSONCompatibleField::test_validate_on_dump",
"tests/utilities/test_serialization.py::TestJSONCompatibleFie... | [
"tests/agent/test_local_agent.py::test_local_agent_init",
"tests/agent/test_local_agent.py::test_local_agent_deduplicates_labels",
"tests/agent/test_local_agent.py::test_local_agent_config_options",
"tests/agent/test_local_agent.py::test_local_agent_config_no_storage_labels",
"tests/agent/test_local_agent.p... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2020-10-20 16:40:15+00:00 | apache-2.0 | 468 | |
PrefectHQ__prefect-3593 | diff --git a/changes/pr3593.yaml b/changes/pr3593.yaml
new file mode 100644
index 0000000000..e65bcec38a
--- /dev/null
+++ b/changes/pr3593.yaml
@@ -0,0 +1,2 @@
+enhancement:
+ - "`prefect diagnostics` no longer displays keys that have values matching the default config - [#3593](https://github.com/PrefectHQ/prefect/p... | PrefectHQ/prefect | 695d8d50a56c9e4d1ba54c848787032042f3088d | diff --git a/tests/utilities/test_diagnostics.py b/tests/utilities/test_diagnostics.py
index b52d1daf04..f86cb74d4f 100644
--- a/tests/utilities/test_diagnostics.py
+++ b/tests/utilities/test_diagnostics.py
@@ -38,6 +38,39 @@ def test_config_overrides_populated(monkeypatch):
assert config_overrides["config_ove... | Diagnostics displays values that do not differ from defaults
## Current behavior
<!-- Please describe how the feature works today -->
If you copy the `prefect/src/prefect/config.toml` file to a local copy at `~/.prefect/config.toml` to easily have all the settings available, `prefect diagnostics` will display all o... | 0.0 | 695d8d50a56c9e4d1ba54c848787032042f3088d | [
"tests/utilities/test_diagnostics.py::test_config_overrides_excludes_all_default_matches",
"tests/utilities/test_diagnostics.py::test_config_overrides_excludes_some_default_matches"
] | [
"tests/utilities/test_diagnostics.py::test_system_information",
"tests/utilities/test_diagnostics.py::test_config_overrides_empty",
"tests/utilities/test_diagnostics.py::test_config_overrides_populated",
"tests/utilities/test_diagnostics.py::test_config_overrides_secrets",
"tests/utilities/test_diagnostics.... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-10-29 17:54:24+00:00 | apache-2.0 | 469 | |
PrefectHQ__prefect-3643 | diff --git a/changes/issue3619.yaml b/changes/issue3619.yaml
new file mode 100644
index 0000000000..8b23031c28
--- /dev/null
+++ b/changes/issue3619.yaml
@@ -0,0 +1,2 @@
+enhancement:
+ - "Checkpoint all iterations of Looped tasks - [#3619](https://github.com/PrefectHQ/prefect/issues/3619)"
diff --git a/changes/pr3624... | PrefectHQ/prefect | 7ef943f1e1dcea54b095403c1b1ca0b47eaf7883 | diff --git a/tests/engine/test_task_runner.py b/tests/engine/test_task_runner.py
index f6f4551a13..841623656d 100644
--- a/tests/engine/test_task_runner.py
+++ b/tests/engine/test_task_runner.py
@@ -2165,7 +2165,7 @@ class TestLooping:
assert state.result == 3
@pytest.mark.parametrize("checkpoint", [Tru... | Templated results are overwritten on raised LOOP
## Opened from the [Prefect Public Slack Community](https://join.slack.com/t/prefect-public/shared_invite/enQtNzE5OTU3OTQwNzc1LTQ5M2FkZmQzZjI0ODg1ZTBmOTc0ZjVjYWFjMWExZDAyYzBmYjVmMTE1NTQ1Y2IxZTllOTc4MmI3NzYxMDlhYWU)
**me1548**: Hey, I’m trying to use the `LOOP` and write... | 0.0 | 7ef943f1e1dcea54b095403c1b1ca0b47eaf7883 | [
"tests/engine/test_task_runner.py::TestLooping::test_looping_checkpoints_all_iterations[True]",
"tests/engine/test_task_runner.py::TestLooping::test_looping_checkpoints_all_iterations[None]"
] | [
"tests/engine/test_task_runner.py::test_task_runner_has_logger",
"tests/engine/test_task_runner.py::test_task_that_succeeds_is_marked_success",
"tests/engine/test_task_runner.py::test_task_that_raises_success_is_marked_success",
"tests/engine/test_task_runner.py::test_task_that_has_an_error_is_marked_fail",
... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-10 19:48:33+00:00 | apache-2.0 | 470 | |
PrefectHQ__prefect-3645 | diff --git a/changes/issue3519.yaml b/changes/issue3519.yaml
new file mode 100644
index 0000000000..d912d92da7
--- /dev/null
+++ b/changes/issue3519.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix issue with retrying mapped pipelines on dask - [#3519](https://github.com/PrefectHQ/prefect/issues/3519)"
diff --git a/changes/issue36... | PrefectHQ/prefect | 5f6b21e37093e2ef8caea676dfbbb02a3d1f5413 | diff --git a/tests/core/test_task_map.py b/tests/core/test_task_map.py
index 7646d486d7..18fbd48d27 100644
--- a/tests/core/test_task_map.py
+++ b/tests/core/test_task_map.py
@@ -1154,3 +1154,34 @@ class TestFlatMap:
state.result[z].message
== "At least one upstream state has an unmappable res... | Cannot restart flow run after mapped task
An example flow that maps and then fails:
```
from datetime import timedelta
from prefect import *
from prefect.engine.executors import DaskExecutor
from prefect.engine.results import GCSResult
from prefect.environments.storage import GCS
with Flow("TestFlow", result=G... | 0.0 | 5f6b21e37093e2ef8caea676dfbbb02a3d1f5413 | [
"tests/core/test_task_map.py::test_mapped_retries_regenerate_child_pipelines",
"tests/engine/test_task_runner.py::TestCheckTaskReadyToMapStep::test_run_mapped_returns_cached_inputs_if_rerun[state1]"
] | [
"tests/core/test_task_map.py::test_map_returns_a_task_copy",
"tests/core/test_task_map.py::test_map_returns_a_task_copy_without_context",
"tests/core/test_task_map.py::test_calling_map_with_bind_returns_self",
"tests/core/test_task_map.py::test_map_spawns_new_tasks[local]",
"tests/core/test_task_map.py::tes... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-11 04:47:09+00:00 | apache-2.0 | 471 | |
PrefectHQ__prefect-3654 | diff --git a/.circleci/config.yml b/.circleci/config.yml
index d6aa7c4fe7..2246d1b5a9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -31,7 +31,7 @@ jobs:
check_static_analysis:
docker:
- - image: python:3.7
+ - image: python:3.8
auth:
username: $DOCKER_HUB_USER
... | PrefectHQ/prefect | 92ec574d018f3759ea64c25f5283f0a6aedb6376 | diff --git a/tests/conftest.py b/tests/conftest.py
index 736b1f2d99..78cfaedc7d 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,8 +1,13 @@
import os
import tempfile
+import sys
from unittest.mock import MagicMock
import pytest
+
+if sys.platform != "win32":
+ # Fix for https://github.com/dask/dist... | Same flow generates different hashes on repeated runs
## Description
`flow.serialized_hash()` generates different values on different script runs. Based on the original feature description this isn't what I expected.
## Expected Behavior
The exact same flow will always generate the same hash.
## Reprodu... | 0.0 | 92ec574d018f3759ea64c25f5283f0a6aedb6376 | [
"tests/core/test_flow.py::TestReplace::test_replace_leaves_unset_reference_tasks_alone"
] | [
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_no_args",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_no_name",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_name_as_none",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_name_as_empty_strin... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-12 16:38:14+00:00 | apache-2.0 | 472 | |
PrefectHQ__prefect-3681 | diff --git a/changes/pr3681.yaml b/changes/pr3681.yaml
new file mode 100644
index 0000000000..e707ece5c9
--- /dev/null
+++ b/changes/pr3681.yaml
@@ -0,0 +1,2 @@
+enhancement:
+ - "Add `task_definition_arn` to `ECSRun` run-config - [#3681](https://github.com/PrefectHQ/prefect/pull/3681)"
diff --git a/src/prefect/agent/... | PrefectHQ/prefect | 5715d587e9f30c9e5fced891566a3d7d6c693d4a | diff --git a/tests/agent/test_ecs_agent.py b/tests/agent/test_ecs_agent.py
index f6de39f5d0..79925e4d43 100644
--- a/tests/agent/test_ecs_agent.py
+++ b/tests/agent/test_ecs_agent.py
@@ -506,7 +506,7 @@ class TestGetRunTaskKwargs:
@pytest.mark.parametrize("kind", ["exists", "missing", "error"])
-def test_lookup_ta... | ECSRun should accept task_definition_arn
## Current behavior
The new ECSRun config offers great flexibility and fine-grained control over how a task is defined and executed, especially when custom values for specific parameters have to provided to override the default configuration.
However, in a CI/CD environment, y... | 0.0 | 5715d587e9f30c9e5fced891566a3d7d6c693d4a | [
"tests/run_configs/test_ecs.py::test_no_args",
"tests/run_configs/test_ecs.py::test_all_args",
"tests/run_configs/test_ecs.py::test_labels",
"tests/run_configs/test_ecs.py::test_can_only_specify_task_definition_one_way[kwargs0]",
"tests/run_configs/test_ecs.py::test_can_only_specify_task_definition_one_way[... | [] | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2020-11-18 20:27:36+00:00 | apache-2.0 | 473 | |
PrefectHQ__prefect-3869 | diff --git a/changes/pr3869.yaml b/changes/pr3869.yaml
new file mode 100644
index 0000000000..14678395dd
--- /dev/null
+++ b/changes/pr3869.yaml
@@ -0,0 +1,2 @@
+enhancement:
+ - "Make `setup` method optional for `resource_manager` tasks - [#3869](https://github.com/PrefectHQ/prefect/pull/3869)"
diff --git a/src/prefe... | PrefectHQ/prefect | c85e6e3b3658fe9ca6276d9af2bb38038078df1b | diff --git a/tests/tasks/core/test_resource_manager.py b/tests/tasks/core/test_resource_manager.py
index 73795a06e6..f1b7847878 100644
--- a/tests/tasks/core/test_resource_manager.py
+++ b/tests/tasks/core/test_resource_manager.py
@@ -186,6 +186,56 @@ def test_resource_manager_generated_flow_structure(api):
}
... | Support `resource_manager` tasks without a setup/cleanup step
The current `prefect.resource_manager` design requires both a `setup` and `cleanup` method defined. Sometimes you want to run a cleanup step without an explicit setup step (or the other way around, although that's less useful). It'd be good to modify the `re... | 0.0 | c85e6e3b3658fe9ca6276d9af2bb38038078df1b | [
"tests/tasks/core/test_resource_manager.py::test_resource_manager_generated_flow_structure_no_setup",
"tests/tasks/core/test_resource_manager.py::test_resource_manager_execution_success_no_setup"
] | [
"tests/tasks/core/test_resource_manager.py::test_resource_manager_default_init",
"tests/tasks/core/test_resource_manager.py::test_resource_manager_init_overrides",
"tests/tasks/core/test_resource_manager.py::test_resource_manager_decorator_init",
"tests/tasks/core/test_resource_manager.py::test_resource_manag... | {
"failed_lite_validators": [
"has_issue_reference",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2020-12-17 17:18:12+00:00 | apache-2.0 | 474 | |
PrefectHQ__prefect-3923 | diff --git a/changes/pr3923.yaml b/changes/pr3923.yaml
new file mode 100644
index 0000000000..a17d5f3adb
--- /dev/null
+++ b/changes/pr3923.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Support storing multiple local flows with the same name when using `Local` storage - [#3923](https://github.com/PrefectHQ/prefect/pull/3923)"
diff ... | PrefectHQ/prefect | a26cb1b5b6d2dd18eb8987a9e473e05e38dca8d1 | diff --git a/tests/storage/test_local_storage.py b/tests/storage/test_local_storage.py
index a9381ac1f3..ea4173fc3b 100644
--- a/tests/storage/test_local_storage.py
+++ b/tests/storage/test_local_storage.py
@@ -1,6 +1,5 @@
import os
import socket
-import tempfile
import cloudpickle
import pytest
@@ -41,21 +40,22 ... | Prefect serializes flows based on flow name ignoring project
Hi,
I searched the slack channel and did not find anything that pertained directly to this. We use Prefect for two departments that have virtually the same flows, but different sources and different processing rules. What we have found is that flows with... | 0.0 | a26cb1b5b6d2dd18eb8987a9e473e05e38dca8d1 | [
"tests/storage/test_local_storage.py::test_add_flow_to_storage"
] | [
"tests/storage/test_local_storage.py::test_create_local_storage",
"tests/storage/test_local_storage.py::test_create_local_storage_with_custom_dir",
"tests/storage/test_local_storage.py::test_create_local_storage_without_validation",
"tests/storage/test_local_storage.py::test_add_flow_file_to_storage",
"test... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-05 18:56:39+00:00 | apache-2.0 | 475 | |
PrefectHQ__prefect-3924 | diff --git a/changes/pr3924.yaml b/changes/pr3924.yaml
new file mode 100644
index 0000000000..de3d6b199d
--- /dev/null
+++ b/changes/pr3924.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix bug in `prefect.context` contextmanager that resulted in context fields reverting to their initially configured values - [#3924](https://github... | PrefectHQ/prefect | 8f6792ba31cb17b4a9a0cd1bc32c4160559057b9 | diff --git a/tests/test_context.py b/tests/test_context.py
index 79f7a2c0f6..b17a2a3fc0 100644
--- a/tests/test_context.py
+++ b/tests/test_context.py
@@ -120,11 +120,13 @@ def test_modify_context_by_calling_update_inside_contextmanager():
def test_context_loads_values_from_config(monkeypatch):
subsection = Con... | Prefect context manager overwrites global contexts only once
## Description
<!-- A clear description of the bug -->
The [document](https://docs.prefect.io/core/concepts/execution.html#modifying-context-at-runtime) states we can modify global context keys by using a context manager:
> ### Modifying context at run... | 0.0 | 8f6792ba31cb17b4a9a0cd1bc32c4160559057b9 | [
"tests/test_context.py::test_context_loads_values_from_config",
"tests/test_context.py::test_context_contextmanager_prioritizes_new_keys_even_on_context_exit"
] | [
"tests/test_context.py::test_context_sets_variables_inside_context_manager",
"tests/test_context.py::test_setting_context_with_keywords",
"tests/test_context.py::test_setting_context_with_dict",
"tests/test_context.py::test_call_function_inside_context_can_access_context",
"tests/test_context.py::test_neste... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-05 22:53:46+00:00 | apache-2.0 | 476 | |
PrefectHQ__prefect-3964 | diff --git a/changes/pr3964.yaml b/changes/pr3964.yaml
new file mode 100644
index 0000000000..2c4023eb50
--- /dev/null
+++ b/changes/pr3964.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Properly handle `NotImplementedError` exceptions raised by a result's serializer - [#3964](https://github.com/PrefectHQ/prefect/pull/3964)"
diff --... | PrefectHQ/prefect | babc7631582b43dce9f41d584719dcc2ed6279c9 | diff --git a/tests/engine/result/test_base.py b/tests/engine/result/test_base.py
index dce845dca3..aaa2ddff18 100644
--- a/tests/engine/result/test_base.py
+++ b/tests/engine/result/test_base.py
@@ -7,6 +7,7 @@ from unittest.mock import MagicMock
import prefect
from prefect.engine.result import Result, NoResultType... | Try/Catch accidentally suppresses errors in serializers
## Description
<!-- A clear description of the bug -->
https://github.com/PrefectHQ/prefect/blob/master/src/prefect/engine/task_runner.py#L892
A Flow using the PandasSerializer and the S3Result failed to serialize a `datetime.timedelta` in a column. But, that ... | 0.0 | babc7631582b43dce9f41d584719dcc2ed6279c9 | [
"tests/engine/result/test_base.py::TestInitialization::test_result_does_not_require_a_value",
"tests/engine/result/test_base.py::TestInitialization::test_result_inits_with_value",
"tests/engine/result/test_base.py::test_has_abstract_interfaces[exists]",
"tests/engine/result/test_base.py::test_has_abstract_int... | [] | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-14 21:54:02+00:00 | apache-2.0 | 477 | |
PrefectHQ__prefect-3975 | diff --git a/changes/pr3975.yaml b/changes/pr3975.yaml
new file mode 100644
index 0000000000..b4b643e41b
--- /dev/null
+++ b/changes/pr3975.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix regression in `apply_map` which prevented use in `case`/`resource_manager` blocks - [#3975](https://github.com/PrefectHQ/prefect/pull/3975)"
di... | PrefectHQ/prefect | 07f049055c66193078f4db6a3d3b034acc7145bf | diff --git a/tests/utilities/test_tasks.py b/tests/utilities/test_tasks.py
index 62ebe61107..d8a8700e23 100644
--- a/tests/utilities/test_tasks.py
+++ b/tests/utilities/test_tasks.py
@@ -1,6 +1,6 @@
import pytest
-from prefect import Flow, Task, case, Parameter
+from prefect import Flow, Task, case, Parameter, resou... | Cannot use apply_map in a ResourceManager context
## Description
<!-- A clear description of the bug -->
Prefect version 0.14.2 introduced a bugfix #3920 which disallows the use of apply_map
within a ResourceManager context. We heavily rely on both ResourceManager and apply_map, e.g. we want to
scale a presto/trin... | 0.0 | 07f049055c66193078f4db6a3d3b034acc7145bf | [
"tests/utilities/test_tasks.py::TestApplyMap::test_apply_map_inside_case_statement_works",
"tests/utilities/test_tasks.py::TestApplyMap::test_apply_map_inside_resource_manager_works"
] | [
"tests/utilities/test_tasks.py::TestTaskDecorator::test_task_decorator_can_be_used_without_calling",
"tests/utilities/test_tasks.py::TestTaskDecorator::test_task_decorator_generates_new_tasks_upon_subsequent_calls",
"tests/utilities/test_tasks.py::TestTaskDecorator::test_task_decorator_with_args_must_be_called_... | {
"failed_lite_validators": [
"has_issue_reference",
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-01-19 15:38:50+00:00 | apache-2.0 | 478 | |
PrefectHQ__prefect-4043 | diff --git a/changes/issue4031.yaml b/changes/issue4031.yaml
new file mode 100644
index 0000000000..f521836e2c
--- /dev/null
+++ b/changes/issue4031.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix issue with fixed duration Paused states not resuming properly - [#4031](https://github.com/PrefectHQ/prefect/issues/4031)"
diff --git ... | PrefectHQ/prefect | 974c4a2267cdf28272b349875b58e9bfd13389c0 | diff --git a/tests/engine/test_task_runner.py b/tests/engine/test_task_runner.py
index 534537c29f..9be34ec8fd 100644
--- a/tests/engine/test_task_runner.py
+++ b/tests/engine/test_task_runner.py
@@ -429,6 +429,23 @@ class TestInitializeRun:
result = TaskRunner(Task()).initialize_run(state=Resume(), context... | duration parameter is not taken into account from task_pause
## Description
<!-- A clear description of the bug -->
`duration` parameter in `prefect.utilities.tasks.pause_task` seems to be ignored. Based on documentation, if `duration` is specified, then, the task should be resumed after a period of time
## Ex... | 0.0 | 974c4a2267cdf28272b349875b58e9bfd13389c0 | [
"tests/engine/test_task_runner.py::TestInitializeRun::test_task_runner_puts_resume_in_context_if_paused_start_time_elapsed"
] | [
"tests/engine/test_task_runner.py::test_task_runner_has_logger",
"tests/engine/test_task_runner.py::test_task_that_succeeds_is_marked_success",
"tests/engine/test_task_runner.py::test_task_that_raises_success_is_marked_success",
"tests/engine/test_task_runner.py::test_task_that_has_an_error_is_marked_fail",
... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_media",
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-02-01 19:07:08+00:00 | apache-2.0 | 479 | |
PrefectHQ__prefect-4189 | diff --git a/changes/pr4189.yaml b/changes/pr4189.yaml
new file mode 100644
index 0000000000..4281dbf640
--- /dev/null
+++ b/changes/pr4189.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Make task slug generation robust to modifying existing task names - [#4189](https://github.com/PrefectHQ/prefect/pull/4189)"
diff --git a/src/prefe... | PrefectHQ/prefect | 720d06a8b66f4f13bab59dff7658113e93c39d13 | diff --git a/tests/core/test_flow.py b/tests/core/test_flow.py
index f7df8b2f84..2c2144b6e0 100644
--- a/tests/core/test_flow.py
+++ b/tests/core/test_flow.py
@@ -3196,12 +3196,16 @@ def test_run_agent_passes_flow_labels(monkeypatch, kind):
class TestSlugGeneration:
def test_slugs_are_stable(self):
- tas... | Modifying `task.name` can violate the assumption that slugs are unique
## Description
Dynamically modifying a task's name can result in overlapping slugs. This seems to be because https://github.com/PrefectHQ/prefect/blob/20cd7352705741628ff83789e779b7bdb5315969/src/prefect/core/flow.py#L473-L494 generates `slug_bases... | 0.0 | 720d06a8b66f4f13bab59dff7658113e93c39d13 | [
"tests/core/test_flow.py::TestSlugGeneration::test_generated_slugs_dont_collide_with_user_provided_slugs",
"tests/core/test_flow.py::TestSlugGeneration::test_slugs_robust_to_task_name_changes"
] | [
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_no_args",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_no_name",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_name_as_none",
"tests/core/test_flow.py::TestCreateFlow::test_create_flow_with_name_as_empty_strin... | {
"failed_lite_validators": [
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-03-01 18:01:59+00:00 | apache-2.0 | 480 | |
PrefectHQ__prefect-4232 | diff --git a/changes/pr4232.yaml b/changes/pr4232.yaml
new file mode 100644
index 0000000000..a9b08be9a5
--- /dev/null
+++ b/changes/pr4232.yaml
@@ -0,0 +1,2 @@
+enhancement:
+ - "Add `--docker-client-timeout` flag to docker agent, for configuring the timeout for all docker API requests - [#4232](https://github.com/Pr... | PrefectHQ/prefect | d06c5e49be0d1fc98fb337803aeee0286be39ff6 | diff --git a/tests/agent/test_docker_agent.py b/tests/agent/test_docker_agent.py
index 92bdad2372..a671c7dd70 100644
--- a/tests/agent/test_docker_agent.py
+++ b/tests/agent/test_docker_agent.py
@@ -68,11 +68,12 @@ def test_docker_agent_config_options_populated(monkeypatch):
api = MagicMock()
monkeypatch.seta... | Docker Agent: Passing custom parameters when creating docker.APIClient
## Current behavior
prefect docker agent is using default parameters to create an instance of docker.APIClient. This makes it impossible to customize the docker client. Things such as to increase the timeout of docker client cannot be done.
http... | 0.0 | d06c5e49be0d1fc98fb337803aeee0286be39ff6 | [
"tests/agent/test_docker_agent.py::test_docker_agent_config_options_populated"
] | [
"tests/agent/test_docker_agent.py::test_docker_agent_init",
"tests/agent/test_docker_agent.py::test_docker_agent_config_options[osx-unix://var/run/docker.sock]",
"tests/agent/test_docker_agent.py::test_docker_agent_config_options[win32-npipe:////./pipe/docker_engine]",
"tests/agent/test_docker_agent.py::test_... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-03-09 19:16:51+00:00 | apache-2.0 | 481 | |
PrefectHQ__prefect-4287 | diff --git a/changes/pr4287.yaml b/changes/pr4287.yaml
new file mode 100644
index 0000000000..2f28d5641f
--- /dev/null
+++ b/changes/pr4287.yaml
@@ -0,0 +1,2 @@
+fix:
+ - "Fix bug where sometimes the global `prefect.context` wouldn't be respected during a flow run - [#4287](https://github.com/PrefectHQ/prefect/pull/42... | PrefectHQ/prefect | 4f09895840ff0bc5187ae18ef493ad3021dab0cc | diff --git a/tests/engine/test_flow_runner.py b/tests/engine/test_flow_runner.py
index 47749cd250..c07cc95fbf 100644
--- a/tests/engine/test_flow_runner.py
+++ b/tests/engine/test_flow_runner.py
@@ -1323,18 +1323,28 @@ class TestContext:
output = res.result[return_ctx_key].result
assert isinstance(out... | FlowRunner won't preserve all items from prefect.context
## Description
<!-- A clear description of the bug -->
FlowRunner does not preserve all items from prefect.context (e.g. dates: today, yesterday, etc.), because `initialize_run()` method prepares an empty context if not specified in `context` parameter. This co... | 0.0 | 4f09895840ff0bc5187ae18ef493ad3021dab0cc | [
"tests/engine/test_flow_runner.py::TestContext::test_user_provided_context_is_prioritized[outer_context1-inner_context1-outer]"
] | [
"tests/engine/test_flow_runner.py::test_flow_runner_has_logger",
"tests/engine/test_flow_runner.py::test_flow_runner_runs_basic_flow_with_1_task",
"tests/engine/test_flow_runner.py::test_flow_runner_with_no_return_tasks",
"tests/engine/test_flow_runner.py::test_flow_runner_with_invalid_return_tasks",
"tests... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_added_files"
],
"has_test_patch": true,
"is_lite": false
} | 2021-03-23 22:15:05+00:00 | apache-2.0 | 482 | |
PrefectHQ__prefect-5237 | diff --git a/changes/pr5237.yaml b/changes/pr5237.yaml
new file mode 100644
index 0000000000..aab6b48e00
--- /dev/null
+++ b/changes/pr5237.yaml
@@ -0,0 +1,5 @@
+enhancement:
+ - "Allow passing of proxies argument to slack_notifier - [#5237](https://github.com/PrefectHQ/prefect/pull/5237)"
+
+contributor:
+ - "[Vince... | PrefectHQ/prefect | 80efb2c4f509ba6ee324c6c5c9b214a745eae6a4 | diff --git a/tests/utilities/notifications/test_notifications.py b/tests/utilities/notifications/test_notifications.py
index a2611f6e7b..83e65bff53 100644
--- a/tests/utilities/notifications/test_notifications.py
+++ b/tests/utilities/notifications/test_notifications.py
@@ -260,6 +260,16 @@ def test_slack_notifier_is_c... | Add proxies to slack_notifier
## Current behavior
`prefect.utilities.notifications.slack_notifier` sends requests to the Slack webhook using `requests.post` without allowing `proxies={"http": "0.123.456.789"}` to be passed, which is problematic when Internet access must be done through a proxy.
It is possible to ... | 0.0 | 80efb2c4f509ba6ee324c6c5c9b214a745eae6a4 | [
"tests/utilities/notifications/test_notifications.py::test_slack_notifier_uses_proxies"
] | [
"tests/utilities/notifications/test_notifications.py::test_callback_factory_generates_pickleable_objs",
"tests/utilities/notifications/test_notifications.py::test_formatter_formats_states[Running]",
"tests/utilities/notifications/test_notifications.py::test_formatter_formats_states[Pending]",
"tests/utilities... | {
"failed_lite_validators": [
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-12-15 20:08:18+00:00 | apache-2.0 | 483 | |
PrincetonUniversity__PsyNeuLink-897 | diff --git a/psyneulink/components/component.py b/psyneulink/components/component.py
index 6fe282529e..2a9f3a19bd 100644
--- a/psyneulink/components/component.py
+++ b/psyneulink/components/component.py
@@ -2649,9 +2649,8 @@ class Component(object):
kwargs_to_instantiate = function.ClassDefaults.values().c... | PrincetonUniversity/PsyNeuLink | c95f8b7f357d90bc5b5e65d2ef3c3932e1175cc5 | diff --git a/tests/projections/test_projections.py b/tests/projections/test_projections.py
new file mode 100644
index 0000000000..482a6ab589
--- /dev/null
+++ b/tests/projections/test_projections.py
@@ -0,0 +1,18 @@
+import numpy as np
+import psyneulink as pnl
+import pytest
+
+
+@pytest.mark.parametrize(
+ 'projec... | Inconsistent shape of instance_defaults.value between MappingProjection and its function_object
```
>>> import psyneulink as pnl
>>> A = pnl.components.mechanisms.TransferMechanism(default_variable=[0,0,0])
>>> B = pnl.components.mechanisms.TransferMechanism(default_variable=[0,0])
>>> P = pnl.components.projection... | 0.0 | c95f8b7f357d90bc5b5e65d2ef3c3932e1175cc5 | [
"tests/projections/test_projections.py::test_value_shapes_with_matrix[MappingProjection-sender_variable0-receiver_variable0-projection_value0-function_value0]"
] | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2018-08-09 22:32:59+00:00 | apache-2.0 | 484 | |
Project-MONAI__MONAI-640 | diff --git a/docs/source/transforms.rst b/docs/source/transforms.rst
index b02db767..1c8b8415 100644
--- a/docs/source/transforms.rst
+++ b/docs/source/transforms.rst
@@ -373,6 +373,12 @@ Vanilla Transforms
:members:
:special-members: __call__
+`LabelToContour`
+~~~~~~~~~~~~~~~~
+.. autoclass:: LabelToConto... | Project-MONAI/MONAI | 39f6df581d72562c43207ddf408195c10bf845e7 | diff --git a/tests/test_label_to_contour.py b/tests/test_label_to_contour.py
index e90dcc73..cd9bf88d 100644
--- a/tests/test_label_to_contour.py
+++ b/tests/test_label_to_contour.py
@@ -171,10 +171,6 @@ class TestContour(unittest.TestCase):
error_input = torch.rand(1, 2, 3, 4, 5, 6)
self.assertRaises... | add dictionary level LabelToContourd transform
**Is your feature request related to a problem? Please describe.**
As we already have array level LabelToContour transform, need to update the document and add dictionary level version.
| 0.0 | 39f6df581d72562c43207ddf408195c10bf845e7 | [
"tests/test_label_to_contour.py::TestContour::test_contour",
"tests/test_label_to_contourd.py::TestContourd::test_contour"
] | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_many_modified_files",
"has_many_hunks",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2020-06-28 23:34:41+00:00 | apache-2.0 | 485 | |
ProjectQ-Framework__ProjectQ-53 | diff --git a/projectq/cengines/_replacer/__init__.py b/projectq/cengines/_replacer/__init__.py
index e55b34f..b35d31e 100755
--- a/projectq/cengines/_replacer/__init__.py
+++ b/projectq/cengines/_replacer/__init__.py
@@ -15,4 +15,3 @@ from ._decomposition_rule_set import DecompositionRuleSet
from ._replacer import (Au... | ProjectQ-Framework/ProjectQ | 7c1f33ed06a2fdc53b96311c08f068fd40591fc1 | diff --git a/projectq/cengines/_replacer/_replacer_test.py b/projectq/cengines/_replacer/_replacer_test.py
index cd9266d..43bb487 100755
--- a/projectq/cengines/_replacer/_replacer_test.py
+++ b/projectq/cengines/_replacer/_replacer_test.py
@@ -15,7 +15,9 @@
import pytest
from projectq import MainEngine
-from proje... | Controlled tensors work inconsistently w.r.t. non-controlled tensors
When you apply:
All(X) | targets
The engine receives X commands via the __or__ implementation in Tensor.
But if you apply:
C(All(X)) | (control, targets)
Then then the __or__ operation is bypassed and the engine receives a Tenso... | 0.0 | 7c1f33ed06a2fdc53b96311c08f068fd40591fc1 | [
"projectq/ops/_metagates_test.py::test_tensored_controlled_gate"
] | [
"projectq/cengines/_replacer/_replacer_test.py::test_filter_engine",
"projectq/cengines/_replacer/_replacer_test.py::test_auto_replacer_default_chooser",
"projectq/cengines/_replacer/_replacer_test.py::test_auto_replacer_decomposition_chooser",
"projectq/cengines/_replacer/_replacer_test.py::test_auto_replace... | {
"failed_lite_validators": [
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2017-04-18 07:51:47+00:00 | apache-2.0 | 486 | |
PyCQA__flake8-1320 | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index bfd3f4d..7130df3 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -424,13 +424,23 @@ class FileChecker:
)
@staticmethod
- def _extract_syntax_information(exception):
- token = ()
- if len(exception.arg... | PyCQA/flake8 | 645cd71f571da1cdc42683cf4228b537ddc2685f | diff --git a/tests/integration/test_main.py b/tests/integration/test_main.py
index 45fe9de..5c99d3c 100644
--- a/tests/integration/test_main.py
+++ b/tests/integration/test_main.py
@@ -1,6 +1,7 @@
"""Integration tests for the main entrypoint of flake8."""
import json
import os
+import sys
from unittest import mock
... | Wrong location reported for syntax errors
In GitLab by @scascketta on May 21, 2020, 14:14
*Please describe how you installed Flake8*
```
$ python3.8 -m venv .venv
$ source .venv/bin/activate
(.venv) $ pip install flake8
```
*Please provide the exact, unmodified output of `flake8 --bug-report`*
```
{
"dependencies"... | 0.0 | 645cd71f571da1cdc42683cf4228b537ddc2685f | [
"tests/integration/test_main.py::test_tokenization_error_but_not_syntax_error",
"tests/integration/test_main.py::test_tokenization_error_is_a_syntax_error"
] | [
"tests/integration/test_main.py::test_diff_option",
"tests/integration/test_main.py::test_form_feed_line_split",
"tests/integration/test_main.py::test_e101_indent_char_does_not_reset",
"tests/integration/test_main.py::test_statistics_option",
"tests/integration/test_main.py::test_show_source_option",
"tes... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-04-18 17:05:57+00:00 | mit | 487 | |
PyCQA__flake8-1440 | diff --git a/docs/source/user/options.rst b/docs/source/user/options.rst
index faeb17e..9cdb0ee 100644
--- a/docs/source/user/options.rst
+++ b/docs/source/user/options.rst
@@ -40,6 +40,8 @@ Index of Options
- :option:`flake8 --quiet`
+- :option:`flake8 --color`
+
- :option:`flake8 --count`
- :option:`flake8 -... | PyCQA/flake8 | 05cae7e046d515b8c2dceaa9c897f4c84c7ffb5f | diff --git a/tests/unit/test_base_formatter.py b/tests/unit/test_base_formatter.py
index 8958903..d096457 100644
--- a/tests/unit/test_base_formatter.py
+++ b/tests/unit/test_base_formatter.py
@@ -1,15 +1,18 @@
"""Tests for the BaseFormatter object."""
import argparse
+import sys
from unittest import mock
import ... | add color support for formatting
~essentially replace `flake8-colors`
(needs a bit of design before implementation) | 0.0 | 05cae7e046d515b8c2dceaa9c897f4c84c7ffb5f | [
"tests/unit/test_base_formatter.py::test_start[None]",
"tests/unit/test_base_formatter.py::test_start[out.txt]",
"tests/unit/test_base_formatter.py::test_stop",
"tests/unit/test_base_formatter.py::test_format_needs_to_be_implemented",
"tests/unit/test_base_formatter.py::test_show_source_returns_nothing_when... | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_added_files",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-11-06 00:25:43+00:00 | mit | 488 | |
PyCQA__flake8-1498 | diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py
index d7519df..7cba936 100644
--- a/src/flake8/options/config.py
+++ b/src/flake8/options/config.py
@@ -8,6 +8,7 @@ from typing import List
from typing import Optional
from typing import Tuple
+from flake8 import exceptions
from flake8.option... | PyCQA/flake8 | df64e392f48dca253e80a0d9f6191691df9ec294 | diff --git a/tests/integration/test_main.py b/tests/integration/test_main.py
index b351e9d..fe254b7 100644
--- a/tests/integration/test_main.py
+++ b/tests/integration/test_main.py
@@ -386,3 +386,21 @@ def test_early_keyboard_interrupt_does_not_crash(capsys):
out, err = capsys.readouterr()
assert out == "... ... | A missing explicitly specified config file is silently ignored
*Please describe how you installed Flake8*
```console
$ virtualenv venv
$ . venv/bin/activate
$ pip install flake8
```
*Please provide the exact, unmodified output of `flake8 --bug-report`*
```cnosole
$ flake8 --bug-report
{
"dependencies"... | 0.0 | df64e392f48dca253e80a0d9f6191691df9ec294 | [
"tests/integration/test_main.py::test_config_file_not_found",
"tests/unit/test_options_config.py::test_load_config_missing_file_raises_exception"
] | [
"tests/integration/test_main.py::test_diff_option",
"tests/integration/test_main.py::test_form_feed_line_split",
"tests/integration/test_main.py::test_e101_indent_char_does_not_reset",
"tests/integration/test_main.py::test_statistics_option",
"tests/integration/test_main.py::test_show_source_option",
"tes... | {
"failed_lite_validators": [
"has_hyperlinks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-12-24 15:20:01+00:00 | mit | 489 | |
PyCQA__flake8-1543 | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 2e8117f..28c954c 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -356,7 +356,9 @@ class FileChecker:
exc_info=True,
)
raise exceptions.PluginExecutionFailed(
- plugin_name=plugin.... | PyCQA/flake8 | e704ab4d4405fde784aeecde47f563900f5f8dfd | diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py
index 06c5179..96d0244 100644
--- a/tests/unit/test_exceptions.py
+++ b/tests/unit/test_exceptions.py
@@ -18,6 +18,7 @@ from flake8 import exceptions
exception=ValueError("boom!"),
),
exceptions.PluginExecutionFail... | Improvement suggestion: Add the relevant path as context when encountering exceptions in checker.py
In GitLab by @motin1 on Oct 2, 2018, 03:07
Ran into `UnicodeDecodeError: 'utf8' codec can't decode byte 0xb1 in position 81: invalid start byte` suddenly when running flake8:
```
$ flake8
Traceback (most recent call la... | 0.0 | e704ab4d4405fde784aeecde47f563900f5f8dfd | [
"tests/unit/test_exceptions.py::test_pickleable[err0]",
"tests/unit/test_exceptions.py::test_pickleable[err1]",
"tests/unit/test_exceptions.py::test_pickleable[err2]",
"tests/unit/test_file_checker.py::test_repr",
"tests/unit/test_file_checker.py::test_nonexistent_file",
"tests/unit/test_file_checker.py::... | [] | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2022-01-24 01:42:02+00:00 | mit | 490 | |
PyCQA__flake8-1624 | diff --git a/src/flake8/main/application.py b/src/flake8/main/application.py
index 13ece4e..5178abb 100644
--- a/src/flake8/main/application.py
+++ b/src/flake8/main/application.py
@@ -132,6 +132,7 @@ class Application:
version=flake8.__version__,
plugin_versions=self.plugins.versions_str(),
... | PyCQA/flake8 | fbb33430e6e0b326744e2e703db77c4773de93de | diff --git a/tests/integration/test_aggregator.py b/tests/integration/test_aggregator.py
index a5b39d7..006ac5f 100644
--- a/tests/integration/test_aggregator.py
+++ b/tests/integration/test_aggregator.py
@@ -18,6 +18,7 @@ def optmanager():
version="3.0.0",
plugin_versions="",
parents=[],
+ ... | Display list of available formatters with help for --format
In GitLab by @blueyed on Apr 26, 2018, 03:32
`flake8 --help` contains:
> --format=format Format errors according to the chosen formatter.
It would be nice/helpful if the list of available formats would be listed there. | 0.0 | fbb33430e6e0b326744e2e703db77c4773de93de | [
"tests/integration/test_aggregator.py::test_aggregate_options_with_config",
"tests/integration/test_aggregator.py::test_aggregate_options_when_isolated",
"tests/integration/test_main.py::test_format_option_help",
"tests/integration/test_plugins.py::test_local_plugin_can_add_option",
"tests/unit/test_option_... | [
"tests/integration/test_main.py::test_diff_option",
"tests/integration/test_main.py::test_form_feed_line_split",
"tests/integration/test_main.py::test_e101_indent_char_does_not_reset",
"tests/integration/test_main.py::test_statistics_option",
"tests/integration/test_main.py::test_show_source_option",
"tes... | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-07-28 20:48:41+00:00 | mit | 491 | |
PyCQA__flake8-1642 | diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py
index f5c93ce..36fe976 100644
--- a/src/flake8/options/config.py
+++ b/src/flake8/options/config.py
@@ -23,7 +23,10 @@ def _stat_key(s: str) -> Tuple[int, int]:
def _find_config_file(path: str) -> Optional[str]:
# on windows if the homedir i... | PyCQA/flake8 | 446b18d35a5fa0be6b3531d30a0706fc82247313 | diff --git a/tests/unit/test_options_config.py b/tests/unit/test_options_config.py
index 7a7c4f7..bdc2208 100644
--- a/tests/unit/test_options_config.py
+++ b/tests/unit/test_options_config.py
@@ -78,6 +78,13 @@ def test_find_config_ignores_homedir(tmp_path):
assert config._find_config_file(str(subdir)) is Non... | Exception if HOME is not an existing path
### how did you install flake8?
```console
$ pip install flake8
```
### unmodified output of `flake8 --bug-report`
```json
{
"platform": {
"python_implementation": "CPython",
"python_version": "3.9.13",
"system": "Linux"
},
"plugins": [
{
... | 0.0 | 446b18d35a5fa0be6b3531d30a0706fc82247313 | [
"tests/unit/test_options_config.py::test_find_config_ignores_unknown_homedir"
] | [
"tests/unit/test_options_config.py::test_config_not_found_returns_none",
"tests/unit/test_options_config.py::test_config_file_without_section_is_not_considered",
"tests/unit/test_options_config.py::test_config_file_with_parse_error_is_not_considered",
"tests/unit/test_options_config.py::test_config_file_with_... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2022-08-01 12:52:16+00:00 | mit | 492 | |
PyCQA__flake8-1648 | diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py
index 36fe976..daf8529 100644
--- a/src/flake8/options/config.py
+++ b/src/flake8/options/config.py
@@ -29,9 +29,9 @@ def _find_config_file(path: str) -> Optional[str]:
home_stat = None
dir_stat = _stat_key(path)
- cfg = configp... | PyCQA/flake8 | 70c0b3d27a5626a6ad58293bfaa6308244cb349c | diff --git a/tests/unit/test_options_config.py b/tests/unit/test_options_config.py
index bdc2208..4ad6acd 100644
--- a/tests/unit/test_options_config.py
+++ b/tests/unit/test_options_config.py
@@ -21,7 +21,9 @@ def test_config_file_without_section_is_not_considered(tmp_path):
def test_config_file_with_parse_error_... | Config file .flake8 not exist when running github actions
### how did you install flake8?
```console
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9.x
architecture: x64
- name... | 0.0 | 70c0b3d27a5626a6ad58293bfaa6308244cb349c | [
"tests/unit/test_options_config.py::test_config_file_with_parse_error_is_not_considered"
] | [
"tests/unit/test_options_config.py::test_config_not_found_returns_none",
"tests/unit/test_options_config.py::test_config_file_without_section_is_not_considered",
"tests/unit/test_options_config.py::test_config_file_with_encoding_error_is_not_considered",
"tests/unit/test_options_config.py::test_find_config_fi... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2022-08-01 23:12:41+00:00 | mit | 493 | |
PyCQA__flake8-1713 | diff --git a/src/flake8/defaults.py b/src/flake8/defaults.py
index 4ba0048..e3edf32 100644
--- a/src/flake8/defaults.py
+++ b/src/flake8/defaults.py
@@ -43,3 +43,5 @@ NOQA_INLINE_REGEXP = re.compile(
)
NOQA_FILE = re.compile(r"\s*# flake8[:=]\s*noqa", re.I)
+
+VALID_CODE_PREFIX = re.compile("^[A-Z]{1,3}[0-9]{0,3}$"... | PyCQA/flake8 | 5eeee3fbc0b64c7de347d1964de3074b9b2bde0b | diff --git a/tests/unit/plugins/finder_test.py b/tests/unit/plugins/finder_test.py
index d526fd1..cd5cf4a 100644
--- a/tests/unit/plugins/finder_test.py
+++ b/tests/unit/plugins/finder_test.py
@@ -31,37 +31,6 @@ def _loaded(plugin=None, obj=None, parameters=None):
return finder.LoadedPlugin(plugin, obj, parameters... | warn on invalid codes in `ignore` / `extend-ignore`
### describe the request
for example https://github.com/getsentry/sentry-python/blob/b36d84a76bd6f8344c9b0a9694591939296e9c06/.flake8#L2-L13
this disables a code called `//` and a code called `I` (among many others) due to incorrect comment syntax | 0.0 | 5eeee3fbc0b64c7de347d1964de3074b9b2bde0b | [
"tests/unit/plugins/finder_test.py::test_loaded_plugin_entry_name_vs_display_name",
"tests/unit/plugins/finder_test.py::test_plugins_all_plugins",
"tests/unit/plugins/finder_test.py::test_plugins_versions_str",
"tests/unit/plugins/finder_test.py::test_flake8_plugins",
"tests/unit/plugins/finder_test.py::tes... | [] | {
"failed_lite_validators": [
"has_short_problem_statement",
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks",
"has_pytest_match_arg"
],
"has_test_patch": true,
"is_lite": false
} | 2022-10-12 23:21:04+00:00 | mit | 494 | |
PyCQA__flake8-1726 | diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 2d7bcd9..2cae545 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -6,6 +6,7 @@ import contextlib
import errno
import logging
import multiprocessing.pool
+import operator
import signal
import tokenize
from typing import Any
@@ -180,8... | PyCQA/flake8 | 987a7187872e0abc89f9ed57f1d8012f0737e34c | diff --git a/tests/integration/test_main.py b/tests/integration/test_main.py
index db60f6b..96d1182 100644
--- a/tests/integration/test_main.py
+++ b/tests/integration/test_main.py
@@ -98,6 +98,26 @@ t.py:1:1: F401 'os' imported but unused
assert err == ""
+def test_errors_sorted(tmpdir, capsys):
+ with tmp... | Sort FileCheckers alphabetically
Whenever I run *flake8* on a large set of code which has multiple violations, I am presented with an apparently deterministic, but not alphabetical order of the files. This makes it hard to work on them in a coordinated manner, as the file list inside the file manager or IDE usually is ... | 0.0 | 987a7187872e0abc89f9ed57f1d8012f0737e34c | [
"tests/integration/test_main.py::test_errors_sorted"
] | [
"tests/integration/test_main.py::test_form_feed_line_split",
"tests/integration/test_main.py::test_e101_indent_char_does_not_reset",
"tests/integration/test_main.py::test_statistics_option",
"tests/integration/test_main.py::test_show_source_option",
"tests/integration/test_main.py::test_extend_exclude",
"... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2022-10-30 19:12:25+00:00 | mit | 495 | |
PyCQA__flake8-bugbear-12 | diff --git a/README.rst b/README.rst
index 9f3cf5f..81382f4 100644
--- a/README.rst
+++ b/README.rst
@@ -107,9 +107,10 @@ Users coming from Python 2 may expect the old behavior which might lead
to bugs. Use native ``async def`` coroutines or mark intentional
``return x`` usage with ``# noqa`` on the same line.
-**... | PyCQA/flake8-bugbear | c91bb7e24891cc3d1e3f1396dd280385c4557b48 | diff --git a/tests/b902.py b/tests/b902.py
index 91e6bc1..7f8ffc1 100644
--- a/tests/b902.py
+++ b/tests/b902.py
@@ -47,3 +47,13 @@ class Warnings:
def invalid_keyword_only(*, self):
...
+
+
+class Meta(type):
+ def __init__(cls, name, bases, d):
+ ...
+
+
+class OtherMeta(type):
+ def __in... | B902 requires first parameter named self for __init__ of metaclass
I have a metaclass defined like this:
class StorageMeta(type):
def __init__(cls, name, bases, d):
Naturally B902 flagged the first parameter of `__init__`, but I'm not sure if it's intended in the case of metaclasses. I can imagine ar... | 0.0 | c91bb7e24891cc3d1e3f1396dd280385c4557b48 | [
"tests/test_bugbear.py::BugbearTestCase::test_b902"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [
"has_many_modified_files"
],
"has_test_patch": true,
"is_lite": false
} | 2017-02-25 15:47:25+00:00 | mit | 496 | |
PyCQA__flake8-bugbear-129 | diff --git a/bugbear.py b/bugbear.py
index e45d059..eb96788 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -174,6 +174,7 @@ class BugBearVisitor(ast.NodeVisitor):
# (MyError, MyError) # duplicate names
# (MyError, BaseException) # everything derives from the Base
... | PyCQA/flake8-bugbear | c18db4fa8bdc15f0194541055dd4cf46dbaf18f1 | diff --git a/tests/b014.py b/tests/b014.py
index 4c26794..a3e64e6 100644
--- a/tests/b014.py
+++ b/tests/b014.py
@@ -1,6 +1,6 @@
"""
Should emit:
-B014 - on lines 10, 16, 27, 41, and 48
+B014 - on lines 10, 16, 27, 41, 48, and 55
"""
import re
@@ -48,3 +48,14 @@ try:
except (re.error, re.error):
# Duplicate... | B014 recommends `except ():`
In the following code:
```
try:
with open(fn) as f:
return f.read().split('\n')
except (OSError, IOError):
pass
```
The new B014 warning shows this:
> B014 Redundant exception types in `except (OSError, IOError):`. Write `except ():`, whic... | 0.0 | c18db4fa8bdc15f0194541055dd4cf46dbaf18f1 | [
"tests/test_bugbear.py::BugbearTestCase::test_b014"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2020-06-28 00:04:20+00:00 | mit | 497 | |
PyCQA__flake8-bugbear-161 | diff --git a/bugbear.py b/bugbear.py
index 873fc10..974e5cb 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -124,8 +124,10 @@ def _to_name_str(node):
# "pkg.mod.error", handling any depth of attribute accesses.
if isinstance(node, ast.Name):
return node.id
- assert isinstance(node, ast.Attribute)
- ... | PyCQA/flake8-bugbear | eb85c48cc32a6a401d22339f675c6310e2e91eef | diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py
index ccce9da..c755fb9 100644
--- a/tests/test_bugbear.py
+++ b/tests/test_bugbear.py
@@ -340,6 +340,20 @@ class TestFuzz(unittest.TestCase):
if f.endswith(".py"):
BugBearChecker(filename=str(Path(dirname) / f))
+... | crash on tuple expansion in try/except block
Running flake8 against the following file produces no report as an exception is raised in bugbear
```python
# dummy.py
grey_list = (ValueError,)
black_list = (TypeError,)
try:
int("1e3")
except (*grey_list, *black_list):
print("error caught")
```
crashe... | 0.0 | eb85c48cc32a6a401d22339f675c6310e2e91eef | [
"tests/test_bugbear.py::TestFuzz::test_does_not_crash_on_tuple_expansion_in_except_statement"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2021-03-05 17:25:15+00:00 | mit | 498 | |
PyCQA__flake8-bugbear-173 | diff --git a/bugbear.py b/bugbear.py
index b881b8b..40708b9 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -694,6 +694,13 @@ B008.immutable_calls = {
"frozenset",
"types.MappingProxyType",
"MappingProxyType",
+ "re.compile",
+ "operator.attrgetter",
+ "operator.itemgetter",
+ "operator.methodcal... | PyCQA/flake8-bugbear | 63239e09ededc6efe841555376f288b115154953 | diff --git a/tests/b006_b008.py b/tests/b006_b008.py
index e60e968..40bf797 100644
--- a/tests/b006_b008.py
+++ b/tests/b006_b008.py
@@ -1,7 +1,10 @@
import collections
import logging
+import operator
+import re
import time
import types
+from operator import attrgetter, itemgetter, methodcaller
from types import M... | B008: Whitelist operator.{attrgetter,itemgetter,methodcaller} default args
Calling those functions in default args is perfectly fine and *not* calling them would most likely be a bug. | 0.0 | 63239e09ededc6efe841555376f288b115154953 | [
"tests/test_bugbear.py::BugbearTestCase::test_b006_b008"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [
"has_short_problem_statement"
],
"has_test_patch": true,
"is_lite": false
} | 2021-06-19 16:19:27+00:00 | mit | 499 | |
PyCQA__flake8-bugbear-209 | diff --git a/bugbear.py b/bugbear.py
index 77b4dc6..9249550 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -639,7 +639,6 @@ class BugBearVisitor(ast.NodeVisitor):
if isinstance(
subnode.value,
(
- ast.Str,
ast.Num,
... | PyCQA/flake8-bugbear | 9e311d5af7ffd2bba272fc6471b8ecfe21bf1993 | diff --git a/tests/b018_classes.py b/tests/b018_classes.py
index 12195c0..551b14e 100644
--- a/tests/b018_classes.py
+++ b/tests/b018_classes.py
@@ -1,6 +1,6 @@
"""
Should emit:
-B018 - on lines 15-26, 30, 32
+B018 - on lines 16-26, 30, 33
"""
@@ -30,3 +30,4 @@ class Foo3:
123
a = 2
"str"
+ 1
d... | B018 wrongly detects inline variable or attribute docstrings
Having an inline attribute doc string or a module variable docstring, it is wrongly marked as B018 (sample from sphinx doc):
```
module_level_variable2 = 98765
"""int: Module level variable documented inline.
The docstring may span multiple lines. The... | 0.0 | 9e311d5af7ffd2bba272fc6471b8ecfe21bf1993 | [
"tests/test_bugbear.py::BugbearTestCase::test_b018_classes",
"tests/test_bugbear.py::BugbearTestCase::test_b018_functions"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2021-11-29 18:59:11+00:00 | mit | 500 | |
PyCQA__flake8-bugbear-213 | diff --git a/.gitignore b/.gitignore
index fc8539e..1dc5815 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
+venv/
# PyInstaller
# Usually these files are written by a python script from a template
diff --git a/README.rst b/README.rst
index 6d94ba7..7ad3874 10064... | PyCQA/flake8-bugbear | 49aec1807ead4c7da7d055e20118563ed13b5201 | diff --git a/tests/b950.py b/tests/b950.py
index 1939105..942e50c 100644
--- a/tests/b950.py
+++ b/tests/b950.py
@@ -1,3 +1,4 @@
+#! Ignore long shebang fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
# Assumes the default allowed line length of 79
"line is fine"
@@ -5,3 +6,16 @@
" ... | B950: Propose exemption for long URLs
I like the idea of using B950 over E501, but I do not want to be warned anytime I include a long URL in a comment. Breaking URLs over multiple lines is not acceptable as I want them to be clickable.
pycodestyle addresses this by making an exemption to the line length error for c... | 0.0 | 49aec1807ead4c7da7d055e20118563ed13b5201 | [
"tests/test_bugbear.py::BugbearTestCase::test_b950"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2021-12-31 20:56:05+00:00 | mit | 501 | |
PyCQA__flake8-bugbear-216 | diff --git a/bugbear.py b/bugbear.py
index 78c2ca3..b8ecbd5 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -654,18 +654,15 @@ class BugBearVisitor(ast.NodeVisitor):
self.errors.append(B903(node.lineno, node.col_offset))
def check_for_b018(self, node):
- for index, subnode in enumerate(node.body):
+ ... | PyCQA/flake8-bugbear | c0a9c878dd50b57e8f39f34b07f1730866c9d86d | diff --git a/tests/b018_classes.py b/tests/b018_classes.py
index 551b14e..7992f15 100644
--- a/tests/b018_classes.py
+++ b/tests/b018_classes.py
@@ -1,6 +1,6 @@
"""
Should emit:
-B018 - on lines 16-26, 30, 33
+B018 - on lines 17-26, 30, 33
"""
@@ -12,12 +12,12 @@ class Foo2:
"""abc"""
a = 2
- "str... | B018 wrongly detects inline variable or attribute docstrings
Having an inline attribute doc string or a module variable docstring, it is wrongly marked as B018 (sample from sphinx doc):
```
module_level_variable2 = 98765
"""int: Module level variable documented inline.
The docstring may span multiple lines. The... | 0.0 | c0a9c878dd50b57e8f39f34b07f1730866c9d86d | [
"tests/test_bugbear.py::BugbearTestCase::test_b018_classes",
"tests/test_bugbear.py::BugbearTestCase::test_b018_functions"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [],
"has_test_patch": true,
"is_lite": true
} | 2022-01-10 15:26:51+00:00 | mit | 502 | |
PyCQA__flake8-bugbear-220 | diff --git a/.gitignore b/.gitignore
index 1dc5815..fca188e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,6 @@ target/
.ipynb_checkpoints
.vscode
+
+# JetBrains
+.idea/
diff --git a/README.rst b/README.rst
index 2ecc7b8..09e87df 100644
--- a/README.rst
+++ b/README.rst
@@ -132,6 +132,8 @@ data available in ... | PyCQA/flake8-bugbear | 1c47a162d4b2c41ada9164a12b536d6f49833d7e | diff --git a/tests/b020.py b/tests/b020.py
new file mode 100644
index 0000000..df30e75
--- /dev/null
+++ b/tests/b020.py
@@ -0,0 +1,22 @@
+"""
+Should emit:
+B020 - on lines 8 and 21
+"""
+
+items = [1, 2, 3]
+
+for items in items:
+ print(items)
+
+items = [1, 2, 3]
+
+for item in items:
+ print(item)
+
+values ... | Proposed Check: same variable name of list and interating item in for-loop
I've already placed a question [here](https://stackoverflow.com/questions/70827394/is-there-pep-rule-or-pre-commit-check-to-prevent-same-name-of-variable-and-list). Then found this project.
```
items = [1, 2, 3]
for items in items:
con... | 0.0 | 1c47a162d4b2c41ada9164a12b536d6f49833d7e | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | [] | {
"failed_lite_validators": [
"has_hyperlinks",
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-01-25 16:55:40+00:00 | mit | 503 | |
PyCQA__flake8-bugbear-230 | diff --git a/README.rst b/README.rst
index 09e87df..7994a6c 100644
--- a/README.rst
+++ b/README.rst
@@ -134,6 +134,9 @@ data available in ``ex``.
**B020**: Loop control variable overrides iterable it iterates
+**B021**: f-string used as docstring. This will be interpreted by python
+as a joined string rather than... | PyCQA/flake8-bugbear | 3206da7d3a3ef98f7c2bd38d7b533cb1d65f8a3b | diff --git a/tests/b021.py b/tests/b021.py
new file mode 100644
index 0000000..dd0bb63
--- /dev/null
+++ b/tests/b021.py
@@ -0,0 +1,76 @@
+"""
+Should emit:
+B021 - on lines 14, 22, 30, 38, 46, 54, 62, 70, 73
+"""
+
+VARIABLE = "world"
+
+
+def foo1():
+ """hello world!"""
+
+
+def foo2():
+ f"""hello {VARIABLE}!... | B018 complains about f-strings as docstrings... and it's right! (but a more specific message would be helpful)
```python
CONSTANT = "magic value"
def f():
f"""Return {CONSTANT!r}.""" # warning B018
return CONSTANT
assert f.__doc__ is not None # fails!
```
I was originally reporting this as a bug... | 0.0 | 3206da7d3a3ef98f7c2bd38d7b533cb1d65f8a3b | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | [] | {
"failed_lite_validators": [
"has_many_modified_files",
"has_many_hunks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-03-17 02:27:46+00:00 | mit | 504 | |
PyCQA__flake8-bugbear-261 | diff --git a/bugbear.py b/bugbear.py
index 06e598d..e47ede1 100644
--- a/bugbear.py
+++ b/bugbear.py
@@ -155,12 +155,13 @@ class BugBearChecker:
return True
for i in range(2, len(code) + 1):
- if code[:i] in self.options.select:
+ if self.options.select and code[:i] in self... | PyCQA/flake8-bugbear | b1e4ef296ec6afb6df788d81db0953cf5fd79566 | diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py
index a974cf4..12469e6 100644
--- a/tests/test_bugbear.py
+++ b/tests/test_bugbear.py
@@ -438,6 +438,16 @@ class BugbearTestCase(unittest.TestCase):
),
)
+ def test_b9_flake8_next_default_options(self):
+ filename = Path(__file... | `should_warn` is incompatible with flake8 (next)
minimal reproduction (trigger any `B9*` warning with the default settings)
```console
$ rm -rf venv && virtualenv -qq venv && venv/bin/pip install -qq git+https://github.com/pycqa/flake8 git+https://github.com/pycqa/flake8-bugbear && venv/bin/flake8 --config /dev/nul... | 0.0 | b1e4ef296ec6afb6df788d81db0953cf5fd79566 | [
"tests/test_bugbear.py::BugbearTestCase::test_b9_flake8_next_default_options"
] | [
"tests/test_bugbear.py::BugbearTestCase::test_b001",
"tests/test_bugbear.py::BugbearTestCase::test_b002",
"tests/test_bugbear.py::BugbearTestCase::test_b003",
"tests/test_bugbear.py::BugbearTestCase::test_b004",
"tests/test_bugbear.py::BugbearTestCase::test_b005",
"tests/test_bugbear.py::BugbearTestCase::... | {
"failed_lite_validators": [
"has_hyperlinks"
],
"has_test_patch": true,
"is_lite": false
} | 2022-06-12 16:06:43+00:00 | mit | 505 |
Subsets and Splits
Long Problem Statements
Retrieves a subset of problem statements within a specific length range, ordered by length, which provides basic filtering but limited analytical value.