instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
Ouranosinc__xclim-297
[ { "changes": { "added_entities": [ "xclim/subset.py:distance" ], "added_modules": [ "xclim/subset.py:distance" ], "edited_entities": [ "xclim/subset.py:subset_gridpoint" ], "edited_modules": [ "xclim/subset.py:subset_gridpoint" ] ...
Ouranosinc/xclim
608bac4c9976df778fb9fa442ef725c45dde9f36
add optional threshold in utils.subset_gridpoint * xclim version: * Python version: * Operating System: ### Description Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. ### What I Did ``` Paste the command(s) you ran and the output. If ...
diff --git a/HISTORY.rst b/HISTORY.rst index ced91a46..0a2c589e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ History ======= +0.12.x-beta (2019-11-15) +------------------------ +* Added a distance function computing the geodesic distance to a point. +* Added a `tolerance` argument to `subset_gridpoin...
Ouranosinc__xclim-312
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/atmos/_temperature.py" }, { "changes": { "added_entities": [ "xclim/indices/_multivariate.py:tas" ], "added_modules": ...
Ouranosinc/xclim
5860a492a4b27bdc0b89ad912b955ac963b854cc
Indicator for average temperature based on tasmin and tasmax ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Create a new indicator computing the daily average temperature from the daily min and max temperature.
diff --git a/HISTORY.rst b/HISTORY.rst index 4994460e..3ff1c54d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,7 +8,7 @@ History * Added a `tolerance` argument to `subset_gridpoint` raising an error if distance to closest point is larger than tolerance. * Created land module for standardized access to streamflow in...
Ouranosinc__xclim-336
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/ensembles.py:_ens_align_datasets" ], "edited_modules": [ "xclim/ensembles.py:_ens_align_datasets" ] }, "file": "xclim/ensembles.py" } ]
Ouranosinc/xclim
26d99831e33e989da59b0a7e2471e66231111784
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...
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-339
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/ensembles.py:create_ensemble", "xclim/ensembles.py:ensemble_percentiles", "xclim/ensembles.py:_calc_percentiles_simple", "xclim/ensembles.py:_calc_percentiles_blocks", ...
Ouranosinc/xclim
0790e8c7cc4b5d933a034f1a6da1cdc1072c2e01
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(...
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-347
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null ...
Ouranosinc/xclim
a4a8a7c4a7d2bb527ff11b77607189415c9def13
Subset with individual features * xclim version: 0.13.0 It would be great to have an option for us to explode the features of a shapefile and subset spatially according to their boundaries. This has been implemented in a few libraries but it wouldn't take much work to modify our current `subset_shape` and `create_ma...
diff --git a/HISTORY.rst b/HISTORY.rst index 50dd6f92..ec7dbd31 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ History ======= +0.14.x +------ +* Fix in `subset.wrap_lons_and_split_at_greenwich` to preserve multi-region dataframes. + + 0.13.x (2020-01-10) ------------------- * Documentation improvem...
Ouranosinc__xclim-349
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/atmos/_temperature.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/in...
Ouranosinc/xclim
7d331b5a2753f334d6e066d14ed64f6b5718e051
growing season length memory use ### Description Calling growing season length calculation on large multiyear datasets (e.g. mf_datset of nrcan over canada) causes memory errors / accumulation. Dask writing of chunks to netcdf (xr.to_netcdf) does not seem to work as expected and RAM use quickly accumulates and crashe...
diff --git a/HISTORY.rst b/HISTORY.rst index ec7dbd31..4d84de91 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,7 @@ History 0.14.x ------ * Fix in `subset.wrap_lons_and_split_at_greenwich` to preserve multi-region dataframes. +* Improve the memory use of `indices.growing_season_length`. 0.13.x (2020-01-1...
Ouranosinc__xclim-377
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/subset.py:subset_gridpoint" ], "edited_modules": [ "xclim/subset.py:subset_gridpoint" ] }, "file": "xclim/subset.py" } ]
Ouranosinc/xclim
bbc8bc730d99f28dfc9d31f17fadfa188d92fcd5
Add support in subset_gridpoint for 1D lat lon. ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> `subset_gridpoint` assumes that lats and lons are on a 2D grid. If used with 1D coordinates, it fails. This would be useful to ...
diff --git a/HISTORY.rst b/HISTORY.rst index 026c37e2..ba05dad9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ History ======= +0.15.x +------ +* Fix bug in subset_gridpoint to work on lat/lon coords of any dimension when they are not a dimension of the data. + 0.14.x (2020-02-21) -------------------...
Ouranosinc__xclim-380
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null ...
Ouranosinc/xclim
314e4297f40d82a193f52a5cbb5cae4b9d3ac014
Make run_length methods return the coordinate values Right now, functions like `rl.first_run` return indexes (integers) along the given dimension. Retrieving the coordinate values (like the datetime objects) is not an easy task and usually gets done by unelegant hacky lines. There should be an option on the run_length ...
diff --git a/HISTORY.rst b/HISTORY.rst index ba05dad9..9915f137 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ History 0.15.x ------ +* Add feature to retrieve coordinate values instead of index in `run_length.first_run`. Add `run_length.last_run`. * Fix bug in subset_gridpoint to work on lat/lon coord...
Ouranosinc__xclim-401
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null ...
Ouranosinc/xclim
9b03ee6cb9929db1644d95238d49ba3310d597bf
crs coordinate added during the `subset_shape` call * xclim version: 0.15.0 * Python version: 3.8 * Operating System: ubuntu ### Description This happened in the finch test suite: https://github.com/bird-house/finch/pull/107/commits/7f5ffff1ed422df8ddd12286f5990cf3fbe389c2 When I call `xclim.subset.subset_sh...
diff --git a/HISTORY.rst b/HISTORY.rst index c70e0593..d282d386 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,7 @@ History 0.16.x ------ * Allow lazy units conversion +* CRS definitions of projected DataSets are now written to file according to Climate and Forecast-convention standards 0.15.x (2020-03-12)...
Ouranosinc__xclim-408
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/indices/_multivariate.py:cold_spell_duration_index", "xclim/indices/_multivariate.py:heat_wave_frequency", "xclim/indices/_multivariate.py:heat_wave_max_length", "xclim/ind...
Ouranosinc/xclim
e940cdb3cfa9bf5b0284067673e99e9f9f02530d
`subset_shape` with large input data * xclim version: 0.15.0 * Python version: 3.8 * Operating System: ubuntu ### Description Calling the `subset_shape` function on a large input dataset crashes when the dataset doesn't fit in memory. Not with a large polygon subset, but a large source dataset. So I want to sub...
diff --git a/HISTORY.rst b/HISTORY.rst index 1660b080..d6263236 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,8 @@ History * CRS definitions of projected DataSets are now written to file according to Climate and Forecast-convention standards * Add utilities to merge attributes and update history in xclim.core...
Ouranosinc__xclim-413
[ { "changes": { "added_entities": [ "xclim/subset.py:convert_lat_lon_to_da" ], "added_modules": [ "xclim/subset.py:convert_lat_lon_to_da" ], "edited_entities": [ "xclim/subset.py:subset_gridpoint", "xclim/subset.py:distance" ], "edited_mod...
Ouranosinc/xclim
7e7ff9762465e1621bf51cd4ca0cb490a4987811
subset multipoint (scattered locations) For a couple of recent projects I have had to extract multiple scattered site locations (weather stations, sample sites etc etc) from a netcdf and thought that the steps could form the basis of a `subset.subset_scattered()` or similar named function For a large number of stat...
diff --git a/HISTORY.rst b/HISTORY.rst index 178cf347..1aa592c2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ History 0.16.x ------ +* Add multi gridpoints support in `subset.subset_gridpoint`. * Better `wrapped_partial` for more meaningful inspection. * Add indices for relative humidity, specific hu...
Ouranosinc__xclim-416
[ { "changes": { "added_entities": [ "xclim/core/checks.py:MissingBase.__init__", "xclim/core/checks.py:MissingBase.split_freq", "xclim/core/checks.py:MissingBase.is_null", "xclim/core/checks.py:MissingBase.prepare", "xclim/core/checks.py:MissingBase.is_missing", ...
Ouranosinc/xclim
83aebec1966213b1be8131f998d6b69bf2406198
Improve missing data check ### Description Currently missing data checks in indicator classes are very strict (single missing day or single nan value) will result in nan for a given resample time step Options include: 1. Percent missing : https://github.com/Ouranosinc/xclim/issues/364#issuecomment-585804628...
diff --git a/HISTORY.rst b/HISTORY.rst index f0f5444e..6883462f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,8 @@ History * Ensembles : Allow alignment of datasets with same frequency but different offsets. * Bug fixes in run_length for run-with-dates methods when the date is not found in the run. * Remov...
Ouranosinc__xclim-428
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/indicators/atmos/_conversion.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ ...
Ouranosinc/xclim
04dd41642ad2f5bd10c44c5501e1a6351f74ad57
Error converting array to scalars in subset.subset_shape * xclim version: 0.16.0 * Python version: PAVICS * Operating System: PAVICS ### Description I was subsetting a shapefile to be used to calculate ensemble percentiles. The shapefile has multiple watershed sub-boundaries. ### What I Did ```python impo...
diff --git a/docs/notebooks/example.ipynb b/docs/notebooks/example.ipynb index 344812d6..6bc3484a 100644 --- a/docs/notebooks/example.ipynb +++ b/docs/notebooks/example.ipynb @@ -51,40 +51,27 @@ "source": [ "## Setting up the Dask client: parallel processing\n", "\n", - "This step is not mandatory as d...
Ouranosinc__xclim-433
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/core/checks.py:MissingBase.split_freq", "xclim/core/checks.py:MissingBase.is_null", "xclim/core/checks.py:MissingBase.prepare" ], "edited_modules": [ "xclim/cor...
Ouranosinc/xclim
3c2b233b45af8c1b6932d19ae43dc398bbcbed43
Support `freq=None` in missing_* functions ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> This will simplify the Indicator class logic and facilitate switching the missing method.
diff --git a/xclim/core/checks.py b/xclim/core/checks.py index fb7eef91..d478910c 100644 --- a/xclim/core/checks.py +++ b/xclim/core/checks.py @@ -62,7 +62,7 @@ def assert_daily(var): if np.timedelta64(dt.timedelta(days=1)) != (t1 - t0).data: raise ValueError("time series is not daily.") - # Check th...
Ouranosinc__xclim-447
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/sdba/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/sdba/ad...
Ouranosinc/xclim
761b2c1433223adad92124565572fc0aca519f61
DetrendedQuantileMapping only applies the last correction factor * xclim version: '0.16.1-beta' (master, as of 2020-05-08) * Python version: 3.8.2 * Operating System: Linux ### Description The figure below is the daily average : `plt.plot(data.groupby("time.dayofyear").mean("time").values)`. The black line is my ...
diff --git a/docs/sdba.rst b/docs/sdba.rst index d25e699e..1ac5f555 100644 --- a/docs/sdba.rst +++ b/docs/sdba.rst @@ -2,18 +2,18 @@ Bias adjustment and downscaling algorithms ========================================== -`xarray` data structures allow for relatively straightforward implementations of simple bias-adj...
Ouranosinc__xclim-453
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/core/units.py:units2pint" ], "edited_modules": [ "xclim/core/units.py:units2pint" ] }, "file": "xclim/core/units.py" } ]
Ouranosinc/xclim
6393a9bbc9fe8fc344b64512f0277d55dd83e3e8
Add support for unit = '1' ### Description I'm trying to use xclim.indices.relative_humidity and I get the following error when `huss` is among the inputs : ``` Traceback (most recent call last): File "/usr/local/pycharm-community-2017.3.4/helpers/pydev/pydevd.py", line 1668, in <module> main() File "/us...
diff --git a/xclim/core/units.py b/xclim/core/units.py index be0d956f..d186db7e 100644 --- a/xclim/core/units.py +++ b/xclim/core/units.py @@ -143,6 +143,9 @@ def units2pint(value: Union[xr.DataArray, str]) -> pint.unit.UnitDefinition: raise NotImplementedError(f"Value of type `{type(value)}` not supported.") ...
Ouranosinc__xclim-463
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/ensembles.py:ensemble_percentiles", "xclim/ensembles.py:_calc_perc" ], "edited_modules": [ "xclim/ensembles.py:ensemble_percentiles", "xclim/ensembles.py:_calc_...
Ouranosinc/xclim
9a5a4140fa3fcef611de21495c077c22128de2c0
Ensemble percentiles as dimension instead of variables <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Currently, `xclim.ensembles.ensemble_percentiles` takes in a dataset and returns a new one with one variable per percentile and data varia...
diff --git a/HISTORY.rst b/HISTORY.rst index 5c6413eb..47eda3f1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,7 @@ History ======= 0.18.x ------ +* `ensembles.ensemble_percentiles` modified to compute along a `percentiles` dimension by default, instead of creating different variables. * Added indicator `fir...
Ouranosinc__xclim-467
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null ...
Ouranosinc/xclim
17bc5e9afdc76d7f802b5193ed4209b0e7d5a67c
sdba - Grouped Detrending We need to implement grouped detrending into sdba.
diff --git a/HISTORY.rst b/HISTORY.rst index 2e0e319a..1d6a6ebc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ History 0.18.x ------ +* `xclim.sdba.detrending` objects can now act on groups. * Replaced `dask[complete]` with `dask[array]` in basic installation and added `distributed` to `docs` build dep...
Ouranosinc__xclim-488
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/indicators/seaIce/_seaice.py" } ]
Ouranosinc/xclim
0309ee4f6208ce1d468673aec9b2cb7353749616
Sea ice extent and area should use CF units * xclim version: master ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Units are currently set as `m^2`. CF units should be written `m2`.
diff --git a/HISTORY.rst b/HISTORY.rst index 8d834796..0e27f351 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,8 +12,10 @@ History * Added indicator `first_day_below` and run length helper `first_run_after_date`. * Added ANUCLIM model climate indices mappings. * Renamed `areacella` to `areacello` in sea ice tests...
Ouranosinc__xclim-489
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/indices/_multivariate.py:daily_freezethaw_cycles", "xclim/indices/_multivariate.py:daily_temperature_range", "xclim/indices/_multivariate.py:daily_temperature_range_variability", ...
Ouranosinc/xclim
6b5a5e952203d1be2c1bd9a4a03af6974cec6f5a
Some indices are defined with (tasmin, tasmax) while others use (tasmax, tasmin) * xclim version: master ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> I think we should stick to one ordering. It creates problems when wr...
diff --git a/HISTORY.rst b/HISTORY.rst index 85dd5f6d..1df4f827 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,9 +14,9 @@ History * Renamed `areacella` to `areacello` in sea ice tests. * Sea ice extent and area outputs now have units of m2 to comply with CF-Convention. * Split `checks.py` into `cfchecks.py`, `dat...
Ouranosinc__xclim-495
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/indices/run_length.py:rle" ], "edited_modules": [ "xclim/indices/run_length.py:rle" ] }, "file": "xclim/indices/run_length.py" } ]
Ouranosinc/xclim
c8a0a5417baf28f8b10d8ca4f3e9dd2db8ff55dd
rle fails when first dimension is not 'time' on dask arrays * xclim version: 0.17.0 & @master * Python version: 3.6 & 3.8 * Operating System: boréas and Linux ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> When `xclim.in...
diff --git a/xclim/indices/run_length.py b/xclim/indices/run_length.py index e1dc8f33..9b69522c 100644 --- a/xclim/indices/run_length.py +++ b/xclim/indices/run_length.py @@ -43,8 +43,11 @@ def get_npts(da: xr.DataArray) -> int: def rle(da: xr.DataArray, dim: str = "time", max_chunk: int = 1_000_000): n = len(d...
Ouranosinc__xclim-513
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/indices/generic.py:fit" ], "edited_modules": [ "xclim/indices/generic.py:fit" ] }, "file": "xclim/indices/generic.py" } ]
Ouranosinc/xclim
c3cce368e5ac64b27ecc93157095f55fefd07305
generic.fit incorrectly orders dimensions * xclim version: 0.18.1-beta ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Works as long as time is the first dimension, breaks otherwise (I think). For example, `xclim.indice...
diff --git a/HISTORY.rst b/HISTORY.rst index 8aa7b5b3..a53a3b5c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,8 @@ New features and enhancements Bug fixes ~~~~~~~~~ +* Fix `generic.fit` dimension ordering. This caused errors when "time" was not the first dimension in a DataArray. + Internal changes ~~...
Ouranosinc__xclim-531
[ { "changes": { "added_entities": [ "xclim/core/datachecks.py:check_freq" ], "added_modules": [ "xclim/core/datachecks.py:check_freq" ], "edited_entities": [ "xclim/core/datachecks.py:check_daily" ], "edited_modules": [ "xclim/core/datache...
Ouranosinc/xclim
160cd4e5a271178bb9a0a61d9e34f0fa077bd62c
Extend support to hourly data Raven will generate hourly streamflow time series, driven by hourly meteorological data. Ideally we would be able to define indicators operating on hourly data.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b23b630..2b76e53c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: # - id: autopep8 # args: ['--global-config=setup.cfg','--in-place'] - repo: https://github.com/timothycrosley/isort - re...
Ouranosinc__xclim-547
[ { "changes": { "added_entities": [ "xclim/indices/generic.py:_fit_start" ], "added_modules": [ "xclim/indices/generic.py:_fit_start" ], "edited_entities": [ "xclim/indices/generic.py:fit" ], "edited_modules": [ "xclim/indices/generic.py:f...
Ouranosinc/xclim
b5fa98ec7d0aa7a39e58fc9efbf7a36aa6aad6ec
Initial values for distribution fit * xclim version: 0.19 ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> The scipy.stats fit function using Maximum Likelihood (`generic.fit`) converges to poor values for some distributi...
diff --git a/HISTORY.rst b/HISTORY.rst index 9b8bd3f8..5abe2ece 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ New features and enhancements * New `generic.parametric_quantile` function taking parameters estimated by `generic.fit` as an input. * Add support for using probability weighted moments method ...
Ouranosinc__xclim-562
[ { "changes": { "added_entities": [ "xclim/indices/run_length.py:index_of_date" ], "added_modules": [ "xclim/indices/run_length.py:index_of_date" ], "edited_entities": [ "xclim/indices/run_length.py:season_length", "xclim/indices/run_length.py:run_end...
Ouranosinc/xclim
a7e126ceae6c743f7f7fd85b9bf45b52b39abb10
Run calculations with dates are not calendar-aware * xclim version: 0.20 * Python version: 3.8 * Operating System: Linux ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Functions of `xclim.indices.run_length` that accept ...
diff --git a/HISTORY.rst b/HISTORY.rst index 67715d9a..04b7dcd9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,6 +18,7 @@ New features and enhancements Bug fixes ~~~~~~~~~ * Fixed a bug in the attributes of `frost_season_length`. +* `indices.run_length` methods using dates now respect the array's calendar. Int...
Ouranosinc__xclim-694
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/core/calendar.py:doy_to_days_since", "xclim/core/calendar.py:days_since_to_doy" ], "edited_modules": [ "xclim/core/calendar.py:doy_to_days_since", "xclim/core/c...
Ouranosinc/xclim
0a66c614f159f7243a09d837a7beb315f891ed45
Implement a 'doy_to_days_after' and reverse functionality ### Description Certain indices outputting 'day of year' or `doy` values are not directly usable for ensemble percentiles and statistics due to its circular nature. Averaging `doy` results can potentially be handled by users via https://docs.scipy.org/d...
diff --git a/xclim/core/calendar.py b/xclim/core/calendar.py index e2936660..86a3787f 100644 --- a/xclim/core/calendar.py +++ b/xclim/core/calendar.py @@ -872,7 +872,7 @@ def doy_to_days_since( Passing `start` only makes sense if `da` has a yearly sampling frequency. calendar: str, optional The calen...
Ouranosinc__xclim-720
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/core/options.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/sdba/_ad...
Ouranosinc/xclim
2bd9efe0e241ce039f7e818df32d2b047729a6bf
sdba - "verbose" mode? As suggested in slack by @dgergel and also discussed this morning with Patrick, it could be interesting to output more than just the training dataset / scenario timeseries. I am thinking of some kind of "verbose" or "debug" mode, where sdba trains and adjusts would provide ancillary "diagnostics"...
diff --git a/HISTORY.rst b/HISTORY.rst index d6dafcde..073c2715 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ New features and enhancements * Indicator modules built from YAML can now use custom indices. A mapping or module of them can be given to ``build_indicator_module_from_yaml`` with the ``indices`...
Ouranosinc__xclim-723
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/indicators/atmos/_conversion.py" }, { "changes": { "added_entities": [ "xclim/indices/_conversion.py:humidex" ], "adde...
Ouranosinc/xclim
8688e167d4210d43a5792416679ed483caac6f87
Humidex indicator ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Add humidex indicator. https://www.canada.ca/en/environment-climate-change/services/seasonal-weather-hazards/warm-season-weather-hazards.html#toc7 http...
diff --git a/HISTORY.rst b/HISTORY.rst index f812dc8a..bfb2f18d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -34,6 +34,7 @@ New indicators ~~~~~~~~~~~~~~ * `atmos.corn_heat_units` computes the daily temperature-based index for corn growth. * New indices and indicators for `tx_days_below`, `tg_days_above`, `tg_days_...
Ouranosinc__xclim-757
[ { "changes": { "added_entities": [ "xclim/sdba/_adjustment.py:npdf_transform" ], "added_modules": [ "xclim/sdba/_adjustment.py:npdf_transform" ], "edited_entities": null, "edited_modules": null }, "file": "xclim/sdba/_adjustment.py" }, { "chang...
Ouranosinc/xclim
8504336b13c2a9e4b826024bbe5c84337a1b94f6
Multivariate quantile mapping bias correction implementation Implement https://link.springer.com/article/10.1007/s00382-017-3580-6
diff --git a/HISTORY.rst b/HISTORY.rst index af3ab196..842e6529 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,9 +9,12 @@ New features and enhancements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Automatic load of translations on import and possibility to pass translations for virtual modules. * New ``xclim.testing.list_datas...
Ouranosinc__xclim-766
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "xclim/indicators/land/_snow.py" }, { "changes": { "added_entities": [ "xclim/indices/_simple.py:snow_depth" ], "added_module...
Ouranosinc/xclim
8acbae020e6472783fc11330a8f51f3a0aa14107
Implement missing ICCLIM indices A few icclim indices were never included in early xclim implementation @bzah indicates he can spend some time on this List of indices: - [x] SD : Snow depth - [ ] CD : Cold and dry days - [ ] CW: Cold and wet days - [ ] WD: Warm and dry days - [ ] WW: Warm and wet days
diff --git a/.zenodo.json b/.zenodo.json index 6f50705d..5b82038d 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -35,6 +35,11 @@ "name": "Rondeau-Genesse, Gabriel", "orcid": "0000-0003-3389-9406" }, + { + "affiliation": "CERFACS", + "name": "Aoun, Abel", + "orcid": "0000-0003-2289-...
Ouranosinc__xclim-836
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/core/missing.py:MissingBase.__init__", "xclim/core/missing.py:MissingBase.prepare", "xclim/core/missing.py:MissingWMO.execute", "xclim/core/missing.py:missing_wmo" ],...
Ouranosinc/xclim
45cc76286525c2b7cbc55eb34bfcbb7ed7712e0e
WMO check missing doesn't account for missing months * xclim version: 0.29.0 * Python version: 3.9 * Operating System: BSD ### Description The missing data checks using the `set_options(check_missing="wmo")` context are correctly dropping the months that don't have an adequate number of days or too many days mi...
diff --git a/HISTORY.rst b/HISTORY.rst index 0c8f0a75..4d485e63 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,6 +17,7 @@ Bug fixes * ``xc.core.units.rate2amount`` is now exact when the sampling frequency is monthly, seasonal or yearly. Earlier, monthly and yearly data were computed using constant month and year le...
Ouranosinc__xclim-852
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xclim/core/indicator.py:build_indicator_module_from_yaml" ], "edited_modules": [ "xclim/core/indicator.py:build_indicator_module_from_yaml" ] }, "file": "xclim/core/ind...
Ouranosinc/xclim
994c1d7681af0a0dd46d90725bf6a093719860f2
Reading YAML file code seems need add encoding setting * xclim version: 0.29.0 * Python version: 3.9.7 * Operating System: Windows 10(zh-cn) ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> Maybe Reading YAML file part nee...
diff --git a/HISTORY.rst b/HISTORY.rst index 13b838e3..581e8cde 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -44,6 +44,7 @@ Bug fixes * Fix bug in ``missing_wmo``, where a period would be considered valid if all months met WMO criteria, but complete months in a year were missing. Now if any month does not meet criter...
Ouranosinc__xclim-969
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null ...
Ouranosinc/xclim
bd10c799d885531a0061a15f04a4b90bd9c32a48
Circular imports ### Description <!--Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.--> `core.missing` imports `indices.generic`, while some indices import `core.missing`, which causes circular import problems. The function required in `core.m...
diff --git a/HISTORY.rst b/HISTORY.rst index 13d253ca..378d7eeb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,10 @@ History ------------------- Contributors to this version: Trevor James Smith (:user:`Zeitsperre`). +Breaking changes +^^^^^^^^^^^^^^^^ +* To reduce import complexity, `select_time` has been re...
OxfordIonTrapGroup__oitg-38
[ { "changes": { "added_entities": [ "oitg/threshold.py:optimise_readout", "oitg/threshold.py:optimise_treshold", "oitg/threshold.py:optimise_t_bin", "oitg/threshold.py:poisson_optimal_thresh_count" ], "added_modules": [ "oitg/threshold.py:optimise_readout...
OxfordIonTrapGroup/oitg
768b2d5be8cf189b192d025877518a227171177f
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.
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 ...
PEtab-dev__libpetab-python-136
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/lint.py:check_observable_df" ], "edited_modules": [ "petab/lint.py:check_observable_df" ] }, "file": "petab/lint.py" } ]
PEtab-dev/libpetab-python
902f34967ecc60230339006dc21e233578075dc6
Reduce tests to min+max python? takes quite some time to start+run all ...
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-152
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/problem.py:Problem.from_files", "petab/problem.py:Problem.from_yaml" ], "edited_modules": [ "petab/problem.py:Problem" ] }, "file": "petab/problem.py" }...
PEtab-dev/libpetab-python
7a0b77ef6d968a4600497763df0ca791caa24768
Add support for multiple condition files per petab.Problem Allowed in YAML file, but not implemented in library.
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-156
[ { "changes": { "added_entities": [ "petab/parameters.py:_check_for_contradicting_parameter_definitions" ], "added_modules": [ "petab/parameters.py:_check_for_contradicting_parameter_definitions" ], "edited_entities": [ "petab/parameters.py:get_parameter_df" ...
PEtab-dev/libpetab-python
5a87f8370aa5be56ed39b986801e7e36b18d94cb
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...
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-235
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/core.py:get_visualization_df", "petab/core.py:flatten_timepoint_specific_output_overrides", "petab/core.py:unflatten_simulation_df" ], "edited_modules": [ "peta...
PEtab-dev/libpetab-python
4e6a0189eedf7078de8a674c200819cbdc26c83b
`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
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-287
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/v1/problem.py:Problem.to_files_generic" ], "edited_modules": [ "petab/v1/problem.py:Problem" ] }, "file": "petab/v1/problem.py" }, { "changes": { "a...
PEtab-dev/libpetab-python
62991395aeebb5b60a02ba39d6dc9a0347db4957
Validation fails for remote files `validate_yaml_semantics` uses `os.path.isfile` to check whether referenced files are available and fails for remote files.
diff --git a/petab/v1/problem.py b/petab/v1/problem.py index 203e8d9..e49e4d7 100644 --- a/petab/v1/problem.py +++ b/petab/v1/problem.py @@ -5,7 +5,7 @@ import os import tempfile from collections.abc import Iterable from math import nan -from pathlib import Path +from pathlib import Path, PurePosixPath from typing ...
PEtab-dev__libpetab-python-327
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/v1/problem.py:Problem.from_yaml" ], "edited_modules": [ "petab/v1/problem.py:Problem" ] }, "file": "petab/v1/problem.py" }, { "changes": { "added_en...
PEtab-dev/libpetab-python
0b77d7fb48ef36c579f9748d7df12365c68a1e24
Path management When generating a `petab.Problem` from a yaml file, all files are automatically prefixed by the location of the yaml file. However when directly passing the corresponding `dict` (potentially after manipulation), it is no longer possible to specify a prefix and the only way for the import to work correct...
diff --git a/petab/v1/problem.py b/petab/v1/problem.py index 4a5577e..6145656 100644 --- a/petab/v1/problem.py +++ b/petab/v1/problem.py @@ -251,21 +251,28 @@ class Problem: ) @staticmethod - def from_yaml(yaml_config: dict | Path | str) -> Problem: + def from_yaml( + yaml_config: dict | Pa...
PEtab-dev__libpetab-python-350
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/v1/problem.py:Problem.from_yaml" ], "edited_modules": [ "petab/v1/problem.py:Problem" ] }, "file": "petab/v1/problem.py" }, { "changes": { "added_en...
PEtab-dev/libpetab-python
9f11e7319b44b991fb0dc3315f1f3441ae9ac5fd
v2: version check `pteab.v2.Problem.from_yaml` will only accept "2.0.0" as version string, even though it sounds like "2" would also be valid according to spec. see https://github.com/PEtab-dev/libpetab-python/blob/99373c4340512def5a23bf2a75805c3f88251251/petab/v2/problem.py#L139
diff --git a/petab/v1/problem.py b/petab/v1/problem.py index 5c0dcf6..373b6b4 100644 --- a/petab/v1/problem.py +++ b/petab/v1/problem.py @@ -13,10 +13,10 @@ from warnings import warn import pandas as pd from pydantic import AnyUrl, BaseModel, Field, RootModel +from ..versions import get_major_version from . import...
PEtab-dev__libpetab-python-92
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/lint.py:check_condition_df" ], "edited_modules": [ "petab/lint.py:check_condition_df" ] }, "file": "petab/lint.py" } ]
PEtab-dev/libpetab-python
f6fd4896f557497a16afe3773467eb06a2614a79
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.
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-93
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "petab/conditions.py:get_condition_df", "petab/conditions.py:write_condition_df" ], "edited_modules": [ "petab/conditions.py:get_condition_df", "petab/conditions.py:wr...
PEtab-dev/libpetab-python
4f6b841495647a163d29c11c847dc4f45fda4286
Add consistent support for pathlib.Path Would be quite convenient if `Path`s could be used in addition path strings.
diff --git a/petab/conditions.py b/petab/conditions.py index 4cb7853..c9ed93c 100644 --- a/petab/conditions.py +++ b/petab/conditions.py @@ -1,11 +1,12 @@ """Functions operating on the PEtab condition table""" -from typing import Iterable, Optional, List, Union +from pathlib import Path +from typing import Iterable,...
PMEAL__OpenPNM-1665
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/algorithms/GenericTransport.py:GenericTransport.run", "openpnm/algorithms/GenericTransport.py:GenericTransport._run_generic" ], "edited_modules": [ "openpnm/algorithm...
PMEAL/OpenPNM
707321ce9beb29a4b36730c5ea87b48f04953187
Solvers don't check for convergence when maximum iterations is reached This is a corner-case that @mkaguer has recently found. Basically, when `max_iter` is reached, the solver gets tricked that the solution has converged. This is because unless `update_iterative_props` is called, the solution `x`, not surprisingly, sa...
diff --git a/examples/tutorials/Working with Mixtures.ipynb b/examples/tutorials/Working with Mixtures.ipynb index b3298216d..5b1ad732f 100644 --- a/examples/tutorials/Working with Mixtures.ipynb +++ b/examples/tutorials/Working with Mixtures.ipynb @@ -589,7 +589,6 @@ "1 pore.bc_rate ...
PMEAL__OpenPNM-1689
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/Base.py:Base.__init__", "openpnm/core/Base.py:Base._set_name" ], "edited_modules": [ "openpnm/core/Base.py:Base" ] }, "file": "openpnm/core/Base.py...
PMEAL/OpenPNM
9393cc8308a61651681b2595b0f7cfa3eaa4a55f
Object names must be unique within a project Currently, this is not enforced.
diff --git a/openpnm/core/Base.py b/openpnm/core/Base.py index f99efe03c..7a19fa281 100644 --- a/openpnm/core/Base.py +++ b/openpnm/core/Base.py @@ -1,7 +1,6 @@ import warnings import uuid import numpy as np -import scipy as sp from collections import namedtuple from openpnm.models.misc import from_neighbor_throat...
PMEAL__OpenPNM-1702
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/topotools/topotools.py:dimensionality" ], "edited_modules": [ "openpnm/topotools/topotools.py:dimensionality" ] }, "file": "openpnm/topotools/topotools.py" } ...
PMEAL/OpenPNM
2b26808ccdf541e955bf8c897d1dca1b1cac2f3c
topotools.dimensionality sometimes treats 1D networks as 2D Although extremely rare, it's still a bug. It's even hard to reproduce, but I had this problem when I was doing manual coordinate manipulations for the CL project. ```python import openpnm as op net = op.network.Cubic([1, 1, 5], spacing=1.2345678e-20) ...
diff --git a/openpnm/topotools/topotools.py b/openpnm/topotools/topotools.py index 54d885cd6..05e8744fc 100644 --- a/openpnm/topotools/topotools.py +++ b/openpnm/topotools/topotools.py @@ -551,10 +551,12 @@ def dimensionality(network): Returns an 3-by-1 array containing ``True`` for each axis that contains mu...
PMEAL__OpenPNM-1789
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/ModelsMixin.py:ModelsMixin._regen" ], "edited_modules": [ "openpnm/core/ModelsMixin.py:ModelsMixin" ] }, "file": "openpnm/core/ModelsMixin.py" }, { ...
PMEAL/OpenPNM
0cdb50bea1b1ec2aa8fca57358faa0fc757dc7e1
Problem with 'throat.partition_coef.all' not being set as iterative_prop nor updating when regenerate_models is called manually I am writing a model where the partition coefficient changes with concentration. So it's important that 'throat.partition_coef.all' updates as 'throat.diffusive_conductance' (based on multipha...
diff --git a/openpnm/algorithms/ReactiveTransport.py b/openpnm/algorithms/ReactiveTransport.py index 4f50c065f..5b495bc99 100644 --- a/openpnm/algorithms/ReactiveTransport.py +++ b/openpnm/algorithms/ReactiveTransport.py @@ -368,14 +368,16 @@ class ReactiveTransport(GenericTransport): def _get_iterative_props(se...
PMEAL__OpenPNM-1794
[ { "changes": { "added_entities": [ "openpnm/algorithms/AdvectionDiffusion.py:AdvectionDiffusion.remove_BC", "openpnm/algorithms/AdvectionDiffusion.py:AdvectionDiffusion._set_BC" ], "added_modules": null, "edited_entities": [ "openpnm/algorithms/AdvectionDiffusion....
PMEAL/OpenPNM
86411dbd0af894ac569ab2cb09d2d33441cd8716
Outflow BC and other BC types must be prevented to coexist in a given set of pores
diff --git a/openpnm/algorithms/AdvectionDiffusion.py b/openpnm/algorithms/AdvectionDiffusion.py index 7554b0429..5373467f1 100644 --- a/openpnm/algorithms/AdvectionDiffusion.py +++ b/openpnm/algorithms/AdvectionDiffusion.py @@ -74,7 +74,7 @@ class AdvectionDiffusion(ReactiveTransport): **kwargs ): ...
PMEAL__OpenPNM-1831
[ { "changes": { "added_entities": [ "openpnm/algorithms/ReactiveTransport.py:ReactiveTransport.remove_source" ], "added_modules": null, "edited_entities": [ "openpnm/algorithms/ReactiveTransport.py:ReactiveTransport.set_source" ], "edited_modules": [ "o...
PMEAL/OpenPNM
5ecee86e7b99c122804ce39971e351faff09da7d
Add remove_source to Algorithm objects?
diff --git a/openpnm/algorithms/ReactiveTransport.py b/openpnm/algorithms/ReactiveTransport.py index a5f422105..15ea1402a 100644 --- a/openpnm/algorithms/ReactiveTransport.py +++ b/openpnm/algorithms/ReactiveTransport.py @@ -185,7 +185,7 @@ class ReactiveTransport(GenericTransport): if variable_props: ...
PMEAL__OpenPNM-1844
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/network/Cubic.py:Cubic.__init__", "openpnm/network/Cubic.py:Cubic._get_spacing" ], "edited_modules": [ "openpnm/network/Cubic.py:Cubic" ] }, "file": "op...
PMEAL/OpenPNM
11530fa4ce00a80700429710bad3b26bc540d600
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) ```
diff --git a/openpnm/network/Cubic.py b/openpnm/network/Cubic.py index 389562f19..41278b9c0 100644 --- a/openpnm/network/Cubic.py +++ b/openpnm/network/Cubic.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ =============================================================================== Cubic: Generate lattice-like ne...
PMEAL__OpenPNM-1850
[ { "changes": { "added_entities": [ "openpnm/algorithms/ReactiveTransport.py:ReactiveTransport._set_variable_props" ], "added_modules": null, "edited_entities": [ "openpnm/algorithms/ReactiveTransport.py:ReactiveTransport.reset", "openpnm/algorithms/ReactiveTranspo...
PMEAL/OpenPNM
52eb1bca667fd098d027b83f9f344e0d54d42ca3
The default markersize in plot_coordinates is way too small Maybe change it to 10.
diff --git a/examples/notebooks/algorithms/multiphysics/advection_diffusion.ipynb b/examples/notebooks/algorithms/multiphysics/advection_diffusion.ipynb index e38cc56a4..5f7e54b4d 100644 --- a/examples/notebooks/algorithms/multiphysics/advection_diffusion.ipynb +++ b/examples/notebooks/algorithms/multiphysics/advection...
PMEAL__OpenPNM-1902
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/models/physics/ad_dif_conductance.py:ad_dif" ], "edited_modules": [ "openpnm/models/physics/ad_dif_conductance.py:ad_dif" ] }, "file": "openpnm/models/physics/a...
PMEAL/OpenPNM
9392f1cf79eb2a0f39ba9f6d6211c6ead596c147
Remove lines that store peclet numbers https://github.com/PMEAL/OpenPNM/blob/c01c5d3433c411bc69968feb7847cd2e3ba2eaa3/openpnm/models/physics/ad_dif_mig_conductance.py#L175 https://github.com/PMEAL/OpenPNM/blob/c01c5d3433c411bc69968feb7847cd2e3ba2eaa3/openpnm/models/physics/ad_dif_conductance.py#L97 These lines of...
diff --git a/openpnm/models/physics/ad_dif_conductance.py b/openpnm/models/physics/ad_dif_conductance.py index 315ecde99..7dbe99fd3 100644 --- a/openpnm/models/physics/ad_dif_conductance.py +++ b/openpnm/models/physics/ad_dif_conductance.py @@ -94,10 +94,6 @@ def ad_dif(target, Peij[(Peij < 1e-10) & (Peij >= 0)] =...
PMEAL__OpenPNM-2157
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/Base.py:Base._get_name", "openpnm/core/Base.py:Base.to_global", "openpnm/core/Base.py:Base.to_local", "openpnm/core/Base.py:LegacyMixin.tomask", "openpnm/cor...
PMEAL/OpenPNM
371c97fc696d027fb37d46d9b352b3c56f853de6
Remove target argument from pores/throats This should be replaced with the ``global=True/False`` keyword
diff --git a/openpnm/core/Base.py b/openpnm/core/Base.py index a486260b7..d1e2840ad 100644 --- a/openpnm/core/Base.py +++ b/openpnm/core/Base.py @@ -268,7 +268,10 @@ class Base(dict): item['throat.' + name] = item.pop('throat.' + old_name) def _get_name(self): - return self.settings['name...
PMEAL__OpenPNM-2160
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "openpnm/models/geometry/misc.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "ed...
PMEAL/OpenPNM
ddefbc73da05c936dcea0373cb89cb92121a35b0
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.
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-2162
[ { "changes": { "added_entities": [ "openpnm/core/Base.py:Base.__delitem__" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "openpnm/core/Base.py:Base" ] }, "file": "openpnm/core/Base.py" } ]
PMEAL/OpenPNM
aa445a2acec85ebf1e8f358e641fa5e2c4e141b7
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'] ```
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-2173
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "openpnm/algorithms/GenericAlgorithm.py:GenericAlgorithm" ] }, "file": "openpnm/algorithms/GenericAlgorithm.py" }, { "changes": { "added_entities...
PMEAL/OpenPNM
486ed107160e587096d85cf308af7eadb5bef390
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...
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-2186
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/models/geometry/throat_volume.py:lens", "openpnm/models/geometry/throat_volume.py:pendular_ring" ], "edited_modules": [ "openpnm/models/geometry/throat_volume.py:lens...
PMEAL/OpenPNM
4588835e40c14421dcc6c34b555595147006c417
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...
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-2216
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/_base.py:Base.interleave_data" ], "edited_modules": [ "openpnm/core/_base.py:Base" ] }, "file": "openpnm/core/_base.py" } ]
PMEAL/OpenPNM
af5c148155e16793697f0e754846a0ca83eb50e1
Interleave data could infer the wrong shape In line 803, depending on which object comes first, the inferred shape could be wrong. For instance, if we have `(Nt,1)` and `(Nt,2)` conductances, it'll break (the opposite accidentally works fine, since it'll broadcast the values). See #1676. https://github.com/PMEAL/Ope...
diff --git a/openpnm/core/_base.py b/openpnm/core/_base.py index 3b64fb4a5..1a4a429b3 100644 --- a/openpnm/core/_base.py +++ b/openpnm/core/_base.py @@ -682,14 +682,14 @@ class Base(dict): [False False False False] """ - # Fetch sources list depending on type of self + # Fetch subdomai...
PMEAL__OpenPNM-2230
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/_base.py:Base.interleave_data" ], "edited_modules": [ "openpnm/core/_base.py:Base" ] }, "file": "openpnm/core/_base.py" } ]
PMEAL/OpenPNM
703437e816546e12ec2ff71350961d666edbda9d
Interleave data breaks when dealing with a combination of (Nt,1) and (Nt,2) conductance models **Describe the bug** Suppose you have two geometries, one involves a conductance model that returns (Nt,1), and the other (Nt,2). Calling `throat.conductance` on the phase object fails. **To Reproduce** Steps to reproduc...
diff --git a/openpnm/core/_base.py b/openpnm/core/_base.py index a10d5a9d8..8e72baeb7 100644 --- a/openpnm/core/_base.py +++ b/openpnm/core/_base.py @@ -715,11 +715,14 @@ class Base(dict): # Let's start by handling the easy cases first if not any([a is None for a in arrs]): + # If any arr...
PMEAL__OpenPNM-2240
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "example.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/algorithms/_gener...
PMEAL/OpenPNM
7a5aacb5a02bb4e242de949dcc1b48af13d43a7d
Make main arguments mandatory for main objects I think we should make main arguments, namely `network`, `geometry`, `phase`, `physics` (where applicable), mandatory for main objects. Here's what I propose: - `network`: looks good as is - `geometry`: `network` - `phase`: `network` - `physics`: `network`, `geometry...
diff --git a/example.py b/example.py index c781347fe..d3e8746af 100644 --- a/example.py +++ b/example.py @@ -5,11 +5,10 @@ from openpnm.models.physics import source_terms # %% Initialization: create Workspace and project objects. ws = op.Workspace() ws.settings.loglevel = 50 -proj = ws.new_project() np.random.seed(...
PMEAL__OpenPNM-2243
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/_base.py:Base.__getitem__" ], "edited_modules": [ "openpnm/core/_base.py:Base" ] }, "file": "openpnm/core/_base.py" }, { "changes": { "added_...
PMEAL/OpenPNM
846dc907049f1a411907be762e7cc013b72429e1
Allow passing scalar values as argument to built-in source term models Something like: ```python mod = op.models.physics.generic_source_term.standard_kinetics k, n = 1e-4, 2 phys.add_model( X="pore.concentration", propname="pore.rxn", model=mod, prefactor=k, exponent=n, regen_mode="deferred" ) ...
diff --git a/openpnm/core/_base.py b/openpnm/core/_base.py index 3fac92c54..3152d64ab 100644 --- a/openpnm/core/_base.py +++ b/openpnm/core/_base.py @@ -182,6 +182,11 @@ class Base(dict): raise Exception('Provided array is wrong length for ' + key) def __getitem__(self, key): + # If the k...
PMEAL__OpenPNM-2265
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "openpnm/__version__.py" }, { "changes": { "added_entities": [ "openpnm/algorithms/_generic_transport.py:GenericTransport._validate_x0", ...
PMEAL/OpenPNM
a592f5d7b7d57b9ef2a7101eaad4950d4acb27c5
Check that x0 contains valid numbers in transport algs the ``_validate_data_health`` check should also check if x0 doesn't contain nan/infs. This is the main point we settled on in #2126
diff --git a/openpnm/__version__.py b/openpnm/__version__.py index 5f18c6783..ee33cb361 100644 --- a/openpnm/__version__.py +++ b/openpnm/__version__.py @@ -1,1 +1,1 @@ -__version__ = '2.8.2.dev6' +__version__ = '2.8.2.dev5' diff --git a/openpnm/algorithms/_generic_transport.py b/openpnm/algorithms/_generic_transport.p...
PMEAL__OpenPNM-2266
[ { "changes": { "added_entities": [ "openpnm/topotools/_topotools.py:find_interface_throats" ], "added_modules": [ "openpnm/topotools/_topotools.py:find_interface_throats" ], "edited_entities": null, "edited_modules": null }, "file": "openpnm/topotools/...
PMEAL/OpenPNM
bc4a7da27aa23ff0fc74b1ae0bc18a4451db3223
Find rate between two sets of pores Here's a handy function that calculates the rate between two sets of pores `P1` and `P2`. I'm not sure if it's worth adding it to `openpnm`. ```python def rate_interface(alg, P1, P2): if np.intersect1d(P1, P2).size != 0: raise Exception("P1 and P2 must not share any...
diff --git a/openpnm/topotools/_topotools.py b/openpnm/topotools/_topotools.py index ce44e9c9a..2cbf51a9b 100644 --- a/openpnm/topotools/_topotools.py +++ b/openpnm/topotools/_topotools.py @@ -1890,6 +1890,39 @@ def filter_pores_by_z(network, pores, z=1): hits = pores[orphans] return hits + +def find_interf...
PMEAL__OpenPNM-2306
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/algorithms/_generic_transport.py:GenericTransport.run", "openpnm/algorithms/_generic_transport.py:GenericTransport._run_special" ], "edited_modules": [ "openpnm/algor...
PMEAL/OpenPNM
b60786a2194e9812ef3728b76f75d483aebd6b38
Change solution objects to be nested inside a dict All solutions should be returned inside a dict, so that ``sol = alg.run()`` and ``sol['pore.concentration']`` points to the actual Solution object. This way (a) the solution knows the quantity it contains (pore.concentration) and (b) multiphysics can be combined into o...
diff --git a/openpnm/algorithms/_generic_transport.py b/openpnm/algorithms/_generic_transport.py index 7dcf7a3d1..272d8ea2d 100644 --- a/openpnm/algorithms/_generic_transport.py +++ b/openpnm/algorithms/_generic_transport.py @@ -7,7 +7,7 @@ from openpnm.algorithms import BCsMixin from openpnm.utils import logging, pre...
PMEAL__OpenPNM-2319
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "openpnm/contrib/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited...
PMEAL/OpenPNM
eefbd1ed219cd40ad514b8bd5f80008d5e24dcd5
Move Multiphase into the contrib folder We are still trying to figure out how Multiphase should work, and how it should interact with Mixtures, etc. In the spirit of actually getting 3.0 released, I think we should move it to contrib to allow us to break compatibility later.
diff --git a/openpnm/contrib/__init__.py b/openpnm/contrib/__init__.py index f1d1793be..994381c77 100644 --- a/openpnm/contrib/__init__.py +++ b/openpnm/contrib/__init__.py @@ -10,3 +10,4 @@ removed. """ from ._transient_multiphysics import * +from ._multiphase import MultiPhase diff --git a/openpnm/phase/_multipha...
PMEAL__OpenPNM-2333
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/models/geometry/pore_surface_area/_funcs.py:sphere", "openpnm/models/geometry/pore_surface_area/_funcs.py:circle", "openpnm/models/geometry/pore_surface_area/_funcs.py:cube", ...
PMEAL/OpenPNM
007c521a4cb93d45beb26cb878b9b1ee1762a4f8
pore_area models are needlessly slow We're using list comprehensions in these models, but could use unbuffered vector operations: ``` python import numpy as np import openpnm as op net = op.network.Cubic(shape=[3, 3]) net['pore.diameter'] = 1 net['throat.diameter'] = np.random.rand(net.Nt)*0.5 net['throa...
diff --git a/openpnm/models/geometry/pore_surface_area/_funcs.py b/openpnm/models/geometry/pore_surface_area/_funcs.py index 877347415..b5cc123a2 100644 --- a/openpnm/models/geometry/pore_surface_area/_funcs.py +++ b/openpnm/models/geometry/pore_surface_area/_funcs.py @@ -42,11 +42,11 @@ def sphere( """ net...
PMEAL__OpenPNM-2445
[ { "changes": { "added_entities": [ "openpnm/contrib/_multiphase.py:MultiPhase.phases", "openpnm/contrib/_multiphase.py:MultiPhase.K", "openpnm/contrib/_multiphase.py:MultiPhase._get_phase_labels", "openpnm/contrib/_multiphase.py:MultiPhase._get_interface_throats", "...
PMEAL/OpenPNM
9b209ae9a469018f6e49a3dd05124d7787a42e60
Fix MultiPhase to work with v3 changes
diff --git a/openpnm/contrib/_multiphase.py b/openpnm/contrib/_multiphase.py index f07acc2ac..1b0d6c203 100644 --- a/openpnm/contrib/_multiphase.py +++ b/openpnm/contrib/_multiphase.py @@ -2,7 +2,7 @@ import logging import numpy as np import openpnm.models.misc as misc from openpnm.phase import GenericPhase as Gener...
PMEAL__OpenPNM-2467
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/algorithms/_advection_diffusion.py:AdvectionDiffusion._get_settings" ], "edited_modules": [ "openpnm/algorithms/_advection_diffusion.py:AdvectionDiffusion" ] }, ...
PMEAL/OpenPNM
bdd1eb8b7652198846e19bbf6f7552347b643e0e
Fine-tune iterative props machinery - [x] Move ``update_iterative_props`` to a higher level, like GenericAlgorithm, or perhaps as a Mixin - [x] Add functools.cached_property to ``get_iterative_props`` - [ ] Decide if/how to update models on algorithm. Ex. Drainage could use 'update_iterative_props' method, or could ...
diff --git a/openpnm/algorithms/_advection_diffusion.py b/openpnm/algorithms/_advection_diffusion.py index 2cd6c415b..efdf9cd0d 100644 --- a/openpnm/algorithms/_advection_diffusion.py +++ b/openpnm/algorithms/_advection_diffusion.py @@ -47,15 +47,6 @@ class AdvectionDiffusion(ReactiveTransport): kwargs['na...
PMEAL__OpenPNM-2532
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "openpnm/core/_base2.py:Base2.get_conduit_data" ], "edited_modules": [ "openpnm/core/_base2.py:Base2" ] }, "file": "openpnm/core/_base2.py" }, { "changes": { ...
PMEAL/OpenPNM
0d09f937f96b36cfb33ce49dfa9ebf334fee3c20
Models that return conduit data should return Nt by 3 instead of a dict Because it's more concise...
diff --git a/openpnm/core/_base2.py b/openpnm/core/_base2.py index 94c40516d..f2f2e9a13 100644 --- a/openpnm/core/_base2.py +++ b/openpnm/core/_base2.py @@ -402,12 +402,35 @@ class Base2(dict): values = from_neighbor_throats(target=self, prop='throat.'+prop, mode=mode) return values - def get...
PMEAL__porespy-368
[ { "changes": { "added_entities": [ "porespy/metrics/__funcs__.py:radial_density_distribution", "porespy/metrics/__funcs__.py:lineal_path_distribution" ], "added_modules": [ "porespy/metrics/__funcs__.py:radial_density_distribution", "porespy/metrics/__funcs__.py...
PMEAL/porespy
f0089c7ceb9b9e186e6302b98cfe6cf2d89bd130
Rename radial_density to radial_distribution The term density comes from the statistical "probability density". This functions takes a distance transform, which is really a distribution of radii, and computes the pdf and cdf of those values. I propose to rename this to ``radial_distribution`` to indicate what it's an...
diff --git a/porespy/metrics/__funcs__.py b/porespy/metrics/__funcs__.py index d0dc0e87e..8964ebc09 100644 --- a/porespy/metrics/__funcs__.py +++ b/porespy/metrics/__funcs__.py @@ -103,7 +103,7 @@ def porosity_profile(im, axis=0): return prof -def radial_density(im, bins=10, voxel_size=1): +def radial_density_...
PMEAL__porespy-369
[ { "changes": { "added_entities": [ "porespy/tools/__funcs__.py:ps_rect" ], "added_modules": [ "porespy/tools/__funcs__.py:ps_rect" ], "edited_entities": null, "edited_modules": null }, "file": "porespy/tools/__funcs__.py" }, { "changes": { ...
PMEAL/porespy
f0089c7ceb9b9e186e6302b98cfe6cf2d89bd130
Add new strel generators, that accepts ndims? we have ps_sphere and ps_disk, so I propose ps_round, which accepts r and dims. If dims=2, it returns a disk, if dims=3 it returns a ball. This would save about 5 lines of code in dozens of functions. Could also do ps_rect for squares and cubes.
diff --git a/porespy/tools/__funcs__.py b/porespy/tools/__funcs__.py index 1de41cb0c..0aa421013 100644 --- a/porespy/tools/__funcs__.py +++ b/porespy/tools/__funcs__.py @@ -911,6 +911,32 @@ def ps_round(r, ndim, smooth=True): return ball +def ps_rect(w, ndim): + r""" + Creates rectilinear structuring ele...
PMEAL__porespy-371
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "porespy/generators/__imgen__.py:RSA" ], "edited_modules": [ "porespy/generators/__imgen__.py:RSA" ] }, "file": "porespy/generators/__imgen__.py" } ]
PMEAL/porespy
f0089c7ceb9b9e186e6302b98cfe6cf2d89bd130
Add a clearance argument to RSA
diff --git a/examples/generators/RSA.ipynb b/examples/generators/RSA.ipynb index 6dfc999f7..50b8c8c12 100644 --- a/examples/generators/RSA.ipynb +++ b/examples/generators/RSA.ipynb @@ -29,7 +29,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "metadata": {}, "outputs"...
PMEAL__porespy-465
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "porespy/filters/_snows.py:trim_nearby_peaks" ], "edited_modules": [ "porespy/filters/_snows.py:trim_nearby_peaks" ] }, "file": "porespy/filters/_snows.py" } ]
PMEAL/porespy
51276c464ccaf8feea1cb246c6178a81af3b51dc
enhance trim_nearby_peaks to accept a tolerance or threshold At the moment it trims peaks that are closer to another peak than to solid, but it'd be nice if we could put some sort of absolute AND relative tolerance, so it only trims peaks if they are too close to a nearby peak within some acceptable amount.
diff --git a/porespy/filters/_snows.py b/porespy/filters/_snows.py index 346716570..aa17cb1a8 100644 --- a/porespy/filters/_snows.py +++ b/porespy/filters/_snows.py @@ -350,7 +350,7 @@ def trim_saddle_points(peaks, dt, max_iters=10): return peaks -def trim_nearby_peaks(peaks, dt): +def trim_nearby_peaks(peaks,...
PMEAL__porespy-802
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "porespy/__version__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modu...
PMEAL/porespy
aad78183ae47b4cf8c28558a25d5ee7287ff06b5
add seed argument to all generators This would be handy for several reason: - so that we don't have to import numpy just to initialize the rng - numba doesn't respect the numpy rng so needs special treatment - the docs could explain how to get a repeatable image
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c5a81e49c..14230c7ac 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -22,30 +22,21 @@ jobs: with: python-version: 3.8 - - name: Cache conda + - name: Cache pip ...
PMEAL__porespy-809
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "porespy/networks/_snow2.py:_parse_pad_width" ], "edited_modules": [ "porespy/networks/_snow2.py:_parse_pad_width" ] }, "file": "porespy/networks/_snow2.py" } ]
PMEAL/porespy
63ce07d4a1c0337bc5942a33777fae81adc6aba9
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...
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-863
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "porespy/metrics/_funcs.py:satn_profile" ], "edited_modules": [ "porespy/metrics/_funcs.py:satn_profile", "porespy/metrics/_funcs.py:results" ] }, "file": "pores...
PMEAL/porespy
2b340e9cd1c6923f375496b0c040ea614d75e4d5
Update `satn_profile` to accept an already thresholded image
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-864
[ { "changes": { "added_entities": [ "porespy/tools/_utils.py:_format_time", "porespy/tools/_utils.py:tic", "porespy/tools/_utils.py:toc" ], "added_modules": [ "porespy/tools/_utils.py:_format_time", "porespy/tools/_utils.py:tic", "porespy/tools/_u...
PMEAL/porespy
2b340e9cd1c6923f375496b0c040ea614d75e4d5
Readd tic and toc to tools I've been interested in timings a lot lately and it would be helpful if `tic` and `toc` were readded back to the tools module.
diff --git a/porespy/tools/_utils.py b/porespy/tools/_utils.py index 630ac30af..9055157ef 100644 --- a/porespy/tools/_utils.py +++ b/porespy/tools/_utils.py @@ -16,9 +16,88 @@ __all__ = [ 'get_tqdm', 'show_docstring', 'Results', + 'tic', + 'toc', ] +def _format_time(timespan, precision=3): + ...
PMEAL__porespy-865
[ { "changes": { "added_entities": [ "porespy/filters/_size_seq_satn.py:pc_to_seq" ], "added_modules": [ "porespy/filters/_size_seq_satn.py:pc_to_seq" ], "edited_entities": null, "edited_modules": null }, "file": "porespy/filters/_size_seq_satn.py" }, ...
PMEAL/porespy
ff3029fad904dab8ac6f5acf02e3270a704cb07f
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.
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...
PSLmodels__ParamTools-80
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "paramtools/parameters.py:Parameters.to_array" ], "edited_modules": [ "paramtools/parameters.py:Parameters" ] }, "file": "paramtools/parameters.py" } ]
PSLmodels/ParamTools
06d113a25a3a6e3193fc3704c40a92cbcfdbe80b
Scalar values are set as zero dimension arrays When `array_first` is `True`, scalar values are set to zero dimension NumPy arrays. For the most part, these values act like normal Python `int`s or `float`s, but they cause problems in edge cases. Further, this behavior may confusing for new users. I'll open a PR this wee...
diff --git a/paramtools/parameters.py b/paramtools/parameters.py index a44fc7c..1d91538 100644 --- a/paramtools/parameters.py +++ b/paramtools/parameters.py @@ -369,10 +369,14 @@ class Parameters: f"\nYou may be able to describe this parameter's values with additional " f"labels\nand t...
PSLmodels__microdf-158
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "microdf/inequality.py:gini", "microdf/inequality.py:top_x_pct_share", "microdf/inequality.py:bottom_x_pct_share", "microdf/inequality.py:bottom_50_pct_share", "microdf/in...
PSLmodels/microdf
a2422e8b0bf20eca60a9bf39e8a3ad14d98a62e9
Add groupby to gini
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-166
[ { "changes": { "added_entities": [ "microdf/generic.py:MicroSeries.handles_zero_weights", "microdf/generic.py:MicroSeries.groupby", "microdf/generic.py:MicroSeries.__getitem__", "microdf/generic.py:MicroSeriesGroupBy.__init__", "microdf/generic.py:MicroSeriesGroupBy...
PSLmodels/microdf
db688dbab9b0fc84bbd7d5d096084ff8d6a9ff13
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'`
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-188
[ { "changes": { "added_entities": [ "microdf/generic.py:MicroSeries.cumsum", "microdf/generic.py:MicroSeries.rank", "microdf/generic.py:MicroDataFrame.catch_series_relapse", "microdf/generic.py:MicroDataFrame.__setattr__", "microdf/generic.py:MicroDataFrame.reset_ind...
PSLmodels/microdf
995a0c703af8bcc84809915df155336d9473d043
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....
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-191
[ { "changes": { "added_entities": [ "microdf/generic.py:MicroSeries.decile_rank", "microdf/generic.py:MicroSeries.quintile_rank", "microdf/generic.py:MicroSeries.quartile_rank", "microdf/generic.py:MicroSeries.percentile_rank" ], "added_modules": null, "edi...
PSLmodels/microdf
2c66482b72f12355ad0035bf281390197908788c
Add MicroSeries.{percentile, decile, quintile, quartile}_rank Based off of recently-added `MicroSeries.rank(pct=True)`
diff --git a/microdf/generic.py b/microdf/generic.py index 32d688c..4b31aba 100644 --- a/microdf/generic.py +++ b/microdf/generic.py @@ -1,6 +1,7 @@ from typing import Callable, Union from functools import wraps import warnings +import copy import numpy as np import pandas as pd @@ -247,10 +248,26 @@ class Micro...
PSLmodels__microdf-205
[ { "changes": { "added_entities": [ "microdf/generic.py:MicroSeries.copy", "microdf/generic.py:MicroSeries.equals", "microdf/generic.py:MicroDataFrame.copy", "microdf/generic.py:MicroDataFrame.equals" ], "added_modules": null, "edited_entities": [ "...
PSLmodels/microdf
02280c5d13dbc715258cd47b57a8ddd9291ecce2
MicroDataFrame[[cols]] produces KeyError This works in `pandas` and should produce a `MicroDataFrame` with only the column `x`: ``` d = mdf.MicroDataFrame(dict(x=[1, 2], y=[3, 4]), weights=[5, 6]) d[["x"]] ``` But it errors out instead: ``` KeyError: "None of [Index(['x'], dtype='object')] are in the [index]" `...
diff --git a/microdf/generic.py b/microdf/generic.py index f6a91ad..32d688c 100644 --- a/microdf/generic.py +++ b/microdf/generic.py @@ -1,8 +1,8 @@ -import numpy as np -import pandas as pd from typing import Callable, Union from functools import wraps import warnings +import numpy as np +import pandas as pd cl...
PSLmodels__microdf-219
[ { "changes": { "added_entities": [ "microdf/generic.py:MicroSeries.__repr__", "microdf/generic.py:MicroDataFrame.__repr__" ], "added_modules": null, "edited_entities": [ "microdf/generic.py:MicroDataFrame.__getitem__" ], "edited_modules": [ "mi...
PSLmodels/microdf
8802af33cdae9b37733a33aa307ee991246b0716
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...
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): + ...
PaccMann__paccmann_datasets-13
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pytoda/smiles/transforms.py:ToTensor.__call__" ], "edited_modules": [ "pytoda/smiles/transforms.py:ToTensor" ] }, "file": "pytoda/smiles/transforms.py" } ]
PaccMann/paccmann_datasets
def0673e39f2e6a6e86f6d2456eab4e7b770980f
Shape of tensors returned by SMILES_dataset The `SMILESDataset` class currently returns per default tensors of shape `sequence_length x 1`. This is not ideal since the additional dimension is not understood by most models per default. As a workaround, we use `torch.squeeze()` in the code that currently uses `SMILESDat...
diff --git a/pytoda/smiles/transforms.py b/pytoda/smiles/transforms.py index 6a9288f..a40439f 100644 --- a/pytoda/smiles/transforms.py +++ b/pytoda/smiles/transforms.py @@ -95,7 +95,7 @@ class ToTensor(Transform): """ return torch.tensor( token_indexes, dtype=self.dtype, device=self.devic...
PagerDuty__pdpyras-54
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pdpyras.py:PDSession.stagger_cooldown", "pdpyras.py:EventsAPISession.auth_header", "pdpyras.py:EventsAPISession.send_event", "pdpyras.py:APISession.find", "pdpyras.py:API...
PagerDuty/pdpyras
4fb715ab215a500262cb61005b1a9c70ba190179
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...
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...
PandABlocks__PandABlocks-client-20
[ { "changes": { "added_entities": [ "pandablocks/commands.py:RawResponse.line", "pandablocks/commands.py:RawResponse.multiline", "pandablocks/commands.py:Disarm.lines", "pandablocks/commands.py:Disarm.response" ], "added_modules": [ "pandablocks/commands....
PandABlocks/PandABlocks-client
89bb7d6cbe69199959d62859fabfd2a59526ae52
look at changing return value of send to always be a list. this may reduce the amount of code checking the type of the return.
diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 0768ee0..4cfab26 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -25,7 +25,7 @@ jobs: run: | env pip install pipenv - pipenv install --dev --deploy && pipenv graph + pi...
PandABlocks__PandABlocks-client-55
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pandablocks/connections.py:DataConnection.__init__", "pandablocks/connections.py:DataConnection._handle_data_frame", "pandablocks/connections.py:DataConnection._handle_data_end" ],...
PandABlocks/PandABlocks-client
158122304c0c730e6adaddea30eae3d27db9d3da
How to get data frames immediately, instead of one frame late? Hi Team PandABlocks At MAX IV, we are trying to implement a near "real-time" indicator of the number of samples received from the PandABox via the data capture port. We are currently underestimating the expected value while capturing. ### Symptoms ...
diff --git a/docs/explanations/performance.rst b/docs/explanations/performance.rst index 18f384c..f2952d9 100644 --- a/docs/explanations/performance.rst +++ b/docs/explanations/performance.rst @@ -51,7 +51,7 @@ Scale the data on the client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `AsyncioClient.data` and `BlockingClient.data` ...
PandABlocks__PandABlocks-client-96
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/pandablocks/commands.py:GetFieldInfo._time" ], "edited_modules": [ "src/pandablocks/commands.py:GetFieldInfo" ] }, "file": "src/pandablocks/commands.py" }, { ...
PandABlocks/PandABlocks-client
aa2eb1a823c08751b0deba072f39d1b4285d52f6
PandABlocks-client raises error when using PandA3.1 (b1) firmware I have recently updated the Firmware on BL20J-TS-PANDA-01 (172.23.90.24) to 3.1b1 and it produces the following error: ``` pandablocks-ioc softioc BL20J-TS-PANDA-01 BL20J-EA-PANDA-01 INFO: PVXS QSRV2 is loaded, permitted, and ENABLED. Traceback (most...
diff --git a/src/pandablocks/commands.py b/src/pandablocks/commands.py index b94a0f6..7a5d32e 100644 --- a/src/pandablocks/commands.py +++ b/src/pandablocks/commands.py @@ -510,13 +510,12 @@ class GetFieldInfo(Command[dict[str, FieldInfo]]): def _time( self, field_name: str, field_type: str, field_subtype...
Parallel-in-Time__pySDC-235
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pySDC/implementations/convergence_controller_classes/adaptivity.py:AdaptivityResidual.setup" ], "edited_modules": [ "pySDC/implementations/convergence_controller_classes/adaptivity.p...
Parallel-in-Time/pySDC
994530de81e58b85952343cd34e3ba7890cc1975
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...
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...
Parietal-INRIA__fmralign-106
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fmralign/_utils.py:_make_parcellation" ], "edited_modules": [ "fmralign/_utils.py:_make_parcellation" ] }, "file": "fmralign/_utils.py" }, { "changes": { ...
Parietal-INRIA/fmralign
51b01ffc4ae74e00f6c2dc2f25dcba2a76af79f6
Using surface data Currently, the code takes Niimg-like objects. PairwiseAlignment also takes as input a mask (also Niimg-like object). How can we straightforwardly use surface space data with fmralign? One idea: Make the input images numpy arrays (ntimepoints/ncontrasts x nvertices). 'clustering' could also become ...
diff --git a/fmralign/_utils.py b/fmralign/_utils.py index 7f8e4ac..6fc8111 100644 --- a/fmralign/_utils.py +++ b/fmralign/_utils.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import os import warnings import nibabel as nib @@ -8,6 +7,7 @@ from nilearn._utils.niimg_conversions import check_same_fov from nilearn.ima...
Parietal-INRIA__fmralign-115
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fmralign/preprocessing.py:ParcellationMasker._fit_masker" ], "edited_modules": [ "fmralign/preprocessing.py:ParcellationMasker" ] }, "file": "fmralign/preprocessing.py"...
Parietal-INRIA/fmralign
077501ef5c14d00a2f34bb1e13f221a86ffe43f5
[BUG] Inconsistence between 3D inputs and 4D templates When dealing with one contrast, input images are usually 3D however the template is initialized as a 1 sample 4D image which raises an error when comparing the shapes during preprocessing.
diff --git a/fmralign/preprocessing.py b/fmralign/preprocessing.py index 63521e8..0cc4a0a 100644 --- a/fmralign/preprocessing.py +++ b/fmralign/preprocessing.py @@ -123,6 +123,14 @@ class ParcellationMasker(BaseEstimator, TransformerMixin): if isinstance(imgs, Nifti1Image): imgs = [imgs] + ...
Parquery__icontract-109
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_decorators.py:require.__init__", "icontract/_decorators.py:snapshot.__init__", "icontract/_decorators.py:ensure.__init__" ], "edited_modules": [ "icontract...
Parquery/icontract
846e3187869a9ba790e9b893c98e5055e1cce274
include decorator definition in ViolationError description Consider this module (defined in ictb.py): ``` from icontract import require, ensure @require(lambda x: x > 0) def frobulate(x: int) -> int: return x ``` Which I use ``` $ python -c "import ictb; ictb.frobulate(-1)" ...
diff --git a/README.rst b/README.rst index 4cee487..17e1bbe 100644 --- a/README.rst +++ b/README.rst @@ -84,7 +84,8 @@ If you want to customize the error, see Section "Custom Errors". >>> some_func(x=1) Traceback (most recent call last): ... - icontract.errors.ViolationError: x > 3: x was 1 + ico...
Parquery__icontract-112
[ { "changes": { "added_entities": [ "icontract/_checkers.py:_not_check" ], "added_modules": [ "icontract/_checkers.py:_not_check" ], "edited_entities": [ "icontract/_checkers.py:_assert_precondition", "icontract/_checkers.py:_assert_invariant", ...
Parquery/icontract
013cb1bb0294097eaa8c43776bfd4d73342a1655
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)" ...
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-114
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_assert_precondition", "icontract/_checkers.py:_assert_postcondition" ], "edited_modules": [ "icontract/_checkers.py:_assert_precondition", "ic...
Parquery/icontract
5eecd149ac76db451a978ba208b95768fa1685af
checking of contract arguments is too strict consider: ``` $ cat i.py (time_gym) from icontract import require, e...
diff --git a/icontract/_checkers.py b/icontract/_checkers.py index 1dc79d3..e5909e2 100644 --- a/icontract/_checkers.py +++ b/icontract/_checkers.py @@ -92,11 +92,12 @@ def _assert_precondition(contract: Contract, resolved_kwargs: Mapping[str, Any]) Assert that the contract holds as a precondition. :param c...
Parquery__icontract-115
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_kwargs_from_call" ], "edited_modules": [ "icontract/_checkers.py:_kwargs_from_call" ] }, "file": "icontract/_checkers.py" } ]
Parquery/icontract
21f6b8f51d4d458ee36b8a31cc091a5679a01000
Crashes when functions are given wrong number of (positional) arguments The following case, where `f` is given one too many arguments, should give the _original error message_ `TypeError: f() takes 0 positional arguments but 1 was given`: ```python import icontract @icontract.require(lambda: True) def f(): ...
diff --git a/icontract/_checkers.py b/icontract/_checkers.py index e5909e2..19b1dcf 100644 --- a/icontract/_checkers.py +++ b/icontract/_checkers.py @@ -58,7 +58,13 @@ def _kwargs_from_call(param_names: List[str], kwdefaults: Dict[str, Any], args: # Override the defaults with the values actually suplied to the f...
Parquery__icontract-137
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:decorate_with_checker", "icontract/_checkers.py:_decorate_with_invariants" ], "edited_modules": [ "icontract/_checkers.py:decorate_with_checker", ...
Parquery/icontract
0bf4b66fd1590fc18a73208b69a0a17b228dd79b
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...
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-151
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "icontract/_checkers.py:_decorate_with_invariants" ], "edited_modules": [ "icontract/_checkers.py:_decorate_with_invariants" ] }, "file": "icontract/_checkers.py" } ]
Parquery/icontract
f99d7436e3ef1fee8b83f7dc6b2ea8500ebdfa68
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...
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-166
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "icontract/_recompute.py:Visitor" ] }, "file": "icontract/_recompute.py" }, { "changes": { "added_entities": null, "added_modules": null, ...
Parquery/icontract
9e8451b28b9cb5bdd02c1ae0b194af58ea80854d
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...
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...