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 |
|---|---|---|---|---|---|
allrod5__parameters-validation-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"parameters_validation/builtin_validations.py:_build_arg"
],
"edited_modules": [
"parameters_validation/builtin_validations.py:_build_arg"
]
},
"file": "parameters_valid... | allrod5/parameters-validation | 42d116873d426360b5e2f26726c02c5044968714 | Patching the validate_parameters decorator
### Problem description
With the actual state of the library it is not intuitive how to write tests for methods that use the validate_parameters decorator. Because decorators are called at the moment that the python module is imported, to patch the decorator we need to disrup... | diff --git a/README.md b/README.md
index 49dd10f..c44f8e9 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,51 @@ def foo(df: log_to_debug(str)):
# do something
```
+## Skipping validations
+
+For whatever reason, if one wants to skip validations a method `skip_validations` is
+appended to the decorated metho... |
allrod5__parameters-validation-3 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
],
"edited_modules": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
... | allrod5/parameters-validation | 8a36fbaa01780960d8963fba35aae3f06efcc6a5 | Decorated function can not return right value.
I think I found a bug.
**How to reproduce:**
```python
from parameters_validation import non_null, validate_parameters
@validate_parameters
def concat(front: str, back: non_null(str)):
result = None
if front:
result = front + '-' + back
pr... | diff --git a/parameters_validation/validate_parameters_decorator.py b/parameters_validation/validate_parameters_decorator.py
index 877f496..7aea24b 100644
--- a/parameters_validation/validate_parameters_decorator.py
+++ b/parameters_validation/validate_parameters_decorator.py
@@ -33,6 +33,6 @@ def validate_parameters(f... |
allrod5__parameters-validation-6 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
],
"edited_modules": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
... | allrod5/parameters-validation | 611c5d4744dde3354ee7e8460d199bc79ee4af94 | `strongly_typed` validation does not work with default parameters
Attempting to use `strongly_typed` validation on default parameters will break the code.
```python
from parameters_validation import validate_parameters, strongly_typed
@validate_parameters
def foo(a: strongly_typed(str) = "default value"):
... | diff --git a/parameters_validation/validate_parameters_decorator.py b/parameters_validation/validate_parameters_decorator.py
index 7aea24b..4cc3d7c 100644
--- a/parameters_validation/validate_parameters_decorator.py
+++ b/parameters_validation/validate_parameters_decorator.py
@@ -24,10 +24,7 @@ def validate_parameters(... |
allrod5__parameters-validation-9 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
],
"edited_modules": [
"parameters_validation/validate_parameters_decorator.py:validate_parameters"
... | allrod5/parameters-validation | 900a9aff357d7e931a7aabdbe3a68fe00a29c526 | Validations on parameters with default values aren't performed
Using validations on parameters with default values won't work. Apparently, just the default value is validated.
This bug was introduced after #7.
```python
from parameters_validation import non_blank, validate_parameters
@validate_parameters
def... | diff --git a/parameters_validation/validate_parameters_decorator.py b/parameters_validation/validate_parameters_decorator.py
index 2fa2cf3..fa843a6 100644
--- a/parameters_validation/validate_parameters_decorator.py
+++ b/parameters_validation/validate_parameters_decorator.py
@@ -41,12 +41,12 @@ def validate_parameters... |
almarklein__asgineer-31 | [
{
"changes": {
"added_entities": [
"asgineer/_app.py:asgineer_application",
"asgineer/_app.py:_handle_lifespan",
"asgineer/_app.py:_handle_websocket",
"asgineer/_app.py:_handle_http"
],
"added_modules": [
"asgineer/_app.py:asgineer_application",
... | almarklein/asgineer | 57abd177fc14ab57c8599b2893796ca31ebe6a2b | Make use of ASGI 3.0 | diff --git a/.travis.yml b/.travis.yml
index cfdea4d..5fa533a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,14 +3,6 @@
language: python
-# use container-based infrastructure
-# sudo : false
-
-# Trick to get 3.7 working for now
-# https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-405506964
-dist: ... |
almarklein__asgineer-32 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgineer/utils.py:make_asset_handler"
],
"edited_modules": [
"asgineer/utils.py:make_asset_handler"
]
},
"file": "asgineer/utils.py"
},
{
"changes": {
"ad... | almarklein/asgineer | ba2a9bdbd2af8893d26437fd07785fcd23caf5f8 | Dont compress files that already are
`make_asset_handler()` compresses all files above a certain size, including e.g. `.png`. Instead, it should only use the compressed version if it's 90% or less of the original. | diff --git a/asgineer/utils.py b/asgineer/utils.py
index 8a3c28d..eee51c6 100644
--- a/asgineer/utils.py
+++ b/asgineer/utils.py
@@ -11,14 +11,16 @@ from ._app import normalize_response, guess_content_type_from_body
__all__ = ["normalize_response", "make_asset_handler", "guess_content_type_from_body"]
+VIDEO_EXTEN... |
almarklein__asgineer-35 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgineer/utils.py:make_asset_handler"
],
"edited_modules": [
"asgineer/utils.py:make_asset_handler"
]
},
"file": "asgineer/utils.py"
}
] | almarklein/asgineer | dbd7fd111c5aa3a7f3ad1374441e0062bd4cd5f4 | Asset handler should not return a body for HEAD requests. | diff --git a/asgineer/utils.py b/asgineer/utils.py
index fffe0fd..893d0e7 100644
--- a/asgineer/utils.py
+++ b/asgineer/utils.py
@@ -140,6 +140,11 @@ def make_asset_handler(assets, max_age=0, min_compress_size=256):
else:
body = assets[path]
+ # The response to a head request should not i... |
altair-viz__altair-1075 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v2/api.py:TopLevelMixin.transform_filter"
],
"edited_modules": [
"altair/vegalite/v2/api.py:TopLevelMixin"
]
},
"file": "altair/vegalite/v2/api.py"
}
... | altair-viz/altair | c578fda2c2e19fb2345a7dd878e019b9edac1f51 | SelectionNot is not appropriately serialized
See https://github.com/altair-viz/altair/issues/695#issuecomment-411506890 and https://github.com/altair-viz/altair/issues/695#issuecomment-411536841 | diff --git a/CHANGES.md b/CHANGES.md
index dc755b43..8f2a9392 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -18,6 +18,11 @@
- ``alt.SortField`` renamed to ``alt.EncodingSortField`` and ``alt.WindowSortField`` renamed to ``alt.SortField`` (https://github.com/vega/vega-lite/pull/3741)
+### Bug Fixes
+
+- Fixed seriali... |
altair-viz__altair-1092 | [
{
"changes": {
"added_entities": [
"altair/vegalite/v2/api.py:_consolidate_data"
],
"added_modules": [
"altair/vegalite/v2/api.py:_consolidate_data"
],
"edited_entities": [
"altair/vegalite/v2/api.py:_dataset_name",
"altair/vegalite/v2/api.py:_prepar... | altair-viz/altair | 2fbbb9ae469c4a8306462e0fcc81f8df57b29776 | Altair 2.2 losses format property of InlineData object
~~~python
data = alt.InlineData(
values={'a':[{'b': 0}, {'b': 1}, {'b': 2}]},
format=alt.DataFormat(
type='json',
property='a',
))
chart = alt.Chart(
data
).mark_tick(
).encode(
x=... | diff --git a/altair/vegalite/v2/api.py b/altair/vegalite/v2/api.py
index f0bf2a67..dc8f10a7 100644
--- a/altair/vegalite/v2/api.py
+++ b/altair/vegalite/v2/api.py
@@ -17,18 +17,50 @@ from .theme import themes
# ------------------------------------------------------------------------
# Data Utilities
-def _dataset_n... |
altair-viz__altair-1433 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "altair/examples/interactive_cross_highlight.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": ... | altair-viz/altair | 5cdf0cc3a96159a4eac81a1beec3a0c9efae722d | Altair selections resolve incorrectly as scale domain values.
I am observing this issue in Altair 2.x. Apologies if this issue has already been addressed for v3!
The following code for an overview + detail plot fails:
```python
brush = alt.selection_interval(encodings=['x']);
base = alt.Chart().mark_area().en... | diff --git a/CHANGES.md b/CHANGES.md
index e0b1d71b..4f0dae9f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,8 +1,8 @@
# Altair Change Log
-## Version 3.0.0rc1 (prerelease)
+## Version 3.0.0 (unreleased)
-Update to Vega-Lite 3.0 and Vega 5.0 & support all new features. See
+Update to Vega-Lite 3.2 and Vega 5.0 & s... |
altair-viz__altair-1493 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v3/api.py:TopLevelMixin.repeat",
"altair/vegalite/v3/api.py:EncodingMixin.encode"
],
"edited_modules": [
"altair/vegalite/v3/api.py:TopLevelMixin",
"a... | altair-viz/altair | 5894423b359fcd911defab1495dd7e7b89f65bfe | repeat() function is borked in Altair 3
Need to make certain ``alt.repeat()`` and ``alt.Chart.repeat()`` work correctly together and support wrapped repeats. | diff --git a/altair/vegalite/v3/api.py b/altair/vegalite/v3/api.py
index 16796458..a57e009c 100644
--- a/altair/vegalite/v3/api.py
+++ b/altair/vegalite/v3/api.py
@@ -487,7 +487,7 @@ class TopLevelMixin(mixins.ConfigMethodMixin):
def __or__(self, other):
return HConcatChart(hconcat=[self, other])
- d... |
altair-viz__altair-1538 | [
{
"changes": {
"added_entities": [
"altair/vegalite/data.py:DataTransformerRegistry.disable_max_rows"
],
"added_modules": [
"altair/vegalite/data.py:DataTransformerRegistry"
],
"edited_entities": null,
"edited_modules": null
},
"file": "altair/vegalite... | altair-viz/altair | 35fad6bc10a14ab1072c3ce37ab2c1653d8364b7 | chart.serve() ignores data transformers
```python
import altair as alt
alt.data_transformers.enable('data_server')
from vega_datasets import data
cars = data.cars()
chart = alt.Chart(cars).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
).interactive()
chart.serv... | diff --git a/altair/vegalite/data.py b/altair/vegalite/data.py
index d54dfd93..3ffa3da0 100644
--- a/altair/vegalite/data.py
+++ b/altair/vegalite/data.py
@@ -3,8 +3,9 @@ from toolz.curried import curry, pipe
from ..utils.core import sanitize_dataframe
from ..utils.data import (
MaxRowsError, limit_rows, sample,... |
altair-viz__altair-1587 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v2/schema/channels.py:FieldChannelMixin.to_dict"
],
"edited_modules": [
"altair/vegalite/v2/schema/channels.py:FieldChannelMixin"
]
},
"file": "altair/v... | altair-viz/altair | d9e2d60c61945fc3bb0f59dbb962e320bdca9fda | alt.Tooltip not behaving the same way as not specifying the object
Excuse the weird title but I am not sure how to properly phrase the issue. This is on Altair 3.1.
Let's take the following example code from another issue:
```
from vega_datasets import data
df=data.barley()
base = alt.Chart(df).transform_join... | diff --git a/altair/vegalite/v2/schema/channels.py b/altair/vegalite/v2/schema/channels.py
index fa9f5b63..dc9a9b4a 100644
--- a/altair/vegalite/v2/schema/channels.py
+++ b/altair/vegalite/v2/schema/channels.py
@@ -24,7 +24,7 @@ class FieldChannelMixin(object):
# If given a list of shorthands, then transfo... |
altair-viz__altair-1607 | [
{
"changes": {
"added_entities": [
"altair/vegalite/v3/api.py:Chart.add_selection",
"altair/vegalite/v3/api.py:RepeatChart.add_selection",
"altair/vegalite/v3/api.py:ConcatChart.add_selection",
"altair/vegalite/v3/api.py:HConcatChart.add_selection",
"altair/vegalite... | altair-viz/altair | 079f8727deca3178089f5c2042145a60f874af1e | BUG: Remove invalid methods from top-level chart objects
Examples of methods that never result in valid chart specs:
- ``LayerChart.mark_*``
- ``LayerChart.add_selection``
- ``*ConcatChart.add_selection``
- ``FacetChart.add_selection``
- ``RepeatChart.add_selection`` | diff --git a/altair/vegalite/v3/api.py b/altair/vegalite/v3/api.py
index f844ef0f..b043680d 100644
--- a/altair/vegalite/v3/api.py
+++ b/altair/vegalite/v3/api.py
@@ -559,18 +559,6 @@ class TopLevelMixin(mixins.ConfigMethodMixin):
setattr(copy, key, val)
return copy
- def add_selection(se... |
altair-viz__altair-1667 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "altair/examples/interactive_layered_crossfilter.py"
},
{
"changes": {
"added_entities": [
"altair/vegalite/v3/api.py:sequence",
... | altair-viz/altair | 93846e70ad7fed56e02001f5af4c1bfed1ba3e3e | Refine data generator support
Vega-Lite supports _data generators_ for geo spheres, geo graticules, and numeric sequences: https://vega.github.io/vega-lite/docs/data.html#data-generators
Altair includes auto-generated classes (e.g., `alt.GraticuleGenerator`, `alt.GraticuleParams`) corresponding to these features. Ho... | diff --git a/altair/examples/interactive_layered_crossfilter.py b/altair/examples/interactive_layered_crossfilter.py
index edde1957..bf5e3d3f 100644
--- a/altair/examples/interactive_layered_crossfilter.py
+++ b/altair/examples/interactive_layered_crossfilter.py
@@ -26,13 +26,13 @@ base = alt.Chart().mark_bar().encode(... |
altair-viz__altair-1794 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v3/api.py:LayerChart.add_selection"
],
"edited_modules": [
"altair/vegalite/v3/api.py:LayerChart"
]
},
"file": "altair/vegalite/v3/api.py"
}
] | altair-viz/altair | 1d80b5979a47b118db67c408d09237a9173ea455 | Calling add_selection() on a layered chart results in an invalid spec
Example:
```python
import altair as alt
import pandas as pd
df = pd.DataFrame({
'x': range(5),
'y1': [1, 3, 2, 4, 5],
'y2': [2, 1, 4, 5, 3]
})
alt.layer(
alt.Chart(df).mark_line().encode(x='x', y='y1'),
alt.Chart(df).ma... | diff --git a/altair/vegalite/v3/api.py b/altair/vegalite/v3/api.py
index 2b372f35..ceef45ef 100644
--- a/altair/vegalite/v3/api.py
+++ b/altair/vegalite/v3/api.py
@@ -1882,8 +1882,7 @@ class LayerChart(TopLevelMixin, _EncodingMixin, core.TopLevelLayerSpec):
if not selections or not self.layer:
ret... |
altair-viz__altair-1852 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v3/schema/core.py:EventStream.__init__"
],
"edited_modules": [
"altair/vegalite/v3/schema/core.py:EventStream"
]
},
"file": "altair/vegalite/v3/schema/c... | altair-viz/altair | c05a7caa26c2f592ed69a6d4d95276fdb1e80331 | Code generator uses `mapping(required=[])` in confusing ways
In particular:
```
>>> alt.Chart.transform_impute?
[...]
keyvals : anyOf(List(Mapping(required=[])), :class:`ImputeSequence`)
[...]
```
This should be something like
```
keyvals : anyOf(List(Any), :class:`ImputeSequence`)
```
Somehow the schema gen... | diff --git a/altair/vega/v5/schema/core.py b/altair/vega/v5/schema/core.py
index fd4aeb23..5e2a668d 100644
--- a/altair/vega/v5/schema/core.py
+++ b/altair/vega/v5/schema/core.py
@@ -774,7 +774,7 @@ class projection(VegaSchema):
extent : oneOf(List(oneOf(List(:class:`numberOrSignal`), :class:`signal`)), :class:`... |
altair-viz__altair-2403 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/expr/core.py:DatumType.__getattr__"
],
"edited_modules": [
"altair/expr/core.py:DatumType"
]
},
"file": "altair/expr/core.py"
},
{
"changes": {
"ad... | altair-viz/altair | 8e42747ddc6e8784b4caad2a85db290a604cc96b | `DatumType` and `Selection` instances are not deep copyable.
Thanks for your work on Altair, which makes generating VegaLite plots in Python super easy.
One issue I've come across is that you cannot deep-copy some of the object types because the `__getattr__` implementations of some objects are too broad (i.e. https... | diff --git a/altair/expr/core.py b/altair/expr/core.py
index c1fdf49b..9e530b69 100644
--- a/altair/expr/core.py
+++ b/altair/expr/core.py
@@ -8,6 +8,8 @@ class DatumType(object):
return "datum"
def __getattr__(self, attr):
+ if attr.startswith("__") and attr.endswith("__"):
+ raise At... |
altair-viz__altair-2522 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/core.py:infer_vegalite_type",
"altair/utils/core.py:parse_shorthand"
],
"edited_modules": [
"altair/utils/core.py:infer_vegalite_type",
"altair/utils/cor... | altair-viz/altair | 1f6d1c953cac4a50e9ff2ba0a25ba3f398887784 | Support of ordinal based on pandas' ordered Categorical type?
I've just started to play with altair, using the [diamonds](http://vincentarelbundock.github.io/Rdatasets/datasets.html) dataset. Here is the notebook to clarify what I did https://gist.github.com/pierre-haessig/09fa9268aa0a0e7d91356f681f96ca18
Since, I'm n... | diff --git a/altair/utils/core.py b/altair/utils/core.py
index 53785b17..c47b9a04 100644
--- a/altair/utils/core.py
+++ b/altair/utils/core.py
@@ -193,8 +193,6 @@ def infer_vegalite_type(data):
# Otherwise, infer based on the dtype of the input
typ = infer_dtype(data)
- # TODO: Once this returns 'O', ple... |
altair-viz__altair-2568 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/core.py:use_signature"
],
"edited_modules": [
"altair/utils/core.py:use_signature"
]
},
"file": "altair/utils/core.py"
},
{
"changes": {
"add... | altair-viz/altair | ef8ff946bf610c19ccbecfbbd6b624004c25fb32 | Make `SchemaValidationError` more helpful by printing expected parameters
When a non-existing parameter name is used, I think it would be helpful to include the existing parameter names in the error message. For example, when misspelling a parameter name like in the example below it is not immediately clear whether I m... | diff --git a/altair/utils/core.py b/altair/utils/core.py
index 38bf0950..5e438151 100644
--- a/altair/utils/core.py
+++ b/altair/utils/core.py
@@ -546,7 +546,11 @@ def use_signature(Obj):
# Supplement the docstring of f with information from Obj
if Obj.__doc__:
+ # Patch in a reference to... |
altair-viz__altair-2813 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/schemapi.py:SchemaBase.to_dict"
],
"edited_modules": [
"altair/utils/schemapi.py:SchemaBase"
]
},
"file": "altair/utils/schemapi.py"
},
{
"changes"... | altair-viz/altair | 291bcfc376b6954a09e2c4292b0b7ba13868b108 | Chart representation changes after the chart is displayed
The representation of the chart object seems to change after the chart is displayed. Take this example
```py
import altair as alt
from vega_datasets import data
cars = data.cars()
scatter = alt.Chart(cars).mark_point().encode(
x='Weight_in_lbs:... | diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index b94017c9..4471c65c 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -358,8 +358,24 @@ class SchemaBase(object):
if self._args and not self._kwds:
result = _todict(self._args[0], validate=sub_validate, con... |
altair-viz__altair-2842 | [
{
"changes": {
"added_entities": [
"altair/utils/schemapi.py:_get_most_relevant_errors"
],
"added_modules": [
"altair/utils/schemapi.py:_get_most_relevant_errors"
],
"edited_entities": [
"altair/utils/schemapi.py:validate_jsonschema",
"altair/utils/s... | altair-viz/altair | 74b3515644f16f27cb1924398fbbbc155e5dfaed | Chart.encode() returns confusing error message when using an invalid channel and selections
Consider:
```python
selection = alt.selection_single()
(alt.Chart(data=None)
.mark_circle()
.encode(color=alt.value('red'), invalidChannel=None))
```
Predictably, this fails with:
```
SchemaValidationError... | diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index fab24a4a..0c8f9b27 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -5,7 +5,7 @@ import contextlib
import inspect
import json
import textwrap
-from typing import Any
+from typing import Any, Sequence, List
import jsonsch... |
altair-viz__altair-2874 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/vegalite/v5/api.py:_check_if_can_be_layered"
],
"edited_modules": [
"altair/vegalite/v5/api.py:_check_if_can_be_layered"
]
},
"file": "altair/vegalite/v5/api.py"... | altair-viz/altair | 7509e452a8c5da2870b48b30969d170dc4015597 | doc: ValueError: Faceted charts cannot be layered.
The error: `ValueError: Faceted charts cannot be layered.` is an often reoccurring error:
- https://github.com/altair-viz/altair/issues/2862
- https://github.com/altair-viz/altair/issues/1570
- https://github.com/altair-viz/altair/issues/1329
- https://github.com/... | diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py
index 5b11d029..4ca266f4 100644
--- a/altair/vegalite/v5/api.py
+++ b/altair/vegalite/v5/api.py
@@ -2272,24 +2272,38 @@ def _check_if_can_be_layered(spec):
if encoding is not Undefined:
for channel in ["row", "column", "facet"]:
... |
altair-viz__altair-2885 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/schemapi.py:SchemaBase.to_dict"
],
"edited_modules": [
"altair/utils/schemapi.py:SchemaBase"
]
},
"file": "altair/utils/schemapi.py"
},
{
"changes"... | altair-viz/altair | c6cbdfa72c93a94631177b6bc8b0d3f0d8871704 | tooltip throws error for Categorical variable
The following code used to work in recent versions of `altair` including the current in-development branch
But by commit f8912bad75d4247ab7 this code throws an error.
The problem appears to be that specifying a variable for a tooltip without a type throws an error if ... | diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index de631b62..0b4dd372 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -404,10 +404,10 @@ class SchemaBase(object):
parsed_shorthand = context.pop("parsed_shorthand", {})
# Prevent that pandas categorica... |
altair-viz__altair-2975 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/schemapi.py:SchemaValidationError.__str__"
],
"edited_modules": [
"altair/utils/schemapi.py:SchemaValidationError"
]
},
"file": "altair/utils/schemapi.py"
... | altair-viz/altair | 97f8edaacc8b85d52588873623a5b57b057d6363 | Multiple rounds of the same error message
I noticed that some specs shows the same error multiple time, for example:
```py
source = data.cars()
alt.Chart(source).mark_text(align="right").encode(
alt.Text("Horsepower:N", bandPosition='4')
)
```
```
'4' is not of type 'number'
Additional properties are n... | diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index 298a1cbf..03b5fc1e 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -299,9 +299,23 @@ class SchemaValidationError(jsonschema.ValidationError):
{message}"""
if self._additional_errors:
- ... |
altair-viz__altair-3009 | [
{
"changes": {
"added_entities": [
"altair/utils/schemapi.py:_get_errors_from_spec",
"altair/utils/schemapi.py:_group_errors_by_json_path",
"altair/utils/schemapi.py:_get_leaves_of_error_tree",
"altair/utils/schemapi.py:_subset_to_most_specific_json_paths",
"altair/... | altair-viz/altair | 9abc8f0d2f1893a922ae33695f0bb135128ceff6 | Some errors in layered or faceted specs raise the wrong error message
A spec that is not layered will return to correct error in this case:
```py
alt.Chart().mark_point().encode(tooltip=[{'wrong'}])
```
```
SchemaValidationError: '[{'field': {'wrong'}}]' is an invalid value for `tooltip`:
[{'field': {'wrong... | diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index 76fbcb05..79808e24 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -5,7 +5,17 @@ import contextlib
import inspect
import json
import textwrap
-from typing import Any, Sequence, List, Dict, Optional
+from typing import (
+ ... |
altair-viz__altair-3128 | [
{
"changes": {
"added_entities": [
"altair/utils/core.py:numpy_is_subtype"
],
"added_modules": [
"altair/utils/core.py:numpy_is_subtype"
],
"edited_entities": [
"altair/utils/core.py:sanitize_dataframe",
"altair/utils/core.py:infer_vegalite_type_for_... | altair-viz/altair | 72a361c68731212d8aa042f4c73d5070aa110a9a | Pandas 2.0 with pyarrow backend: "TypeError: Cannot interpret 'timestamp[ms][pyarrow]' as a data type"
* Vega-Altair 5.0.1
* Pandas 2.0.3
* PyArrow 12.0.1
Essential outline of what I'm doing:
```
import pandas as pd
arrow_table = [make an Arrow table]
pandas_df = arrow_table.to_pandas(types_mapper=pd.Arrow... | diff --git a/altair/utils/core.py b/altair/utils/core.py
index 1d4d6f17..082db4cc 100644
--- a/altair/utils/core.py
+++ b/altair/utils/core.py
@@ -298,6 +298,13 @@ def sanitize_geo_interface(geo: MutableMapping) -> dict:
return geo_dct
+def numpy_is_subtype(dtype: Any, subtype: Any) -> bool:
+ try:
+ ... |
altair-viz__altair-398 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "altair/v1/__init__.py"
},
{
"changes": {
"added_entities": [
"altair/v1/api.py:disable_mime_rendering"
],
"added_modules": [... | altair-viz/altair | dfed1d404821e21c25413579f8506b4be05561ad | Safer enabling of MIME rendering
Right now the `enable_mime_rendering()` function is not very safe:
* Can't call twice.
* Can't disable.
Easy to fix, but need to wait for #377 to be merged. | diff --git a/altair/v1/__init__.py b/altair/v1/__init__.py
index 6239d9e1..62db76eb 100644
--- a/altair/v1/__init__.py
+++ b/altair/v1/__init__.py
@@ -43,6 +43,7 @@ from .api import (
OneOfFilter,
MaxRowsExceeded,
enable_mime_rendering,
+ disable_mime_rendering
)
from ..datasets import (
diff --gi... |
altair-viz__altair-399 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "altair/v1/__init__.py"
},
{
"changes": {
"added_entities": [
"altair/v1/api.py:TopLevelMixin._finalize",
"altair/v1/api.py:TopLe... | altair-viz/altair | ea129b3b43bc6768a8a66d09830731ed8197c4b8 | Raise exception when a user specifies a field not in the data or expressions.
Right now if a user creates a spec that has column name misspelled, the chart renders with nothing and no error messages are shown. This is probably the most common error we see in teaching with Altair. | diff --git a/altair/v1/__init__.py b/altair/v1/__init__.py
index 62db76eb..f67374d6 100644
--- a/altair/v1/__init__.py
+++ b/altair/v1/__init__.py
@@ -42,6 +42,7 @@ from .api import (
RangeFilter,
OneOfFilter,
MaxRowsExceeded,
+ FieldError,
enable_mime_rendering,
disable_mime_rendering
)
di... |
altair-viz__altair-925 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altair/utils/plugin_registry.py:PluginRegistry.enable"
],
"edited_modules": [
"altair/utils/plugin_registry.py:PluginRegistry"
]
},
"file": "altair/utils/plugin_registr... | altair-viz/altair | 6b9d5eef7dd850388d7f01ce5eed33bda21000be | ENH: allow specification of embed options from chart.display()
See https://github.com/altair-viz/altair/issues/688#issuecomment-395523194 | diff --git a/altair/utils/plugin_registry.py b/altair/utils/plugin_registry.py
index 3c57e1af..ad76662f 100644
--- a/altair/utils/plugin_registry.py
+++ b/altair/utils/plugin_registry.py
@@ -138,7 +138,7 @@ class PluginRegistry(Generic[PluginType]):
self._active = self._plugins[name]
self._options = o... |
altcha-org__altcha-lib-py-2 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"altcha/altcha.py:verify_solution"
],
"edited_modules": [
"altcha/altcha.py:verify_solution"
]
},
"file": "altcha/altcha.py"
}
] | altcha-org/altcha-lib-py | 9eedc1bbaf6813c95e6b19205a0d3aadd62effd3 | `check_expires=True` produces an error
`extract_params` uses `urllib.parse.parse_qs`, which will return a _list_ for every parameter:
```python
qs = urllib.parse.parse_qs('foo=bar')
# qs = { 'foo': ['bar'] }
```
`extract_params(payload).get('expires')` is then fed into `int()`, which obviously throws, because yo... | diff --git a/altcha/altcha.py b/altcha/altcha.py
index b0dab21..0bfd62b 100644
--- a/altcha/altcha.py
+++ b/altcha/altcha.py
@@ -323,7 +323,10 @@ def verify_solution(payload, hmac_key, check_expires):
return False, None, "Invalid algorithm"
expires = extract_params(payload).get("expires")
- if check_... |
alteryx__featuretools-1251 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"featuretools/computational_backends/feature_set_calculator.py:FeatureSetCalculator._calculate_features_for_entity",
"featuretools/computational_backends/feature_set_calculator.py:FeatureSetCalcu... | alteryx/featuretools | 41cb8a44ae536da09ca60bdf693b14ee6dedf89c | Move query_by_values from Entity to EntitySet
- the `query_by_values` functions on Entity needs to moved to EntitySet with the Woodwork integration | diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst
index 24d61d4a..68036800 100644
--- a/docs/source/release_notes.rst
+++ b/docs/source/release_notes.rst
@@ -6,13 +6,19 @@ Release Notes
* Enhancements
* Fixes
* Changes
+ * Move ``query_by_values`` method from ``Entity`` to... |
alteryx__featuretools-1273 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"featuretools/utils/entity_utils.py:infer_variable_types"
],
"edited_modules": [
"featuretools/utils/entity_utils.py:infer_variable_types"
]
},
"file": "featuretools/uti... | alteryx/featuretools | 2b11e78e3d6d89e0dc35876c8bd6a31860ce2873 | Infer Variable Types Always Returns Numeric For Input Numeric Fields, Regardless of Number of Unique Values.
https://github.com/alteryx/featuretools/blob/753615c89360910768811680a7a71e08ab83ad79/featuretools/utils/entity_utils.py#L85
This bit of logic creates a sample based on the min of 10,000 and the number of uni... | diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst
index be456dac..14090441 100644
--- a/docs/source/release_notes.rst
+++ b/docs/source/release_notes.rst
@@ -5,6 +5,7 @@ Release Notes
**Future Release**
* Enhancements
* Fixes
+ * Fix logic for inferring variable type from unus... |
alteryx__featuretools-1280 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"featuretools/entityset/entity.py:Entity.__init__",
"featuretools/entityset/entity.py:Entity.update_data",
"featuretools/entityset/entity.py:Entity.set_secondary_time_index"
],
... | alteryx/featuretools | 653a179971212ffbbeba815ab89dca6f5e8d13ad | Move set_secondary_time_index method from Entity to EntitySet
For Woodwork integration the `set_secondary_time_index` method needs to be moved from `Entity` to `EntitySet` as this method will not be present on a `ww.DataTable`. | diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst
index f3f9df1f..d702f61a 100644
--- a/docs/source/release_notes.rst
+++ b/docs/source/release_notes.rst
@@ -11,6 +11,7 @@ Release Notes
* Move ``query_by_values`` method from ``Entity`` to ``EntitySet`` (:pr:`1251`)
* Remove ``... |
alteryx__featuretools-1323 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"featuretools/entityset/entityset.py:EntitySet.__eq__"
],
"edited_modules": [
"featuretools/entityset/entityset.py:EntitySet"
]
},
"file": "featuretools/entityset/entity... | alteryx/featuretools | 5450641b8b3cfb98ce4b65e4b9fee6b7eaae4b75 | EntitySet.__eq__ bug fix and test coverage improvement
The `EntitySet.__eq__` method contains code that will never evaluate to False. This could cause two entitysets that have different relationships defined to evaluate as equal when they should be not equal.
This code block
```python
for r in other.relationships:... | diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst
index 6aec9616..6752626d 100644
--- a/docs/source/release_notes.rst
+++ b/docs/source/release_notes.rst
@@ -6,6 +6,7 @@ Release Notes
* Enhancements
* Fixes
* Calculate direct features uses default value if parent missing (:pr... |
alteryx__featuretools-1398 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"featuretools/entityset/entity.py:Entity.update_data"
],
"edited_modules": [
"featuretools/entityset/entity.py:Entity"
]
},
"file": "featuretools/entityset/entity.py"
... | alteryx/featuretools | 482033cdcf0068b9f7ce73bf16d100446aa1e8f0 | Move `update_data` from Entity to EntitySet
Featuretools should provide an interface for users to update the data that makes up an "entity" in an EntitySet. This is currently done via a method on the `ft.Entity` object, but Woodwork dataframes do not have a corresponding method. To resolve this problem, we can move the... | diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst
index 041550eb..6773c218 100644
--- a/docs/source/release_notes.rst
+++ b/docs/source/release_notes.rst
@@ -12,6 +12,7 @@ Future Release
* Move ``set_secondary_time_index`` method from ``Entity`` to ``EntitySet`` (:pr:`1280`)
*... |
alvinwan__TexSoup-108 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/reader.py:read_tex",
"TexSoup/reader.py:read_expr",
"TexSoup/reader.py:read_math_env",
"TexSoup/reader.py:read_env",
"TexSoup/reader.py:read_args",
"TexSo... | alvinwan/TexSoup | a7976e70d568afc0053ba72260088ba0c93488fa | Parsing the content of math environments?
Currently, it seems to me that TexSoup treats the content of a math environment ($...$, \(...) or \[...\]) like a single token.
Is there any way to get a structured representation of this content too? I was thinking of getting a string representation of the inside of $...$ an... | diff --git a/TexSoup/reader.py b/TexSoup/reader.py
index 11cdd75..304b557 100644
--- a/TexSoup/reader.py
+++ b/TexSoup/reader.py
@@ -7,20 +7,23 @@ from TexSoup.data import arg_type
from TexSoup.tokens import (
TC,
tokenize,
- SKIP_ENVS,
+ SKIP_ENV_NAMES,
+ MATH_ENV_NAMES,
)
import functools
impor... |
alvinwan__TexSoup-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/reader.py:tokenize_math",
"TexSoup/reader.py:read_arg"
],
"edited_modules": [
"TexSoup/reader.py:tokenize_math",
"TexSoup/reader.py:read_arg"
]
},
... | alvinwan/TexSoup | b95820ac9f507916ce0a777cfcefe003ceb10c20 | $ and $$ math is not parsed
To reproduce:
```python
In [4]: list(TexSoup.read('$\lambda$').children)
Out[4]: [TexCmd('lambda$')]
```
Expected:
`$` and `$$` should be treated as paired delimiters and result in a correct environment.
TexSoup version:
0.0.3 | diff --git a/TexSoup/reader.py b/TexSoup/reader.py
index 6125322..c6012fa 100644
--- a/TexSoup/reader.py
+++ b/TexSoup/reader.py
@@ -136,11 +136,19 @@ def tokenize_math(text):
>>> tokenize_math(b)
'$$\\min_x$$'
"""
+
+ def escaped_dollar():
+ return text.peek() == '$' and result[-1] == '\\'
+
+... |
alvinwan__TexSoup-132 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/data.py:TexArgs.insert"
],
"edited_modules": [
"TexSoup/data.py:TexArgs"
]
},
"file": "TexSoup/data.py"
},
{
"changes": {
"added_entities": null,
... | alvinwan/TexSoup | f91d4e71b21aa6852378d2d60ecc551b39e05bf0 | \def\command not parsed correctly
For example, `\def\arraystretch{1.1}` will be parsed as `\def{\}{arraystretch}{1.1}`. The bad part of this result is it breaks the balance of braces as `\}` is escaped. | diff --git a/TexSoup/data.py b/TexSoup/data.py
index f7279c8..58cd070 100644
--- a/TexSoup/data.py
+++ b/TexSoup/data.py
@@ -1317,7 +1317,7 @@ class TexArgs(list):
"""
arg = self.__coerce(arg)
- if isinstance(arg, TexGroup):
+ if isinstance(arg, (TexGroup, TexCmd)):
super(... |
alvinwan__TexSoup-133 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/data.py:TexArgs.insert"
],
"edited_modules": [
"TexSoup/data.py:TexArgs"
]
},
"file": "TexSoup/data.py"
},
{
"changes": {
"added_entities": null,
... | alvinwan/TexSoup | f91d4e71b21aa6852378d2d60ecc551b39e05bf0 | Control spaces "\ " in math mode don't make the roundtrip
People often use `\ ` (called control space) to insert a little extra space in math mode—to avoid the default behaviour of ignoring math spaces.
In TexSoup these get eaten up somehow, so when serialize back out, the tex is different:
Failing test case:
``... | diff --git a/TexSoup/data.py b/TexSoup/data.py
index f7279c8..58cd070 100644
--- a/TexSoup/data.py
+++ b/TexSoup/data.py
@@ -1317,7 +1317,7 @@ class TexArgs(list):
"""
arg = self.__coerce(arg)
- if isinstance(arg, TexGroup):
+ if isinstance(arg, (TexGroup, TexCmd)):
super(... |
alvinwan__TexSoup-138 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/reader.py:read_env"
],
"edited_modules": [
"TexSoup/reader.py:read_env"
]
},
"file": "TexSoup/reader.py"
}
] | alvinwan/TexSoup | 19451a322a51e12fd30a9a391301aa31b937e9e2 | Non-matching brackets not parsed correctly
Certain math notation involves non-matched brackets.
For example the set of nonnegative numbers is denoted `$[0, \infty)$` in interval notation. TexSoup handle this notation fine on it's own but has trouble if there is command before it this non-matching expression, e.g. `$S ... | diff --git a/TexSoup/reader.py b/TexSoup/reader.py
index fd53989..ba92aaa 100644
--- a/TexSoup/reader.py
+++ b/TexSoup/reader.py
@@ -31,7 +31,11 @@ SIGNATURES = {
'textbf': (1, 0),
'section': (1, 1),
'label': (1, 0),
+ 'cap': (0, 0),
'cup': (0, 0),
+ 'in': (0, 0),
+ 'notin': (0, 0),
+ 'i... |
alvinwan__TexSoup-140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/reader.py:read_env"
],
"edited_modules": [
"TexSoup/reader.py:read_env"
]
},
"file": "TexSoup/reader.py"
},
{
"changes": {
"added_entities": null,... | alvinwan/TexSoup | 19451a322a51e12fd30a9a391301aa31b937e9e2 | Newlines after backslashes are not parsed correctly
For example:
```python
>>> import TexSoup
>>> text = 'a\\\nb'
>>> print(text)
a\
b
>>> soup = TexSoup.TexSoup(text)
>>> soup
a\b
```
The newline is gone, which has of course changed the meaning of the text, so running it through `TexSoup` again gives a ... | diff --git a/TexSoup/reader.py b/TexSoup/reader.py
index fd53989..ba92aaa 100644
--- a/TexSoup/reader.py
+++ b/TexSoup/reader.py
@@ -31,7 +31,11 @@ SIGNATURES = {
'textbf': (1, 0),
'section': (1, 1),
'label': (1, 0),
+ 'cap': (0, 0),
'cup': (0, 0),
+ 'in': (0, 0),
+ 'notin': (0, 0),
+ 'i... |
alvinwan__TexSoup-141 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/data.py:TexNode.replace",
"TexSoup/data.py:TexCmd._assert_supports_contents"
],
"edited_modules": [
"TexSoup/data.py:TexNode",
"TexSoup/data.py:TexCmd"
... | alvinwan/TexSoup | 19451a322a51e12fd30a9a391301aa31b937e9e2 | replace_with does not work for arguments of a node
```python3
soup = TexSoup(r"\somecommand{\anothercommand}")
some_obj = TexNode(TexText("new text"))
soup.somecommand.anothercommand.replace_with(some_obj)
```
Gives
```python3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/... | diff --git a/TexSoup/data.py b/TexSoup/data.py
index 58cd070..8e04c24 100644
--- a/TexSoup/data.py
+++ b/TexSoup/data.py
@@ -593,10 +593,15 @@ class TexNode(object):
\item Bye
\end{itemize}
"""
+ for arg in self.expr.args:
+ if child.expr in arg._contents:
+ a... |
alvinwan__TexSoup-147 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/data.py:TexNode.delete"
],
"edited_modules": [
"TexSoup/data.py:TexNode"
]
},
"file": "TexSoup/data.py"
}
] | alvinwan/TexSoup | c91a14a0019ff7df197e71c906bc0403eddf80dc | Commands in environment arguments cannot be deleted
For example:
```python
>>> import TexSoup
>>> ts = TexSoup.TexSoup(r'\begin{env}{\test}\end{env}')
>>> ts.find('test').delete()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/atlas/physics-office/src/TexSoup/TexSou... | diff --git a/README.md b/README.md
index df2a1d4..754a26b 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
[](https://travis-ci.org/alvinwan/TexSoup)
[ or be used after e.g.\
- [ ] \right. \right[ \right( \right|
again, noted by/thanks to @chewisinho for bringing up
| diff --git a/TexSoup/__init__.py b/TexSoup/__init__.py
index c34f8b7..ec90adb 100644
--- a/TexSoup/__init__.py
+++ b/TexSoup/__init__.py
@@ -8,8 +8,6 @@ Main file, containing most commonly used elements of TexSoup
@site: alvinwan.com
"""
-import itertools
-import _io
from TexSoup.tex import *
diff --git a/TexS... |
alvinwan__TexSoup-92 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"TexSoup/__init__.py:TexSoup"
],
"edited_modules": [
"TexSoup/__init__.py:TexSoup"
]
},
"file": "TexSoup/__init__.py"
},
{
"changes": {
"added_entities": n... | alvinwan/TexSoup | 19f91d9ca806018dd83de419c12377f3ca0add3f | Ignoring Latex in certain cases
In the LaTex files I try to parse are some blocks that TexSoup shouldn't try to parse as LaTex. They are, in fact, similar to a `\begin{code}
...\end{code}` block, what is between the begin and end should not be read as LaTex. In fact, doing so would lead to a lot of errors in a book ... | diff --git a/TexSoup/__init__.py b/TexSoup/__init__.py
index cd8782a..9e622c0 100644
--- a/TexSoup/__init__.py
+++ b/TexSoup/__init__.py
@@ -9,7 +9,7 @@ from TexSoup.tex import *
# noinspection PyPep8Naming
-def TexSoup(tex_code):
+def TexSoup(tex_code, skip_envs=()):
r"""
At a high-level, parses provide... |
amadeus4dev__amadeus-python-203 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"amadeus/reference_data/locations/hotels/_by_hotels.py:ByHotels.get"
],
"edited_modules": [
"amadeus/reference_data/locations/hotels/_by_hotels.py:ByHotels"
]
},
"file":... | amadeus4dev/amadeus-python | 98dfe7f644ce0c50ea9009a02f438b13215dca2c | Query Parameter of Type List Does Not Work As Expected
## Description
This issue was found while triaging #201.
If the Hotel List API is called with a list of hotel IDs, the response only contains information of the first Hotel ID in the list.
## Steps to Reproduce
```python3
amadeus.reference_data.locatio... | diff --git a/amadeus/reference_data/locations/hotels/_by_hotels.py b/amadeus/reference_data/locations/hotels/_by_hotels.py
index 07d185a..cc9b274 100644
--- a/amadeus/reference_data/locations/hotels/_by_hotels.py
+++ b/amadeus/reference_data/locations/hotels/_by_hotels.py
@@ -18,5 +18,8 @@ class ByHotels(Decorator, obj... |
amazon-braket__autoqasm-45 | [
{
"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": [
"src/autoqasm/instructions/g... | amazon-braket/autoqasm | 6943fe933cfc091b75e535f1b69ac342531b6f75 | Unit tests produce OpenQASM programs which use reserved keywords as variable names
**Describe the bug**
When using `amazon-braket-sdk` version 1.81.1 or higher, several AutoQASM unit tests are failing because they were producing OpenQASM programs which used reserved keywords as variable names (i.e., invalid OpenQASM).... | diff --git a/doc/decorators.md b/doc/decorators.md
index 879b65e..67fc77b 100644
--- a/doc/decorators.md
+++ b/doc/decorators.md
@@ -98,18 +98,18 @@ The body of a function decorated with `@aq.gate_calibration` must only contain p
The first argument to the `@aq.gate_calibration` decorator must be the gate function that... |
ambv__retype-3 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"retype.py:retype_file",
"retype.py:lib2to3_parse"
],
"edited_modules": [
"retype.py:retype_file",
"retype.py:lib2to3_parse"
]
},
"file": "retype.py"
}... | ambv/retype | 3fb46555d76dd5432481936c4101f7f50b584b88 | lib2to3_parse assumes that the ParseError will always refer to an existing line
There seems to be a case where `ParseError` will report the line number after the last line number, causing an `IndexError` in retype:
Example file (core.py):
```
def get_message():
return '123'
```
Example stub (types/core.py... | diff --git a/retype.py b/retype.py
index eee4b8e..d59e1b0 100644
--- a/retype.py
+++ b/retype.py
@@ -12,6 +12,7 @@ from pathlib import Path
import re
import sys
import threading
+import tokenize
import traceback
import click
@@ -138,9 +139,9 @@ def retype_file(src, pyi_dir, targets, *, quiet=False, hg=False):
... |
ambv__retype-30 | [
{
"changes": {
"added_entities": [
"src/retype/__init__.py:normalize_node",
"src/retype/__init__.py:_convert_annotation"
],
"added_modules": [
"src/retype/__init__.py:normalize_node",
"src/retype/__init__.py:_convert_annotation"
],
"edited_entities":... | ambv/retype | 7298175beeac991751ff1a6c70700bbafe268b79 | Redefining aliases that use typing module fails
Thanks for this useful tool. Unfortunately while using it I've stumbled upon a weird error.
Consider the following example:
```python
import typing
OPTIONAL_STR = typing.Optional[str]
```
This is content of `example.py` **and** `example.pyi`. After running `... | diff --git a/src/retype/__init__.py b/src/retype/__init__.py
index 951b507..c28b596 100644
--- a/src/retype/__init__.py
+++ b/src/retype/__init__.py
@@ -489,56 +489,83 @@ def _sa_expr(expr):
return serialize_attribute(expr.value)
-@singledispatch
def convert_annotation(ann):
+ return normalize_node(_conver... |
ameily__cincoconfig-18 | [
{
"changes": {
"added_entities": [
"cincoconfig/config.py:Config._process_includes"
],
"added_modules": null,
"edited_entities": [
"cincoconfig/config.py:Config.loads"
],
"edited_modules": [
"cincoconfig/config.py:Config"
]
},
"file": "ci... | ameily/cincoconfig | 2115b05e344ad2086adc89393c883d7ff1f8f67a | IncludeField nested in a Schema object not evaluated
IncludeFields only seem to be parsed, if an IncludeField is a value at root depth. For example:
```yaml
log_level: "warn"
include: "path/to/file.yml"
```
Will evaluate the `include` declaration, and import any values from there, but:
```yaml
log_level: "warn... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aeaae1a..46c1a01 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Vers... |
ameily__cincoconfig-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cincoconfig/fields.py:SecureField.to_basic"
],
"edited_modules": [
"cincoconfig/fields.py:SecureField"
]
},
"file": "cincoconfig/fields.py"
}
] | ameily/cincoconfig | a4efa8aeb094899216ca505d493fc3e2ed88f7ab | SecureField - Don't encrypt empty stirngs
Empty strings should probably be treated as None for `SecureField` | diff --git a/cincoconfig/fields.py b/cincoconfig/fields.py
index 49b618c..a56555a 100644
--- a/cincoconfig/fields.py
+++ b/cincoconfig/fields.py
@@ -1071,8 +1071,8 @@ class SecureField(Field):
super().__init__(**kwargs)
self.method = method
- def to_basic(self, cfg: BaseConfig, value: str) -> dic... |
ameily__cincoconfig-31 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cincoconfig/abc.py:Field.__init__"
],
"edited_modules": [
"cincoconfig/abc.py:Field"
]
},
"file": "cincoconfig/abc.py"
},
{
"changes": {
"added_entities":... | ameily/cincoconfig | f4bb22919f76de1b0aa41ae161f6a62a3b1e5a94 | Add Secure Value Masking
Add a new argument to `dumps` and `to_tree` that can mask secure values. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fad85ba..139f0f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Vers... |
ameily__cincoconfig-35 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "cincoconfig/__init__.py"
},
{
"changes": {
"added_entities": [
"cincoconfig/abc.py:ValidationError.friendly_name",
"cincoconfig/... | ameily/cincoconfig | b81b7de2cd307275d4fb9475f8cb8a3a98fc19e6 | List of complex types doesn't print full config path on error
The following code:
```python
import getpass
from cincoconfig import *
# first, define the configuration's schema -- the fields available that
# customize the application's or library's behavior
schema = Schema()
# Create a user account schema t... | diff --git a/cincoconfig/__init__.py b/cincoconfig/__init__.py
index 0687c54..abbd3dd 100644
--- a/cincoconfig/__init__.py
+++ b/cincoconfig/__init__.py
@@ -7,7 +7,7 @@
# Public API
from .config import Config, Schema, ConfigType
-from .abc import Field, AnyField
+from .abc import Field, AnyField, ValidationError
f... |
ameily__cincoconfig-40 | [
{
"changes": {
"added_entities": [
"cincoconfig/fields.py:IPv4NetworkField.__init__"
],
"added_modules": null,
"edited_entities": [
"cincoconfig/fields.py:IPv4NetworkField._validate"
],
"edited_modules": [
"cincoconfig/fields.py:IPv4NetworkField"
... | ameily/cincoconfig | d17a6ef7cd1528bba34797716150119342f9d915 | IPv4Network min/max prefix length
Implement options for validating an IPv4 network with a minimum and maximum prefix length. For example, these options could be used to filter out single IP addresses (`max_prefix_length = 31`) and filter out class A networks (`min_prefix_length = 9`). | diff --git a/cincoconfig/fields.py b/cincoconfig/fields.py
index bf64778..f0abaaf 100644
--- a/cincoconfig/fields.py
+++ b/cincoconfig/fields.py
@@ -286,6 +286,15 @@ class IPv4NetworkField(StringField):
'''
storage_type = str
+ def __init__(self, min_prefix_len: int = None, max_prefix_len: int = None, **... |
ameily__cincoconfig-45 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cincoconfig/abc.py:Field.__init__",
"cincoconfig/abc.py:Field.__setdefault__",
"cincoconfig/abc.py:Field.__setkey__",
"cincoconfig/abc.py:BaseSchema.__init__",
"cincoconf... | ameily/cincoconfig | 7ec669a672397989b7d7131a987d1e6e8faa9f4e | Field Environment Variable
Create a new attribute for the `Field` class, `Field.env`, that specifies the environment variable that overrides the config value. The env variable would override both the `Field.default` and any values loaded from a configuration file. So, if a configuration file sets a field to `X` but the... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a4e0499..5c9760b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Vers... |
ameily__pypsi-52 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pypsi/os/unix.py:find_bins_in_path"
],
"edited_modules": [
"pypsi/os/unix.py:find_bins_in_path"
]
},
"file": "pypsi/os/unix.py"
}
] | ameily/pypsi | 38dda442b21b8deb569d61076ab0a19c0e78edc8 | Helper function `find_bins_in_path` can raise unhandled exception
When using the helper function `find_bins_in_path` on linux, if an item exists in your PATH variable that does not exist on disk, an exception will be raised and _all tab completion will be broken_, not just bin completion.
### Steps to Reproduce
... | diff --git a/pypsi/os/unix.py b/pypsi/os/unix.py
index 65021f0..03b83a6 100644
--- a/pypsi/os/unix.py
+++ b/pypsi/os/unix.py
@@ -60,14 +60,18 @@ def make_ansi_stream(stream, **kwargs):
def find_bins_in_path():
bins = set()
- paths = [x for x in os.environ['PATH'].split(':') if x.strip()]
+ paths = [x for ... |
amietn__vcsi-120 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vcsi/vcsi.py:max_line_length",
"vcsi/vcsi.py:compose_contact_sheet"
],
"edited_modules": [
"vcsi/vcsi.py:max_line_length",
"vcsi/vcsi.py:compose_contact_sheet"
... | amietn/vcsi | a0186f700b9016bd1099be192e52b46aec682b60 | pillow 10.0.0 breaks things
I've recently been getting this error on every invocation of VCSI
```
Sampling... 20/20
Composing contact sheet...
Traceback (most recent call last):
File "/usr/bin/vcsi", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/vcsi/... | diff --git a/poetry.lock b/poetry.lock
index d2ca673..9c0303b 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,18 +1,84 @@
+# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
+
[[package]]
name = "colorama"
version = "0.4.6"
description = "Cross-platform colored terminal text... |
amjith__fuzzyfinder-19 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fuzzyfinder/main.py:fuzzyfinder"
],
"edited_modules": [
"fuzzyfinder/main.py:fuzzyfinder"
]
},
"file": "fuzzyfinder/main.py"
}
] | amjith/fuzzyfinder | 43fe7676cad68e269bbace7bb2fd9b77f2e07da9 | case_insensitive as optional argument?
I have some old code that reads:
```python
from fuzzyfinder import fuzzyfinder
matches = fuzzyfinder(word_before_cursor, fuzzy_words, case_sensitive=True)
```
But I can't see in this project when case_sensitive was ever an option? Am I going crazy? Was case_sensitive the defa... | diff --git a/fuzzyfinder/main.py b/fuzzyfinder/main.py
index fa5c14b..ab9c4f4 100755
--- a/fuzzyfinder/main.py
+++ b/fuzzyfinder/main.py
@@ -3,7 +3,9 @@ import re
from . import export
@export
-def fuzzyfinder(input, collection, accessor=lambda x: x, sort_results=True):
+def fuzzyfinder(
+ input, collection, acce... |
amplify-education__python-hcl2-73 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hcl2/transformer.py:DictTransformer.attribute",
"hcl2/transformer.py:DictTransformer.body"
],
"edited_modules": [
"hcl2/transformer.py:DictTransformer"
]
},
"fi... | amplify-education/python-hcl2 | c9869c1373ea2401a4a43d8b429bd70fc33683ec | Incorrectly transforms attributes into lists
Hi,
I was excited to try this package but it seems to turn everything into a list. There is a test for this behaviour, which I think is wrong:
https://github.com/amplify-education/python-hcl2/blob/a4b29a76e34bbbd4bcac8d073f96392f451f79b3/test/helpers/terraform-config/v... | diff --git a/hcl2/transformer.py b/hcl2/transformer.py
index b03aaee..74430f7 100644
--- a/hcl2/transformer.py
+++ b/hcl2/transformer.py
@@ -1,6 +1,7 @@
"""A Lark Transformer for transforming a Lark parse tree into a Python dict"""
import re
import sys
+from collections import namedtuple
from typing import List, Di... |
amueller__word_cloud-242 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"wordcloud/wordcloud.py:WordCloud.generate_from_frequencies"
],
"edited_modules": [
"wordcloud/wordcloud.py:WordCloud"
]
},
"file": "wordcloud/wordcloud.py"
}
] | amueller/word_cloud | 4fc252d97045fa3616a7f13cbdd56eddca8ff008 | Checking 'frequencies' list in function WordCloud.generate_from_frequencies()
I'm having an issue related to the generation of the word_cloud from a list of frequencies per word. As you can see below, the function is trying to retrieve the max frequency from a list 'frecuencies', but it doesn't check before if there is... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index ae5d107..e63d922 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -348,7 +348,11 @@ class WordCloud(object):
"""
# make sure frequencies are sorted and normalized
frequencies = sorted(frequencies.items(), ke... |
amueller__word_cloud-243 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"wordcloud/wordcloud.py:WordCloud.generate_from_frequencies"
],
"edited_modules": [
"wordcloud/wordcloud.py:WordCloud"
]
},
"file": "wordcloud/wordcloud.py"
},
{
... | amueller/word_cloud | 2b868941a71e0ad6efac3b25433b97e8776e381b | Some text distributions yield duplicate words in image
As a workaround for #226 I tried generating text according to the desired distribution: [food.txt](https://github.com/amueller/word_cloud/files/858596/food.txt)
Note in particular there are few word types but relatively high number of tokens per type compared to... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index e63d922..ae5d107 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -348,11 +348,7 @@ class WordCloud(object):
"""
# make sure frequencies are sorted and normalized
frequencies = sorted(frequencies.items(), ke... |
amueller__word_cloud-470 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"wordcloud/wordcloud.py:WordCloud.generate_from_frequencies"
],
"edited_modules": [
"wordcloud/wordcloud.py:WordCloud"
]
},
"file": "wordcloud/wordcloud.py"
}
] | amueller/word_cloud | 64ff55ea10751deac3381fbc268c47827704a2c3 | generate_from_frequencies() raise ZeroDivisionError when there're more than one zero in the data
#### Description
Similar Issue: [Issue 308](https://github.com/amueller/word_cloud/issues/308)
At line 464 in wordcloud.py:
```
if rs != 0:
font_size = int(round((rs * (freq / float(last_freq))
... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index b42961a..c2b9d98 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -466,6 +466,8 @@ class WordCloud(object):
# start drawing grey image
for word, freq in frequencies:
+ if freq == 0:
+ cont... |
anchore__anchore-cli-101 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"anchorecli/cli/image.py:delete"
],
"edited_modules": [
"anchorecli/cli/image.py:delete"
]
},
"file": "anchorecli/cli/image.py"
}
] | anchore/anchore-cli | 5cd4fa4783793ad50dfbc70dcb0709fbcd27009c | Deleting an image reports success even if the image can't be deleted
Starting anchore-engine v0.8.0 image deletion is an async op and the response has changed to reflect this. The API always responds with 200 HTTP status unless the service is unable to respond. Status and details of the delete op are in the body of the... | diff --git a/anchorecli/cli/image.py b/anchorecli/cli/image.py
index dbc1892..61c21f7 100644
--- a/anchorecli/cli/image.py
+++ b/anchorecli/cli/image.py
@@ -375,6 +375,10 @@ def delete(input_image, force, all):
if image['imageDigest']:
ret = anchorecli.clients.apiexternal.delete_im... |
anchore__anchore-cli-102 | [
{
"changes": {
"added_entities": [
"anchorecli/cli/utils.py:format_malware_scans"
],
"added_modules": [
"anchorecli/cli/utils.py:format_malware_scans"
],
"edited_entities": [
"anchorecli/cli/utils.py:format_output"
],
"edited_modules": [
... | anchore/anchore-cli | 62232d3079879960119ad43cb1b93da7f27ef396 | Malware scan output support in CLI
Add support for malware scan results in engine 0.8.0 responses
Simple table output:
|Scanner | Signature | Path
|------------|--------------|------|
clamav | Sig1 | /usr/bin/something
clamav | Sig2 | /usr/bin/somethingelse
scan2 | Shell.123 | /usr/bin... | diff --git a/anchorecli/cli/utils.py b/anchorecli/cli/utils.py
index 34b107e..d520fb7 100644
--- a/anchorecli/cli/utils.py
+++ b/anchorecli/cli/utils.py
@@ -336,6 +336,8 @@ def format_output(config, op, params, payload):
obuf = obuf + t.get_string(sortby='Package')
elif params['que... |
anchore__anchore-cli-107 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"anchorecli/cli/image.py:delete"
],
"edited_modules": [
"anchorecli/cli/image.py:delete"
]
},
"file": "anchorecli/cli/image.py"
}
] | anchore/anchore-cli | 702abb3d3e99e1a932085b967a1167c6652108e3 | Deleting an image reports success even if the image can't be deleted
Starting anchore-engine v0.8.0 image deletion is an async op and the response has changed to reflect this. The API always responds with 200 HTTP status unless the service is unable to respond. Status and details of the delete op are in the body of the... | diff --git a/anchorecli/cli/image.py b/anchorecli/cli/image.py
index 2b6ba61..7607869 100644
--- a/anchorecli/cli/image.py
+++ b/anchorecli/cli/image.py
@@ -376,7 +376,7 @@ def delete(input_image, force, all):
ret = anchorecli.clients.apiexternal.delete_image(config, imageDigest=image['imageDigest'... |
anchore__anchore-cli-111 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"anchorecli/cli/image.py:query_metadata"
],
"edited_modules": [
"anchorecli/cli/image.py:query_metadata"
]
},
"file": "anchorecli/cli/image.py"
},
{
"changes": {... | anchore/anchore-cli | 2762581062c91ff776827083631c06aab724e37b | CLI fails to parse response from Engine when getting image manifest
After adding alpine:latest for analysis, retrieving it's manifest metadata fails unless you use the json flag
```zsh
[anchore@anchore-cli-7cf49bf7d-58cnc anchore-cli]$ anchore-cli --debug image metadata alpine:latest manifest
DEBUG:anchorecli.clie... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 0ad303f..0b6fbd5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -8,7 +8,7 @@
# Define YAML anchors
.global_environment_vars: &global_environment_vars
PROD_IMAGE_REPO: anchore/engine-cli
- LATEST_RELEASE_MAJOR_VERSION: 0.8
+ LATEST_RE... |
anchore__anchore-cli-144 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"anchorecli/cli/system.py:WaitOnDisabledFeedError"
],
"edited_entities": [
"anchorecli/cli/system.py:wait"
],
"edited_modules": [
"anchorecli/cli/system.py:wait"
]
},
"file": "anch... | anchore/anchore-cli | 032b658d71d2ce52040d1a3b48b9e371f75fe0c2 | "anchore-cli system wait" endlessly waiting for disabled feeds to sync
We currently have the problem, that our scan pipeline is hanging, because it is stuck on waiting:
$ anchore-cli system wait
Starting checks to wait for anchore-engine to be available timeout=-1.0 interval=5.0
API availability:... | diff --git a/anchorecli/cli/system.py b/anchorecli/cli/system.py
index 48a9c44..8ba1011 100644
--- a/anchorecli/cli/system.py
+++ b/anchorecli/cli/system.py
@@ -11,6 +11,10 @@ config = {}
_logger = logging.getLogger(__name__)
+class WaitOnDisabledFeedError(Exception):
+ pass
+
+
@click.group(name="system", sho... |
andersbogsnes__ml_tooling-424 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ml_tooling/data/base_data.py:Dataset._load_training_data",
"src/ml_tooling/data/base_data.py:Dataset._load_prediction_data"
],
"edited_modules": [
"src/ml_tooling/data/ba... | andersbogsnes/ml_tooling | dc0726dd61a4d45a7125a0aec07e3418fc15fcb8 | API: What to return when no matching data is found when predicting
We should make it clear what return value is expected when .make_prediction fails due to invalid data - either because the key doesn't exist or key is malformed.
Should we raise an MLToolingError? A subclassed InvalidInput or something similar?
We c... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b40cc55..27fc088 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
- Fixed typehints in Dataset
- Dataset.create_train_test now takes a boolean `stratify` parameter.
- Added default local filestorage when using `save_estimator`
+- Dataset now verifies that `l... |
andersbogsnes__ml_tooling-454 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ml_tooling/baseclass.py:Model.make_prediction"
],
"edited_modules": [
"src/ml_tooling/baseclass.py:Model"
]
},
"file": "src/ml_tooling/baseclass.py"
},
{
"c... | andersbogsnes/ml_tooling | d028b0fb4c1bdfadc6270cf716ea231bd01aea30 | ENH: Datasets should check cached `.x` and `.y` attributes when dumping data
When dumping data from one Dataset to another, the dataset always fetches a new copy of the data and dumps it. This can potentially take time and is not necessary if the data is already cached
**Describe the solution you'd like**
All data ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5bacac4..04dce69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ human friendly manner
- Dataset now verifies that `load_training_data` and `load_prediction_data` do not return empty
- Added a missing data visualization to `Dataset.plot`
- FillNA now accept... |
andersbogsnes__ml_tooling-623 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ml_tooling/baseclass.py:Model.__init__",
"src/ml_tooling/baseclass.py:Model.score_estimator",
"src/ml_tooling/baseclass.py:Model.reset_config"
],
"edited_modules": [
... | andersbogsnes/ml_tooling | b4e9ed520586ce65692da3ff8a3a84751aaf2915 | ENH: Maybe we can remove ConfigGetter
Now that we don't need to subclass the model class ConfigGetter might be obsolete. We should check this.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5240bfd..b826eee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
combined feature_pipeline + estimator Pipeline
- Can pass a feature pipeline to `Dataset.plot` methods, to apply preprocessing
before visualization
+- New config implementation. If you need t... |
andersbogsnes__ml_tooling-653 | [
{
"changes": {
"added_entities": [
"src/ml_tooling/data/load_demo.py:DemoData.__repr__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/ml_tooling/data/load_demo.py:DemoData"
]
},
"file": "src/ml_tooling/data/load_demo.py"
... | andersbogsnes/ml_tooling | 16e153c5f8d178c097ed574a2a6e8b396c474c1a | ENH: change __repr__ for demodata to include dataset name
**Is your feature request related to a problem? Please describe.**
The ML-developer want to know which dataset they use.
**Describe the solution you'd like**
Should show 'Boston - data" when printing demo-dataset based on Boston.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74e1c19..cdda3a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
- Added a `read_file` convenience method to `FileDataset` to read
- Fixed a bug where `copy_to` failed between two instances of Sqlite based SQLDatasets
- Fixed a bug where `ClassificationVisu... |
andersbogsnes__ml_tooling-683 | [
{
"changes": {
"added_entities": [
"src/ml_tooling/data/base_data.py:Dataset.features"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/ml_tooling/data/base_data.py:Dataset"
]
},
"file": "src/ml_tooling/data/base_data.py"
}... | andersbogsnes/ml_tooling | 7c7dc586efb28b681f86ce09fc0da8e3cab68b82 | ENH: Datasets should have a way of listing available features
**Is your feature request related to a problem? Please describe.**
When doing EDA, it would be useful to have a way to describe what features are available
**Describe the solution you'd like**
Having a `.features` attribute that shows what features are ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8310c3d..6b95b1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+# v.0.12.1
+- Dataset features can now be easily accessed with the property dataset.features
+
# v0.12.0
- Permutation importance and Feature importance are now two different plotting methods.... |
andersbogsnes__ml_tooling-752 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ml_tooling/baseclass.py:Model.test_estimators"
],
"edited_modules": [
"src/ml_tooling/baseclass.py:Model"
]
},
"file": "src/ml_tooling/baseclass.py"
}
] | andersbogsnes/ml_tooling | f69731ca22ff37c2b1d9b5ae2962cd2d3eecdb23 | BUG: When using the method Model.test_estimators with refit=True it's not using the specified metrics.
**Describe the bug**
When using the method Model.test_estimators with refit=True, it's not using the specified metrics. Instead it's using the default metric.
Additionally, wouldn't you except it to be refitting u... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b95b1a..2645563 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
# v.0.12.1
- Dataset features can now be easily accessed with the property dataset.features
+- `model.test_estimators` with CV will keep using CV if it's refitting the best estimator.
# v0.1... |
andersbogsnes__ml_tooling-765 | [
{
"changes": {
"added_entities": [
"src/ml_tooling/result/result.py:Result.parameters"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/ml_tooling/result/result.py:Result"
]
},
"file": "src/ml_tooling/result/result.py"
}
] | andersbogsnes/ml_tooling | 9a9b55eba69230fb1f37ad06ad48337feb1f2de3 | ENH: Get result parameters
**Is your feature request related to a problem? Please describe.**
When doing a grid-search, I want to be able to see what parameters generated the result from the result.
**Describe the solution you'd like**
A `Result.parameters` attribute would likely be enough
**Describe alternativ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2645563..91f3331 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# v.0.12.1
- Dataset features can now be easily accessed with the property dataset.features
- `model.test_estimators` with CV will keep using CV if it's refitting the best estimator.
+- `Resul... |
andialbrecht__sqlparse-231 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlparse/engine/grouping.py:group_comparison"
],
"edited_modules": [
"sqlparse/engine/grouping.py:group_comparison"
]
},
"file": "sqlparse/engine/grouping.py"
}
] | andialbrecht/sqlparse | ee5799fbb60e9739e42922861cd9f24990fc52dd | Functions are not grouped into a Comparison
I.e. `foo = DATE(bar.baz)` is not grouped. | diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 4e45f65..68960d5 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -135,7 +135,8 @@ def group_comparison(tlist):
T.Name, T.Number, T.Number.Float,
T.... |
andialbrecht__sqlparse-323 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sqlparse/keywords.py"
}
] | andialbrecht/sqlparse | d67c442db4fd8b60a97440e84b9c21e80e4e958c | Support CONCURRENTLY keyword in CREATE INDEX statements
When parsing a statement like `CREATE INDEX CONCURRENTLY name ON ...`, "CONCURRENTLY name" is returned as a single identifier | diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py
index 1fd07c1..d68b4ae 100644
--- a/sqlparse/keywords.py
+++ b/sqlparse/keywords.py
@@ -167,6 +167,7 @@ KEYWORDS = {
'COMMIT': tokens.Keyword.DML,
'COMMITTED': tokens.Keyword,
'COMPLETION': tokens.Keyword,
+ 'CONCURRENTLY': tokens.Keyword,
... |
andialbrecht__sqlparse-445 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlparse/filters/others.py:StripCommentsFilter._process"
],
"edited_modules": [
"sqlparse/filters/others.py:StripCommentsFilter"
]
},
"file": "sqlparse/filters/others.p... | andialbrecht/sqlparse | 488505f6c448e7eb0e4a1915bdc5b6130d44a68a | strip_comments causing syntax error
If there is no space between comments and keyword, the output causes a syntax error. Here's an example:
```python
import sqlparse
sql='''select * from table1--this is a comment
inner join table2 on table1.id = table2.id--this is a comment
where table1.a=1'''
sqlparse.form... | diff --git a/sqlparse/filters/others.py b/sqlparse/filters/others.py
index df4d861..b0bb898 100644
--- a/sqlparse/filters/others.py
+++ b/sqlparse/filters/others.py
@@ -26,6 +26,13 @@ class StripCommentsFilter(object):
if (prev_ is None or next_ is None or
prev_.is_whitespace or prev_.... |
andialbrecht__sqlparse-451 | [
{
"changes": {
"added_entities": [
"sqlparse/engine/grouping.py:group_values"
],
"added_modules": [
"sqlparse/engine/grouping.py:group_values"
],
"edited_entities": [
"sqlparse/engine/grouping.py:group_identifier_list",
"sqlparse/engine/grouping.py:g... | andialbrecht/sqlparse | 08cb6dab214dc638190c6e8f8d3b331b38bbd238 | Staircase formatting on INSERT with multiple values
Here's an example where formatting results in a staircase effect:
```
>>> sql = """insert into foo values (1, 'foo'), (2, 'bar'), (3, 'baz');"""
>>> print(sqlparse.format(sql, reindent=True))
insert into foo
values (1,
'foo'), (2,
'bar... | diff --git a/.travis.yml b/.travis.yml
index 5d5b670..3e09159 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,13 +4,20 @@ python:
- "3.4"
- "3.5"
- "3.6"
- # - "3.7" # see https://github.com/travis-ci/travis-ci/issues/9815
- "nightly"
- "pypy"
- "pypy3"
+# Enable 3.7 without globally enabling sudo a... |
andialbrecht__sqlparse-633 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlparse/sql.py:Statement.get_type"
],
"edited_modules": [
"sqlparse/sql.py:Statement"
]
},
"file": "sqlparse/sql.py"
}
] | andialbrecht/sqlparse | 907fb496f90f2719095a1f01fe24db1e5c0e15a8 | Statement.get_type() does not skip comments between subqueries.
SQL query can contain comment in between WITH multiple query but the `get_type()` implementation doesn't skip them
```python
>>> query, = sqlparse.parse("""
WITH A AS (),
-- A comment about the B subquery...
B AS ()
SELECT * FRO... | diff --git a/sqlparse/sql.py b/sqlparse/sql.py
index 586cd21..1ccfbdb 100644
--- a/sqlparse/sql.py
+++ b/sqlparse/sql.py
@@ -413,27 +413,28 @@ class Statement(TokenList):
Whitespaces and comments at the beginning of the statement
are ignored.
"""
- first_token = self.token_first(skip_c... |
andialbrecht__sqlparse-664 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sqlparse/keywords.py"
}
] | andialbrecht/sqlparse | 83e5381fc320f06f932d10bc0691ad970ef7962f | `DIV` should be Operator
`DIV` should be treated as Operator, but it isn't.
https://www.w3schools.com/sql/func_mysql_div.asp
This behavior prevents to get_alias with `DIV` operator.
## Actual behavior
```py
>>> sqlparse.parse('col1 DIV 5')[0]._pprint_tree()
|- 0 Identifier 'col1 D...'
| |- 0 Name 'col1'
... | diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 82f63a6..1cde398 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -39,11 +39,11 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ ... |
andialbrecht__sqlparse-676 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlparse/engine/grouping.py:group_tzcasts"
],
"edited_modules": [
"sqlparse/engine/grouping.py:group_tzcasts"
]
},
"file": "sqlparse/engine/grouping.py"
}
] | andialbrecht/sqlparse | 9d2cb6fc950386e9e59f29faf0d3742c4b12572c | Space removed in the extract presto function after query formatting.
```
sqlparse.format( "SELECT extract(HOUR from from_unixtime(hour_ts) AT TIME ZONE 'America/Los_Angeles') from table", reindent=True)
```
removes space between `from` and `from_unixtime(hour_ts` in the 0.3.1 version, works fine in 0.3.0
Related... | diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 175ae8e..2fb0a4c 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -91,13 +91,20 @@ def group_tzcasts(tlist):
def match(token):
return token.ttype == T.Keyword.TZCast
- def valid(token):
+ def ... |
andialbrecht__sqlparse-746 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sqlparse/engine/grouping.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited... | andialbrecht/sqlparse | f101546dafa921edfea5b3107731504665b758ea | The group_order() function fails to identify an ordered identifier in the context when nested
**Describe the bug**
The [`group_order()`](https://github.com/andialbrecht/sqlparse/blob/f101546dafa921edfea5b3107731504665b758ea/sqlparse/engine/grouping.py#L363-L371) function does not leverage the `@recurse` decorator a... | diff --git a/AUTHORS b/AUTHORS
index 4617b7d..934bbe3 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -31,9 +31,11 @@ Alphabetical list of contributors:
* Florian Bauer <florian.bauer@zmdi.com>
* Fredy Wijaya <fredy.wijaya@gmail.com>
* Gavin Wahl <gwahl@fusionbox.com>
+* Georg Traar <georg@crate.io>
* Hugo van Kemenade <hugo... |
andialbrecht__sqlparse-764 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sqlparse/keywords.py"
}
] | andialbrecht/sqlparse | f101546dafa921edfea5b3107731504665b758ea | Dollar quoted strings (PostgreSQL) cannot follow an operator (e.g. `=$$Hello$$`)
**Describe the bug**
Dollar quoted strings (e.g. PostgreSQL) are not properly detected, when there is an operator directly preceding the dollar quoted string (e.g `var=$$text$$`). While according to PostgreSQL docs ...
> A dollar-quot... | diff --git a/CHANGELOG b/CHANGELOG
index 0ede280..0b48e9f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ Enhancements:
Bug Fixes
* Ignore dunder attributes when creating Tokens (issue672).
+* Allow operators to precede dollar-quoted strings (issue763).
Release 0.4.4 (Apr 18, 2023)
diff --git a/sqlpar... |
andialbrecht__sqlparse-768 | [
{
"changes": {
"added_entities": [
"sqlparse/engine/grouping.py:group_over"
],
"added_modules": [
"sqlparse/engine/grouping.py:group_over"
],
"edited_entities": [
"sqlparse/engine/grouping.py:group_functions",
"sqlparse/engine/grouping.py:group"
... | andialbrecht/sqlparse | d8f81471cfc2c39ac43128e2a0c8cc67c313cc40 | Incorrect parsing of expressions in SELECT when "<Window Function> OVER ( ... )" is present
When there is a Window Function (e.g., `ROW_NUMBER()`) followed by `OVER ( ... )` in the expressions after the `SELECT` statement, these expressions are not split correctly into individual `Identifier`s. For example, let's have
... | diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 9190797..926a3c1 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -235,6 +235,16 @@ def group_identifier(tlist):
tidx, token = tlist.token_next_by(t=ttypes, idx=tidx)
+@recurse(sql.Over)
+def group_ove... |
andir__isc-dhcp-filter-2 | [
{
"changes": {
"added_entities": [
"isc_dhcp_filter/__init__.py:Leases.count",
"isc_dhcp_filter/__init__.py:Leases.__len__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"isc_dhcp_filter/__init__.py:Leases"
]
},
"file":... | andir/isc-dhcp-filter | efc868102f47329f7280b87a21b5fd9e9defcd64 | Add `.count()` method as shortcut for len(list(leases))
Sometime the only intresting part about the lease db is how many are actually in a given state. Currently you've to write `len(list(leases.active))` to get the count of active leases. `leases.active.count()` and also implementing `__len__` would probably be handy. | diff --git a/isc_dhcp_filter/__init__.py b/isc_dhcp_filter/__init__.py
index d769b6d..70524c3 100644
--- a/isc_dhcp_filter/__init__.py
+++ b/isc_dhcp_filter/__init__.py
@@ -1,6 +1,6 @@
+from isc_dhcp_leases import IscDhcpLeases
from isc_dhcp_leases import Lease
from isc_dhcp_leases import Lease6
-from isc_dhcp_leases... |
andrasmaroy__pconf-32 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pconf/pconf.py:Pconf.get"
],
"edited_modules": [
"pconf/pconf.py:Pconf"
]
},
"file": "pconf/pconf.py"
},
{
"changes": {
"added_entities": null,
"add... | andrasmaroy/pconf | fa6203d593f7c1ec862dd1647df12f5e2b522844 | Calling Pconf.get() multiple times causes configuration flips due to order failure
Calling Pconf.get() multiple times fails to return the same configuration (order of storeMethods flips / reverses).
Scenario (`COMPUTERNAME=aws-ron`)
```
Pconf.env()
Pconf.defaults({'COMPUTERNAME': 'localhost'})
print(Pconf.get(... | diff --git a/pconf/pconf.py b/pconf/pconf.py
index 72fdaeb..81848b3 100644
--- a/pconf/pconf.py
+++ b/pconf/pconf.py
@@ -33,8 +33,7 @@ class Pconf(object):
"""
results = {}
- hierarchy = cls.__hierarchy
- hierarchy.reverse()
+ hierarchy = cls.__hierarchy[::-1]
for sto... |
andrenarchy__stellar-observatory-26 | [
{
"changes": {
"added_entities": [
"stellarobservatory/utils/scc.py:get_graph_csr_matrix",
"stellarobservatory/utils/scc.py:get_scc_graph"
],
"added_modules": [
"stellarobservatory/utils/scc.py:get_graph_csr_matrix",
"stellarobservatory/utils/scc.py:get_scc_grap... | andrenarchy/stellar-observatory | 42a33ede75ba300c57d80a8136442e5983eb784d | Return scc graph from get_sccs()
After finding the SCCs there should be a post-processing step that returns all (directed) edges between the SCCs. | diff --git a/stellarobservatory/utils/scc.py b/stellarobservatory/utils/scc.py
index 1d13f16..82b6822 100644
--- a/stellarobservatory/utils/scc.py
+++ b/stellarobservatory/utils/scc.py
@@ -4,16 +4,10 @@ from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
-def get_strongly_conn... |
andreroggeri__pynubank-104 | [
{
"changes": {
"added_entities": [
"pynubank/nubank.py:Nubank._password_auth",
"pynubank/nubank.py:Nubank.get_qr_code",
"pynubank/nubank.py:Nubank.authenticate_with_qr_code"
],
"added_modules": null,
"edited_entities": [
"pynubank/nubank.py:Nubank.authenti... | andreroggeri/pynubank | 7e5e7efd691dc14ee6eb85eed9f517a3f0469aa0 | Autenticação com QRCode voltou a ser obrigatória
Boa tarde pessoal, tudo bem?
Passando aqui só para avisar que a autenticação com QRCode voltou a ser necessária para fazer autenticação. Parece que é algo bem recente, pois na terça-feira estava funcionando sem a necessidade do QRCode.
Acredito que seria melhor de... | diff --git a/README.md b/README.md
index 0096c61..4922837 100644
--- a/README.md
+++ b/README.md
@@ -13,17 +13,17 @@ Disponível via pip
## Utilizando
### Ponto de atenção
-O Nubank pode bloquear a sua conta por 72 horas caso detecte algum comportamento anormal !!
-Por conta disso, evite enviar muitas requisições (E... |
andreroggeri__pynubank-12 | [
{
"changes": {
"added_entities": [
"pynubank/nubank.py:Nubank.get_card_bills"
],
"added_modules": null,
"edited_entities": [
"pynubank/nubank.py:Nubank.authenticate"
],
"edited_modules": [
"pynubank/nubank.py:Nubank"
]
},
"file": "pynuban... | andreroggeri/pynubank | 9e1660516600a94f949259465c371acf7256f5ae | Acessar faturas do cartão
Olá, gostaria de um método para acessar as faturas do cartão! | diff --git a/pynubank/nubank.py b/pynubank/nubank.py
index 3ba66af..ae31690 100644
--- a/pynubank/nubank.py
+++ b/pynubank/nubank.py
@@ -54,6 +54,7 @@ class Nubank:
self.headers['Authorization'] = 'Bearer {}'.format(data['access_token'])
self.feed_url = data['_links']['events']['href']
self.q... |
andreroggeri__pynubank-14 | [
{
"changes": {
"added_entities": [
"pynubank/nubank.py:Nubank.get_bills",
"pynubank/nubank.py:Nubank.get_bill_details"
],
"added_modules": null,
"edited_entities": [
"pynubank/nubank.py:Nubank.get_card_bills"
],
"edited_modules": [
"pynubank/nu... | andreroggeri/pynubank | b315dd9b34064d16cc18fe91c4f96102d2a1444a | Adicionar endpoint para detalhes da fatura
Olá! Gostaria de obter os detalhes da fatura. Até já implementei isso, porém tenho dúvidas sobre a melhor forma de implementação, uma forma simples seria:
```
def get_bill_details(self, bill):
request = requests.get(bill['_links']['self']['href'], headers=self.headers... | diff --git a/.gitignore b/.gitignore
index 00099ec..8a3fedb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
+.pytest_cache/
# Translations
*.mo
diff --git a/README.md b/README.md
index b0185e1..f7db56b 100644
--- a/README.md
+++ b/README.md
@@ -17,13 +17... |
andreroggeri__pynubank-332 | [
{
"changes": {
"added_entities": [
"pynubank/nubank.py:Nubank._get_pix_value",
"pynubank/nubank.py:Nubank._get_pix_id",
"pynubank/nubank.py:Nubank._get_pix_message",
"pynubank/nubank.py:Nubank._get_pix_date",
"pynubank/nubank.py:Nubank.get_pix_details"
],
... | andreroggeri/pynubank | 1db33f1d32fef543e3f558fffbd22659a5bb1eea | Texto "Comentário" da Transação PIX
O texto comentário que pode ser escrito pelo pagador durante uma transação pix não é retornado no método `nu.get_account_feed()`. Seria possível incluir? | diff --git a/pynubank/nubank.py b/pynubank/nubank.py
index 23dd07f..7ef07e8 100644
--- a/pynubank/nubank.py
+++ b/pynubank/nubank.py
@@ -286,19 +286,61 @@ class Nubank:
@requires_auth_mode(AuthMode.APP)
def get_pix_identifier(self, transaction_id: str):
- def find_pix_identifier(table_item: dict):
- ... |
andreroggeri__pynubank-337 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pynubank/utils/parsing.py:parse_pix_transaction",
"pynubank/utils/parsing.py:parse_generic_transaction"
],
"edited_modules": [
"pynubank/utils/parsing.py:parse_pix_transactio... | andreroggeri/pynubank | 1817459911645eed3b4c94d6e42a115293e5c328 | Erro em get_card_statements()
Ao tentar utilizar o método get_card_statements() é retornado o erro
> Traceback (most recent call last):
File "C:\Python\Python310\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Python\Python310\lib\site-packages\py... | diff --git a/pynubank/utils/parsing.py b/pynubank/utils/parsing.py
index c1bed33..75d4317 100644
--- a/pynubank/utils/parsing.py
+++ b/pynubank/utils/parsing.py
@@ -1,5 +1,6 @@
import re
+BRL = 'R$'
TITLE_INFLOW_PIX = 'Transferência recebida'
TITLE_OUTFLOW_PIX = 'Transferência enviada'
TITLE_REVERSAL_PIX = 'Reemb... |
andreroggeri__pynubank-79 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pynubank/nubank.py:NuException.__init__",
"pynubank/nubank.py:Nubank._handle_response"
],
"edited_modules": [
"pynubank/nubank.py:NuException",
"pynubank/nubank.py:Nu... | andreroggeri/pynubank | 4e3c7ca641da2b557137c649911e222e752eea1c | NuException does not show which status code I actually got
exception looks like this:
```
Traceback (most recent call last):
File "main.py", line 11, in <module>
nu.authenticate_with_qr_code(os.environ['NU_CPF'], os.environ['NU_PWD'], uuid)
File "/usr/local/lib/python3.8/site-packages/pynubank/nubank.py"... | diff --git a/pynubank/nubank.py b/pynubank/nubank.py
index d38a582..f7174db 100644
--- a/pynubank/nubank.py
+++ b/pynubank/nubank.py
@@ -18,9 +18,8 @@ PAYMENT_EVENT_TYPES = (
class NuException(Exception):
-
def __init__(self, status_code, response, url):
- super().__init__()
+ super().__init__(f... |
andreroggeri__pynubank-95 | [
{
"changes": {
"added_entities": [
"pynubank/nubank.py:Nubank.authenticate"
],
"added_modules": null,
"edited_entities": [
"pynubank/nubank.py:Nubank._password_auth",
"pynubank/nubank.py:Nubank.get_qr_code",
"pynubank/nubank.py:Nubank.authenticate_with_qr_... | andreroggeri/pynubank | 0f3a907d943a77e21ad78af1fee651e40efa723d | Acesso com QR Code retornando erro
Olá, hj fui atualizar minhas contas e o tive o erro 403 retornado após o pynubank pedir o QR Code.
Fui acessar pelo site e notei que o QR Code não é mais pedido.
Antes havia um método na biblioteca para acesso sem QR Code, ainda não testei se esse método voltou a funciona.
^^ | diff --git a/README.md b/README.md
index 4922837..0096c61 100644
--- a/README.md
+++ b/README.md
@@ -13,17 +13,17 @@ Disponível via pip
## Utilizando
### Ponto de atenção
-O Nubank pode trancar a sua conta por 72 horas caso detecte algum comportamento anormal !!
-Por conta disso, evite enviar muitas requisições. Se... |
andrewgodwin__urlman-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"urlman.py:UrlsMetaclass.__get__",
"urlman.py:Urls.__init__"
],
"edited_modules": [
"urlman.py:UrlsMetaclass",
"urlman.py:Urls"
]
},
"file": "urlman.py"
... | andrewgodwin/urlman | a750ba9a9922b32d46a90f8a2e69cea7f1103296 | __qualname__ access by Sphinx 3.4.0 fails
I'm using Sphinx to document my project that uses `urlman`. As of the new Sphinx 3.4.0, Sphinx [uses](https://github.com/sphinx-doc/sphinx/issues/5538) `__qualname__` to resolve inheritance when running `autodoc`. This process causes `urlman` to throw an exception, making the d... | diff --git a/urlman.py b/urlman.py
index 738018e..7700384 100644
--- a/urlman.py
+++ b/urlman.py
@@ -51,7 +51,7 @@ class UrlsMetaclass(type):
return type.__new__(self, name, bases, attrs)
def __get__(self, instance, klass):
- return self(klass, instance)
+ return self(klass, instance, self... |
andycasey__ads-115 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ads/search.py:SearchQuery.__init__"
],
"edited_modules": [
"ads/search.py:SearchQuery"
]
},
"file": "ads/search.py"
}
] | andycasey/ads | 63e1e53e9e495e4b54ee395b263d0dc6d539dcc8 | Search parameters wrapped in parentheses should not be auto-quoted
## Expected Behavior
Don't auto-quote search params wrapped in parentheses.
```python
>>> q = ads.SearchQuery(title='("solar" OR "sun" OR "helio" OR "cme" OR "corona")')
>>> q._query
{'q': ' title:("solar" OR "sun" OR "helio" OR "cme" OR "corona")'... | diff --git a/.gitignore b/.gitignore
index 35b071d..04102ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,8 @@
*idea*
*pyo
*__pycache__*
+*.egg-info
+.coverage
docs/_build
+venv/
diff --git a/README.rst b/README.rst
index 0ab9cd7..8ae5ec2 100644
--- a/README.rst
+++ b/README.rst
@@ -27,4 +27,10 @@ Quickstar... |
andycasey__ads-36 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ads/search.py:SearchQuery.__init__",
"ads/search.py:SearchQuery.__next__"
],
"edited_modules": [
"ads/search.py:SearchQuery"
]
},
"file": "ads/search.py"
}
] | andycasey/ads | 5bd62ef2bf924116374455e222ea9ac8dc416b3a | Number of returned results doesn't correspond to 'rows' key value in SearchQuery
Example code:
````
In [5]: papers = ads.SearchQuery(q="supernova", sort="citation_count", rows=10)
In [6]: print(len(list(papers)))
40
````
Not massively important, but a bit surprising anyway. Any explanation? Thanks! | diff --git a/ads/search.py b/ads/search.py
index eb64e70..fed6c0c 100644
--- a/ads/search.py
+++ b/ads/search.py
@@ -275,7 +275,7 @@ class SearchQuery(BaseQuery):
"title", "reference", "citation"]
def __init__(self, query_dict=None, q=None, fq=None, fl=DEFAULT_FIELDS,
- sor... |
andycasey__ads-64 | [
{
"changes": {
"added_entities": [
"ads/search.py:Article.first_author"
],
"added_modules": null,
"edited_entities": [
"ads/search.py:Article.__unicode__",
"ads/search.py:Article.__eq__",
"ads/search.py:Article.first_author_norm"
],
"edited_mod... | andycasey/ads | 0afd82e0f48ee4debb9047c086488d860415bce7 | Exception handling in Unicode representation of Articles
In the article method `__unicode__()`, the article properties `first_author`, `bibcode` and `year` are used. This can yield an exception if the fields are not included in the original search query; generally for `first_author` as no getter exists, or if deferred ... | diff --git a/ads/search.py b/ads/search.py
index c8a0bb4..8f36421 100644
--- a/ads/search.py
+++ b/ads/search.py
@@ -40,21 +40,20 @@ class Article(object):
return self.__unicode__().encode("utf-8")
def __unicode__(self):
- author = self.first_author or "Unknown author"
- if self.author and... |
andycasey__ads-74 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ads/search.py:SearchQuery.__init__"
],
"edited_modules": [
"ads/search.py:SearchQuery"
]
},
"file": "ads/search.py"
}
] | andycasey/ads | ce1dce7fb2695d6436c112926709fe1a63e881cd | Bibtex issue
<!--- Provide a general summary of the issue in the Title above -->
## Expected Behavior
Hello,
I would like to extract the url of the ADS page associated to each entry. I got it from the bibtex entry, but bibtex does always return none when query from the field. More specifically, querying with the... | diff --git a/ads/search.py b/ads/search.py
index f1b5205..97727de 100644
--- a/ads/search.py
+++ b/ads/search.py
@@ -399,6 +399,12 @@ class SearchQuery(BaseQuery):
else:
self._query["fl"] = ["id"] + self._query["fl"]
+ # remove bibtex and metrics as a safeguard against
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.