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 |
|---|---|---|---|---|---|
crate__crate-python-556 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/crate/client/sqlalchemy/compiler.py:CrateDDLCompiler.get_column_specification"
],
"edited_modules": [
"src/crate/client/sqlalchemy/compiler.py:CrateDDLCompiler"
]
},
... | crate/crate-python | 7b86801062437465e8740dc5e298a0d18856ac1d | SQLAlchemy/DDL: Support `server_default` column definition option
### Introduction
CrateDB can use functions to generate server-side default values on columns. For example, the `NOW()` function can be used to auto-generate timestamp values.
```sql
crash <<EOL
DROP TABLE IF EXISTS testdrive;
CREATE TABLE IF... | diff --git a/CHANGES.txt b/CHANGES.txt
index 0a7196f..f8d0f54 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@ Unreleased
SQLAlchemy 2.0 by adding the new ``insert_returning`` and ``update_returning`` flags
in the CrateDB dialect.
+- SQLAlchemy DDL: Allow setting ``server_default`` on columns to ena... |
crate__crate-python-584 | [
{
"changes": {
"added_entities": [
"src/crate/client/sqlalchemy/compiler.py:CrateCompiler.for_update_clause"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/crate/client/sqlalchemy/compiler.py:CrateCompiler"
]
},
"file": "sr... | crate/crate-python | 471f026fa5e764ac80c1a47c366600e3d5ca0ca0 | SQLAlchemy: Ignore `FOR UPDATE` clauses
## About
At https://github.com/crate-workbench/mlflow-cratedb/issues/7, we discovered that CrateDB does not support `SELECT ... FOR UPDATE` statements.
## Details
mlflow-cratedb [has a monkeypatch](https://github.com/crate-workbench/mlflow-cratedb/blob/v0.1.1/mlflow_crat... | diff --git a/CHANGES.txt b/CHANGES.txt
index 808430c..5947185 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@ Unreleased
constraints
- DBAPI: Properly raise ``IntegrityError`` exceptions instead of
``ProgrammingError``, when CrateDB raises a ``DuplicateKeyException``.
+- SQLAlchemy: Ignore SQL's ``F... |
crccheck__postdoc-17 | [
{
"changes": {
"added_entities": [
"postdoc.py:make_tokens_and_env"
],
"added_modules": [
"postdoc.py:make_tokens_and_env"
],
"edited_entities": [
"postdoc.py:main"
],
"edited_modules": [
"postdoc.py:main"
]
},
"file": "post... | crccheck/postdoc | 4080450041ae86b295a2e1f8aea2018bf5e4b32a | Add a way to let the user decide if postdoc outputs anything at all
As a human using postdoc, I want to be able to see what it's doing under the hood. But if I were a script, I may not want any output at all. | diff --git a/README.rst b/README.rst
index 599ed6e..c4e5cb4 100644
--- a/README.rst
+++ b/README.rst
@@ -49,7 +49,9 @@ You can do MySQL stuff too::
If your database url isn't `DATABASE_URL`, you can connect to it by making it
the first argument::
+ $ export FATTYBASE_URL=postgres://fatty@fat/phat
$ phd FATT... |
crccheck__project_runpy-17 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"project_runpy/heidi.py:ReadableSqlFilter.filter"
],
"edited_modules": [
"project_runpy/heidi.py:ReadableSqlFilter"
]
},
"file": "project_runpy/heidi.py"
}
] | crccheck/project_runpy | b70c8b4dc398411a02905ad7c97db388ace9e4fd | SQL filter: TypeError: 'NoneType' object is not subscriptable
if 'SELECT' not in sql[:28]:
TypeError: 'NoneType' object is not subscriptable | diff --git a/Makefile b/Makefile
index 025331e..508e289 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,8 @@ test: ## Run test suite
# Bump project_runpy.__version__
# Update CHANGELOG (TODO)
# `git commit -am "1.0.0"`
-# `git tag v1.0.0`
# `make publish`
+# `git tag v1.0.0`
# `git push --tags origin master`
pu... |
creare-com__podpac-221 | [
{
"changes": {
"added_entities": [
"podpac/core/data/types.py:NumpyArray.init"
],
"added_modules": [
"podpac/core/data/types.py:NumpyArray"
],
"edited_entities": null,
"edited_modules": null
},
"file": "podpac/core/data/types.py"
},
{
"changes"... | creare-com/podpac | fe1e81a50e60cfd950c2e8f41a05784656708ba0 | Custom JSONEncoder for serialization
**Description**
Node and Coordinate objects need to be serializable.
**Describe the solution you'd like**
The Node and Coordinate classes contain a `definition` property and a `json` property that serializes this definition. We should use a custom JSONEncoder to handle unserial... | diff --git a/podpac/core/data/types.py b/podpac/core/data/types.py
index 36d41583..23f7c663 100644
--- a/podpac/core/data/types.py
+++ b/podpac/core/data/types.py
@@ -83,6 +83,17 @@ class Array(DataSource):
d = self.create_output_array(coordinates, data=self.source[s])
return d
+class NumpyArray(Arr... |
creare-com__podpac-241 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"podpac/core/pipeline/pipeline.py:Pipeline._json_validate",
"podpac/core/pipeline/pipeline.py:Pipeline._definition_from_json",
"podpac/core/pipeline/pipeline.py:_get_subattr"
],
... | creare-com/podpac | 1189085514c1b1da71c4ddeff345a69fc8c6630b | Pipelines should create unique instances for nodes that are re-used
**Description**
When a node is re-used in a Pipeline, it may be evaluated more than once with different coordinates. The pipeline should still evaluate correctly, but debugging becomes unreliable. All of the nodes in a Pipeline should be unique instan... | diff --git a/podpac/core/pipeline/pipeline.py b/podpac/core/pipeline/pipeline.py
index 16249c00..59750353 100644
--- a/podpac/core/pipeline/pipeline.py
+++ b/podpac/core/pipeline/pipeline.py
@@ -9,10 +9,12 @@ import warnings
import importlib
from collections import OrderedDict
import json
+from copy import deepcopy
... |
creare-com__podpac-328 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "podpac/core/data/datasource.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"podpa... | creare-com/podpac | e11b29a47299cbc781ee8943579b270aebb09f78 | Interpolation Specification no JSON serializable
**Description**
When I try to specify different interpolation methods for different dimensions, I get an error:
```python
C:\Anaconda3\envs\podpac\lib\json\encoder.py in iterencode(self, o, _one_shot)
255 self.key_separator, self.item_separator... | diff --git a/podpac/core/data/datasource.py b/podpac/core/data/datasource.py
index bb1bcd16..cab0d03e 100644
--- a/podpac/core/data/datasource.py
+++ b/podpac/core/data/datasource.py
@@ -99,26 +99,24 @@ DATA_DOC = {
:attr:`podpac.data.INTERPOLATION_SHORTCUTS`. The interpolation method associated
with ... |
creare-com__podpac-417 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "podpac/algorithm.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"podpac/core/algo... | creare-com/podpac | 2a1677dcd5af2e00cd151da3c79ece5cfd43bee4 | Algorithm Convolution node kernel should be a labelled array
**Description**
Right now the kernel for the convolution algorithm nodes is very difficult to use, and the results depend on the order of the coords used to evaluate the Node.
**Steps to Reproduce**
```
lat = [0, 1, 2, 3]
lon = [0, 1, 2]
coords = pod... | diff --git a/podpac/algorithm.py b/podpac/algorithm.py
index 54e3d3a6..ec8be6a0 100644
--- a/podpac/algorithm.py
+++ b/podpac/algorithm.py
@@ -28,4 +28,4 @@ from podpac.core.algorithm.coord_select import (
YearSubstituteCoordinates,
TransformTimeUnits,
)
-from podpac.core.algorithm.signal import Convolution,... |
creisle__markdown_refdocs-12 | [
{
"changes": {
"added_entities": [
"markdown_refdocs/markdown.py:admonitions_to_markdown"
],
"added_modules": [
"markdown_refdocs/markdown.py:admonitions_to_markdown"
],
"edited_entities": [
"markdown_refdocs/markdown.py:_create_type_link",
"markdown... | creisle/markdown_refdocs | 57d9f12b559073824044bc6b708aa6fe3c928fa6 | Error generating reference docs for MAVIS
Encountered this error generating reference docs from the [mavis](https://github.com/bcgsc/mavis) package
```
Traceback (most recent call last):
File "/Users/creisle/git/markdown_refdocs/venv/bin/markdown_refdocs", line 11, in <module>
load_entry_point('markdown-refdo... | diff --git a/README.md b/README.md
index 77f9a6f..5a36484 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Markdown Refdocs
- [](https://pypi.org/project/mar... |
creisle__markdown_refdocs-19 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"markdown_refdocs/parsers.py:parse_google_docstring"
],
"edited_modules": [
"markdown_refdocs/parsers.py:parse_google_docstring"
]
},
"file": "markdown_refdocs/parsers.p... | creisle/markdown_refdocs | 0284e8471c2be4e9083be00ad94f6e495fb2e801 | add admonitions for `Todo`s
it would be nice if Todo sections in docstrings where put into an [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) of some kind rather than ending up in the main description
for example, the following docstring:
```
"""
validator for pk_select endpoi... | diff --git a/markdown_refdocs/parsers.py b/markdown_refdocs/parsers.py
index 586a383..d4d46e4 100644
--- a/markdown_refdocs/parsers.py
+++ b/markdown_refdocs/parsers.py
@@ -19,6 +19,11 @@ def parse_google_docstring(
) -> ParsedDocstring:
"""
parses a google-style docsting into a dictionary of the various sec... |
csdms__model_metadata-30 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/model_metadata/model_parameter.py:NumberParameter.__init__",
"src/model_metadata/model_parameter.py:IntParameter.__init__"
],
"edited_modules": [
"src/model_metadata/mode... | csdms/model_metadata | 9a319b4e12a6ea844f3c9050bfa12efa11d868ac | model_metadata v0.8.0 breaks pymt_era5 import
Hello,
Seems that model_metadata 0.8.0 breaks [pymt.models.Era5](https://github.com/gantian127/pymt_era5) imports. I'm posting this here (and not at pymt_era5) because I don't see any model_metadata documentation suggesting 0.8.0 should break back-compatibility, but ple... | diff --git a/src/model_metadata/model_parameter.py b/src/model_metadata/model_parameter.py
index b44faf3..32ed8f3 100644
--- a/src/model_metadata/model_parameter.py
+++ b/src/model_metadata/model_parameter.py
@@ -238,13 +238,13 @@ class NumberParameter(ModelParameter):
if range_ is not None and len(range_) != ... |
csiro-coasts__emsarray-111 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/emsarray/conventions/_base.py:Convention.plot_on_figure"
],
"edited_modules": [
"src/emsarray/conventions/_base.py:Convention"
]
},
"file": "src/emsarray/convention... | csiro-coasts/emsarray | b72107c0e8c3be6016a459aba5631320d4837551 | Error when plotting variables with no 'long_name' attribute
Plotting a data array using `Convention.plot(data_array)` when the data array has no 'long_name' attribute but does have a single time coordinate fails. `Convention.plot_on_figure()` attempts to generate a title from the long_name and time coordinate. This fai... | diff --git a/docs/releases/development.rst b/docs/releases/development.rst
index d1ec009..24fb7a8 100644
--- a/docs/releases/development.rst
+++ b/docs/releases/development.rst
@@ -31,3 +31,5 @@ Next release (in development)
This feature is considered experimental
and may change significantly in future releases.
... |
csiro-coasts__emsarray-120 | [
{
"changes": {
"added_entities": [
"src/emsarray/conventions/_base.py:DimensionConvention._get_data_array"
],
"added_modules": null,
"edited_entities": [
"src/emsarray/conventions/_base.py:Convention._get_data_array",
"src/emsarray/conventions/_base.py:Convention.... | csiro-coasts/emsarray | 395514dd7dde4b6811b1f115a3292fd1d7a168c1 | Handle case where transect line does not intersect dataset geometry
Currently a cryptic error message is raised when constructing the distance bounds data array.
Detecting this case is as simple as intersecting the line with the dataset, or checking if the `Transect.segments` list is empty.
The solution is either... | diff --git a/docs/releases/development.rst b/docs/releases/development.rst
index 1c9b9fb..02694ea 100644
--- a/docs/releases/development.rst
+++ b/docs/releases/development.rst
@@ -5,3 +5,6 @@ Next release (in development)
* Fix a ``FutureWarning`` on accessing :attr:`xarray.Dataset.dims`
with xarray >= 2023.12.0
... |
csiro-coasts__emsarray-126 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/emsarray/conventions/shoc.py:ShocStandard.get_all_depth_names",
"src/emsarray/conventions/shoc.py:ShocSimple.get_all_depth_names"
],
"edited_modules": [
"src/emsarray/con... | csiro-coasts/emsarray | 87b87129054e82509e4666b8b582abc5358c079f | Shoc datasets without depth coordinate throw errors
SHOC datasets that do not have a depth coordinate throw an error in `Convention.get_depth_name()` which is correct, but this error bubbles up to `Convention.get_all_depth_names()` which is incorrect. This means that Shoc datasets that have been passed through `Convent... | diff --git a/docs/releases/development.rst b/docs/releases/development.rst
index 416ffd0..7175a6f 100644
--- a/docs/releases/development.rst
+++ b/docs/releases/development.rst
@@ -11,3 +11,6 @@ Next release (in development)
* Drop dependency on importlib_metadata.
This was only required to support Python 3.8, whic... |
csparpa__pyowm-189 | [
{
"changes": {
"added_entities": [
"pyowm/utils/temputils.py:metric_wind_dict_to_imperial"
],
"added_modules": [
"pyowm/utils/temputils.py:metric_wind_dict_to_imperial"
],
"edited_entities": null,
"edited_modules": null
},
"file": "pyowm/utils/temputil... | csparpa/pyowm | 93e2b8b77f96abc0428c8817ac411dc77169c6fc | [Feature suggestion] Change wind speed unit
While `get_temperature() `supports unit parameter, `get_wind()` does not support it. OWM has wind speed unit available as Imperial (miles/hour) or Metric (meter/sec) unit.
Suggested implementation:
`w.get_wind(unit = 'Imperial')` or
`w.get_wind(unit = 'miles/hour')` o... | diff --git a/pyowm/utils/temputils.py b/pyowm/utils/temputils.py
index 58c4ea9..8bc29c3 100644
--- a/pyowm/utils/temputils.py
+++ b/pyowm/utils/temputils.py
@@ -1,11 +1,15 @@
"""
-Module containing utility functions for temperature units conversion
+Module containing utility functions for temperature and wind units co... |
cta-observatory__cta-lstchain-1227 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "lstchain/high_level/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lstc... | cta-observatory/cta-lstchain | e09707951ad623802a6acd09333c7d0aa384ee41 | Fake ERRORs in DL2 to DL3 step
When running the DL2 to DL3 step for a source-independent analysis, one gets this error if IRF interpolation is used:
2024-02-10 13:32:49,219 ERROR [lstchain.high_level.interpolate] (interpolate.interpolate_irf): AL CUTS not present for IRF interpolation
Obviously, Alpha cuts do not e... | diff --git a/lstchain/high_level/__init__.py b/lstchain/high_level/__init__.py
index 261d18cb..4b86720e 100644
--- a/lstchain/high_level/__init__.py
+++ b/lstchain/high_level/__init__.py
@@ -18,8 +18,7 @@ from .interpolate import (
compare_irfs,
get_nearest_az_node,
interp_params,
- interpolate_al_cut... |
cta-observatory__cta-lstchain-1254 | [
{
"changes": {
"added_entities": [
"lstchain/io/io.py:get_resource_path"
],
"added_modules": [
"lstchain/io/io.py:get_resource_path"
],
"edited_entities": null,
"edited_modules": null
},
"file": "lstchain/io/io.py"
},
{
"changes": {
"adde... | cta-observatory/cta-lstchain | 9e2b2b04ca9c93492925d98e427681625e245a88 | FileNotFoundError: lstchain/data/SinglePhE_ResponseInPhE_expo2Gaus.dat not found
Hi
With lstchain >= v0.10.7 I get the following error when running `lstchain_mc_r0_to_dl1`:
```
FileNotFoundError: lstchain/data/SinglePhE_ResponseInPhE_expo2Gaus.dat not found
```
| diff --git a/lstchain/data/lstchain_lhfit_config.json b/lstchain/data/lstchain_lhfit_config.json
index 39e742d6..05368110 100644
--- a/lstchain/data/lstchain_lhfit_config.json
+++ b/lstchain/data/lstchain_lhfit_config.json
@@ -280,7 +280,7 @@
"waveform_nsb_tuning":{
"nsb_tuning": false,
"nsb_tuning_ratio":... |
cta-observatory__cta-lstchain-1274 | [
{
"changes": {
"added_entities": [
"lstchain/image/modifier.py:WaveformNsbTunner.__init__",
"lstchain/image/modifier.py:WaveformNsbTunner.initialise_waveforms",
"lstchain/image/modifier.py:WaveformNsbTunner._tune_nsb_on_waveform_precomputed",
"lstchain/image/modifier.py:Wav... | cta-observatory/cta-lstchain | ef91c6447d88eeb25fa5b7a3dace861c4f96fc93 | Speeding-up the NSB addition at waveform level
The generation of random NSB p.e.'s to be added to waveforms in the R0 to DL1 stage of MC is currently done "on the fly" for every event & pixel. That takes a significant part of the total cpu for the case of nigh NSB - for 16 * dark we saw like a factor 6 slower processin... | diff --git a/lstchain/data/lstchain_lhfit_config.json b/lstchain/data/lstchain_lhfit_config.json
index 05368110..c761c199 100644
--- a/lstchain/data/lstchain_lhfit_config.json
+++ b/lstchain/data/lstchain_lhfit_config.json
@@ -279,8 +279,9 @@
},
"waveform_nsb_tuning":{
"nsb_tuning": false,
- "nsb_tuning_r... |
cta-observatory__lstmcpipe-398 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lstmcpipe/utils.py:SbatchLstMCStage.compose_wrap_command"
],
"edited_modules": [
"lstmcpipe/utils.py:SbatchLstMCStage"
]
},
"file": "lstmcpipe/utils.py"
}
] | cta-observatory/lstmcpipe | 825c042148c211e0581d5ae4068b6d3d296debb3 | Merging failure does not make job fail
> @vuillaut It seems other base productions have the same issue:
> `20221215_v0.9.12_base_prod` and `20230127_v0.9.12_base_prod_az_tel`
_Originally posted by @SeiyaNozaki in https://github.com/cta-observatory/lstmcpipe/issues/371#issuecomment-1446600468_
See... | diff --git a/lstmcpipe/utils.py b/lstmcpipe/utils.py
index a122672..6ab3063 100644
--- a/lstmcpipe/utils.py
+++ b/lstmcpipe/utils.py
@@ -256,6 +256,11 @@ class SbatchLstMCStage:
def compose_wrap_command(self, wrap_command=None, source_env="", backend=""):
if wrap_command is None or wrap_command == "":
... |
cta-observatory__lstmcpipe-399 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lstmcpipe/utils.py:SbatchLstMCStage._construct_slurm_dependencies"
],
"edited_modules": [
"lstmcpipe/utils.py:SbatchLstMCStage"
]
},
"file": "lstmcpipe/utils.py"
}
] | cta-observatory/lstmcpipe | c2340d1a4d046d327ddabd8c287afdee6edc7ec2 | Production 20221128_src5_dec3476_tuned did not include integration corrections
See #383 comments and PR.
@alvmas
Merging failure does not make job fail
> @vuillaut It seems other base productions have the same issue:
> `20221215_v0.9.12_base_prod` and `20230127_v0.9.12_base_prod_az_tel`
_Originally posted by @S... | diff --git a/lstmcpipe/utils.py b/lstmcpipe/utils.py
index 6ab3063..723c7ea 100644
--- a/lstmcpipe/utils.py
+++ b/lstmcpipe/utils.py
@@ -285,7 +285,7 @@ class SbatchLstMCStage:
if slurm_deps is None or slurm_deps == "":
return ""
elif all(items != "" for items in slurm_deps.split(",")):
-... |
cta-observatory__lstosa-108 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"osa/configs/datamodel.py:SequenceData.__init__"
],
"edited_modules": [
"osa/configs/datamodel.py:SequenceData"
]
},
"file": "osa/configs/datamodel.py"
},
{
"cha... | cta-observatory/lstosa | 3227a997dbfca193c5de7646df0b244ae0a6584a | Look for proper systematics factor file and pass it to the r0_to_dl1 script
Implement a function to look for the systematic correction file path used to produce the calibration file to be employed for data processing | diff --git a/cfg/sequencer.cfg b/cfg/sequencer.cfg
index 20db5c5..c5db1f5 100644
--- a/cfg/sequencer.cfg
+++ b/cfg/sequencer.cfg
@@ -18,6 +18,7 @@ CALIB_BASE_DIR: %(MONITORING)s/PixelCalibration/LevelA
CALIB_DIR: %(CALIB_BASE_DIR)s/calibration
PEDESTAL_DIR: %(CALIB_BASE_DIR)s/drs4_baseline
TIMECALIB_DIR: %(CALIB_BAS... |
cta-observatory__pyirf-106 | [
{
"changes": {
"added_entities": [
"pyirf/sensitivity.py:_relative_sensitivity"
],
"added_modules": [
"pyirf/sensitivity.py:_relative_sensitivity"
],
"edited_entities": [
"pyirf/sensitivity.py:relative_sensitivity",
"pyirf/sensitivity.py:calculate_se... | cta-observatory/pyirf | 0159bfe3067b2d88333a39a7ba96c85a88f34849 | Doc update (or functionality fix) is required in pyirf.sensitivity.relative_sensitivity
The docstring of the method says:
```
----------
n_on: int or array-like
Number of signal-like events for the on observations
n_off: int or array-like
Number of signal-like events for the off obser... | diff --git a/pyirf/sensitivity.py b/pyirf/sensitivity.py
index 58bf3be..bda24c4 100644
--- a/pyirf/sensitivity.py
+++ b/pyirf/sensitivity.py
@@ -19,7 +19,7 @@ __all__ = ["relative_sensitivity", "calculate_sensitivity"]
log = logging.getLogger(__name__)
-def relative_sensitivity(
+def _relative_sensitivity(
n_... |
cta-observatory__pyirf-147 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyirf/benchmarks/angular_resolution.py:angular_resolution"
],
"edited_modules": [
"pyirf/benchmarks/angular_resolution.py:angular_resolution"
]
},
"file": "pyirf/benchm... | cta-observatory/pyirf | 99df3429e819180f8f8e2784e75d72441a20ff0d | angular resolution does not work when events are outside of the defined bins
```
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-15-873b0be41b34> in <module>
----> 1 angular_resolution(events, bins... | diff --git a/pyirf/benchmarks/angular_resolution.py b/pyirf/benchmarks/angular_resolution.py
index 7ae02d8..f98478e 100644
--- a/pyirf/benchmarks/angular_resolution.py
+++ b/pyirf/benchmarks/angular_resolution.py
@@ -6,7 +6,7 @@ import astropy.units as u
from ..binning import calculate_bin_indices
-ONE_SIGMA_PERCE... |
cta-observatory__pyirf-188 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyirf/binning.py:create_bins_per_decade"
],
"edited_modules": [
"pyirf/binning.py:create_bins_per_decade"
]
},
"file": "pyirf/binning.py"
}
] | cta-observatory/pyirf | 285bca156d9c7d88dbfe7a5af402fde7321924fb | `create_bins_per_decade` does not include the maximum value
binning edges obtained using `create_bins_per_decade` does not include the maximum value
```
>>> import astropy.units as u
>>> from pyirf.binning import create_bins_per_decade
>>>
>>> energy_min = 0.01 * u.TeV
>>> energy_max = 100 * u.TeV
>>> create_... | diff --git a/pyirf/binning.py b/pyirf/binning.py
index bbc4e5f..f23cd0e 100644
--- a/pyirf/binning.py
+++ b/pyirf/binning.py
@@ -98,7 +98,9 @@ def create_bins_per_decade(e_min, e_max, bins_per_decade=5):
e_min: u.Quantity[energy]
Minimum energy, inclusive
e_max: u.Quantity[energy]
- Maximum en... |
cta-observatory__pyirf-193 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyirf/benchmarks/angular_resolution.py:angular_resolution"
],
"edited_modules": [
"pyirf/benchmarks/angular_resolution.py:angular_resolution"
]
},
"file": "pyirf/benchm... | cta-observatory/pyirf | 2929cd1881a10aa02133600d663b490635d84d57 | angular resolution function does not respect units of theta in input
Due to how astropy tables work, the input is assumed to be degrees. | diff --git a/pyirf/benchmarks/angular_resolution.py b/pyirf/benchmarks/angular_resolution.py
index a5c120d..c1bcb1b 100644
--- a/pyirf/benchmarks/angular_resolution.py
+++ b/pyirf/benchmarks/angular_resolution.py
@@ -51,7 +51,7 @@ def angular_resolution(
result[f"{energy_type}_energy_high"] = energy_bins[1:]
... |
cta-observatory__pyirf-212 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyirf/statistics.py:li_ma_significance"
],
"edited_modules": [
"pyirf/statistics.py:li_ma_significance"
]
},
"file": "pyirf/statistics.py"
}
] | cta-observatory/pyirf | 4d55170f8b6553f5f78a420fe90a40111d98e7f5 | li_ma_significance needs float64 for large numbers
```
noff = 1e7
nexcess = 1e4
print(li_ma_significance(np.float64(noff+nexcess), np.float64(noff / 0.2), 0.2))
print(li_ma_significance(np.float32(noff+nexcess), np.float32(noff / 0.2), 0.2))
2.8861902631323018
3.7806044
```
May be this is unavoidable, I don... | diff --git a/pyirf/statistics.py b/pyirf/statistics.py
index 9abd7c1..b4f5b10 100644
--- a/pyirf/statistics.py
+++ b/pyirf/statistics.py
@@ -2,7 +2,7 @@ import numpy as np
from .utils import is_scalar
-__all__ = ['li_ma_significance']
+__all__ = ["li_ma_significance"]
def li_ma_significance(n_on, n_off, alph... |
cta-observatory__pyirf-67 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyirf/irf/effective_area.py:point_like_effective_area"
],
"edited_modules": [
"pyirf/irf/effective_area.py:point_like_effective_area"
]
},
"file": "pyirf/irf/effective_... | cta-observatory/pyirf | bc826fa00a44b84043799db2d3bd403f2c5026f4 | histogram of simulated events(direction)
Compute the histogram of the events as a function of the position from any direction (useful: camera center or source) from the simulation info (view cone, etc...)
Needed for the full enclosure effective area. | diff --git a/pyirf/irf/effective_area.py b/pyirf/irf/effective_area.py
index 0172405..33341c0 100644
--- a/pyirf/irf/effective_area.py
+++ b/pyirf/irf/effective_area.py
@@ -45,6 +45,6 @@ def point_like_effective_area(selected_events, simulation_info, true_energy_bins
hist_selected = create_histogram_table(
... |
cthoyt__class-resolver-37 | [
{
"changes": {
"added_entities": [
"src/class_resolver/base.py:BaseResolver.register_entrypoint"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/class_resolver/base.py:BaseResolver"
]
},
"file": "src/class_resolver/base.py"
... | cthoyt/class-resolver | c594e2eab7f481f75c67abd24a8a53b16ed7a278 | Combine subclass and entrypoint instantiation
While the entrypoint loader in PyKEEN seems to be very clever, it's still sort of a problem for collab users. It might be better to provide a mixed version where there are some base classes that are in PyKEEN, plus the possibility to add extra stuff | diff --git a/src/class_resolver/base.py b/src/class_resolver/base.py
index 138ab7e..0b5aad7 100644
--- a/src/class_resolver/base.py
+++ b/src/class_resolver/base.py
@@ -234,6 +234,11 @@ class BaseResolver(ABC, Generic[X, Y]):
**kwargs,
)
+ def register_entrypoint(self, group: str) -> None:
+ ... |
cthoyt__ols-client-5 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ols_client/client.py:Client.get_response",
"src/ols_client/client.py:Client.get_term"
],
"edited_modules": [
"src/ols_client/client.py:Client"
]
},
"file": ... | cthoyt/ols-client | 14ce3cea037b580a637533a1f3d7cf1d6adbc725 | Access to SBO terms not possible
I am trying to use your tool to look up the specification of different SBO terms automatically.
```Python
from ols_client import EBIClient
client = EBIClient()
```
When I then browse through the `sbo` ontology it seems to me that the IRI of any SBO term looks like `http://bi... | diff --git a/src/ols_client/client.py b/src/ols_client/client.py
index 2888a72..6c3f068 100644
--- a/src/ols_client/client.py
+++ b/src/ols_client/client.py
@@ -87,7 +87,8 @@ class Client:
params = {}
if path.startswith(self.base_url):
path = path[len(self.base_url) :]
- res = ... |
cthoyt__pystow-59 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pystow/config_api.py:_get_cfp",
"src/pystow/config_api.py:write_config"
],
"edited_modules": [
"src/pystow/config_api.py:_get_cfp",
"src/pystow/config_api.py:writ... | cthoyt/pystow | eb2892c06b556fe893f3344c5d16f17ed8cc1d68 | Get configuration from file corresponding to leading part
If I want to use `zenodo:sandbox` as a key, it should figure to look in `zenodo.ini` and other `zenodo.*` files if they exist | diff --git a/src/pystow/config_api.py b/src/pystow/config_api.py
index 270e4f5..dca56d4 100644
--- a/src/pystow/config_api.py
+++ b/src/pystow/config_api.py
@@ -77,6 +77,12 @@ def get_home(ensure_exists: bool = True) -> Path:
def _get_cfp(module: str) -> ConfigParser:
cfp = ConfigParser()
directory = get_hom... |
ctypesgen__ctypesgen-150 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "ctypesgen/ctypedescs.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ctypesgen/pa... | ctypesgen/ctypesgen | 2120dbf9a5086a21c48e5a002b1f274f3716b7ec | interface is generated with short == int
I had a very old project that used an old version of CTypesGen. with 32 bit python 2 and wanted to bring the build tools up to date. Installed latest cygwin64 with gcc , the current CtypesGen, and made the changes to go to 64 bit python 3 including some minor changes to suppor... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94e9abe..0750831 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ major work was made towards code modernization and quality.
- Added support for sized integer types on Windows
- Added support to handle `restrict` and `_Noreturn` keywords
- Added name form... |
cuenca-mx__arcus-python-67 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"arcus/client.py:Client._check_response"
],
"edited_modules": [
"arcus/client.py:Client"
]
},
"file": "arcus/client.py"
},
{
"changes": {
"added_entities":... | cuenca-mx/arcus-python | c2c0b3378eeef7841fedb612e2a445964418bc43 | update Tranasction.status to refunded on successful cancelation
[`Transaction.cancel()`](https://github.com/cuenca-mx/arcus-python/blob/master/arcus/resources/transactions.py#L29-L30) returns the raw response `dict` from the arcus API. It should also update the transaction in place iff the cancelation was successful. | diff --git a/.travis.yml b/.travis.yml
index dc3112b..74ea356 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ jobs:
- make install-test
- pip install coveralls
script:
- - python setup.py test
+ - pytest --vcr-record=none
- coveralls
- stage: PyPI Upload... |
cuenca-mx__cuenca-python-103 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "cuenca/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cuenca/resources/... | cuenca-mx/cuenca-python | c523e1ab6fa508de7f19ca219738194201da8da3 | Customized session in each request
There are cases where you might have to use temporary credentials in order to perform an operation. For instance, when you need to authenticate a user for certain request.
Right now there's already a way to override the current header by doing:
```python
import cuenca
# Config... | diff --git a/cuenca/__init__.py b/cuenca/__init__.py
index b7a01ba..441c121 100644
--- a/cuenca/__init__.py
+++ b/cuenca/__init__.py
@@ -4,6 +4,7 @@ __all__ = [
'Account',
'BalanceEntry',
'BillPayment',
+ 'Card',
'CardTransaction',
'Commission',
'Deposit',
@@ -20,6 +21,7 @@ from .resour... |
cuenca-mx__cuenca-python-129 | [
{
"changes": {
"added_entities": [
"cuenca/resources/card_transactions.py:CardTransaction.card"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"cuenca/resources/card_transactions.py:CardTransaction"
]
},
"file": "cuenca/resource... | cuenca-mx/cuenca-python | eb5047bc7a990890316413abf04499facef3c8e7 | Add card_uri into CardTransactions resource
In the future we need to be able to access the card from the uri according to another resources | diff --git a/cuenca/resources/card_transactions.py b/cuenca/resources/card_transactions.py
index 4e4043a..6921a4d 100644
--- a/cuenca/resources/card_transactions.py
+++ b/cuenca/resources/card_transactions.py
@@ -9,7 +9,8 @@ from cuenca_validations.types import (
from pydantic.dataclasses import dataclass
from .bas... |
cuenca-mx__cuenca-python-140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"cuenca/resources/card_activations.py:CardActivation"
]
},
"file": "cuenca/resources/card_activations.py"
},
{
"changes": {
"added_entities": nul... | cuenca-mx/cuenca-python | e26630dd581532b7276ecfaa154b781f652398bd | CardActivation should have success
Right now it uses `succeeded`, change it to `success` to have consistency with `UserLogin` | diff --git a/cuenca/resources/card_activations.py b/cuenca/resources/card_activations.py
index 2ce1b41..da8e273 100644
--- a/cuenca/resources/card_activations.py
+++ b/cuenca/resources/card_activations.py
@@ -18,7 +18,7 @@ class CardActivation(Creatable):
user_id: str
ip_address: str
card_uri: Optional[s... |
cuenca-mx__cuenca-python-153 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"cuenca/resources/arpc.py:Arpc"
]
},
"file": "cuenca/resources/arpc.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
... | cuenca-mx/cuenca-python | 72c485a8b6e6fdc9fc2ba9577951af60d7ba6a79 | Remover campo `err` de arpc
```
authorizer_1 | File "./authorizer/models/transactions.py", line 424, in validate_arqc
authorizer_1 | arpc = cuenca.resources.Arpc.create(
authorizer_1 | File "/usr/local/lib/python3.8/site-packages/cuenca/resources/arpc.py", line 58, in create
authorizer_1 | ... | diff --git a/cuenca/resources/arpc.py b/cuenca/resources/arpc.py
index 7323723..1257499 100644
--- a/cuenca/resources/arpc.py
+++ b/cuenca/resources/arpc.py
@@ -27,7 +27,6 @@ class Arpc(Creatable):
card_uri: str
is_valid_arqc: Optional[bool]
arpc: Optional[str]
- err: Optional[str]
@classmethod... |
cuenca-mx__cuenca-python-174 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cuenca/resources/card_validations.py:CardValidation.create"
],
"edited_modules": [
"cuenca/resources/card_validations.py:CardValidation"
]
},
"file": "cuenca/resources/... | cuenca-mx/cuenca-python | 4e0bbbb56b42a02b44d40764bb68537cc768bc4c | Parametros validación de pin en card_validations
Agregar parametro en `card_validations` para enviar desde `card-authorizer` a `Knox` la bandera de intentos de pin excedidos de forma offline | diff --git a/cuenca/resources/card_validations.py b/cuenca/resources/card_validations.py
index 33f8a62..44a0aa6 100644
--- a/cuenca/resources/card_validations.py
+++ b/cuenca/resources/card_validations.py
@@ -25,6 +25,7 @@ class CardValidation(Creatable):
is_valid_icvv: Optional[bool]
is_valid_pin_block: Opti... |
cuenca-mx__cuenca-python-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cuenca/resources/base.py:Queryable.all"
],
"edited_modules": [
"cuenca/resources/base.py:Queryable"
]
},
"file": "cuenca/resources/base.py"
},
{
"changes": {
... | cuenca-mx/cuenca-python | 7f4e6032f87ca64d91b7a002eb26cef928221b00 | Change next_page_url to _uri
The parameter for the next page should be `next_page_uri` (not `_url`) for consistency | diff --git a/cuenca/resources/base.py b/cuenca/resources/base.py
index 612d148..b712d0b 100644
--- a/cuenca/resources/base.py
+++ b/cuenca/resources/base.py
@@ -102,11 +102,11 @@ class Queryable(Resource):
@classmethod
def all(cls, **query_params) -> Generator[Resource, None, None]:
q = cls._query_pa... |
cunla__fakeredis-py-102 | [
{
"changes": {
"added_entities": [
"fakeredis/commands_mixins/string_mixin.py:StringCommandsMixin.getex"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fakeredis/commands_mixins/string_mixin.py:StringCommandsMixin"
]
},
"file":... | cunla/fakeredis-py | bd8f43fd3e0d55f0eb2778dc9c79c7f2ed398afa | Implement support for `GETEX` (string command)
Implement support for command `GETEX` in string_mixin.py.
Get the value of a key and optionally set its expiration.
Here is the [Official documentation](https://redis.io/commands/getex/) | diff --git a/REDIS_COMMANDS.md b/REDIS_COMMANDS.md
index db7a154..df16b3e 100644
--- a/REDIS_COMMANDS.md
+++ b/REDIS_COMMANDS.md
@@ -14,6 +14,8 @@ list of [unimplemented commands](#unimplemented-commands).
Get the value of a key
* [GETDEL](https://redis.io/commands/getdel/)
Get the value of a key and delete t... |
cunla__fakeredis-py-109 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/_basefakesocket.py:BaseFakeSocket._scan"
],
"edited_modules": [
"fakeredis/_basefakesocket.py:BaseFakeSocket"
]
},
"file": "fakeredis/_basefakesocket.py"
},... | cunla/fakeredis-py | c3501c15fa8d1287ded6d9abade3252cf372d59f | AttributeError: 'FakeSocket' object has no attribute '_type'
**Describe the bug**
When calling `scan_iter` with `_type` as argument, it throws AttributeError.
**To Reproduce**
Minimal reproducible example:
```py
from fakeredis import FakeRedis
r = FakeRedis()
r.zadd("key", {"a": 2})
for _ in r.scan_iter(mat... | diff --git a/fakeredis/_basefakesocket.py b/fakeredis/_basefakesocket.py
index 9929587..37259b4 100644
--- a/fakeredis/_basefakesocket.py
+++ b/fakeredis/_basefakesocket.py
@@ -7,7 +7,8 @@ from typing import List
import redis
from . import _msgs as msgs
-from ._commands import (Int, Float, SUPPORTED_COMMANDS, COMMA... |
cunla__fakeredis-py-127 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "fakeredis/_msgs.py"
},
{
"changes": {
"added_entities": [
"fakeredis/commands_mixins/sortedset_mixin.py:SortedSetCommandsMixin._zrange_a... | cunla/fakeredis-py | 3c48e3e63bc9d92b21a6433d633c56389b5e2feb | Support for ZRANGE command with BYLEX arg
It looks like there is support for ZRANGE https://redis.io/commands/zrange/, but not with the BYLEX=True arg. What I'm trying to do is use ZRANGE by lex where start & stop are strings. I'm getting this error:
```
File "/Users/kchonka/.pyenv/versions/new-test-lti1p3/lib/py... | diff --git a/fakeredis/_msgs.py b/fakeredis/_msgs.py
index 10f6243..ab08960 100644
--- a/fakeredis/_msgs.py
+++ b/fakeredis/_msgs.py
@@ -1,6 +1,8 @@
INVALID_EXPIRE_MSG = "ERR invalid expire time in {}"
WRONGTYPE_MSG = "WRONGTYPE Operation against a key holding the wrong kind of value"
SYNTAX_ERROR_MSG = "ERR syntax ... |
cunla__fakeredis-py-214 | [
{
"changes": {
"added_entities": [
"fakeredis/_commands.py:BeforeAny.__hash__",
"fakeredis/_commands.py:AfterAny.__hash__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fakeredis/_commands.py:BeforeAny",
"fakeredis/_commands... | cunla/fakeredis-py | 640faeb86129e0c62a70302c736fcd97a95aed7a | issue with `ZRANGE` and `ZRANGESTORE` with `BYLEX`.
**Describe the bug**
`BYLEX` does not work as expected. See `test_zrangestore`:
```python
# TODO: fix
assert r.zrange("a", "[a2", "(a3", bylex=True, offset=0, num=1) == [b"a2"]
assert r.zrangestore("b", "a", "[a2", "(a3", bylex=True, offset=0, num=1)
assert ... | diff --git a/fakeredis/_commands.py b/fakeredis/_commands.py
index 3d2ef57..1d25e0d 100644
--- a/fakeredis/_commands.py
+++ b/fakeredis/_commands.py
@@ -238,6 +238,9 @@ class BeforeAny:
def __eq__(self, other):
return isinstance(other, BeforeAny)
+ def __hash__(self):
+ return 1
+
@functool... |
cunla__fakeredis-py-238 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/_basefakesocket.py:BaseFakeSocket._blocking"
],
"edited_modules": [
"fakeredis/_basefakesocket.py:BaseFakeSocket"
]
},
"file": "fakeredis/_basefakesocket.py"
... | cunla/fakeredis-py | 19d36bdb935111578076ab1ab5c6589932aa64b9 | WRONGTYPE Operation against a key holding the wrong kind of value in XREADGROUP
The error message 'WRONGTYPE: Operation against a key holding an incompatible data type' occurs when attempting to use 'XREADGROUP' with the 'COUNT' and 'BLOCK' parameters.
**To Reproduce**
```
await fakeredis.xreadgroup(groupname="tes... | diff --git a/docs/about/changelog.md b/docs/about/changelog.md
index d3f5938..e623e2a 100644
--- a/docs/about/changelog.md
+++ b/docs/about/changelog.md
@@ -5,6 +5,12 @@ description: Change log of all fakeredis releases
## Next release
+## v2.18.2
+
+### 🐛 Bug Fixes
+
+- Fix error on blocking XREADGROUP #237
+
#... |
cunla__fakeredis-py-275 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/commands_mixins/streams_mixin.py:StreamsCommandsMixin._xread",
"fakeredis/commands_mixins/streams_mixin.py:StreamsCommandsMixin._parse_start_id",
"fakeredis/commands_mixins/str... | cunla/fakeredis-py | 1abca949c8ea916697277f510db9f44a5af6ca5f | Using a blocking XREAD on an empty stream returns a list instead of blocking
**Describe the bug**
When using `xread` on an empty or non-existant stream with a blocking argument, the function incorrectly returns an empty list instead of blocking.
This is a regression of behavior from the real Redis client.
The s... | diff --git a/fakeredis/commands_mixins/streams_mixin.py b/fakeredis/commands_mixins/streams_mixin.py
index e14d811..4d37900 100644
--- a/fakeredis/commands_mixins/streams_mixin.py
+++ b/fakeredis/commands_mixins/streams_mixin.py
@@ -104,15 +104,19 @@ class StreamsCommandsMixin:
(count,), _ = extract_args(args,... |
cunla__fakeredis-py-303 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/_server.py:FakeRedisMixin.__init__"
],
"edited_modules": [
"fakeredis/_server.py:FakeRedisMixin"
]
},
"file": "fakeredis/_server.py"
},
{
"changes": {... | cunla/fakeredis-py | c0e620af93839f2761c8c0be2ecc6c531617ce0b | Persistence between across pytest cases difference between 2.21.1 and 2.21.2
**Describe the bug**
There's been a change in how persistence works between 2.21.1 and 2.21.2.
Specifically, in 2.21.2, fakeredis seems to persist state across pytest cases that uses a pytest fixture to provide the fakeredis client. This is ... | diff --git a/docs/about/changelog.md b/docs/about/changelog.md
index 583f412..a40fdc7 100644
--- a/docs/about/changelog.md
+++ b/docs/about/changelog.md
@@ -13,7 +13,7 @@ description: Change log of all fakeredis releases
### 🐛 Bug Fixes
-- Connection params are defaulted to be the same between async and sync conn... |
cunla__fakeredis-py-44 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/_commands.py:ScoreTest.__init__",
"fakeredis/_commands.py:ScoreTest.decode"
],
"edited_modules": [
"fakeredis/_commands.py:ScoreTest"
]
},
"file": "fa... | cunla/fakeredis-py | c7dda2155d16b8b35ced377a33d1f659781826dc | zrange byscore kwarg not handled
`zrangebyscore` is deprecated in redis and replace by `zrange` with a `byscore=True` argument. This isn't handled in fakeredis, and I needed to change _zrange in _fakesocket to the following to handle this case:
```
def _zrange(self, key, start, stop, reverse, *args):
zs... | diff --git a/fakeredis/_commands.py b/fakeredis/_commands.py
index f5c8b99..6b231de 100644
--- a/fakeredis/_commands.py
+++ b/fakeredis/_commands.py
@@ -1,7 +1,6 @@
import functools
-import re
-
import math
+import re
from . import _msgs as msgs
from ._helpers import MAX_STRING_SIZE, null_terminate, SimpleError
@... |
cunla__fakeredis-py-85 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fakeredis/_basefakesocket.py:_extract_command"
],
"edited_modules": [
"fakeredis/_basefakesocket.py:_extract_command"
]
},
"file": "fakeredis/_basefakesocket.py"
},
... | cunla/fakeredis-py | 2c13b7bff13c4376f4bd5493de0b669bf6efbbe0 | Implement `JSON.MGET`
**Is your feature request related to a problem? Please describe.**
Implement [`JSON.MGET`](https://redis.io/commands/json.mget/)
| diff --git a/fakeredis/_basefakesocket.py b/fakeredis/_basefakesocket.py
index 3f82112..d8729d0 100644
--- a/fakeredis/_basefakesocket.py
+++ b/fakeredis/_basefakesocket.py
@@ -10,13 +10,10 @@ from . import _msgs as msgs
from ._commands import (Int, Float, SUPPORTED_COMMANDS, COMMANDS_WITH_SUB)
from ._helpers import ... |
cunybpl__isdparser-2 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "isdparser/_version.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"isdparser/reco... | cunybpl/isdparser | f1012bd8ef09d842733409eb848d45857c13300e | ISDRecordFactory's constructor bug
There is a bug in constructor of ISDRecordFactory.
```[python]
class ISDRecordFactory(object):
__slots__ = ('_control', '_mandatory')
def __init__(self,
control: Tuple[str, List[Measure]]=('control', control_measures()),
... | diff --git a/isdparser/_version.py b/isdparser/_version.py
index aa70592..b72bd09 100644
--- a/isdparser/_version.py
+++ b/isdparser/_version.py
@@ -1,1 +1,1 @@
-VERSION='0.2.0'
\ No newline at end of file
+VERSION='0.2.1'
\ No newline at end of file
diff --git a/isdparser/record.py b/isdparser/record.py
index 3e70bfe.... |
cunybpl__isdparser-4 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "isdparser/_version.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"isdparser/meas... | cunybpl/isdparser | d36f19a863deb257f5766d866340421d8704d8cc | Whitespace is Measure mappings' keys.
Whitespaces are being encountered in `GEOPHYSICAL-POINT-OBSERVATION` mappings; specifically, 'SOD' and 'SOM'. Those two codes/keys come with whitespaces from NOAA: `SOD ` and `SOM `.
```
1218725030147322010010104596+40779-073881SOD +0009KLGA V030999999999999999999999999999+999... | diff --git a/isdparser/_version.py b/isdparser/_version.py
index b72bd09..5aa75f8 100644
--- a/isdparser/_version.py
+++ b/isdparser/_version.py
@@ -1,1 +1,1 @@
-VERSION='0.2.1'
\ No newline at end of file
+VERSION='0.2.3'
\ No newline at end of file
diff --git a/isdparser/measures.py b/isdparser/measures.py
index f42a... |
custom-components__feedparser-89 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"custom_components/feedparser/sensor.py:FeedParserSensor.__init__",
"custom_components/feedparser/sensor.py:FeedParserSensor.update"
],
"edited_modules": [
"custom_components/... | custom-components/feedparser | 3c73434ec40ec9d7f8e919b5788b8bb8794b5971 | Add entity attribution
https://developers.home-assistant.io/docs/core/entity/?_highlight=attribution#generic-properties
https://github.com/home-assistant/core/blob/af5fc7e759d52c9357fc9d6d8cb7d578123011a9/homeassistant/helpers/entity.py#L638-L641 | diff --git a/custom_components/feedparser/sensor.py b/custom_components/feedparser/sensor.py
index a898875..a292ff6 100644
--- a/custom_components/feedparser/sensor.py
+++ b/custom_components/feedparser/sensor.py
@@ -104,6 +104,7 @@ class FeedParserSensor(SensorEntity):
self._local_time = local_time
s... |
cvmfs__collectd-cvmfs-11 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": [
"src/collectd_cvmfs/__init__.py:CvmfsProbe.safe_scandir"
],
"added_modules":... | cvmfs/collectd-cvmfs | 70b45773f1bbf11fa3e7e0a17d00cab3faa6228b | collectd could get stuck in some cases if autofs hangs while mounting the repository
On SLC6 nodes I have spotted some scenarios where collectd could get stuck while trying to the the `MountTime` for a cvmfs repository.
In the affected nodes, you would see an autofs in a state like this:
```
root 7065 0.0 0... | diff --git a/.gitignore b/.gitignore
index c274220..a76c8a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,13 @@
-*.pyc
-
-.installed.cfg
-bin
-develop-eggs
-
-*.egg-info
-
-tmp
-build
-dist
-
-.pytest_cache
+*.pyc
+
+.installed.cfg
+bin
+develop-eggs
+
+*.egg-info
+
+tmp
+build
+dist
+.pytest_cache
... |
cwacek__python-jsonschema-objects-139 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__init__"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase"
]
},
"file": "python_js... | cwacek/python-jsonschema-objects | 66ab8b1c3a9e38ccc2d1d0f39db0d5c575ac42df | Instances of Generated Classes with Arrays Appear to be Global Across Class
I'm not entirely sure if I captured the problem concisely but here some example code the demonstrates the problem.
I have a simple schema that is as follows:
```
{
"title": "Example Schema",
"type": "object",
"properties": {... | diff --git a/.travis.yml b/.travis.yml
index 84cb0d7..8af51f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ language: python
python:
- '2.7'
- '3.5'
+- '3.6'
env:
global:
- CC_TEST_REPORTER_ID=dc84306013e5ab029d115d8c2f9b27f23ee83b8d73c2dc35fed00954769fc76b
diff --git a/python_jsonschema_object... |
cwacek__python-jsonschema-objects-163 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__new__"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase"
]
},
"file": "python_jso... | cwacek/python-jsonschema-objects | 5d4f01bea8f4d3688a4ffbf23e45994c040ba254 | oneOf example in README does not deserialize
The README contains this example for `oneOf`:
```
{
"title": "MultipleObjects",
"id": "foo",
"type": "object",
"oneOf":[
{"$ref": "#/definitions/ErrorResponse"},
{"$ref": "#/definitions/VersionGetResponse"}
],
"definitions": {
"ErrorResp... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 65dbfad..b455580 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -142,6 +142,7 @@ class ProtocolBase(collections.MutableMapping):
cls, klass... |
cwacek__python-jsonschema-objects-167 | [
{
"changes": {
"added_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__delattr__"
],
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__setitem__",
"python_jsonschema_objects/classbuilder.py:... | cwacek/python-jsonschema-objects | e5ed9cabc13f1b7f2004b6e4bb9b04e525d7cf54 | Missing __delattr__
The class `ProtocolBase` misses a specific `__delattr__` implementation. This is required to delete extended properties using `delattr` or `del`. Currently, extended properties can be set with `setattr` but only deleted with array syntax:
```
>>> import python_jsonschema_objects as pjs
>>> builde... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 65d8660..9ef9dc8 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -251,16 +251,6 @@ class ProtocolBase(collections.MutableMapping):
except AttributeE... |
cwacek__python-jsonschema-objects-168 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder.construct"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder"
]
},
"file": "python_j... | cwacek/python-jsonschema-objects | 773f4be636fae50432d230fb6b7dad744d257bcc | Nesting array and objects problematic
Attached is a schema with python code - I could not get this to run. The problem is with this line:
objs = Array1([o1, o2])
The script is:
import python_jsonschema_objects as pjs
import collections
schema = {}
schema['Test'] = 'test.json'
builder = pjs.ObjectBuilder(sc... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index b230977..f162565 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -453,6 +453,7 @@ class ClassBuilder(object):
logger.debug(util.lazy_format("Constru... |
cwacek__python-jsonschema-objects-173 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__delattr__"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase"
]
},
"file": "python... | cwacek/python-jsonschema-objects | 773f4be636fae50432d230fb6b7dad744d257bcc | Infinite recursion when deleting internal attribute
The recent fix of #165 introduced a new bug, unfortunately.
The function `ProtocolBase.__delattr__` calls `delattr` again, if the two conditions don't match. This causes an infinite recursion when trying to delete an internal attribute, or one that does not exist:
`... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index b230977..94a8396 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -276,7 +276,7 @@ class ProtocolBase(collections.MutableMapping):
prop.__delete_... |
cwacek__python-jsonschema-objects-176 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/__init__.py:ObjectBuilder.__init__"
],
"edited_modules": [
"python_jsonschema_objects/__init__.py:ObjectBuilder"
]
},
"file": "python_jsonsche... | cwacek/python-jsonschema-objects | 0c3ca1d7443b40052d10daf7f3384e61c29439bd | Detail JSON Schema draft version support
It doesn't look like you detail the draft version of JSON Schema you support.
Could you add this detial to the read-me please?
draft-7 is latest, but draft-8 is coming pretty soon. | diff --git a/python_jsonschema_objects/__init__.py b/python_jsonschema_objects/__init__.py
index af24cad..c48747f 100644
--- a/python_jsonschema_objects/__init__.py
+++ b/python_jsonschema_objects/__init__.py
@@ -1,8 +1,10 @@
import jsonschema
from jsonschema import Draft4Validator
from jsonschema.compat import iter... |
cwacek__python-jsonschema-objects-178 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__setattr__",
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__getattr__",
"python_jsonschema_objects/classbuilder.py:Prot... | cwacek/python-jsonschema-objects | 6e34b75e00afbab3e92cd0fee958165ac3ac14e8 | automatically convert keys in property access
I often use properties of pjs objects as keys in other objects (i.e., dictionary lookup), such as in
```python
o = orgs[handle.key]
```
with `handle` and `orgs` both being instances of `ProtocolBase`.
This, however, does not work since Python expects a string here, and... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 0313909..8178397 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -213,6 +213,7 @@ class ProtocolBase(collections.MutableMapping):
self.validate(... |
cwacek__python-jsonschema-objects-179 | [
{
"changes": {
"added_entities": [
"python_jsonschema_objects/classbuilder.py:TypeProxy.from_json",
"python_jsonschema_objects/classbuilder.py:ClassBuilder.expand_references",
"python_jsonschema_objects/classbuilder.py:ClassBuilder.resolve_type",
"python_jsonschema_objects/... | cwacek/python-jsonschema-objects | c4ace6de887690a04399c62a52ac6d481930c5a5 | oneOf array of simple types bug - propose fix
```
basicSchemaDefn = {
'$schema': 'http://json-schema.org/draft-04/schema#',
'title': 'Test',
'properties': {
'SimpleArrayOfNumberOrString': {
'$ref': '#/definitions/simparray'
}
},
'required': [
'SimpleArrayOfNumberOrString'
],
... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 8178397..809095e 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -399,9 +399,20 @@ class TypeRef(object):
class TypeProxy(object):
- def __init__(sel... |
cwacek__python-jsonschema-objects-190 | [
{
"changes": {
"added_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__deepcopy__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase"
]
},
"file": "pytho... | cwacek/python-jsonschema-objects | 8d6b992919bf240f4142acb2bbbf8c1dca41bcb6 | deep-copying of instances seems not to work
Here is a minimal viable example
```
import pytest
import fastjsonschema
import python_jsonschema_objects as pjs
from dataclasses import dataclass
import json
import copy
import pprint
pp = pprint.PrettyPrinter(indent=2)
lpid_class_schema = {
'$id': 'http... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 809095e..5524b18 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -127,6 +127,9 @@ class ProtocolBase(collections.MutableMapping):
obj.validate()
... |
cwacek__python-jsonschema-objects-209 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder._construct"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder"
]
},
"file": "python_... | cwacek/python-jsonschema-objects | eeccd62179c49fcfc6814fddc391e5e55622f8b4 | serialize and reload (roundtrip) failed with oneOf keyword
the reification of an object previously serialized with the library failed.
the particularity of the schema: is using 'oneOf' to switch between 2 object types.
The following code and schema aim to reproduce the bug. please notice that if you serialize an obje... | diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 56255e6..ab0dd74 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
-... |
cwacek__python-jsonschema-objects-216 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/literals.py:LiteralValue.__eq__",
"python_jsonschema_objects/literals.py:LiteralValue.__lt__"
],
"edited_modules": [
"python_jsonschema_objects/lite... | cwacek/python-jsonschema-objects | a1367dd0fb29f8d218f759bd2baf86e2ae48484d | __lt__ operator doesn't work with two Literals
**Describe the bug**
A clear and concise description of what the bug is.
**Example Schema and code**
```
{
"title":"whatever",
"test": {"type": "number"}
}
>>> whatever.test < whatever.test
>>> whatever.test <= whatever.test
>>> whatever.test >= whatever.... | diff --git a/python_jsonschema_objects/literals.py b/python_jsonschema_objects/literals.py
index 0c05a6e..c83ad1a 100644
--- a/python_jsonschema_objects/literals.py
+++ b/python_jsonschema_objects/literals.py
@@ -22,6 +22,7 @@ def MakeLiteral(name, typ, value, **properties):
return klass(value)
+@functools.tot... |
cwacek__python-jsonschema-objects-233 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/descriptors.py:AttributeDescriptor.__set__"
],
"edited_modules": [
"python_jsonschema_objects/descriptors.py:AttributeDescriptor"
]
},
"file":... | cwacek/python-jsonschema-objects | ca06e7338d82e547267da8dfb5ba326d6d29ae99 | Invalid resolution of nested `oneOf` for schemas of differing types
**Describe the bug**
When nested `oneOf` are used with types that do not match, the resolution fails.
This is somewhat related to #214, but contrary to the `oneOf` using two distinct `object` references in:
https://github.com/cwacek/python-jsonsch... | diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index ab0dd74..7c3caca 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: [3.6, 3.7, 3... |
cwacek__python-jsonschema-objects-234 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/descriptors.py:AttributeDescriptor.__set__"
],
"edited_modules": [
"python_jsonschema_objects/descriptors.py:AttributeDescriptor"
]
},
"file":... | cwacek/python-jsonschema-objects | 8b32dfade9e19e6cedc4ccf6dbe701a759562963 | Invalid resolution of nested `oneOf` for schemas of differing types
**Describe the bug**
When nested `oneOf` are used with types that do not match, the resolution fails.
This is somewhat related to #214, but contrary to the `oneOf` using two distinct `object` references in:
https://github.com/cwacek/python-jsonsch... | diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 07e941a..503d3bf 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -33,15 +33,9 @@ jobs:
needs: lint
runs-on: ubuntu-latest
- continue-on-error: ${{ matrix.experimental... |
cwacek__python-jsonschema-objects-261 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/validators.py:multipleOf"
],
"edited_modules": [
"python_jsonschema_objects/validators.py:multipleOf"
]
},
"file": "python_jsonschema_objects/... | cwacek/python-jsonschema-objects | 51c4a5f7226d7172178869f442da45fb25872b0c | Unprecise comparizon with zero of float values
Consider the following schema (this is an extract from Walmart)
```
"ShippingWeight": {
"type": "number",
"title": "Shipping Weight (lbs)",
"minimum": 0,
"maximum": 1000000000,
... | diff --git a/python_jsonschema_objects/validators.py b/python_jsonschema_objects/validators.py
index 5cd9c94..92a792d 100644
--- a/python_jsonschema_objects/validators.py
+++ b/python_jsonschema_objects/validators.py
@@ -1,3 +1,4 @@
+import decimal
import logging
import six
@@ -40,8 +41,14 @@ registry = ValidatorRe... |
cwacek__python-jsonschema-objects-263 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.as_dict",
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__new__",
"python_jsonschema_objects/classbuilder.py:ProtocolBase... | cwacek/python-jsonschema-objects | abf38ddda4a590290b8b8fe1d877724b993064e2 | Add option for not removing null values on serialization
**What are you trying to do?**
If you initalize a schema with null values, after serialziation they are removed.
```python
# test.py
import os
import python_jsonschema_objects as pjs
dir_path = os.path.dirname(os.path.realpath(__file__))
SCHEMA = os.pa... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 0ed8a33..157471b 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -62,7 +62,10 @@ class ProtocolBase(collections.abc.MutableMapping):
out[pro... |
cwacek__python-jsonschema-objects-283 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__init__",
"python_jsonschema_objects/classbuilder.py:ClassBuilder._build_literal",
"python_jsonschema_objects/classbuilder.py:Clas... | cwacek/python-jsonschema-objects | fd28c9cc4bd623627ef943ecf62ec12e85cd1105 | Request of the const field support
**What are you trying to do?**
We use this library to automatically generate classes to validate our data format.
**Example Schema and code**
```
import python_jsonschema_objects as pjs
exclass = {
"type": "object",
"properties": {
"region_type": { "const": ... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index e9aaabe..783b064 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -4,6 +4,7 @@ import itertools
import logging
import sys
+import jsonschema.exceptions
i... |
cwacek__python-jsonschema-objects-300 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder.resolve_type"
],
"edited_modules": [
"python_jsonschema_objects/classbuilder.py:ClassBuilder"
]
},
"file": "pytho... | cwacek/python-jsonschema-objects | 6cf6fc1e8fc1f7d0804b8f0db6b04962bf66a9b4 | Chained references are not resolved correctly
**Describe the bug**
I only recently tried to switch to version 0.5.5 (from 0.4.6) and noticed that apparently relative `$ref`s in a referenced document are not resolved correctly anymore with the new `referencing` lib.
So, when I reference a definition *d1* within a a ... | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 7517d34..d58172d 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -24,7 +24,7 @@ jobs:
python -m pip install -U pip wheel
python setup.py bdist_wheel sdist
- name: pypi-publish
... |
cwacek__python-jsonschema-objects-46 | [
{
"changes": {
"added_entities": [
"python_jsonschema_objects/classbuilder.py:LiteralValue.__eq__",
"python_jsonschema_objects/classbuilder.py:LiteralValue.__hash__",
"python_jsonschema_objects/classbuilder.py:LiteralValue.__lt__"
],
"added_modules": null,
"edited... | cwacek/python-jsonschema-objects | 35cdc2e1e6e1e3978fe2474243f67e4142c93c3d | Creation of array anonymous objects fails
It seems [classbuilder.py:485](https://github.com/cwacek/python-jsonschema-objects/tree/2a6f5af53e69a99a01d867285dd2f138a26549bd/python_jsonschema_objects/classbuilder.py#L485) is passing the whole array `detail['items']` to `construct` when it should be passing `elem` from the... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 740f2a6..c01fdcc 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -355,6 +355,9 @@ class LiteralValue(object):
str(self._value)
)
+ def _... |
cwacek__python-jsonschema-objects-47 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__new__",
"python_jsonschema_objects/classbuilder.py:TypeProxy.__call__",
"python_jsonschema_objects/classbuilder.py:ClassBuilder._... | cwacek/python-jsonschema-objects | ad1ce37fe82cdfa75a8193566c7c7cdcae07b09c | Properties with multiple types are not parsed correctly
http://json-schema.org/latest/json-schema-validation.html#anchor79
Example property
"claimed_by": {
"id": "claimed",
"type": ["string", "null"],
"description": "Robots Only. The human agent that has claimed this... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index c01fdcc..3a5ca41 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -145,7 +145,7 @@ class ProtocolBase(collections.MutableMapping):
else: # We got no... |
cwacek__python-jsonschema-objects-56 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/__init__.py:ObjectBuilder.__init__",
"python_jsonschema_objects/__init__.py:ObjectBuilder.get_class",
"python_jsonschema_objects/__init__.py:ObjectBuilder.build... | cwacek/python-jsonschema-objects | f6e2f9ef5d99f2cfb707c121828d2a0fa3d9252d | Bad handling of arrays of mixed types objects
(or at least inconsistent with `jsonschema`)
Here is a minimal test case:
```
schema_good = {
'title': 'example',
'type': 'array',
'items': {
'oneOf': [
{
'type': 'object',
'properties': {
... | diff --git a/python_jsonschema_objects/__init__.py b/python_jsonschema_objects/__init__.py
index 04ccf1d..39aeb54 100644
--- a/python_jsonschema_objects/__init__.py
+++ b/python_jsonschema_objects/__init__.py
@@ -47,7 +47,6 @@ class ObjectBuilder(object):
resolver=self.resolver... |
cwacek__python-jsonschema-objects-89 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/wrapper_types.py:ArrayWrapper.create"
],
"edited_modules": [
"python_jsonschema_objects/wrapper_types.py:ArrayWrapper"
]
},
"file": "python_js... | cwacek/python-jsonschema-objects | 7da07c489b698fe1df72ee219e5fd52cd37dbbb1 | Top-level array elements are not built into objects
Here is a working example of an _internal_ array of objects:
`example1.json`:
```
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Example1",
"type": "object",
"properties": {
"name": {
"type": "array",
"items": {
... | diff --git a/python_jsonschema_objects/wrapper_types.py b/python_jsonschema_objects/wrapper_types.py
index 2801199..7a211db 100644
--- a/python_jsonschema_objects/wrapper_types.py
+++ b/python_jsonschema_objects/wrapper_types.py
@@ -275,10 +275,16 @@ class ArrayWrapper(collections.MutableSequence):
... |
cwacek__python-jsonschema-objects-95 | [
{
"changes": {
"added_entities": [
"python_jsonschema_objects/classbuilder.py:LiteralValue.default"
],
"added_modules": null,
"edited_entities": [
"python_jsonschema_objects/classbuilder.py:ProtocolBase.__init__",
"python_jsonschema_objects/classbuilder.py:MakeLit... | cwacek/python-jsonschema-objects | ba178ce7680e14e4ac367a6fab5ea3655396668f | Feature request: implement default values
Would it be possible for the auto-generated class to implement any default values as specified in the JSON schema? Right now if I have a property defined as:
```
"sample-boolean": {
"description": "A sample boolean",
"type": "boolean",
"default": fa... | diff --git a/python_jsonschema_objects/classbuilder.py b/python_jsonschema_objects/classbuilder.py
index 4ba6006..ed55b99 100644
--- a/python_jsonschema_objects/classbuilder.py
+++ b/python_jsonschema_objects/classbuilder.py
@@ -39,6 +39,7 @@ class ProtocolBase(collections.MutableMapping):
"""
__propinfo__ = ... |
cydanil__icepap-ipassign-22 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ipassign/message.py:Message.__init__"
],
"edited_modules": [
"ipassign/message.py:Message"
]
},
"file": "ipassign/message.py"
}
] | cydanil/icepap-ipassign | 1a459d932b8ba50789b22106e0f89c7443486bec | Message.target_id will be set to one even if not Message.destination present
When de/serialising `Message`, check that `target_id` is correctly set if with regards to `destination` | diff --git a/ipassign/message.py b/ipassign/message.py
index 5198b2d..b4f4075 100644
--- a/ipassign/message.py
+++ b/ipassign/message.py
@@ -65,9 +65,13 @@ class Message:
if not isinstance(command, commands):
raise TypeError('expected a command enum')
+ if destination is None and command ... |
cytomining__pycytominer-194 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pycytominer/cyto_utils/util.py:get_pairwise_correlation"
],
"edited_modules": [
"pycytominer/cyto_utils/util.py:get_pairwise_correlation"
]
},
"file": "pycytominer/cyto... | cytomining/pycytominer | b4d32d39534c949ad5165f0b98b79537c2a7ca58 | Fix warnings
Fix these these warnings that pop up upon testing
```
pytest
======================================================================== test session starts ========================================================================
platform darwin -- Python 3.9.6, pytest-7.1.1, pluggy-1.0.0
rootdir: /Us... | diff --git a/pycytominer/cyto_utils/util.py b/pycytominer/cyto_utils/util.py
index be22262..a7c5107 100644
--- a/pycytominer/cyto_utils/util.py
+++ b/pycytominer/cyto_utils/util.py
@@ -349,7 +349,7 @@ def get_pairwise_correlation(population_df, method="pearson"):
# Replace upper triangle in correlation matrix wi... |
cytomining__pycytominer-238 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pycytominer/cyto_utils/features.py:drop_outlier_features"
],
"edited_modules": [
"pycytominer/cyto_utils/features.py:drop_outlier_features"
]
},
"file": "pycytominer/cy... | cytomining/pycytominer | e21cc100eadb1b2322a8e1d6510a19d4830e9feb | Questions about drop_outlier_features
I was looking at some code @fefossa is writing, and came across `drop_outlier_features`, which was added in #62 but somehow escaped my notice (it isn't on in the profiling template, for example). This is potentially super useful to us, but I was wondering about the default value (1... | diff --git a/pycytominer/cyto_utils/features.py b/pycytominer/cyto_utils/features.py
index 8cd55a5..8cfc43c 100644
--- a/pycytominer/cyto_utils/features.py
+++ b/pycytominer/cyto_utils/features.py
@@ -142,7 +142,7 @@ def count_na_features(population_df, features):
def drop_outlier_features(
- population_df, fea... |
cytomining__pycytominer-246 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pycytominer/annotate.py:annotate"
],
"edited_modules": [
"pycytominer/annotate.py:annotate"
]
},
"file": "pycytominer/annotate.py"
},
{
"changes": {
"adde... | cytomining/pycytominer | ea9873ddd3b7d9b7072cf7fc55d582012cf6d315 | Load only some columns during compartment loading in SingleCells
Right now, it is possible to subsample the data afterward to certain rows, and after doing something like merge_single_cells you can subset to certain columns, but there is no way to subset before loading in everything. This is a hassle when data is large... | diff --git a/pycytominer/annotate.py b/pycytominer/annotate.py
index 816e2e5..e64e833 100644
--- a/pycytominer/annotate.py
+++ b/pycytominer/annotate.py
@@ -79,7 +79,9 @@ def annotate(
annotated = platemap.merge(
profiles, left_on=join_on[0], right_on=join_on[1], how="inner"
- ).drop(join_on[0], axis... |
cytomining__pycytominer-495 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pycytominer/cyto_utils/features.py:drop_outlier_features"
],
"edited_modules": [
"pycytominer/cyto_utils/features.py:drop_outlier_features"
]
},
"file": "pycytominer/cy... | cytomining/pycytominer | 5743c62d790376950bb77fb797c8a556c76e60c6 | Bug: `samples` parameter in `feature_select` function reduces the rows in output
### Example code with output
Example code:
```python
# Only for Plate 6, we want to normalize to iNFixion institution and Null and WT cells
# to keep consistent with how the other plates are normalized (same cell line)
if... | diff --git a/.gitignore b/.gitignore
index 0191f56..e0a2b14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -168,3 +168,6 @@ cython_debug/
# Miscellaneous
.DS_Store
+
+# removes files that are meant for prototyping
+_*
diff --git a/pycytominer/cyto_utils/features.py b/pycytominer/cyto_utils/features.py
index e3e95c5..5... |
d-Rickyy-b__pyBrematic-22 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyBrematic/gateways/brennenstuhl_gateway.py:BrennenstuhlGateway.build_udp_payload"
],
"edited_modules": [
"pyBrematic/gateways/brennenstuhl_gateway.py:BrennenstuhlGateway"
]
... | d-Rickyy-b/pyBrematic | 94990fdfdfdeac5216c0e364a37b31d7f435d082 | AttributeError: 'CMR1000' object has no attribute 'baud'
I just tried the new version 1.2.0 with this simple example:
```
from pyBrematic import Action
from pyBrematic.devices.intertechno import CMR500, calc_system_and_unit_code
from pyBrematic.gateways import IntertechnoGateway
system_code, unit_code = calc_sys... | diff --git a/pyBrematic/gateways/brennenstuhl_gateway.py b/pyBrematic/gateways/brennenstuhl_gateway.py
index 142a454..5bed652 100644
--- a/pyBrematic/gateways/brennenstuhl_gateway.py
+++ b/pyBrematic/gateways/brennenstuhl_gateway.py
@@ -18,9 +18,9 @@ class BrennenstuhlGateway(Gateway):
self.tail_format = "{0},... |
d-Rickyy-b__pyBrematic-30 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyBrematic/gateways/intertechno_gateway.py:IntertechnoGateway.__init__"
],
"edited_modules": [
"pyBrematic/gateways/intertechno_gateway.py:IntertechnoGateway"
]
},
"fil... | d-Rickyy-b/pyBrematic | 1ae215c9d548299e7837dc8539647565d40b9c3e | ITGW-433 requires a slightly updated head and tail formatter
The head and tail formatter for the Intertechno gateway were missing a trailing "0". After adding these, the ITGW-433 can operate a CMR1000.
The corresponding work can be found here:
https://www.instructables.com/Intertechno-LAN-Gateway-ITGW-433-and-OpenH... | diff --git a/pyBrematic/gateways/intertechno_gateway.py b/pyBrematic/gateways/intertechno_gateway.py
index b10a935..c6d4c4d 100644
--- a/pyBrematic/gateways/intertechno_gateway.py
+++ b/pyBrematic/gateways/intertechno_gateway.py
@@ -14,8 +14,8 @@ class IntertechnoGateway(Gateway):
# For the Intertechno GWY 433... |
d0c-s4vage__lookatme-118 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"lookatme/contrib/file_loader.py:FileSchema"
]
},
"file": "lookatme/contrib/file_loader.py"
},
{
"changes": {
"added_entities": null,
"adde... | d0c-s4vage/lookatme | ca69ad9f2207318312562b0824dc15aa741a8471 | Default styles aren't quite working
**Describe the bug**
A clear and concise description of what the bug is.
#116 made lookatme compatible with the latest version of marshmallow, but it broke some of the default styles from loading correctly. This is most noticeable with the margin and padding values.
**To Repr... | diff --git a/lookatme/contrib/file_loader.py b/lookatme/contrib/file_loader.py
index c9bd704..b897a49 100644
--- a/lookatme/contrib/file_loader.py
+++ b/lookatme/contrib/file_loader.py
@@ -46,8 +46,8 @@ class FileSchema(Schema):
transform = fields.Str(default=None, missing=None)
lines = fields.Nested(
... |
d0c-s4vage__lookatme-31 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lookatme/parser.py:Parser.parse_meta"
],
"edited_modules": [
"lookatme/parser.py:Parser"
]
},
"file": "lookatme/parser.py"
},
{
"changes": {
"added_entiti... | d0c-s4vage/lookatme | a5ea5bd07bd9a14d797fee3e654269dda5972f84 | Add unit tests | diff --git a/lookatme/parser.py b/lookatme/parser.py
index 2aa401e..6fb86d3 100644
--- a/lookatme/parser.py
+++ b/lookatme/parser.py
@@ -89,11 +89,11 @@ class Parser(object):
break
if not found_first:
- return input_data, {}
+ return input_data, MetaSchema().load({})
... |
d0c-s4vage__lookatme-61 | [
{
"changes": {
"added_entities": [
"lookatme/render/markdown_block.py:render_newline"
],
"added_modules": [
"lookatme/render/markdown_block.py:render_newline"
],
"edited_entities": null,
"edited_modules": null
},
"file": "lookatme/render/markdown_block... | d0c-s4vage/lookatme | 7665549bf3977aa65b88dae0c24ed658a4857c6a | Add newline token support
Apparently I never add double newlines in a markdown document | diff --git a/lookatme/render/markdown_block.py b/lookatme/render/markdown_block.py
index 77a7433..703478f 100644
--- a/lookatme/render/markdown_block.py
+++ b/lookatme/render/markdown_block.py
@@ -46,6 +46,16 @@ def _list_level(item):
return _meta(item).get("list_level", 1)
+@contrib_first
+def render_newline(... |
d0c-s4vage__lookatme-62 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lookatme/__main__.py:main"
],
"edited_modules": [
"lookatme/__main__.py:main"
]
},
"file": "lookatme/__main__.py"
},
{
"changes": {
"added_entities": null... | d0c-s4vage/lookatme | a1634d80ea5e5abcc84b9d6cdbb1209b4db1b717 | --dump-styles should print yaml with Unicode characters
Currently any Unicode characters are escaped as `"\uXXXX"` strings when the resolved styles are dumped. This makes it really hard to debug and know what characters they actually are. | diff --git a/lookatme/__main__.py b/lookatme/__main__.py
index 58e5419..a42b1d7 100644
--- a/lookatme/__main__.py
+++ b/lookatme/__main__.py
@@ -7,6 +7,7 @@ This is the main CLI for lookatme
import click
import logging
+import io
import os
import pygments.styles
import sys
@@ -56,8 +57,12 @@ from lookatme.schema... |
d0c-s4vage__lookatme-68 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "lookatme/__main__.py"
}
] | d0c-s4vage/lookatme | de10fe43475e72ba3ee497feb8670c1e89c9113f | add --version flag to CLI
```
lookatme --version
0.4.0
``` | diff --git a/lookatme/__main__.py b/lookatme/__main__.py
index a42b1d7..78d5101 100644
--- a/lookatme/__main__.py
+++ b/lookatme/__main__.py
@@ -57,6 +57,7 @@ from lookatme.schemas import StyleSchema
is_flag=True,
default=False,
)
+@click.version_option(lookatme.__version__)
@click.argument(
"input_fil... |
d0c-s4vage__lookatme-76 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lookatme/__main__.py:main"
],
"edited_modules": [
"lookatme/__main__.py:main"
]
},
"file": "lookatme/__main__.py"
},
{
"changes": {
"added_entities": null... | d0c-s4vage/lookatme | 5271a01706f60f6e277f7cba7f1bd20bd683f3ce | Rendering errors aren't handled correctly
**Describe the bug**
When an error occurs during the rendering of parsed slide, the error is not handled correctly in tui.py.
**To Reproduce**
Steps to reproduce the behavior:
1. raise an exception in one of the `render_XXX` functions
**Expected behavior**
A clear a... | diff --git a/lookatme/__main__.py b/lookatme/__main__.py
index 78d5101..fafd6d2 100644
--- a/lookatme/__main__.py
+++ b/lookatme/__main__.py
@@ -11,6 +11,7 @@ import io
import os
import pygments.styles
import sys
+import tempfile
import lookatme.tui
@@ -27,7 +28,7 @@ from lookatme.schemas import StyleSchema
... |
d0c-s4vage__lookatme-98 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lookatme/__main__.py:main"
],
"edited_modules": [
"lookatme/__main__.py:main"
]
},
"file": "lookatme/__main__.py"
},
{
"changes": {
"added_entities": null... | d0c-s4vage/lookatme | e03a694812092fdaa05d18270d63a146fff3afbf | Add new cmd-line option to force single slide rendering
**Describe the Feature Request**
A single slide should be rendered if `--single` or `--one` (or something) is specified. This also means that hrules should be actually rendered as well.
See #91 and #29 for some more context. | diff --git a/README.md b/README.md
index 9302700..c1a1e0b 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ Sourcing external files example
## CLI Options
```
-Usage: lookatme [OPTIONS] [INPUT_FILE]
+Usage: lookatme [OPTIONS] [INPUT_FILES]...
lookatme - An interactive, terminal-based markdown presentati... |
d3dave__cough-3 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cough/file.py:ObjectModule.dump_sections"
],
"edited_modules": [
"cough/file.py:ObjectModule"
]
},
"file": "cough/file.py"
}
] | d3dave/cough | b2a4ebe62f953e35beff00a9a7d7426cc20f6350 | Exception when adding an uninitialized section before an initialized section
file.py:133 is inconsistent with file.py:144 | diff --git a/cough/file.py b/cough/file.py
index 84338e7..d96aa8a 100644
--- a/cough/file.py
+++ b/cough/file.py
@@ -125,25 +125,17 @@ class ObjectModule:
return bytes(body_buffer)
def dump_sections(self):
+ data_buf_offset = FileHeader.struct.size + 40 * len(self.sections)
+ hdrs_buf = by... |
da4089__simplefix-17 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simplefix/parser.py:FixParser.__init__",
"simplefix/parser.py:FixParser.reset",
"simplefix/parser.py:FixParser.get_message"
],
"edited_modules": [
"simplefix/parser.p... | da4089/simplefix | eaf8656734ed897d4467937a51f164a4b2f0c4ef | FixParser does not correctly interpret CME execution reports
The CME sends execution reports over drop copy with the format:
```
8=FIX.4.2|35=n|...|213=<RTRF>8=FIX.4.2|...|10=XXX</RTRF>|10=YYY
```
If this message is split inside the XML then FixParser will interpret 10=XXX as the end of the message instead of 10=Y... | diff --git a/simplefix/parser.py b/simplefix/parser.py
index edf5d11..54bebf7 100644
--- a/simplefix/parser.py
+++ b/simplefix/parser.py
@@ -57,6 +57,9 @@ class FixParser(object):
# Copy raw field data tags.
self.raw_data_tags = RAW_DATA_TAGS[:]
+
+ # Parsed length of data field.
+ sel... |
da4089__simplefix-20 | [
{
"changes": {
"added_entities": [
"simplefix/parser.py:FixParser.set_message_terminator"
],
"added_modules": null,
"edited_entities": [
"simplefix/parser.py:FixParser.__init__",
"simplefix/parser.py:FixParser.get_message"
],
"edited_modules": [
... | da4089/simplefix | eae577757c6f9f0cbc1b5fec14c0296a0efe133a | Add support for alternative end-of-message signalling
The CME (bless 'em) publishes a list of active product definitions using a text file containing (very) many FIX 35=a messages (`secdef.dat`). Or *almost* FIX messages, except that they don't have a trailing CheckSum (10) field: messages are terminated by an end-of-... | diff --git a/simplefix/parser.py b/simplefix/parser.py
index 54bebf7..9190780 100644
--- a/simplefix/parser.py
+++ b/simplefix/parser.py
@@ -28,6 +28,10 @@ from .message import FixMessage, fix_val
from .data import RAW_DATA_TAGS, RAW_LEN_TAGS
+# By default, messages are terminated by the Checksum (10) tag.
+DEFAUL... |
daffidwilde__matching-160 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/matching/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/matchin... | daffidwilde/matching | c99b71fba5a77ea4cfbbef4a8a5963892873cc39 | Cleaning not exhaustive
It seems that the cleaning process does not always filter out all invalid players. There's an example below - be warned that it's kind of convoluted.
The crux of the issue in the example is that during the pass to remove any hospitals, some residents' final preference is removed, thus making ... | diff --git a/.gitignore b/.gitignore
index a33cddd..8b1d8e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@ htmlcov/
!img/*.pdf
+!tests/**/data/*.json
/.quarto/
/_site/
diff --git a/src/matching/__init__.py b/src/matching/__init__.py
index 953918d..44499ba 100644
--- a/src/matching/__init__.py
+++ b... |
dag-hammarskjold-library__dlx-193 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dlx/marc/__init__.py:Marc.commit"
],
"edited_modules": [
"dlx/marc/__init__.py:Marc"
]
},
"file": "dlx/marc/__init__.py"
}
] | dag-hammarskjold-library/dlx | fef3972cb2e38ac73d8b92ca30c1e8c33547fa5c | Test record audit data | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index dceecde..493a76d 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -640,14 +640,20 @@ class Marc(object):
@Decorators.check_connected
def commit(self, user='admin', auth_check=True):
new_record = True if self.id is None else... |
dag-hammarskjold-library__dlx-227 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dlx/scripts/build_logical_fields.py:run",
"dlx/scripts/build_logical_fields.py:build_logical_fields"
],
"edited_modules": [
"dlx/scripts/build_logical_fields.py:run",
... | dag-hammarskjold-library/dlx | 4beacc115938c5a126c6c979501d88780bbf6eca | Allow building only certain fields in build-logical-fields script
Add an option to limit the build action to specific fields. This will be useful when an individual field configuration is updated, and only that field(s) needs to be rebuilt. | diff --git a/dlx/scripts/build_logical_fields.py b/dlx/scripts/build_logical_fields.py
index 769dd74..55948a2 100644
--- a/dlx/scripts/build_logical_fields.py
+++ b/dlx/scripts/build_logical_fields.py
@@ -16,10 +16,11 @@ parser.add_argument('--connect', required=True, help='MongoDB connection string'
parser.add_argume... |
dag-hammarskjold-library__dlx-242 | [
{
"changes": {
"added_entities": [
"dlx/marc/__init__.py:MarcSet.from_aggregation"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"dlx/marc/__init__.py:MarcSet"
]
},
"file": "dlx/marc/__init__.py"
}
] | dag-hammarskjold-library/dlx | 04b4bfd4955b722532921be07d7e831e6bc9f76e | Implement MarcSet.from_aggregation to support Atlas $search stage and other aggregations
Currently a MarcSet can be created from a standard MDB filter document (query document). Enabling a MarcSet to be created from an aggregation pipeline should allow richer queries, both in standard MDB and Atlas | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index 66f7774..a47c90f 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -115,6 +115,16 @@ class MarcSet():
return self
+ @classmethod
+ def from_aggregation(cls, pipeline, **kwargs):
+ # the aggregation results must return... |
dag-hammarskjold-library__dlx-293 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"dlx/config.py:Config"
]
},
"file": "dlx/config.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities... | dag-hammarskjold-library/dlx | 733e9cadb70ac2b520809bb0381c5bdd01718087 | Wildcard in search string not working
i.e. `query = Query.from_string('title:*test title*')`. Even though the test for this passes. | diff --git a/dlx/config.py b/dlx/config.py
index 89ded7e..6d2911d 100644
--- a/dlx/config.py
+++ b/dlx/config.py
@@ -101,7 +101,6 @@ class Config():
'130': ['adfgklnp'],
'490': ['a'],
'495': ['a'],
- '245': ['p'],
'495': ['a'],
'765': ['t'],
... |
dag-hammarskjold-library__dlx-310 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dlx/marc/__init__.py:MarcSet.from_query",
"dlx/marc/__init__.py:Datafield.to_mrk"
],
"edited_modules": [
"dlx/marc/__init__.py:MarcSet",
"dlx/marc/__init__.py:Datafie... | dag-hammarskjold-library/dlx | 142a6290d716e042d4548cc620615e7aef011284 | Querystring: NOT text and wildcard searches not working
Querystrings with fielded NOT text and wildcard searches not working, i.e. `NOT 191__a:S PV 64*` | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index 957a990..332087c 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -112,7 +112,7 @@ class MarcSet():
ac = kwargs.pop('auth_control', False)
if 'collation' not in kwargs and Config.marc_index_default_collation:
- ... |
dag-hammarskjold-library__dlx-314 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dlx/marc/query.py:Query.from_string"
],
"edited_modules": [
"dlx/marc/query.py:Query"
]
},
"file": "dlx/marc/query.py"
}
] | dag-hammarskjold-library/dlx | 53ea84345cea0f6099a97c4f2ebd039a899949da | $ not working in regex search term
https://github.com/dag-hammarskjold-library/dlx-rest/issues/1438 | diff --git a/dlx/marc/query.py b/dlx/marc/query.py
index d46b53d..45727df 100644
--- a/dlx/marc/query.py
+++ b/dlx/marc/query.py
@@ -126,7 +126,7 @@ class Query():
# regex
if isinstance(value, Regex):
- matches = DB.handle[f'_index_{tag}'].find({'text': value} if i... |
dag-hammarskjold-library__dlx-317 | [
{
"changes": {
"added_entities": [
"dlx/marc/__init__.py:MarcSet.to_table",
"dlx/marc/__init__.py:MarcSet.to_csv",
"dlx/marc/__init__.py:MarcSet.to_tsv"
],
"added_modules": null,
"edited_entities": [
"dlx/marc/__init__.py:Marc.to_mrc",
"dlx/marc/__... | dag-hammarskjold-library/dlx | 8936709e06ece6066be8e6f801bd2f4c7098b6d6 | Include xref in MRK serialization
For auth controlled fields, write the xref to $0 in the MRK serialization | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index be5cb4b..1461894 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -1,6 +1,6 @@
"""dlx.marc"""
-import time, re, json, threading
+import time, re, json, threading, copy
from collections import Counter
from datetime import datetime
from w... |
dag-hammarskjold-library__dlx-318 | [
{
"changes": {
"added_entities": [
"dlx/marc/__init__.py:MarcSet.to_table",
"dlx/marc/__init__.py:MarcSet.to_csv",
"dlx/marc/__init__.py:MarcSet.to_tsv"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"dlx/marc/__init__.py:Marc... | dag-hammarskjold-library/dlx | 8936709e06ece6066be8e6f801bd2f4c7098b6d6 | Implement CSV serialization
Add CSV to the available record and batch serializations | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index be5cb4b..e20e174 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -303,6 +303,27 @@ class MarcSet():
def to_excel(self, path):
pass
+ def to_table(self) -> Table:
+ table = Table()
+
+ for i, record in enumera... |
dag-hammarskjold-library__dlx-351 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dlx/marc/__init__.py:Auth.in_use",
"dlx/marc/__init__.py:Diff.__init__",
"dlx/marc/__init__.py:Controlfield.__eq__",
"dlx/marc/__init__.py:Datafield.__eq__"
],
"edite... | dag-hammarskjold-library/dlx | e30412f241b5165636e6728ab5bf31653dc070cd | marc.Diff not taking into account tag or field order
* compare tags when comparing fields
* compare field order of fields that are common to both records | diff --git a/dlx/marc/__init__.py b/dlx/marc/__init__.py
index 943a46a..0990edd 100644
--- a/dlx/marc/__init__.py
+++ b/dlx/marc/__init__.py
@@ -1712,14 +1712,10 @@ class Auth(Marc):
def count(lookup_class, xref):
tags = list(Config.bib_authority_controlled.keys()) if lookup_class == Bib... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.