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 |
|---|---|---|---|---|---|
cookiecutter__cookiecutter-1569 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/prompt.py:process_json",
"cookiecutter/prompt.py:read_user_dict"
],
"edited_modules": [
"cookiecutter/prompt.py:process_json",
"cookiecutter/prompt.py:re... | cookiecutter/cookiecutter | a54de6759d2553564cda1911fb553e9df9cad937 | Add support for click 8.0.0
### Description:
We should add support to click 8.0.0, there are some breaking changes like #1558
| diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py
index dfb8f32..4b8b2fb 100644
--- a/cookiecutter/prompt.py
+++ b/cookiecutter/prompt.py
@@ -1,4 +1,5 @@
"""Functions for prompting the user for project info."""
+import functools
import json
from collections import OrderedDict
@@ -78,11 +79,18 @@ def rea... |
cookiecutter__cookiecutter-1669 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/cli.py:main"
],
"edited_modules": [
"cookiecutter/cli.py:main"
]
},
"file": "cookiecutter/cli.py"
},
{
"changes": {
"added_entities": null,
... | cookiecutter/cookiecutter | fdffddb31fd2b46344dfa317531ff155e7999f77 | add CLI option not to delete files on failure
If there's a bug in my hooks, it can be tough to debug it. I'd like to be able to inspect the generated files.
Currently, I modify the hook to exit with code 0 just before the failing line, but it'd be nice if that wasn't necessary. | diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py
index a792fa5..208901a 100644
--- a/cookiecutter/cli.py
+++ b/cookiecutter/cli.py
@@ -144,6 +144,11 @@ def list_installed_templates(default_config, passed_config_file):
@click.option(
'-l', '--list-installed', is_flag=True, help='List currently installed temp... |
cookiecutter__cookiecutter-1920 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/prompt.py:read_user_variable",
"cookiecutter/prompt.py:prompt_for_config"
],
"edited_modules": [
"cookiecutter/prompt.py:read_user_variable",
"cookiecutt... | cookiecutter/cookiecutter | 1b8520e7075175db4a3deae85e71081730ca7ad1 | Variable with null default no longer being required
* Cookiecutter version: 2.3.0
* Template project url: internal
* Python version: Python 3.8.12
* Operating System: Debian GNU/Linux 11
### Description:
After updating from 2.1.1 to 2.3.0, setting a field's default value in `cookiecutter.json` to `null` no lon... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 44c7128..3ea51b4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,8 +10,8 @@ repos:
language: python
files: \.rst$
require_serial: true
- - repo: https://github.com/psf/black.git
- rev: 23.7.0
+ ... |
cookiecutter__cookiecutter-1923 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/__init__.py:_get_version"
],
"edited_modules": [
"cookiecutter/__init__.py:_get_version"
]
},
"file": "cookiecutter/__init__.py"
},
{
"changes": {
... | cookiecutter/cookiecutter | 1b8520e7075175db4a3deae85e71081730ca7ad1 | Add checkout details to context
* Cookiecutter version: 2.1.1
* Template project url: N/A
* Python version: 3.9.13
* Operating System: macOS
### Description:
I would like the context output available in `{{cookiecutter | pprint }}` to include the `--checkout` argument passed to the CLI, under a '_checkout' fie... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 44c7128..3ea51b4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,8 +10,8 @@ repos:
language: python
files: \.rst$
require_serial: true
- - repo: https://github.com/psf/black.git
- rev: 23.7.0
+ ... |
cookiecutter__cookiecutter-1981 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/main.py:cookiecutter"
],
"edited_modules": [
"cookiecutter/main.py:cookiecutter"
]
},
"file": "cookiecutter/main.py"
},
{
"changes": {
"added... | cookiecutter/cookiecutter | 11c2c30c2aae795db2f8542985cba26f8bb54b0e | Nested Config Files: New format for "template" key
* Cookiecutter version: 2.4.0
* Template project URL: https://github.com/plone/cookiecutter-plone/blob/main/cookiecutter.json
* Python version: 3.11
* Operating System: macOs
### Description:
The format for the `template` key requires some additional parsing:
... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index f8b6608..65871ab 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -6,7 +6,6 @@ library rather than a script.
"""
import logging
import os
-import re
import sys
from copy import copy
from pathlib import Path
@@ -15,6 +14,7 @@ from cookie... |
cookiecutter__cookiecutter-2029 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/generate.py:apply_overwrites_to_context"
],
"edited_modules": [
"cookiecutter/generate.py:apply_overwrites_to_context"
]
},
"file": "cookiecutter/generate.... | cookiecutter/cookiecutter | 9f94bceed2301659fbc64b20deb7f96a81ac42f8 | Cannot properly override boolean variable from command line
* Cookiecutter version: 2.4.0
* Template project url: N/A
* Python version: 3.10
* Operating System: Linux
### Description:
I tried to use the boolean variable. It works great when generating from interactive prompt. But when I try to use --no-input w... | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index 14a96e6..48aacb6 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -15,6 +15,7 @@ from typing import Any
from binaryornot.check import is_binary
from jinja2 import Environment, FileSystemLoader
from jinja2.exceptions import ... |
cookiecutter__cookiecutter-839 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cookiecutter/generate.py:generate_files"
],
"edited_modules": [
"cookiecutter/generate.py:generate_files"
]
},
"file": "cookiecutter/generate.py"
}
] | cookiecutter/cookiecutter | d8672b11e445a918431933c322e7ac96440fd438 | Allow for copy_without_render to render output directory name
I find it strange that copy_without_render doesn't render the directory name.
An example use case is wanting to copy a templates directory in your project that contains jinja, the directory is copied however it is placed into a folder like '{{cookiecutter.r... | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index 4739aec..4656a4f 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -323,6 +323,7 @@ def generate_files(
for copy_dir in copy_dirs:
indir = os.path.normpath(os.path.join(root, copy_dir))
... |
cool-RR__PySnooper-147 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pysnooper/tracer.py:Tracer.__init__"
],
"edited_modules": [
"pysnooper/tracer.py:Tracer"
]
},
"file": "pysnooper/tracer.py"
}
] | cool-RR/PySnooper | 81868cd0ba676035172a2ad493253c8c6ac9b4d4 | Problem with passing in a single tuple in custom_repr= ()
I was trying it on a toy example and just wanted to pass in one tuple like
(list, print_list_size) to custom_repr= () with print_list_size being the example used in the readme file:
`
def print_list_size(l):
return 'list(size={})'.format(len(l))
`
T... | diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py
index 5d91aeb..fb6eddc 100644
--- a/pysnooper/tracer.py
+++ b/pysnooper/tracer.py
@@ -214,6 +214,9 @@ class Tracer:
self.target_codes = set()
self.target_frames = set()
self.thread_local = threading.local()
+ if len(custom_repr) ==... |
cool-RR__PySnooper-40 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pysnooper/tracer.py:Tracer.trace"
],
"edited_modules": [
"pysnooper/tracer.py:Tracer"
]
},
"file": "pysnooper/tracer.py"
}
] | cool-RR/PySnooper | 43af67b1d96f4d7fad727982c33ab7923155f08e | Feature request: Show the return value | diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py
index cc6a90d..9ad85c9 100644
--- a/pysnooper/tracer.py
+++ b/pysnooper/tracer.py
@@ -213,6 +213,8 @@ class Tracer:
self.write('{indent}{now_string} {event:9} '
'{line_no:4} {source_line}'.format(**locals()))
+ if event == 'ret... |
cool-RR__PySnooper-65 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "pysnooper/pycompat.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pysnooper/trac... | cool-RR/PySnooper | 669863a65f3252ecec7109ca547acaae45bb4623 | Feature request: Support generators
See the conversation on #31 . | diff --git a/README.md b/README.md
index 331488c..9b43596 100644
--- a/README.md
+++ b/README.md
@@ -149,6 +149,9 @@ On multi-threaded apps identify which thread are snooped in output::
@pysnooper.snoop(thread_info=True)
```
+PySnooper supports decorating generators.
+
+
# Installation #
You can install **PySno... |
corelight__pycommunityid-4 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"communityid/algo.py:FlowTuple.is_port"
],
"edited_modules": [
"communityid/algo.py:FlowTuple"
]
},
"file": "communityid/algo.py"
}
] | corelight/pycommunityid | 9f42930aa24fb3047bf9862cfac7ccdecea7dccd | FlowTupleError port invalid for specific ports
Hi, I started to experiment with community ID and pycommunityid and I think that I found a bug in function in_nbo():
https://github.com/corelight/pycommunityid/blob/b4467350446dde632eef59004a6b4e49cc55a85f/communityid/algo.py#L194-L213
- The problem is with the creatio... | diff --git a/README.md b/README.md
index 2613ecc..241bfee 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This package provides a Python implementation of the open
[Community ID](https://github.com/corelight/community-id-spec)
flow hashing standard.
-It supports Python versions 2.7+ and 3+.
+It supports Pyth... |
cornellius-gp__gpytorch-389 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/source/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gpytorch/kernels... | cornellius-gp/gpytorch | fd8629a2906a0ca7a5c4c39d9dfe07a2a0659aee | Deprecate log space parameters in favor of softplus
Iβm getting very good feedback from a bunch of people using softplus in place of exp to enforce positivity constraints on some of the hyperparameters. It appears to require very little tweaking of optimization hyperparameters, and significantly improves model robustne... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 620e1fb7..41c57de9 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -67,6 +67,7 @@ MOCK_MODULES = [
"torch",
"torch.autograd",
"torch.nn",
+ "torch.nn.functional",
"torch.optim",
"torch.utils",
"torch.utils.data",... |
cornellius-gp__gpytorch-411 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gpytorch/kernels/cosine_kernel.py:CosineKernel._set_period_length"
],
"edited_modules": [
"gpytorch/kernels/cosine_kernel.py:CosineKernel"
]
},
"file": "gpytorch/kernel... | cornellius-gp/gpytorch | 6a78df5769f337507de1af22bedce87a38ecd1da | Module.initialize should work with transformed parameters
`Module.initialize` right now only works for actual parameters. It should also work for transformed parameters.
For example, the following lines work:
```python
likelihood = gpytorch.likelihoods.GaussianLikelihood(param_transform=torch.exp)
likelihood.in... | diff --git a/gpytorch/kernels/cosine_kernel.py b/gpytorch/kernels/cosine_kernel.py
index ba34165f..90a5034e 100644
--- a/gpytorch/kernels/cosine_kernel.py
+++ b/gpytorch/kernels/cosine_kernel.py
@@ -91,7 +91,9 @@ class CosineKernel(Kernel):
return self._set_period_length(value)
def _set_period_length(se... |
corteva__geocube-166 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geocube/vector.py:vectorize"
],
"edited_modules": [
"geocube/vector.py:vectorize"
]
},
"file": "geocube/vector.py"
}
] | corteva/geocube | ec59b49f80c59bdf8f993eecc362f611140558f3 | Setting a name for the value column in vectorize
When using vectorize, the resulting GDF has None as column name, creating issues when trying to save to a file.
It would be nice to set a defaul value. VALUES, for instance, or whatever that is not None.
I could do it. | diff --git a/geocube/vector.py b/geocube/vector.py
index 113f22c..e873c0c 100644
--- a/geocube/vector.py
+++ b/geocube/vector.py
@@ -1,6 +1,8 @@
"""
Module for vector methods
"""
+import warnings
+
import geopandas
import numpy
import rasterio.features
@@ -53,8 +55,15 @@ def vectorize(data_array: xarray.DataArray... |
corteva__geocube-43 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geocube/xarray_extensions/vectorxarray.py:from_geodataframe",
"geocube/xarray_extensions/vectorxarray.py:open_dataset",
"geocube/xarray_extensions/vectorxarray.py:BaseVectorX.to_geodataf... | corteva/geocube | 886a3265462f31399fd46c8f0ea2487f54fbecb0 | Deprecation warnings
https://travis-ci.com/github/corteva/geocube/jobs/415108723
```
test/integration/xarray_extensions/test_integration_xarray_extensions_vectorxarray.py::test_to_netcdf
/home/travis/build/corteva/geocube/geocube/xarray_extensions/vectorxarray.py:59: PendingDeprecationWarning: dropping variables... | diff --git a/.isort.cfg b/.isort.cfg
index 0f20555..b6e6d26 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,6 +1,6 @@
[settings]
line_length=88
multi_line_output=3
-known_third_party=appdirs,click,datacube,dateutil,geopandas,mock,numpy,pandas,pyproj,pytest,rasterio,rioxarray,scipy,setuptools,shapely,xarray
+known_thi... |
corteva__geocube-68 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geocube/vector_to_cube.py:VectorToCube._get_attrs",
"geocube/vector_to_cube.py:VectorToCube._get_grouped_grid",
"geocube/vector_to_cube.py:VectorToCube._get_grid"
],
"edited_... | corteva/geocube | 92b6ffac79932447400298ed167f045d16471c2a | REF: Update grid mapping attribute handling
https://github.com/corteva/geocube/runs/2592740629
```
ValueError: failed to prevent overwriting existing key grid_mapping in attrs. This is probably an encoding field used by xarray to describe how a variable is serialized. To proceed, remove this key from the variable'... | diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 93d97c3..59b31c2 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -110,7 +110,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality ... |
corteva__geocube-95 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geocube/_show_versions.py:_get_deps_info"
],
"edited_modules": [
"geocube/_show_versions.py:_get_deps_info"
]
},
"file": "geocube/_show_versions.py"
},
{
"chang... | corteva/geocube | a7cdbe5993164bb02f6d3dd2c4dc69791cd0b71d | DEP: odc-geo
Migrate to https://github.com/opendatacube/odc-geo from opendatacube when it is released. | diff --git a/.github/workflows/build_docs.yaml b/.github/workflows/build_docs.yaml
index a10e70d..7f7d9a5 100644
--- a/.github/workflows/build_docs.yaml
+++ b/.github/workflows/build_docs.yaml
@@ -27,7 +27,7 @@ jobs:
run: |
conda config --prepend channels conda-forge
conda config --set ch... |
corteva__rioxarray-12 | [
{
"changes": {
"added_entities": [
"rioxarray/rioxarray.py:RasterArray.encoded_nodata"
],
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:_generate_attrs",
"rioxarray/rioxarray.py:_add_attrs_proj",
"rioxarray/rioxarray.py:RasterArray.no... | corteva/rioxarray | f5fa336475419bc513c40cd76d2dba883b2fd2d8 | Better nodata handling
Currently the nodata property searches for nodata in `_FillValue`. But it is not always the case (e.g. `open_rasterio` uses `nodatavals`). Also, the logic for getting/setting nodata in `reproject` is needs to be better generalized. Additionally, when writing `to_raster` is is probably to set the ... | diff --git a/appveyor.yml b/appveyor.yml
index c19f8d52..ce67f833 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -12,7 +12,6 @@ install:
- conda config --set always_yes yes
- conda config --add channels conda-forge
- conda config --add channels conda-forge
- - conda update -q conda python
#---------------... |
corteva__rioxarray-126 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.crs",
"rioxarray/rioxarray.py:XRasterBase.write_crs"
],
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase"
]
},
"file":... | corteva/rioxarray | 62ec2cf90c19c6a7d99b07b1987d2874dfec009d | Use CRS.from_cf when retrieving the CRS
Since the `pyproj.CRS` class is there, might be worthwhile to use the `from_cf` option when getting the CRS in case they didn't use `open_rasterio`.
| diff --git a/docs/history.rst b/docs/history.rst
index a82c1a91..55ceddbc 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -4,6 +4,7 @@ History
Latest
-------
- rio.reproject: change input kwarg dst_affine_width_height -> shape & transform (#125)
+- ENH: Use pyproj.CRS to read/write CF parameters (issue #124)... |
corteva__rioxarray-133 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.isel_window",
"rioxarray/rioxarray.py:RasterArray.clip"
],
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase",
"rioxarray/rio... | corteva/rioxarray | e9aa3ee7f9ef4f2a696736f42acc8a80b13a0074 | BUG: Clip with disjoint geometries drops parts not desired
Problem: https://gis.stackexchange.com/questions/361896/how-to-keep-the-cell-size-fixed-when-clipping-a-netcdf-tiff-with-a-shapefile-usi
Potential solution: Replace `drop=True` in the `where` method and instead use: https://rasterio.readthedocs.io/en/latest/... | diff --git a/docs/history.rst b/docs/history.rst
index cf5c4702..da9c0abd 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,7 +3,8 @@ History
Latest
-------
-
+- BUG: Fix order of axis in `rio.isel_window` (pull #133)
+- BUG: Allow clipping with disjoint geometries (issue #132)
0.0.28
-------
diff --gi... |
corteva__rioxarray-149 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.__init__"
],
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase"
]
},
"file": "rioxarray/rioxarray.py"
}
] | corteva/rioxarray | a7528d0f167d26a65ad3ba98f52b8f96410323e5 | Write the coordinate CF attributes according to the CRS
https://pyproj4.github.io/pyproj/latest/build_crs_cf.html
The reading of the units from the coordinates will likely not be supported due to dependency on `cf-units`.
What can be improved/added:
1. Writing coordinate systems (projected versus geographic ins... | diff --git a/docs/history.rst b/docs/history.rst
index bf5f8b78..9541813d 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -10,7 +10,7 @@ Latest
- BUG: Write transform based on window in rio.isel_window (pull #145)
- ENH: Add `rio.count`, `rio.slice_xy()`, `rio.bounds()`, `rio.resolution()`, `rio.transform_bou... |
corteva__rioxarray-166 | [
{
"changes": {
"added_entities": [
"rioxarray/rioxarray.py:_ensure_nodata_dtype"
],
"added_modules": [
"rioxarray/rioxarray.py:_ensure_nodata_dtype"
],
"edited_entities": [
"rioxarray/rioxarray.py:RasterArray.write_nodata",
"rioxarray/rioxarray.py:Ra... | corteva/rioxarray | 0ed5ff429158b124bcd2e57fc0c48418c944733e | Incorrect missing value handling when _FillValue is float
I am working with [this raster file](https://github.com/corteva/rioxarray/files/5226354/no2_2019_01.tif.zip) which was generated (I believe) with R.
```python
>>> import rioxarray
>>> raster = rioxarray.open_rasterio('no2_2019_01.tif')
>>> raster.attrs
{... | diff --git a/docs/history.rst b/docs/history.rst
index 2a483959..fc6bac04 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -4,6 +4,7 @@ History
Latest
------
- BUG: Ensure transform correct in rio.clip without coords (pull #165)
+- BUG: Ensure the nodata value matches the dtype (pull #166)
0.0.31
------
d... |
corteva__rioxarray-178 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:RasterDataset.crs",
"rioxarray/rioxarray.py:RasterDataset.to_raster"
],
"edited_modules": [
"rioxarray/rioxarray.py:RasterDataset"
]
},
"... | corteva/rioxarray | 1d29a13c4b20b4c7cc2d3317c8a7a84c9c722026 | rioxarray export to_raster and CRS being dropped - user error or bug?
hi there @snowman2
I have a question about CRS persistence when you export a raster using rioxarray. It seems like when we begin to squeeze dimensions from the data, that the CRS gets dropped. I tried to reset the CRS before exporting to a geotiff ... | diff --git a/docs/history.rst b/docs/history.rst
index 7937a3d1..ac181108 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,7 +3,7 @@ History
Latest
------
-
+- BUG: Check all CRS are the same in the dataset in crs() method
0.1.0
------
diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index... |
corteva__rioxarray-182 | [
{
"changes": {
"added_entities": [
"rioxarray/rioxarray.py:XRasterBase.estimate_utm_crs"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase"
]
},
"file": "rioxarray/rioxarray.py"
}
] | corteva/rioxarray | 23fe5e455a2a42d733fdaffe83253b97943f6d3b | Add estimate UTM CRS method
Essentially would be: https://github.com/geopandas/geopandas/pull/1646
Could use the `bounds()` to get the centroid. | diff --git a/.travis.yml b/.travis.yml
index e9dbd6fc..8c32b17b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -54,7 +54,7 @@ before_install:
- conda config --add channels conda-forge
- conda config --set channel_priority strict
# Create conda environment
-- conda create -n test python=$PYTHON_VERSION rasterio scipy ... |
corteva__rioxarray-226 | [
{
"changes": {
"added_entities": [
"rioxarray/raster_array.py:_clip_from_disk",
"rioxarray/raster_array.py:_clip_xarray"
],
"added_modules": [
"rioxarray/raster_array.py:_clip_from_disk",
"rioxarray/raster_array.py:_clip_xarray"
],
"edited_entities":... | corteva/rioxarray | f73b34bc687849861a73f69fbf0d236307cc7e46 | Add mask & bbox arguments to open_rasterio
Is it possible to to use `rioxarray` to read only a section of a file? What I'm thinking would work similarly to [`clip`](https://corteva.github.io/rioxarray/stable/rioxarray.html#rioxarray.rioxarray.RasterArray.clip) or `clip_box` but would not require a full array in memory.... | diff --git a/docs/examples/clip_geom.ipynb b/docs/examples/clip_geom.ipynb
index faa6f929..ba723f7d 100644
--- a/docs/examples/clip_geom.ipynb
+++ b/docs/examples/clip_geom.ipynb
@@ -4,7 +4,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Example - Clip"
+ "# Example - Clip\n",
+ "\n... |
corteva__rioxarray-23 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:RasterArray.nodata",
"rioxarray/rioxarray.py:RasterArray.clip",
"rioxarray/rioxarray.py:RasterArray.to_raster",
"rioxarray/rioxarray.py:RasterDataset.clip"... | corteva/rioxarray | 8605b618c696a24271f8c87ea405a463364f602f | In to_raster, check for original raster object profile for writing to raster

| diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index acb5a1f4..1d791fc8 100644
--- a/rioxarray/rioxarray.py
+++ b/rioxarray/rioxarray.py
@@ -375,11 +375,16 @@ class RasterArray(XRasterBase):
self._obj.attrs.get("fill_value", self._obj.attrs.get("nodata")),
),
... |
corteva__rioxarray-255 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:open_rasterio"
],
"edited_modules": [
"rioxarray/_io.py:open_rasterio"
]
},
"file": "rioxarray/_io.py"
},
{
"changes": {
"added_entities"... | corteva/rioxarray | 0804791a44f65ac4f303dd286e94b3eaee81f72b | open_rasterio throws AttributeError after updating new xarray version 0.17.0
<!-- Please search existing issues to avoid creating duplicates. -->
rioxarray.open_rasterio(raster) was working fine. Today I updated xarray to the new release 0.17.0 and now rioxarray.open_rasterio thows an AttributeError
#### Code Sampl... | diff --git a/docs/history.rst b/docs/history.rst
index 3a05ae6e..9bd50498 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,7 @@ History
Latest
------
+- BUG: Compatibility changes with xarray 0.17 (issue #254)
0.3.0
------
diff --git a/rioxarray/_io.py b/rioxarray/_io.py
index 4d4644e1..930ab767 ... |
corteva__rioxarray-256 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.interpolate_na"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
}
] | corteva/rioxarray | 63ce87f92835897d46aaa270f5ec07aca4e72cda | interpolate_na raises TypeError when using `rioxarray.open_rasterio` instead of `xarray.open_rasterio`
#### Code Sample
The following causes a crash:
```python
import xarray
import rioxarray
file_url = 'https://neo.sci.gsfc.nasa.gov/archive/geotiff.float/MY1DMW_CHLORA/MY1DMW_CHLORA_2020-03-21.FLOAT.TIFF'
ds... | diff --git a/rioxarray/raster_array.py b/rioxarray/raster_array.py
index f77531fd..287ad8f2 100644
--- a/rioxarray/raster_array.py
+++ b/rioxarray/raster_array.py
@@ -789,6 +789,12 @@ class RasterArray(XRasterBase):
:obj:`xarray.DataArray`:
An interpolated :obj:`xarray.DataArray` object.
... |
corteva__rioxarray-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:RasterArray.clip",
"rioxarray/rioxarray.py:RasterDataset.clip"
],
"edited_modules": [
"rioxarray/rioxarray.py:RasterArray",
"rioxarray/rioxarra... | corteva/rioxarray | dc78983b1a6974253cf385399abab076721274ba | add `drop` option to `clip()`
Looks like the clip function in QGIS defaults to match the extent of the masked geometry:

But, it also has the option to keep the original resolution of the original raster. I ... | diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index a067afc4..1d791fc8 100644
--- a/rioxarray/rioxarray.py
+++ b/rioxarray/rioxarray.py
@@ -755,7 +755,7 @@ class RasterArray(XRasterBase):
return cl_array
- def clip(self, geometries, crs, all_touched=False):
+ def clip(self, geometries,... |
corteva__rioxarray-274 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:open_rasterio"
],
"edited_modules": [
"rioxarray/_io.py:open_rasterio"
]
},
"file": "rioxarray/_io.py"
}
] | corteva/rioxarray | fa4a9358bd24493c08b54ee55ab0e64f9ab2f360 | open_rasterio fails when lock=True
https://corteva.github.io/rioxarray/stable/rioxarray.html#rioxarray-open-rasterio says using `open_rasterio` with `lock=True` is valid, but doing so gives an error. This option is also described in https://corteva.github.io/rioxarray/stable/examples/read-locks.html.
```
import rio... | diff --git a/docs/examples/read-locks.ipynb b/docs/examples/read-locks.ipynb
index 4a78b375..99015806 100644
--- a/docs/examples/read-locks.ipynb
+++ b/docs/examples/read-locks.ipynb
@@ -150,7 +150,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "With `lock=True` the initial read is slower (s... |
corteva__rioxarray-284 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "rioxarray/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.... | corteva/rioxarray | 0b32bd0ca1f52304a8ebb8260f44e8a4994055f9 | Add full support for xarray `decode_coords`
*xarray* 0.17.0 has introduced a way to optionally keep most auxiliary variables associated with a main variable, including `grid_mapping`, inside the corresponding `DataArray`: https://github.com/pydata/xarray/pull/2844
See: http://xarray.pydata.org/en/stable/weather-clim... | diff --git a/docs/history.rst b/docs/history.rst
index f7475a45..38575cf1 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,9 @@ History
Latest
------
+- DEP: Python 3.6+ (issue #215)
+- DEP: xarray 0.17+ (needed for issue #282)
+- REF: Store `grid_mapping` in `encoding` instead of `attrs` (issue #282... |
corteva__rioxarray-307 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:open_rasterio"
],
"edited_modules": [
"rioxarray/_io.py:open_rasterio"
]
},
"file": "rioxarray/_io.py"
},
{
"changes": {
"added_entities"... | corteva/rioxarray | f3e4423010c785e281234a1ecbcc8e35901d4562 | Keep in memory original data type for writing
It could be very nice to keep in memory the original data type (ie. `uint16` for landsat data or `uint8` for classified data).
Indeed, for now (unless I missed something), if we open a dataset with `masked=True` and the data is casted to float, we lose the information of... | diff --git a/docs/history.rst b/docs/history.rst
index 2732124a..5448ef84 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -12,6 +12,7 @@ Latest
- BUG: Return correct transform in `rio.transform` with non-rectilinear transform (discussions #280)
- BUG: Update to handle WindowError in rasterio 1.2.2 (issue #286... |
corteva__rioxarray-319 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:_decode_datetime_cf",
"rioxarray/_io.py:_load_subdatasets",
"rioxarray/_io.py:open_rasterio"
],
"edited_modules": [
"rioxarray/_io.py:_decode_datetim... | corteva/rioxarray | 9f92e893f390ac1ddf649432bcc36757248207a0 | open_rasterio fails on NetCDF files with non-standard time units
<!-- Please search existing issues to avoid creating duplicates. -->
#### Code Sample
NOTE: The dataset is available from the [LUH2 site](http://gsweb1vh2.umd.edu/LUH2/LUH2_v2f/MESSAGE/multiple-states_input4MIPs_landState_ScenarioMIP_UofMD-MESSAGE... | diff --git a/docs/history.rst b/docs/history.rst
index dd91a886..b9b0820c 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -9,6 +9,7 @@ Latest
- ENH: enable `engine="rasterio"` via xarray backend API (issue #197 pull #281)
- ENH: Generate 2D coordinates for non-rectilinear sources (issue #290)
- ENH: Add `enc... |
corteva__rioxarray-33 | [
{
"changes": {
"added_entities": [
"rioxarray/_io.py:_parse_tags"
],
"added_modules": [
"rioxarray/_io.py:_parse_tags"
],
"edited_entities": [
"rioxarray/_io.py:RasterioArrayWrapper.__init__",
"rioxarray/_io.py:open_rasterio"
],
"edited_m... | corteva/rioxarray | c6aeebd97ddb8eafec7b02b73f1d91ac7be4421a | `open_rasterio` support subdatasets
It would be a nice feature to be able to load in subdatasets from rasterio. | diff --git a/rioxarray/_io.py b/rioxarray/_io.py
index 55f32887..8974ca49 100644
--- a/rioxarray/_io.py
+++ b/rioxarray/_io.py
@@ -12,7 +12,7 @@ from collections import OrderedDict
from distutils.version import LooseVersion
import numpy as np
-from xarray import DataArray
+from xarray import DataArray, Dataset
fro... |
corteva__rioxarray-346 | [
{
"changes": {
"added_entities": [
"rioxarray/_io.py:FileHandleLocal.__init__",
"rioxarray/_io.py:ThreadURIManager.__init__",
"rioxarray/_io.py:ThreadURIManager.file_handle",
"rioxarray/_io.py:ThreadURIManager.close",
"rioxarray/_io.py:ThreadURIManager.__del__",
... | corteva/rioxarray | b7d5999ce7ce4015a004a402d64cd29c6cbd056b | overview not read when specifying chunks or lock
#### Code Sample, a copy-pastable example if possible
```python
import rasterio
import rioxarray
# from https://openaerialmap.org/
cog_url = (
"https://oin-hotosm.s3.amazonaws.com/"
"5d7dad0becaf880008a9bc88/0/5d7dad0becaf880008a9bc89.tif"
)
```
... | diff --git a/.flake8 b/.flake8
index 06ffc9b5..fdcf6e3d 100644
--- a/.flake8
+++ b/.flake8
@@ -1,6 +1,7 @@
[flake8]
max_line_length = 88
ignore =
+ E501 # line too long - let black handle that
C408 # Unnecessary dict/list/tuple call - rewrite as a literal
E203 # whitespace before ':' - doesn't work well... |
corteva__rioxarray-347 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:URIManager.acquire"
],
"edited_modules": [
"rioxarray/_io.py:URIManager"
]
},
"file": "rioxarray/_io.py"
}
] | corteva/rioxarray | 59a4ba52a122cd6783cbe8bde943a6afcd8a78ce | overview not read when specifying chunks or lock
#### Code Sample, a copy-pastable example if possible
```python
import rasterio
import rioxarray
# from https://openaerialmap.org/
cog_url = (
"https://oin-hotosm.s3.amazonaws.com/"
"5d7dad0becaf880008a9bc88/0/5d7dad0becaf880008a9bc89.tif"
)
```
... | diff --git a/docs/history.rst b/docs/history.rst
index 85e39503..217dc863 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,7 +3,7 @@ History
Latest
------
-
+- BUG: pass kwargs with lock=False (issue #344)
0.4.0
------
diff --git a/rioxarray/_io.py b/rioxarray/_io.py
index 0924175f..aeda3b7a 100644
--... |
corteva__rioxarray-36 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.set_crs",
"rioxarray/rioxarray.py:RasterArray.crs"
],
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase",
"rioxarray/rioxarra... | corteva/rioxarray | 535dbfb20cddc556d3978c6c1023de0a38a55b4e | Add support for initializing from datacube CRS
https://github.com/opendatacube/datacube-core/blob/develop/datacube/utils/geometry/_base.py
Currently it raises an exception as it cannot initialize from it. Thinking about checking for the `crs_str` attribute. | diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index 077148da..6309aff5 100644
--- a/rioxarray/rioxarray.py
+++ b/rioxarray/rioxarray.py
@@ -245,6 +245,8 @@ class XRasterBase(object):
Dataset with crs attribute.
"""
+ if hasattr(input_crs, "wkt"):
+ input_crs = input_... |
corteva__rioxarray-370 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:_make_dst_affine",
"rioxarray/raster_array.py:RasterArray.reproject"
],
"edited_modules": [
"rioxarray/raster_array.py:_make_dst_affine",
"r... | corteva/rioxarray | 47bc0b8219bea94134c10c2a7e8e619d72d8f055 | ENH: Allow passing in arguments into `rasterio.warp.transform` in `rio.reproject`
https://rasterio.readthedocs.io/en/latest/api/rasterio.warp.html#rasterio.warp.reproject
There are additional arguments that could be passed in such as:
```
gcps (sequence of GroundControlPoint, optional) β Ground control points for ... | diff --git a/docs/history.rst b/docs/history.rst
index 75761f5e..1b6eced8 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,7 +3,10 @@ History
Latest
------
-- BUG: Remove duplicate acquire in open_rasterio
+- ENH: Allow passing in kwargs to `rio.reproject` (issue #369; pull #370)
+- ENH: Allow nodata over... |
corteva__rioxarray-383 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.isel_window"
],
"edited_modules": [
"rioxarray/rioxarray.py:XRasterBase"
]
},
"file": "rioxarray/rioxarray.py"
}
] | corteva/rioxarray | 038d81fa244585030f1e354499accf58d372d2db | negative window col_off results in 0 width result from isel_window
<!-- Please search existing issues to avoid creating duplicates. -->
#### Code Sample, a copy-pastable example if possible
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you:
http://matthewrocklin.... | diff --git a/docs/history.rst b/docs/history.rst
index e3880a81..2c78cac3 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,7 @@ History
Latest
------
+- ENH: Add pad option to `rio.isel_window` (issue #381; pull #383)
0.5.0
------
diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index... |
corteva__rioxarray-388 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:RasterioArrayWrapper._getitem"
],
"edited_modules": [
"rioxarray/_io.py:RasterioArrayWrapper"
]
},
"file": "rioxarray/_io.py"
}
] | corteva/rioxarray | 008c2a2c6f0147bd5e075fe6984eb8b636bd0bfc | IndexError on compute() when using mask_and_scale=True and dask chunking along band dimension
#### Code Sample, a copy-pastable example if possible
[tmp.tif.gz](https://github.com/corteva/rioxarray/files/6920344/tmp.tif.gz)
```python
import xarray as xr
import rioxarray as rxr
rs = rxr.open_rasterio("tmp.tif",... | diff --git a/docs/history.rst b/docs/history.rst
index dfe640f7..732d0f9e 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,7 @@ History
Latest
------
+- BUG: Fix indexing error when `mask_and_scale=True` was combined with band dim chunking (issue #387, pull #388)
0.6.0
------
diff --git a/rioxarr... |
corteva__rioxarray-42 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "rioxarray/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modul... | corteva/rioxarray | b392c61b4af4759a110173e794e05c5299dd8ed3 | Add set_attrs/update_attrs methods (or an equivalent)
Currently, you could set the nodata or crs metadata in the attrs, but it won't be re-discovered if you already attempted to access them (reguardless if it was found or not). These methods would reset the cache properly so the accessor knows to re-search for these pr... | diff --git a/rioxarray/__init__.py b/rioxarray/__init__.py
index d75dff25..5746e0ec 100644
--- a/rioxarray/__init__.py
+++ b/rioxarray/__init__.py
@@ -6,5 +6,5 @@ __author__ = """rioxarray Contributors"""
__email__ = "alansnow21@gmail.com"
import rioxarray.rioxarray # noqa
-from rioxarray._version import __version... |
corteva__rioxarray-448 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.reproject_match"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
}
] | corteva/rioxarray | 76064a80c256bcfceb8865a251f88d1eebb189f5 | `reproject_match` swap coordinates order and leads to error in array summation
Hi I'm not sure this is a bug or not, but feels like it depends on `reproject_match` function rather than `xarray` summation operations. Here below I set up a minimal reproducible example to explain what's going on.
## Objective
"Resampl... | diff --git a/.pylintrc b/.pylintrc
index 04a56ce1..2e5f6c13 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -339,7 +339,7 @@ indent-string=' '
max-line-length=100
# Maximum number of lines in a module.
-max-module-lines=1000
+max-module-lines=1200
# Allow the body of a class to be on the same line as the declaratio... |
corteva__rioxarray-51 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.crs",
"rioxarray/rioxarray.py:XRasterBase.write_crs",
"rioxarray/rioxarray.py:RasterArray.crs",
"rioxarray/rioxarray.py:RasterDataset.crs"
... | corteva/rioxarray | c8c6bea318768430f95f40c51ba1d4b10a70ccb8 | Drop python 2 support
It will be removed in rasterio, fiona. Already dropped in pyproj. | diff --git a/rioxarray/rioxarray.py b/rioxarray/rioxarray.py
index 28597969..ad8eaf99 100644
--- a/rioxarray/rioxarray.py
+++ b/rioxarray/rioxarray.py
@@ -11,7 +11,6 @@ datacube is licensed under the Apache License, Version 2.0:
"""
import copy
-from abc import abstractmethod
from datetime import datetime
impor... |
corteva__rioxarray-518 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.reproject"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
}
] | corteva/rioxarray | 7344ea34d7525a6be89fab7c020855108b3ea565 | BUG: `rio.reproject()` does not return 'x' and 'y' coordinates (GCPS)
I also find it surprising that `rio.reproject()` does not return 'x' and 'y' coordinates, I find myself doing the following and wondering if I've overlooked an easier way or the rationale for not doing this by default:
```python
from rioxarray.ri... | diff --git a/docs/history.rst b/docs/history.rst
index 102f0f3c..8d23fd43 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -4,6 +4,7 @@ History
Latest
------
- BUG: Fix WarpedVRT param cache in :func:`rioxarray.open_rasterio` (issue #515)
+- BUG: Always generate coordinates in `rio.reproject` when GCPS|RPCS p... |
corteva__rioxarray-560 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.clip_box"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
},
{
"ch... | corteva/rioxarray | f9ce51ed06359a1fe81ac9c3fde3906551b84e25 | "incorrect" bounds (clip_box, pad_box)
#### Code Sample
```python
ds = xr.Dataset(None, {"x": range(5), "y": range(5)})
ds.rio.bounds()
```
This returns `(-0.5, 4.5, 4.5, -0.5)`, where the values represent `xmin, ymin, xmax, ymax` I believe. As you can see, `ymin > ymax`. I can solve this by assuring that the ... | diff --git a/docs/history.rst b/docs/history.rst
index 7563f87e..78f583d7 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -5,6 +5,7 @@ Latest
------
- BUG: Fix reading file handle with dask (issue #550)
- BUG: Fix reading cint16 files with dask (issue #542)
+- BUG: Ensure `rio.bounds` ordered correctly (issu... |
corteva__rioxarray-575 | [
{
"changes": {
"added_entities": [
"rioxarray/_io.py:_get_unsigned_dtype",
"rioxarray/_io.py:_parse_netcdf_attr_array",
"rioxarray/_io.py:_pop_global_netcdf_attrs_from_vars"
],
"added_modules": [
"rioxarray/_io.py:_get_unsigned_dtype",
"rioxarray/_io.py:... | corteva/rioxarray | f23d3d44928272e560ca2bab65494331ed816139 | to_raster() save function changes original data
# to_raster() function modifying original variable values on output
I added a reproducible script below and attached a link to the data.
#### Code Sample
```python
import rioxarray
import xarray as xr
import numpy as np
from pyproj import CRS
# Open data... | diff --git a/docs/history.rst b/docs/history.rst
index 5a028e21..a7b459e0 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,7 @@ History
Latest
------
+- BUG: Handle `_Unsigned` and load in all attributes (pull #575)
0.12.0
-------
diff --git a/rioxarray/_io.py b/rioxarray/_io.py
index 629ba27f..d... |
corteva__rioxarray-600 | [
{
"changes": {
"added_entities": [
"rioxarray/_io.py:SingleBandDatasetReader.__init__",
"rioxarray/_io.py:SingleBandDatasetReader.__getattr__",
"rioxarray/_io.py:SingleBandDatasetReader.count",
"rioxarray/_io.py:SingleBandDatasetReader.nodata",
"rioxarray/_io.py:Sin... | corteva/rioxarray | 2a70aa9e20e8f488424230f3d1a9df480da37118 | ENH: Add ability to load bands as data_vars
@alexamici brought this up in #197 and has been something I have thought about for a while and haven't come up with a great solution yet.
`xarray-gdal` implementation: https://github.com/bopen/xarray-gdal/blob/main/xarray_gdal/xarray_plugin.py
Benefits:
- It could pote... | diff --git a/.pylintrc b/.pylintrc
index d7961212..f7feea52 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -15,7 +15,7 @@ enable=c-extension-no-member
[FORMAT]
-max-module-lines=1200
+max-module-lines=1250
[DESIGN]
max-locals=20
diff --git a/docs/history.rst b/docs/history.rst
index 175a28ae..6c9675e1 100644
--- a/... |
corteva__rioxarray-647 | [
{
"changes": {
"added_entities": [
"rioxarray/_io.py:_ensure_warped_vrt",
"rioxarray/_io.py:SingleBandDatasetReader._create_vrt",
"rioxarray/_io.py:SingleBandDatasetReader.name"
],
"added_modules": [
"rioxarray/_io.py:_ensure_warped_vrt"
],
"edited_e... | corteva/rioxarray | 33a1be6f1bc3e30cb6d8c1a002d04f439dfb510f | band_as_variable ignores VRT warping
```python
import rasterio as rio
from rasterio import crs
from rasterio.enums import Resampling
from rasterio.vrt import WarpedVRT
import rioxarray
import xarray as xr
resampling = 'average'
warp_args : dict = {
'resampling': Resampling._member_map_[resampling],
... | diff --git a/docs/history.rst b/docs/history.rst
index 1034c6f3..64392041 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -5,6 +5,7 @@ Latest
------
- DEP: Drop Python 3.8 support (issue #582)
- DEP: pin rasterio>=1.2 (pull #642)
+- BUG: Fix WarpedVRT in :func:`rioxarray.open_rasterio` when band_as_variable=... |
corteva__rioxarray-667 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:_get_rasterio_attrs"
],
"edited_modules": [
"rioxarray/_io.py:_get_rasterio_attrs"
]
},
"file": "rioxarray/_io.py"
},
{
"changes": {
"add... | corteva/rioxarray | 4c0aef19ad0c4ff81d94395eb62b605738a7b26c | ValueError: cannot convert float NaN to integer on `open_rasterio`
#### Code Sample, a copy-pastable example if possible
```python
import rioxarray as rx
import xarray as xr
with xr.open_rasterio('https://seaice.uni-bremen.de/data/amsr2/asi_daygrid_swath/n3125/2021/oct/Arctic3125/asi-AMSR2-n3125-20211001-v5.4.t... | diff --git a/docs/history.rst b/docs/history.rst
index 5224cff6..c3946214 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,7 +3,8 @@ History
Latest
------
-- BUG: Fix :mod:`rioxarray.merge` CRS check
+- BUG: Fix :mod:`rioxarray.merge` CRS check (pull #655)
+- BUG: Remove tags with metadata added by raster... |
corteva__rioxarray-68 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/_io.py:_get_rasterio_attrs"
],
"edited_modules": [
"rioxarray/_io.py:_get_rasterio_attrs"
]
},
"file": "rioxarray/_io.py"
},
{
"changes": {
"add... | corteva/rioxarray | 21a315d24f89ed406c70d7c88b368e0a7fd17369 | Write out metadata to tif files on export
1. Preserve attributes in the tags
2. Band names: https://gis.stackexchange.com/a/284242/144357 | diff --git a/rioxarray/_io.py b/rioxarray/_io.py
index 7931571e..aac5d51c 100644
--- a/rioxarray/_io.py
+++ b/rioxarray/_io.py
@@ -272,7 +272,7 @@ def _get_rasterio_attrs(riods, masked):
# The offset values for the raster bands
attrs["offsets"] = riods.offsets
if hasattr(riods, "descriptions") an... |
corteva__rioxarray-769 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_dataset.py:RasterDataset.reproject_match"
],
"edited_modules": [
"rioxarray/raster_dataset.py:RasterDataset"
]
},
"file": "rioxarray/raster_dataset.py"... | corteva/rioxarray | 9b9401f43a211597a2d712d4d65be781e676182a | `reproject_match` raises `MissingSpatialDimensionError` with spatial dims set
#### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import xarray as xr
import rioxarray
lat = [0.1, 0.15, 0.2]
lon = [0.1, 0.15, 0.2]
data = np.arange(1, 10).reshape(3, 3)
ds = xr.Dataset(
... | diff --git a/docs/history.rst b/docs/history.rst
index ccb14e52..5b33117d 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -3,6 +3,7 @@ History
Latest
------
+- BUG:reproject_match: Remove setting spatial dims on output resampled dataset (issue #768)
0.15.3
------
diff --git a/rioxarray/raster_dataset.py... |
corteva__rioxarray-787 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.__init__",
"rioxarray/rioxarray.py:XRasterBase._get_obj",
"rioxarray/rioxarray.py:XRasterBase.write_gcps",
"rioxarray/rioxarray.py:XRasterBase.... | corteva/rioxarray | 98abd84b07c78b7eaf6300ae445a70585fc0dde1 | Having dict-encoded GCPs leads to `to_netcdf` failing with a `TypeError`
#### Code Sample
```python
import xarray as xr
import rioxarray
from rasterio.control import GroundControlPoint
from rasterio.crs import CRS
ds = xr.Dataset(dict(A=xr.DataArray([1.0])))
gcps = [GroundControlPoint(row=0, col=0, x=10, y... | diff --git a/docs/history.rst b/docs/history.rst
index 7819e42e..40237617 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -4,6 +4,7 @@ History
Latest
------
- BUG: Raise OverflowError when nodata data type conversion is unsafe (pull #782)
+- BUG: Support writing GCPs to netCDF (issue #778)
0.15.5
------
... |
corteva__rioxarray-79 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/rioxarray.py:_write_metatata_to_raster"
],
"edited_modules": [
"rioxarray/rioxarray.py:_write_metatata_to_raster"
]
},
"file": "rioxarray/rioxarray.py"
}
] | corteva/rioxarray | ba6c3f6e84772ab8916c1e5b998893a727652475 | Saving a RasterArray with a float nodata value encodes it as a string and transform information is corrupted
I'm on the most recent version of rioxarray, .18
The data file I'm using, "NEON-DS-Airborne-Remote-Sensing/HARV/DTM/HARV_dtmCrop.tif" can be downloaded here: https://ndownloader.figshare.com/articles/2009586/... | diff --git a/docs/history.rst b/docs/history.rst
index 92a22940..f4260842 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -1,6 +1,11 @@
History
=======
+0.0.19
+-------
+- Add support for writing scales & offsets to raster (pull #79)
+- Don't write standard raster metadata to raster tags (issue #78)
+
0.0.... |
corteva__rioxarray-793 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.clip_box"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
},
{
"ch... | corteva/rioxarray | 85290b1a095e418e1a12c00b3ecb560181090d95 | Document difference between `set_crs` and `write_crs`
`set_crs`:
> Set the CRS value for the Dataset/DataArray without modifying the dataset/data array.
`write_crs`:
> Write the CRS to the dataset in a CF compliant manner.
The `input_crs` and `inplace` arguments are the same; the only difference in signatur... | diff --git a/docs/getting_started/crs_management.ipynb b/docs/getting_started/crs_management.ipynb
index d6f94bde..54511d46 100644
--- a/docs/getting_started/crs_management.ipynb
+++ b/docs/getting_started/crs_management.ipynb
@@ -527,7 +527,9 @@
"This modifies the `xarray.Dataset` or `xarray.DataArray` and sets t... |
corteva__rioxarray-796 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"rioxarray/raster_array.py:RasterArray.clip_box"
],
"edited_modules": [
"rioxarray/raster_array.py:RasterArray"
]
},
"file": "rioxarray/raster_array.py"
},
{
"ch... | corteva/rioxarray | 85290b1a095e418e1a12c00b3ecb560181090d95 | "At least one of the clipped raster x,y coordinates has only one point" Error when using rio.clip_box
Hi,
I am a beginner using the package to read rasters in a lazy mode.
I ran into this error message that seems should only occur when doing the integration test instead of general usage: "At least one of the cl... | diff --git a/docs/history.rst b/docs/history.rst
index 1dc5c5ac..4b0aa59b 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -1,8 +1,9 @@
History
=======
-Latest
+0.16.0
------
+- ENH: Add `allow_one_dimensional_raster` option to `rio.clip_box` (issue #708)
0.15.7
------
diff --git a/rioxarray/raster_arra... |
corteva__rioxarray-8 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"rioxarray/exceptions.py:TooManyDimensions",
"rioxarray/exceptions.py:InvalidDimensionOrder"
],
"edited_entities": null,
"edited_modules": null
},
"file": "rioxarray/exceptions.py"
},
{
"chang... | corteva/rioxarray | ba18c367b3e9617d925c5228f231020b426406b2 | Add ability to export to geotiff
It would be useful to write the dataframe out to a geotiff file. | diff --git a/rioxarray/exceptions.py b/rioxarray/exceptions.py
index acf629e6..723a3915 100644
--- a/rioxarray/exceptions.py
+++ b/rioxarray/exceptions.py
@@ -18,3 +18,11 @@ class OneDimensionalRaster(RioXarrayError):
class SingleVariableDataset(RioXarrayError):
"""This is for when you have a dataset with a sin... |
corteva__rioxarray-99 | [
{
"changes": {
"added_entities": [
"rioxarray/rioxarray.py:_get_data_var_message"
],
"added_modules": [
"rioxarray/rioxarray.py:_get_data_var_message"
],
"edited_entities": [
"rioxarray/rioxarray.py:XRasterBase.set_spatial_dims",
"rioxarray/rioxarray... | corteva/rioxarray | 5b6bc6986404aab6ec4f4f1ecb3194b7ba0e26fe | Cannot clip: x dimension not found
#### Code Sample, a copy-pastable example if possible
```python
data = xr.open_dataset('https://oceandata.sci.gsfc.nasa.gov:443/opendap/MODIST/L3SMI/2020/001/T2020001.L3m_DAY_CHL_chl_ocx_4km.nc')
data = data.rename({"lon": "longitude", "lat": "latitude"})
data.rio.set_spatial_... | diff --git a/docs/history.rst b/docs/history.rst
index c35367d3..27a12cb2 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -1,6 +1,10 @@
History
=======
+0.0.24
+------
+- ENH: Add variable names to error messages for clarity (pull #99)
+
0.0.23
------
- BUG: Fix 'rio.set_spatial_dims' so information save... |
cosimoNigro__agnpy-151 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"agnpy/emission_regions/blob.py:Blob.__init__"
],
"edited_modules": [
"agnpy/emission_regions/blob.py:Blob"
]
},
"file": "agnpy/emission_regions/blob.py"
}
] | cosimoNigro/agnpy | b72c94fa5c205284e0e3ee7a37072f3ccfc97c7b | d_L parameter in blob definition spoiling older code and examples
Hi @cosimoNigro
I realized that you added a possibility to set d_L independently in PR #138
https://github.com/cosimoNigro/agnpy/blob/b72c94fa5c205284e0e3ee7a37072f3ccfc97c7b/agnpy/emission_regions/blob.py#L56-L58
This is a bit of a nuisance for th... | diff --git a/agnpy/emission_regions/blob.py b/agnpy/emission_regions/blob.py
index ab3aa0f..c6aec43 100644
--- a/agnpy/emission_regions/blob.py
+++ b/agnpy/emission_regions/blob.py
@@ -48,13 +48,15 @@ class Blob:
size of the array of electrons Lorentz factors
gamma_p_size : int
size of the array ... |
cosmicBboy__pandera-64 | [
{
"changes": {
"added_entities": [
"pandera/pandera.py:_get_fn_argnames"
],
"added_modules": [
"pandera/pandera.py:_get_fn_argnames"
],
"edited_entities": [
"pandera/pandera.py:check_input"
],
"edited_modules": [
"pandera/pandera.py:check... | cosmicBboy/pandera | 3c96cb1ef97dc818ec047f5745a3341d5d70993e | handle `self` argument when using check_input in class method when str obj_getter is supplied
Check is the wrapped function is a class method:
https://stackoverflow.com/questions/5963729/check-if-a-function-is-a-method-of-some-object
if so, ignore the first argument. | diff --git a/pandera/pandera.py b/pandera/pandera.py
index b11eaa4..c191f6c 100644
--- a/pandera/pandera.py
+++ b/pandera/pandera.py
@@ -684,9 +684,8 @@ class Column(SeriesSchemaBase):
then assumes one of the valid pandas string values:
http://pandas.pydata.org/pandas-docs/stable/basics.html#d... |
cosmicBboy__pandera-67 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pandera/pandera.py:Hypothesis.relationships",
"pandera/pandera.py:Hypothesis._check_fn",
"pandera/pandera.py:Hypothesis.two_sample_ttest"
],
"edited_modules": [
"pand... | cosmicBboy/pandera | be330262bb9ff5cfb4499215e1ae70ead1e9ee52 | for two sample hypothesis tests, standardize API
For a more intuitive API, two sample `Hypothesis` tests class method definitions should look like this:
```python
def two_sample_hypothesis_test(
cls, groupby, group1, group2, relationship, alpha=0.01,
equal_var=True, nan_policy="propagate")
```
which i... | diff --git a/docs/source/hypothesis.rst b/docs/source/hypothesis.rst
index e709003..e978d3b 100644
--- a/docs/source/hypothesis.rst
+++ b/docs/source/hypothesis.rst
@@ -27,11 +27,13 @@ can be made about the relationships between ``Column``\s.
schema = DataFrameSchema({
"height_in_feet": Column(Float, [
... |
cosmoquester__speech-recognition-36 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"speech_recognition/measure.py:SparseCategoricalCrossentrophy.call"
],
"edited_modules": [
"speech_recognition/measure.py:SparseCategoricalCrossentrophy"
]
},
"file": "s... | cosmoquester/speech-recognition | 64420143977280c151afe08ee5e3687d21ff17c9 | LAS training so slow
- LAS training too slow on GPU
- LAS training TPU not support | diff --git a/speech_recognition/measure.py b/speech_recognition/measure.py
index 62515b8..e1fd6ce 100644
--- a/speech_recognition/measure.py
+++ b/speech_recognition/measure.py
@@ -17,7 +17,7 @@ class SparseCategoricalCrossentrophy(tf.keras.losses.Loss):
def call(self, y_true, y_pred):
loss = tf.keras.l... |
couler-proj__couler-83 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"couler/core/run_templates.py:run_container"
],
"edited_modules": [
"couler/core/run_templates.py:run_container"
]
},
"file": "couler/core/run_templates.py"
},
{
... | couler-proj/couler | 0002c779f997aa7942c669c4355f0b487ee0a2ad | Add `WorkingDir` field when creating containers | diff --git a/couler/core/run_templates.py b/couler/core/run_templates.py
index 7596a38..b94d5b6 100644
--- a/couler/core/run_templates.py
+++ b/couler/core/run_templates.py
@@ -98,6 +98,7 @@ def run_container(
enable_ulogfs=True,
daemon=False,
volume_mounts=None,
+ working_dir=None,
):
"""
... |
couler-proj__couler-89 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"couler/core/run_templates.py:run_container"
],
"edited_modules": [
"couler/core/run_templates.py:run_container"
]
},
"file": "couler/core/run_templates.py"
},
{
... | couler-proj/couler | c51142ebf2af3945abfbea30f5b50e8860687d3b | Support node selector for scheduling pods
An example in Argo Workflows: https://github.com/argoproj/argo/blob/master/examples/node-selector.yaml
cc @inohmonton99 | diff --git a/couler/core/run_templates.py b/couler/core/run_templates.py
index b94d5b6..35a08b4 100644
--- a/couler/core/run_templates.py
+++ b/couler/core/run_templates.py
@@ -99,6 +99,7 @@ def run_container(
daemon=False,
volume_mounts=None,
working_dir=None,
+ node_selector=None,
):
"""
... |
coverahealth__dataspec-15 | [
{
"changes": {
"added_entities": [
"src/dataspec/factories.py:_str_is_email_address"
],
"added_modules": [
"src/dataspec/factories.py:_str_is_email_address"
],
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/factories.py"
}
] | coverahealth/dataspec | b314d36fab96cb63477c1d95c734e3bd0f807ed5 | Support email address string format
Applications commonly need to validate that an email address is at least in a valid format. Python features the [`email.headerregistry.Address`](https://docs.python.org/3/library/email.headerregistry.html#email.headerregistry.Address) object which parses email address strings and can... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9629beb..cf8c599 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add conforming string formats (#3)
- Add ISO time string format (#4)
- Allow type-checking specs to be crea... |
coverahealth__dataspec-20 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/dataspec/api.py:SpecAPI"
]
},
"file": "src/dataspec/api.py"
},
{
"changes": {
"added_entities": [
"src/dataspec/factories.py:_url_at... | coverahealth/dataspec | 59d81c6b0d23480f866c7661bfa23d02fc2f6b4d | Create URL string validator factory
In #8, we will add a `s.str(format_="url")` string format to check that a string contains something which can be considered a URL. However, nearly any string can be considered a valid URL, so this is not terribly useful outside of limited cases. I think it would be more useful to add... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5751826..8f7b79b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add ISO time string format (#4)
- Allow type-checking specs to be created by passing a type directly to `s` ... |
coverahealth__dataspec-21 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
... | coverahealth/dataspec | 10e8d508329849446ee5c630888be4e4db5f52e4 | Support arbitrary ISO timestamps using dateutil
Currently, the string formatters for ISO date, datetimes, and times actually come from Python's `fromisoformat` staticmethods on each of those respective classes (added in Python 3.7). Those methods do not parse arbitrary ISO 8601 formatted strings and therefore are relat... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8f7b79b..58388aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow type-checking specs to be created by passing a type directly to `s` (#12)
- Add email address string f... |
coverahealth__dataspec-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/factories.py:bytes_spec",
"src/dataspec/factories.py:_make_datetime_spec_factory"
],
"edited_modules": [
"src/dataspec/factories.py:bytes_spec",
"src/dat... | coverahealth/dataspec | 33db5f2971e92bffd750680d864b4a4418e8fe6f | `s.date`, `s.inst`, and `s.time` allow `before` and `after` disagreement
Each of the date/time related Spec factories (`s.date`, `s.inst`, and `s.time`) allow their `before` and `after` conditions to disagree (that is: `before` may be after `after`). | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 126f278..ce02a63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,9 +18,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- `s.all` and `s.any` create `ValidatorSpec`s now rather than `PredicateSpec`s
which yield ric... |
coverahealth__dataspec-28 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/dataspec/api.py:SpecAPI"
]
},
"file": "src/dataspec/api.py"
},
{
"changes": {
"added_entities": [
"src/dataspec/factories.py:_obj_at... | coverahealth/dataspec | bb36543adc0db6fc2a5f1af4a2f5155d98192a4a | Upgrade string email formatter check to a full spec factory
The existing `email` string format checker is fine, but it doesn't allow some of the deeper checks you may want to perform on an email address such as username or domain checks (similar to what we have now in `s.url`. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce02a63..8f91622 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,11 +19,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `s.all` and `s.any` create `ValidatorSpec`s now rather than `PredicateSpec`s
which yield richer error de... |
coverahealth__dataspec-30 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/factories.py:_make_datetime_spec_factory"
],
"edited_modules": [
"src/dataspec/factories.py:_make_datetime_spec_factory"
]
},
"file": "src/dataspec/factori... | coverahealth/dataspec | 5474509121f7b4d78e7e99c35e681202df358a81 | Support `strptime` formats for `s.date`, `s.inst`, and `s.time`
We should add support for `datetime.strptime` to let users specify arbitrary string format strings for `s.date`, `s.inst`, and `s.time` spec factories. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8f91622..a261bc1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add email address string format (#6)
- Add URL string format factory `s.url` (#16)
- Add Python `dateutil` ... |
coverahealth__dataspec-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/factories.py:any_spec"
],
"edited_modules": [
"src/dataspec/factories.py:any_spec"
]
},
"file": "src/dataspec/factories.py"
}
] | coverahealth/dataspec | 1666f6fef501c133589501bd86c8d61559d276e3 | `s.any` specs do not conform values using matching conformer
Specs created with `s.any` will not conform using the conformer of the matching Spec (if any).
```python
class PhoneType(Enum):
HOME = "Home"
MOBILE = "Mobile"
OFFICE = "Office"
phone_type = s.any(
"phone_type",
s(
{... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2479c78..f4beab9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow `s.str`'s `regex` kwarg to be a pre-existing pattern returned from
`re.compile` (#36)
+### Fixed
+- ... |
coverahealth__dataspec-4 | [
{
"changes": {
"added_entities": [
"src/dataspec/impl.py:_str_is_iso_time"
],
"added_modules": [
"src/dataspec/impl.py:_str_is_iso_time"
],
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/impl.py"
}
] | coverahealth/dataspec | 55a75c05b68e815a16fa10b2311a741ca4087fb2 | Support ISO time strings
Currently, we support using `datetime.fromisoformat` and `date.fromisoformat` to check strings for a subset of ISO timestamps and dates. Python 3.7+ also has `time.fromisoformat`, which can validate a subset of ISO time strings.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9436e01..e88328b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add an exact length validator to the string spec factory (#2)
- Add conforming string formats (#3)
... |
coverahealth__dataspec-42 | [
{
"changes": {
"added_entities": [
"src/dataspec/base.py:_enum_conformer"
],
"added_modules": [
"src/dataspec/base.py:_enum_conformer"
],
"edited_entities": [
"src/dataspec/base.py:make_spec"
],
"edited_modules": [
"src/dataspec/base.py:m... | coverahealth/dataspec | 70c2a947f0df85649b4e20f6c26e3f6df10838cd | Enum conformers fail to conform valid Enum values
Using the example from #35:
```python
from enum import Enum
from dataspec import s
class PhoneType(Enum):
HOME = "Home"
MOBILE = "Mobile"
OFFICE = "Office"
phone_type = s.any(
"phone_type",
s(
{"H", "M", "O", ""},
... | diff --git a/src/dataspec/base.py b/src/dataspec/base.py
index e9364a9..7f07262 100644
--- a/src/dataspec/base.py
+++ b/src/dataspec/base.py
@@ -486,6 +486,22 @@ class ObjectSpec(DictSpec):
raise TypeError("Cannot use a default conformer for an Object")
+def _enum_conformer(e: EnumMeta) -> Conformer:
+ ... |
coverahealth__dataspec-47 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/dataspec/api.py:SpecAPI"
]
},
"file": "src/dataspec/api.py"
},
{
"changes": {
"added_entities": [
"src/dataspec/factories.py:blankab... | coverahealth/dataspec | 21b1850683d8b2737c4d8114c8c7a5b7d948d911 | `s.blankable` for optional string values
For optional object-type values, `dataspec` includes `s.nilable`. These values may be _either_ a value conforming to their input Spec, _or_ `None`. However, stringly-typed Specs don't have an equivalent utility factory.
`dataspec` should have `s.blankable` which is allows val... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f497a74..7699e9c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### A... |
coverahealth__dataspec-55 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/base.py:pred_to_validator",
"src/dataspec/base.py:make_spec"
],
"edited_modules": [
"src/dataspec/base.py:pred_to_validator",
"src/dataspec/base.py:make_... | coverahealth/dataspec | cc1879448aac512d1da4003c427e12bd1a793f10 | Predicates decorated by `pred_to_validator` are not properly converted into Validator Specs
```python
from dataspec import s, pred_to_validator
>>> @pred_to_validator("This value is invalid")
... def is_valid(v) -> bool:
... return bool(v)
...
>>> spec = s(is_valid)
>>> spec
PredicateSpec(tag='is_valid', ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a35155c..26d754a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Add `SpecPredicate` and `tag_maybe` to the public interface (#49)
+### Fixed
+- Predicates decora... |
coverahealth__dataspec-56 | [
{
"changes": {
"added_entities": [
"src/dataspec/base.py:compose_spec_conformers"
],
"added_modules": [
"src/dataspec/base.py:compose_spec_conformers"
],
"edited_entities": [
"src/dataspec/base.py:ValidatorSpec.from_validators",
"src/dataspec/base.py... | coverahealth/dataspec | f65a48f0e3f80ccae3fe7492ca20f1689fb4fd27 | Alternate conformers replace default conformers
In lots of builtin Spec factories, alternate conformers (passed via `conformer=...` keyword argument to the Spec factory) will overwrite the existing default conformers, which often apply useful logic (in the case of `s.date(format_="...")` the conformer will convert the ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26d754a..19f8470 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Predicates decorated by `pred_to_validator` will now properly be converted into
validator specs... |
coverahealth__dataspec-59 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/__version__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited... | coverahealth/dataspec | 2bcd7cfb26b39ad703ac9f5581abb39dfe5c9ff3 | Mapping Specs could default child Spec tags from the dictionary key
Mapping Specs often require repeating the key in the child Spec tag:
```python
s(
"user-profile",
{
"id": s.str("id", format_="uuid"),
"first_name": s.str("first_name"),
"last_name": s.str("last_name"),
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0668e0..b31b0fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
-
+###... |
coverahealth__dataspec-62 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/base.py:DictSpec.validate",
"src/dataspec/base.py:make_spec"
],
"edited_modules": [
"src/dataspec/base.py:DictSpec",
"src/dataspec/base.py:make_spec"
... | coverahealth/dataspec | 6cc2c3b5b1f3b78453d3a2bb9ccc86899ff7ca90 | `s(None)` throws an exception
```
>>> from dataspec import s
>>> s(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/christopher/Projects/dataspec/src/dataspec/api.py", line 101, in __call__
return make_spec(*args, conformer=conformer)
File "/Users/christopher/Pr... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2672046..cc15b9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the value spec tags are derived automatically from the corresponding dict keys (#52)
- Add documentation bui... |
coverahealth__dataspec-63 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspec/factories.py:bytes_spec"
],
"edited_modules": [
"src/dataspec/factories.py:bytes_spec"
]
},
"file": "src/dataspec/factories.py"
}
] | coverahealth/dataspec | b9d24ea23f7d4ce7d7f52785abad4b90c50449e1 | `s.bytes` should include regex matching
The Python `re` module allows defining regex patterns on `bytes` types in addition to `str` types, so `s.bytes` should allow defining a regex on bytes. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc15b9a..7339d07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `s.dict_tag` as a convenience factory for building mapping specs for which
the value spec tags are deriv... |
coverahealth__dataspec-66 | [
{
"changes": {
"added_entities": [
"src/dataspec/base.py:Spec.compose_conformer",
"src/dataspec/base.py:ObjectSpec.from_val",
"src/dataspec/base.py:SetSpec.from_enum"
],
"added_modules": null,
"edited_entities": [
"src/dataspec/base.py:Spec._conformer",
... | coverahealth/dataspec | 1850998a57c036392365827024429508c458e511 | `Spec.with_conformer` never really replaces the default conformer
Builtin `Spec` types often apply default conformers using the `Spec._default_conform` method, which makes it impossible to override the builtin conformer. Furthermore, it's unclear from the existing `Spec.with_conformer` method that you are not able to r... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7339d07..e961abe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
the value spec tags are derived automatically from the corresponding dict keys (#52)
- Add documentation bu... |
coverahealth__dataspec-72 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspe... | coverahealth/dataspec | 3da98affcdad7a3598843298170b9e94a50df0ee | Add functionality for merging mapping Specs
It is not possible to merge multiple mapping Specs together right now without defining a custom Spec. Using `s.all` would result in losing any keys whose Specs are defined in later Specs during conformation. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e961abe..9f6fb1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add a `regex` validator to the `s.bytes` factory (#37)
- Added `Spec.compose_conformer` to allow composition... |
coverahealth__dataspec-76 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/dataspec/api.py:SpecAPI"
]
},
"file": "src/dataspec/api.py"
},
{
"changes": {
"added_entities": [
"src/dataspec/base.py:kv_spec"
... | coverahealth/dataspec | 3b4da00d792de4ce5b1ab361e31f1a8a408f3391 | Add functionality for validating generic map Specs
Normal mapping Specs involve defining specific keys with Specs for each, but it may be useful occasionally to validate dictionaries with generic key/value Specs similar to collection Specs:
```python
s.map("map_spec", str, s.str(regex="\d+"))
``` | diff --git a/.circleci/config.yml b/.circleci/config.yml
index fa1fa12..68e7d61 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -18,6 +18,7 @@ jobs:
shell: /bin/bash -leo pipefail
environment:
TOX_NUM_CORES: 2
+ TOX_PARALLEL_NO_SPINNER: 1
TOX_SH... |
coverahealth__dataspec-80 | [
{
"changes": {
"added_entities": [
"src/dataspec/base.py:ErrorDetails.as_map",
"src/dataspec/base.py:Spec.validate_all"
],
"added_modules": null,
"edited_entities": [
"src/dataspec/base.py:Spec.validate_ex"
],
"edited_modules": [
"src/dataspec/... | coverahealth/dataspec | 293ba51c6522227f970466411291c893e01e4f82 | ErrorDetails instance should be easy to convert to dicts
ErrorDetails instances may be emitted to log streams or returned via APIs, so they should include a convenience method for converting to a simple dict. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f6fb1e..b2e117f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `Spec.compose_conformer` to allow composition of new conformers with existing
conformers (#65)
- Ad... |
coverahealth__dataspec-81 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/dataspe... | coverahealth/dataspec | 159f15bdef1ee650a9aedb403665c633b82b7ce5 | `ErrorDetails.via` often includes unexpected values
With builtin Spec factories, the value of `ErrorDetails.via` often includes inner Spec tags that users may not be expecting:
```
>>> s.str("numstr", regex="\d+").validate_all("hey")
[
ErrorDetails(
message="String 'hey' does match regex '\\d+'",
... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 68e7d61..ccf5ef0 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -7,7 +7,7 @@ jobs:
steps:
- checkout
- restore_cache:
- key: deps-v1-{{ .Branch }}-{{ checksum "requirements.txt" }}
+ key: deps-v2-{{ .Bra... |
coverahealth__dataspec-83 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"src/dataspec/base.py:_KeySpec"
],
"edited_entities": [
"src/dataspec/base.py:DictSpec.from_val",
"src/dataspec/base.py:DictSpec.validate",
"src/dataspec/base.py:DictSpec.merge"
],
"edit... | coverahealth/dataspec | 2fba98a61212d5d731551f1aed0d07f4a887feb8 | Keys marked with `s.opt` in a mapping Spec will be out of order after conformation
The default conformer for mapping Specs using `s.opt` always places optional keys at the end of the conformed map. No one should be relying on the ordering of the conformed keys, but it may still be worthwhile to preserve that key order ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a66036..91cde72 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Previously, Spec factories such as `s.str` would inject tags for child validators
such as `str_matches_reg... |
coverahealth__dataspec-88 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/dataspec/__version__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/data... | coverahealth/dataspec | 8643fb012521db1e3633b4b12c445b750bc70868 | Blankable and nilable spec conformers can return INVALID even when validation passes
Due to some changes in #81 to `s.blankable` and `s.nilable`, default conformers for both spec types can return `INVALID` even if the validation logic considers the input value valid.
```
>>> from dataspec import s
>>> spec = s.bla... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e2d058..e1705c1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### F... |
cpplint__cpplint-115 | [
{
"changes": {
"added_entities": [
"cpplint.py:ReplaceAlternateTokens"
],
"added_modules": [
"cpplint.py:ReplaceAlternateTokens"
],
"edited_entities": [
"cpplint.py:unicode_escape_decode",
"cpplint.py:ProcessExtensionsOption",
"cpplint.py:Par... | cpplint/cpplint | 3847a79a9e4f9e0fc16527e6f8a00cb1b93dd9ca | --exclude not work on Windows with cpplint 1.4.4 Python 3.7.3
I'm trying to use cpplint for code static analysis and here I'm in the trouble with excluded directories :(
Long time ago I used a batch script to list all directory and files into a file list and feed cpplint to get the results, but there's distadvantage... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a161699..77ca865 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,21 +1,19 @@
name: Test
-
-on: [push, pull_request_target]
-
+on: [push, pull_request]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
... |
cpplint__cpplint-288 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cpplint.py:CheckTrailingSemicolon"
],
"edited_modules": [
"cpplint.py:CheckTrailingSemicolon"
]
},
"file": "cpplint.py"
}
] | cpplint/cpplint | 820df48adb3cdd557759c5e34d66533680f0b290 | C++20 concepts require a semicolon after the braces
I have a code part like:
```C++
template <typename T>
concept IndexableToChar = requires(T t) {
{ t[0] } -> std::convertible_to<char>;
};
```
And cpplint says `You don't need a ; after a } [readability/braces] [4]`. But here this `;` is needed, otherwise t... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 03cb330..a537585 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -20,6 +20,7 @@ A bunch of long-overdue modernizations of the codebase!
* Indented functions inside namespaces will now be correctly erred on, courtesy of @Yujinmon (https://github.com/cpplint/cpplint/pul... |
cpplint__cpplint-318 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cpplint.py:ProcessGlobalSuppresions",
"cpplint.py:ProcessGlobalSuppressions",
"cpplint.py:ProcessFileData"
],
"edited_modules": [
"cpplint.py:ProcessGlobalSuppresions... | cpplint/cpplint | 9107df4b45e04dd281eadd9bf3287aed95a2bad7 | Skip C++-specific warnings for C code
For source code files with `.[cChH]` extension, please skip warnings meant for C++ code, so that programmers don't accidentally introduce C++-isms into their C code.
Example: readability/casting and runtime/int should be disabled for C code.
As a workaround, I am disabling th... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d22b664..a481c65 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -8,7 +8,8 @@ Changelog
Yet another overdue... hotfix. Sorry this took so long.
* The false positive for indented function parameters in namespaces was eradicated. (https://github.com/cpplint/cpplint/p... |
craffel__mir_eval-157 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mir_eval/sonify.py:chroma",
"mir_eval/sonify.py:chords"
],
"edited_modules": [
"mir_eval/sonify.py:chroma",
"mir_eval/sonify.py:chords"
]
},
"file": "mi... | craffel/mir_eval | 3a6a8ce53eb7974db52104a834210b505b43f711 | sonify.chroma and sonify.chords should pass **kwargs to time_frequency
So that `length` and `function` can be set. | diff --git a/mir_eval/sonify.py b/mir_eval/sonify.py
index 23703e3..66a8319 100644
--- a/mir_eval/sonify.py
+++ b/mir_eval/sonify.py
@@ -125,7 +125,7 @@ def time_frequency(gram, frequencies, times, fs, function=np.sin, length=None):
return output
-def chroma(chromagram, times, fs):
+def chroma(chromagram, time... |
craffel__mir_eval-195 | [
{
"changes": {
"added_entities": [
"mir_eval/sonify.py:pitch_contour"
],
"added_modules": [
"mir_eval/sonify.py:pitch_contour"
],
"edited_entities": null,
"edited_modules": null
},
"file": "mir_eval/sonify.py"
}
] | craffel/mir_eval | f858df347c05c83159875e8f6de84f0041dbabca | continuous pitch sonification
As per [this discussion](https://github.com/marl/jams/pull/91), we could pull in the code from @justinsalamon 's [melosynth](https://github.com/justinsalamon/melosynth) package. | diff --git a/mir_eval/sonify.py b/mir_eval/sonify.py
index f614684..a40a0d0 100644
--- a/mir_eval/sonify.py
+++ b/mir_eval/sonify.py
@@ -5,6 +5,8 @@ All functions return a raw signal at the specified sampling rate.
import numpy as np
from numpy.lib.stride_tricks import as_strided
+from scipy.interpolate import inte... |
craffel__mir_eval-208 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "evaluators/separation_eval.py"
},
{
"changes": {
"added_entities": [
"mir_eval/io.py:_open"
],
"added_modules": [
"m... | craffel/mir_eval | 4425853f27d9039bd48c985fe4ef0c29b53a9385 | use context managers for open file handles
In ```io.py``` ```load_delimited``` and ```load_ragged_delimited```:
[This line](https://github.com/craffel/mir_eval/blob/master/mir_eval/io.py#L59) could leak file descriptors if there's an error anywhere below (before the call to close). Replace with ```with my_open(buf_o... | diff --git a/evaluators/separation_eval.py b/evaluators/separation_eval.py
index 2f6bde1..a9c8e0b 100755
--- a/evaluators/separation_eval.py
+++ b/evaluators/separation_eval.py
@@ -12,6 +12,7 @@ import argparse
import sys
import os
import glob
+import os
import numpy as np
import eval_utilities
diff --git a/mir_... |
craffel__mir_eval-249 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mir_eval/util.py:interpolate_intervals"
],
"edited_modules": [
"mir_eval/util.py:interpolate_intervals"
]
},
"file": "mir_eval/util.py"
}
] | craffel/mir_eval | 6f8ee58f437dd9b8f54b3c9700e7b4dc3879853f | mir_eval.util.intervals_to_samples expected behavior
What's the intended behavior for `mir_eval.util.intervals_to_samples`?
In the following example:
```python
import numpy as np
import mir_eval
intervals = np.array(
[[0.2, 0.49],
[0.8, 0.9]]
)
labels = ['a', 'b']
sample_times, sample_labels = mir... | diff --git a/mir_eval/util.py b/mir_eval/util.py
index 1df1142..0ce9130 100644
--- a/mir_eval/util.py
+++ b/mir_eval/util.py
@@ -129,11 +129,11 @@ def intervals_to_samples(intervals, labels, offset=0, sample_size=0.1,
def interpolate_intervals(intervals, labels, time_points, fill_value=None):
"""Assign labels to ... |
craffel__mir_eval-297 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mir_eval/transcription_velocity.py:match_notes"
],
"edited_modules": [
"mir_eval/transcription_velocity.py:match_notes"
]
},
"file": "mir_eval/transcription_velocity.py... | craffel/mir_eval | 73886e52e0e29a840d5fabf0148b6b78574d4790 | transcription+velocity metrics fail when there is no matching
The implementation recently added in #283, it fails with an unexpected exception when there is zero match between the reference and the estimated.
```python
from numpy import array
from mir_eval.transcription_velocity import precision_recall_f1_overlap... | diff --git a/mir_eval/transcription_velocity.py b/mir_eval/transcription_velocity.py
index 223f487..c7aac28 100644
--- a/mir_eval/transcription_velocity.py
+++ b/mir_eval/transcription_velocity.py
@@ -174,6 +174,9 @@ def match_notes(
# Convert matching list-of-tuples to array for fancy indexing
matching = n... |
craffel__mir_eval-374 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mir_eval/sonify.py:time_frequency"
],
"edited_modules": [
"mir_eval/sonify.py:time_frequency"
]
},
"file": "mir_eval/sonify.py"
}
] | craffel/mir_eval | 7997fdf3972f992209eaf144f37c18926fa3c960 | sonify.time_frequency regression
@leighsmith looks like modernizing the tests #370 surfaced a bug in the optimization of time_frequency sonification #355
The bug only seems to show up in the chord sonification, which goes through chordβchroma and chromaβtime_frequency. It works fine when `length=None` is used, but... | diff --git a/mir_eval/sonify.py b/mir_eval/sonify.py
index c3b3cdd..45d059f 100644
--- a/mir_eval/sonify.py
+++ b/mir_eval/sonify.py
@@ -200,13 +200,10 @@ def time_frequency(
# Create the time-varying scaling for the entire time interval by the piano roll
# magnitude and add to the accumulating wave... |
craigjmidwinter__total-connect-client-164 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": [
"total_connect_client/zone.py:TotalConnectZone.is_type_temperature",
"total_conn... | craigjmidwinter/total-connect-client | f8f406eb72cb12274372e7c36ec3c00d078679db | total_connect_client.zone Unknown Zone Type after upgrade
I just upgraded to Home Assistant 2021.11.1, after doing so my log is being spammed with these messages.
2021-11-08 18:38:49 ERROR (SyncWorker_8) [total_connect_client.zone] unknown ZoneType 50 in OrderedDict([('AlarmTriggerTime', None), ('AlarmTriggerTimeLoc... | diff --git a/README.md b/README.md
index 4e87c67..edc5339 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,10 @@ The code currently supports:
If you're having trouble with your system, or find an error message, we may ask you to submit information about your alarm system. To do that from the command line do the... |
craigjmidwinter__total-connect-client-174 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"total_connect_client/const.py:ArmingState.is_armed_home"
],
"edited_modules": [
"total_connect_client/const.py:ArmingState"
]
},
"file": "total_connect_client/const.py"... | craigjmidwinter/total-connect-client | 1bc255da4ea000e553fe98041154a1b7857c9fbe | unknown ArmingState 10230
Initially reported at https://github.com/home-assistant/core/issues/64303
```txt
unknown ArmingState 10230 in OrderedDict([('PartitionID', 1), ('ArmingState', 10230), ('IsAlarmResponded', False), ('AlarmTriggerTimeLocalized', None), ('PartitionName', 'Main'), ('IsStayArmed', False), ('IsFi... | diff --git a/total_connect_client/const.py b/total_connect_client/const.py
index a927fc8..ea43e74 100644
--- a/total_connect_client/const.py
+++ b/total_connect_client/const.py
@@ -22,6 +22,7 @@ class ArmingState(Enum):
ARMED_AWAY_BYPASS = 10202
ARMED_STAY = 10203
ARMED_STAY_OTHER = 10226
+ ARMED_STAY... |
craigjmidwinter__total-connect-client-178 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"total_connect_client/const.... | craigjmidwinter/total-connect-client | af1a7f38b11432284c3f28e8418380b4403e43f6 | Honeywell ProA7Plus Errors
I got some errors in my log, looking at the times and the zones these areas are from I believe they are codes for Zone Tamper and Arming Away with a bypass. Attached are the errors. Let me know if you need any specific information and I can get it for you.
unknown partition ArmingState 10... | diff --git a/ALARM_STATUS.md b/ALARM_STATUS.md
index b0d9b90..1e35f93 100644
--- a/ALARM_STATUS.md
+++ b/ALARM_STATUS.md
@@ -22,8 +22,15 @@ Code | Status
10213 | Alarming Carbon Monoxide
10214 | Disarmed not ready to arm - zone(s) faulted
10218 | Armed Stay Night
+10219 | Armed Stay Night Bypass. Reported by ProA7 ... |
craigjmidwinter__total-connect-client-206 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"total_connect_client/location.py:TotalConnectLocation._update_zone_details"
],
"edited_modules": [
"total_connect_client/location.py:TotalConnectLocation"
]
},
"file": ... | craigjmidwinter/total-connect-client | 746ec69379f4fe650e9318bb991673989f5a3ac0 | PartialResponseError on startup
See https://github.com/home-assistant/core/issues/91703
User can see status in TC app and website, but cannot load data via Home Assistant.
Full log at original ticket above, but basic issue is here:
```txt
File "/usr/local/lib/python3.10/site-packages/total_connect_client/loca... | diff --git a/README.md b/README.md
index bafe6cc..12dabd9 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# Total-Connect-Client
-Total-Connect-Client is a python client for interacting with the TotalConnect2 alarm system.
+Total-Connect-Client is a python client for interacting with the [TotalConnect2](https:/... |
crate__crate-python-472 | [
{
"changes": {
"added_entities": [
"src/crate/client/sqlalchemy/compiler.py:CrateCompiler.limit_clause"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/crate/client/sqlalchemy/compiler.py:CrateCompiler"
]
},
"file": "src/cra... | crate/crate-python | 2742729300647c3702753c32f26f1ef560e06bec | SQLParseException[line 4:8: no viable alternative at input 'LIMIT -']
### Problem
```
sqlalchemy.exc.ProgrammingError: (crate.client.exceptions.ProgrammingError) SQLParseException[line 4:8: no viable alternative at input 'LIMIT -']
[SQL: SELECT testdrive.id, testdrive.name, testdrive.age, testdrive.gender
FROM test... | diff --git a/CHANGES.txt b/CHANGES.txt
index 5e99d18..6d080ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,10 @@ Unreleased
- Added a generic data type converter to the ``Cursor`` object, for converting
fetched data from CrateDB data types to Python data types.
+- Fixed generating appropriate syntax for ... |
crate__crate-python-474 | [
{
"changes": {
"added_entities": [
"src/crate/client/sqlalchemy/compiler.py:CrateDDLCompiler.visit_computed_column"
],
"added_modules": null,
"edited_entities": [
"src/crate/client/sqlalchemy/compiler.py:CrateDDLCompiler.get_column_specification"
],
"edited_mo... | crate/crate-python | ab6f03a5a1bf36bb6abc465bf3107fe94e85a4fc | Support generated columns
Using the SQLAlchemy ORM mapper, in PostgreSQL, you can define a table with a generated column. Which is essential for generating partitioned time-series tables. Using `crate-python`, `Computed` isn't supported.
---
Using PostgreSQL, this script generated a table with a generated column:... | diff --git a/CHANGES.txt b/CHANGES.txt
index 6d080ad..3292708 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@ Unreleased
that SQL statement clauses like ``LIMIT -1`` could have been generated. Both
PostgreSQL and CrateDB only accept ``LIMIT ALL`` instead.
+- Added support for computed columns in th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.