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 |
|---|---|---|---|---|---|
hgrecco__pint-pandas-60 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pint_pandas/pint_array.py:PintArray.astype"
],
"edited_modules": [
"pint_pandas/pint_array.py:PintArray"
]
},
"file": "pint_pandas/pint_array.py"
}
] | hgrecco/pint-pandas | df2f7c7200354c2093a1f8f7d27fd085d8b6a038 | Fixing the tests
I'd like to add a PR which fixes #51 but it's not possible at the moment because the tests wouldn't pass, even if I made the right change. More generally, at the moment we can't really do any meaningful pull request reviews because the tests are failing.
@andrewgsavage I think you have the best ove... | diff --git a/CHANGES b/CHANGES
index 61162eb..0ae0912 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,9 @@ pint-pandas Changelog
0.2 (unreleased)
----------------
-- Nothing changed yet.
+- Partial support for pandas 1.2, which allows DataFrames with PintArrays to be plotted #53 #60
+- Fixed bug which prevented creat... |
hgrecco__pint-pandas-69 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pint_pandas/pint_array.py:PintArray.__setitem__",
"pint_pandas/pint_array.py:PintArray._create_method",
"pint_pandas/pint_array.py:PintArray.searchsorted"
],
"edited_modules"... | hgrecco/pint-pandas | 1c443a3d480e72745806884185cb9f17eccf4215 | Error applying assignment operators to series
@hgrecco thanks very much for the recent 0.2 release! I was already making use of the new #47 by installing the dev build, but am happy to see it released 🙂
I came across some edge cases when using assignment operators and compound assignment operators (e.g., `+=`); pa... | diff --git a/CHANGES b/CHANGES
index 525d271..6ca212e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,7 @@ pint-pandas Changelog
- Fixed a bug where units of a quantity where ignored when creating a PintArray. #104
- Quantity arrays may be used to initialise PintArrays without specifying the dtype. #104
- Fixed a bu... |
hgrecco__pint-pandas-87 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pint_pandas/pint_array.py:PintArray.__init__",
"pint_pandas/pint_array.py:PintArray._create_method",
"pint_pandas/pint_array.py:PintArray._reduce"
],
"edited_modules": [
... | hgrecco/pint-pandas | 04d4ed7befb42d3c830885d7f39997eac5392af3 | Very long runtimes for DataFrames with units
Using pint dtypes increases run time significantly compared to standard pandas DataFrames.
Example:
```python
import numpy as np
import pandas as pd
import pint_pandas
def make_df(size, pint_units=True, dtype=float):
if pint_units:
dist_unit ='... | diff --git a/CHANGES b/CHANGES
index 12c2d3b..746db0f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,9 @@ pint-pandas Changelog
0.3 (unreleased)
----------------
-- Nothing changed yet.
+- Fixed a bug which caused the creation of PintArray (and even more so all binary mathematical operations)
+ to convert input arr... |
hh-h__aiohttp-swagger3-52 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "aiohttp_swagger3/__init__.py"
},
{
"changes": {
"added_entities": [
"aiohttp_swagger3/validators.py:StringFormat._missing_"
],
... | hh-h/aiohttp-swagger3 | a4a0a383cceacf93fe611d2285fdec0a15201bcd | Custom string formats
Hello!
In our project we need to validate some string formats, which are not represented in aiohhtp-swagger3, like a IPv4Network (192.168.100.0/24). Specification [says](https://swagger.io/specification/?sbsearch=String#dataTypeFormat), that custom formats may be used even though undefined by ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a2e38bd..9b803cc 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,11 @@
Changelog
=========
+0.4.1 (09-03-2020)
+------------------
+
+- allow for unknown string formats. Closes `#51 <https://github.com/hh-h/aiohttp-swagger3/issues/51>`_
+
0.4.0 (07-03-2020... |
hh-h__aiohttp-swagger3-75 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "aiohttp_swagger3/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"aiohttp... | hh-h/aiohttp-swagger3 | 07135b67c9729b9f1a0ee31e86c7c9c971025296 | Combination of $ref with nullable: true: validation fails
Hello hh-h,
Just went into a validation error for some specific case which is supposed to be supported: combinating an existing model and make it nullable by using:
```yaml
nullable: true
allOf:
- $ref: '#/components/schemas/SomeObject'
```
Workin... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index bc99362..01d6daf 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,12 @@
Changelog
=========
+0.5.3 (14-01-2021)
+------------------
+
+- allOf, oneOf, anyOf can be nullable
+- readOnly should affect only properties
+
0.5.2 (31-12-2020)
------------------
... |
hh-h__aiohttp-swagger3-98 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "aiohttp_swagger3/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"aiohttp... | hh-h/aiohttp-swagger3 | 4ce20d2eb102bbbe7c95a22060a558fc22003618 | Definitions with requestBody / required: false can not be used
Schema with `requestBody` where `required` is set to false can not be used as the library fails to handle them.
The library first raises a 400 with a complaint about the content type `application/octet-stream` not being supported. I would already expect ... | diff --git a/.travis.yml b/.travis.yml
index c9bb4cc..4eb9d8d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,7 +12,6 @@ matrix:
- python: nightly
fast_finish: true
allow_failures:
- - python: 3.10
- python: 3.10-dev
- python: 3.11-dev
- python: nightly
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
in... |
hhatto__autopep8-450 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:get_w605_position"
],
"edited_modules": [
"autopep8.py:get_w605_position"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | 4343c41ca3d52e75af5e95f6b86a6053bcbd9a57 | W605: identical tokens cause infinite loop
There is a bug with the way that tokens are handled with W605 that causes an infinite loop to occur when two identical W605 tokens exist on the same line of code. This infinite loop can be observed both on the command line and by adding a test to the test_autopep8.py unit te... | diff --git a/autopep8.py b/autopep8.py
index 53a8446..e30b4eb 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -1363,7 +1363,7 @@ def get_w605_position(tokens):
'N', 'u', 'U',
]
- for token_type, text, start, end, line in tokens:
+ for token_type, text, start_pos, end_pos, line in tokens:
if... |
hhatto__autopep8-464 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:FixPEP8.fix_w504"
],
"edited_modules": [
"autopep8.py:FixPEP8"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | 40bcf6f126f11f6957f7b2c31d880245843b2242 | Applying W504 may cause syntax error if there are comments
Hi, I just noticed that the following code:
```
x = (1 |
2) # test
```
was being formatted as
```
x = (1|
| 2) # test
```
causing a syntax error. It seems to be related to the presence of the comment.
I'll push a PR shortly | diff --git a/autopep8.py b/autopep8.py
index d07f74c..258f30c 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -1313,14 +1313,15 @@ class FixPEP8(object):
old = []
for t in tts:
if tokenize.COMMENT == t[0] and old:
- comment_index = old[3][1]
+ ... |
hhatto__autopep8-466 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:parse_args"
],
"edited_modules": [
"autopep8.py:parse_args"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | 89886b439f35778ac1edefbc93ad9aa411d889d1 | Inconsistently rewrites W504/3 (newline after/before binary operator)
Consider this input, which has two lines of whitespace above the function
```python
q = 1
def x(y, z):
if (
y and
z
):
pass
```
`autopep8` will not touch it (this is good, this is what I expec... | diff --git a/autopep8.py b/autopep8.py
index 8fc548a..3a55a01 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -100,6 +100,9 @@ SHORTEN_OPERATOR_GROUPS = frozenset([
DEFAULT_IGNORE = 'E226,E24,W50,W690' # TODO: use pycodestyle.DEFAULT_IGNORE
DEFAULT_INDENT_SIZE = 4
+# these fixes conflict with each other, if the `-... |
hhatto__autopep8-467 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:get_module_imports_on_top_of_file"
],
"edited_modules": [
"autopep8.py:get_module_imports_on_top_of_file"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | 89886b439f35778ac1edefbc93ad9aa411d889d1 | Imports are always moved to top of the file
Running autopep8 on
```py
"""Module docstring"""
a = 5
import random
import itertools
```
results in
```py
import itertools
import random
"""module docstring"""
a = 5
```
Instead of
```py
"""module docstring"""
import itertools
import random
a = 5
``` | diff --git a/autopep8.py b/autopep8.py
index 8fc548a..e8c1b9e 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -82,6 +82,7 @@ COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+([^][)(}{]+?)\s+(in|is)\s')
COMPARE_NEGATIVE_REGEX_THROUGH = re.compile(r'\b(not\s+in|is\s+not)\s')
BARE_EXCEPT_REGEX = re.compile(r'except\s*:')
... |
hhatto__autopep8-491 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:get_module_imports_on_top_of_file"
],
"edited_modules": [
"autopep8.py:get_module_imports_on_top_of_file"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | fff90d479862f65ac57678f150a97217439c1bc9 | SyntaxError rewriting specific combination of imports and defs
---
## Python Code
```python
def setup():
pass
from a import b
from b import c
from b import d
```
## Command Line and Configuration
Command Line
```shell
$ autopep8 -i t.py
Traceback (most recent call last):
File "/tmp/pyqtgraph... | diff --git a/.gitignore b/.gitignore
index 7139401..3dea285 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
.build-*/
README.html
__pycache__
+.mypy_cache/
build
.coverage
coverage.xml
diff --git a/autopep8.py b/autopep8.py
index 01b90d6..8d73736 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -48,6 +48,... |
hhatto__autopep8-580 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:FixPEP8.fix_w605",
"autopep8.py:get_w605_position"
],
"edited_modules": [
"autopep8.py:FixPEP8",
"autopep8.py:get_w605_position"
]
},
"file"... | hhatto/autopep8 | 55887dc214bf085ac533879dca0fae3bd1a84cfc | autopep8 wrongly adds raw string
autopep8 correctly fixes code from this:
'^(\d*)x(\d*):(\d*)$'
to:
r'^(\d*)x(\d*):(\d*)$'
The problem is when the string has both invalid and valid escape sequence.
Then autopep8 wrong adds r'...' , which breaks legacy code.
I think autopep8 shouldn't add r'...'... | diff --git a/autopep8.py b/autopep8.py
index 2a2a067..a7be266 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -1384,56 +1384,10 @@ class FixPEP8(object):
next_line[next_line_indent:])
def fix_w605(self, result):
- (line_index, _, target) = get_index_offset_contents(result,
- ... |
hhatto__autopep8-608 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:FixPEP8.__init__",
"autopep8.py:refactor",
"autopep8.py:_remove_leading_and_normalize",
"autopep8.py:Reindenter.__init__",
"autopep8.py:normalize_line_endings... | hhatto/autopep8 | 32c78a3a07d7ee35500e6f20bfcd621f3132c42e | Ignore Settings for W292 Do Not Work
When attempting to disable formatting for W292, autopep8 does not follow the ignore settings provided by any vector.
## Python Code
`test.py`
```python
def fn():
pass
```
## Command Line and Configuration
`setup.cfg`
```ini
[pycodestyle]
select =
ignore = W29... | diff --git a/autopep8.py b/autopep8.py
index b20d812..c1f3caf 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -531,6 +531,7 @@ class FixPEP8(object):
options and (options.aggressive >= 2 or options.experimental) else
self.fix_long_line_physically)
self.fix_e703 = self.fix_e702
+ ... |
hhatto__autopep8-663 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"autopep8.py:filter_results"
],
"edited_modules": [
"autopep8.py:filter_results"
]
},
"file": "autopep8.py"
}
] | hhatto/autopep8 | d0289ea8af969a2bcd539f6c84e84cd3ff8c1869 | Some E265 errors won't be fixed
---
## Python Code
```python
#print(" ")
```
## Command Line and Configuration
Config:
N/A
Command Line
```shell
$ autopep8 --diff --select=E265 foo.py
```
## Your Environment
* Python version: 3.10.9
* autopep8 version: 1.7.1 (pycodestyle: 2.9.1)
* Platform: WSL... | diff --git a/autopep8.py b/autopep8.py
index 27809fc..75cb27d 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -3330,7 +3330,7 @@ def filter_results(source, results, aggressive):
continue
if r['line'] in commented_out_code_line_numbers:
- if issue_id.startswith(('e26', 'e501')):
+ ... |
hhatto__autopep8-748 | [
{
"changes": {
"added_entities": [
"autopep8.py:FixPEP8._check_affected_anothers"
],
"added_modules": null,
"edited_entities": [
"autopep8.py:FixPEP8.__init__",
"autopep8.py:FixPEP8._fix_source"
],
"edited_modules": [
"autopep8.py:FixPEP8"
... | hhatto/autopep8 | f0289518ac3c676db2ae1cd4632fa86fad449728 | "for<space><space>" gets changed to "f<space>or<space>"
---
## Python Code
```python
cm_opts = ([1] +
[d for d in [3,4]])
```
Command Line
```shell
$ autopep8 --diff --recursive --aggressive --select E27,W504 foo.py
--- original/foo.py
+++ fixed/foo.py
@@ -1,2 +1,2 @@
-cm_opts = ([1] +
... | diff --git a/autopep8.py b/autopep8.py
index e3666bc..437c92f 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -477,6 +477,7 @@ class FixPEP8(object):
self.source = sio.readlines()
self.options = options
self.indent_word = _get_indentword(''.join(self.source))
+ self.original_source =... |
hhm970__c10-games-tracker-project-161 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pipeline/extract/epic/extract_epic.py:get_games_data"
],
"edited_modules": [
"pipeline/extract/epic/extract_epic.py:get_games_data"
]
},
"file": "pipeline/extract/epic/... | hhm970/c10-games-tracker-project | 569298c6e17c7be0ec473d31b26f8739968190c2 | BUG:Change epic base url
## Description
- change extract epic base url to have a unique name to allow for terraform to build it with the other extract functions
## Required Files
- `extract_epic.py`
## User Story
- As an engineer in order to be able to terraform the infrastructure all the files must use unique base u... | diff --git a/pipeline/extract/epic/extract_epic.py b/pipeline/extract/epic/extract_epic.py
index 72aed7f..3e59c00 100644
--- a/pipeline/extract/epic/extract_epic.py
+++ b/pipeline/extract/epic/extract_epic.py
@@ -38,7 +38,7 @@ def get_games_data(config) -> list[dict]:
headers = {
"User-Agent": "Mozilla/5.... |
hhm970__c10-games-tracker-project-188 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pipeline/extract/gog/extract_gog.py:get_release_date",
"pipeline/extract/gog/extract_gog.py:get_game_details",
"pipeline/extract/gog/extract_gog.py:get_games_from_page",
"pipelin... | hhm970/c10-games-tracker-project | d4a7b8d733048d544bfce051c1133fd8fd3eb679 | More filtering on GOG
## Description
Filter out games which have '''Buying this game on GOG.COM you will receive a censored version of the game.''' or '''This Game may contain content not appropriate for all ages or may not be appropriate for viewing at work.'''
## Required Files
- extract_gog.py
## User Story
As a... | diff --git a/pipeline/extract/gog/extract_gog.py b/pipeline/extract/gog/extract_gog.py
index 1f07801..8f50fe9 100644
--- a/pipeline/extract/gog/extract_gog.py
+++ b/pipeline/extract/gog/extract_gog.py
@@ -12,6 +12,8 @@ from bs4.element import Tag
PLATFORM_TITLE = 'window.productcardData.cardProductSystemRequiremen... |
hhm970__c10-games-tracker-project-88 | [
{
"changes": {
"added_entities": [
"pipeline/extract_epic.py:remove_platforms_from_tags"
],
"added_modules": [
"pipeline/extract_epic.py:remove_platforms_from_tags"
],
"edited_entities": [
"pipeline/extract_epic.py:get_game_details"
],
"edited_mo... | hhm970/c10-games-tracker-project | 89f3e6ecfaafca4b4c5be2ea2716002ddef8c23b | remove platforms from tag list
## Description
From the current set up of our database as seen in #72. We do not need the platform within the tags.
## Required Files
- `extract_epic.py`
## User Story
As an engineer it is important to closely follow the database design and prevent any unwanted data going into the datab... | diff --git a/pipeline/extract_epic.py b/pipeline/extract_epic.py
index 2f692a8..16ef7ca 100644
--- a/pipeline/extract_epic.py
+++ b/pipeline/extract_epic.py
@@ -100,16 +100,27 @@ def get_platform_ids(game_tags: list[str]) -> list[int]:
return platform_ids
+def remove_platforms_from_tags(game_tags: list[str]) -... |
hhm970__c10-games-tracker-project-90 | [
{
"changes": {
"added_entities": [
"pipeline/extract/extract_gog.py:get_game_data_json"
],
"added_modules": [
"pipeline/extract/extract_gog.py:get_game_data_json"
],
"edited_entities": [
"pipeline/extract/extract_gog.py:get_json",
"pipeline/extract/e... | hhm970/c10-games-tracker-project | 130a085cdc276d85a86c8dadfed6985f2582170d | Test extract_gog.py
## Description
Write a test file to test extract_gog.py
## Required Files
- test_extract_gog.py
## User Story
As an engineer I need well tested scripts so I am more confident they won't break. | diff --git a/pipeline/extract/extract_gog.py b/pipeline/extract/extract_gog.py
index f20ddce..c429930 100644
--- a/pipeline/extract/extract_gog.py
+++ b/pipeline/extract/extract_gog.py
@@ -8,6 +8,7 @@ from time import sleep
from dotenv import load_dotenv
import requests as req
from bs4 import BeautifulSoup
+from bs4... |
hhursev__recipe-scrapers-1061 | [
{
"changes": {
"added_entities": [
"recipe_scrapers/_abstract.py:AbstractScraper.ratings_count"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"recipe_scrapers/_abstract.py:AbstractScraper"
]
},
"file": "recipe_scrapers/_abstrac... | hhursev/recipe-scrapers | c3128face6ad22c79e665dc5dc33ed4848551795 | Rating total count?
I can see in the allrecipe.py file you have a ratings method, however I don't see a total count of people who made up that rating. I'm assuming because it's really schema driven, those types of details are implementation specific. Is it alright if I make a change specific to that AllRecipes class to... | diff --git a/docs/in-depth-guide-scraper-functions.md b/docs/in-depth-guide-scraper-functions.md
index a7a65732..22ee37cb 100644
--- a/docs/in-depth-guide-scraper-functions.md
+++ b/docs/in-depth-guide-scraper-functions.md
@@ -301,6 +301,15 @@ scraper.ratings()
# Not implemented!
```
+### `ratings_count() -> float`... |
hhursev__recipe-scrapers-1187 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/__init__.py:scrape_html"
],
"edited_modules": [
"recipe_scrapers/__init__.py:scrape_html"
]
},
"file": "recipe_scrapers/__init__.py"
}
] | hhursev/recipe-scrapers | 4b2b20f8dc8c6e7adbe7cdd1a88689be30afcae8 | V14: using 'scrape_html' for an unsupported website unexpectedly implies 'wild_mode'.
During prep for the V15 migration I'm planning to add a deprecation warning to the `scrape_me` function in V14. It'll continue to be available and usable while the V14 branch is maintained, although we should help folks become aware ... | diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py
index f484e803..d48dbebb 100644
--- a/recipe_scrapers/__init__.py
+++ b/recipe_scrapers/__init__.py
@@ -822,6 +822,10 @@ def scrape_html(
scraper = SCRAPERS[host_name]
if not scraper:
+ if not options.get("wild_mode", Fals... |
hhursev__recipe-scrapers-1381 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/_schemaorg.py:SchemaOrg.__init__"
],
"edited_modules": [
"recipe_scrapers/_schemaorg.py:SchemaOrg"
]
},
"file": "recipe_scrapers/_schemaorg.py"
},
{... | hhursev/recipe-scrapers | 43093df7e03591d65b56a42b5876d5052b43d79f | schema.org author retrieval: author from WebPage not returned
**Pre-filing checks**
- [x] I have searched for open issues that report the same problem
- [x] I have checked that the bug affects the latest version of the library
**The URL of the recipe(s) that are not being scraped correctly**
- https://www.rew... | diff --git a/.flake8 b/.flake8
index d3e86fd9..76661ede 100644
--- a/.flake8
+++ b/.flake8
@@ -3,7 +3,7 @@
# and would error on `str.format()` usage
ignore = E203, E501, W503, FS002, N818
max-line-length = 88
-max-complexity = 20
+max-complexity = 21
select = B,C,E,F,N,W,T4,B9
exclude =
./.tox/
diff --git a/r... |
hhursev__recipe-scrapers-415 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/domesticateme.py:DomesticateMe.host"
],
"edited_modules": [
"recipe_scrapers/domesticateme.py:DomesticateMe"
]
},
"file": "recipe_scrapers/domesticateme... | hhursev/recipe-scrapers | c4783179ed96e98722fb7572b2fcfefe24323d1b | mindmegette.hu and other hosts contains www
I see that the scraper for mindmegette.hu [contains `www.` in its host](https://github.com/hhursev/recipe-scrapers/blob/master/recipe_scrapers/mindmegette.py#L8) unlike other hosts.
I'm currently developing an application using your fantastic library, and I want to do ur... | diff --git a/README.rst b/README.rst
index 28f7782f..68fb495f 100644
--- a/README.rst
+++ b/README.rst
@@ -145,7 +145,7 @@ Scrapers available for:
- `https://hellofresh.com/ <https://hellofresh.com>`_
- `https://hellofresh.co.uk/ <https://hellofresh.co.uk>`_
- `https://www.hellofresh.de/ <https://www.hellofresh.de/>... |
hhursev__recipe-scrapers-500 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/_utils.py:get_minutes"
],
"edited_modules": [
"recipe_scrapers/_utils.py:get_minutes"
]
},
"file": "recipe_scrapers/_utils.py"
}
] | hhursev/recipe-scrapers | 941f062572b15264be3fdf802b66c7eaaba7b291 | Handle fractions and decimals in get_minutes()
current the get_minutes() utility fails to hour durations when parsing duration attributes.
Examples
- "1.5 hours"
- "1 1/2 hours"
- "1½ hours"
I believe the code below works, but can is probably inefficient and I'm not confident on the full ramifications elsewhere i... | diff --git a/recipe_scrapers/_utils.py b/recipe_scrapers/_utils.py
index 07f826bf..c84a4ac2 100644
--- a/recipe_scrapers/_utils.py
+++ b/recipe_scrapers/_utils.py
@@ -3,8 +3,19 @@ import re
from ._exceptions import ElementNotFoundInHtml
+FRACTIONS = {
+ "¼": 0.25,
+ "½": 0.50,
+ "¾": 0.75,
+ "⅓": 0.33,... |
hhursev__recipe-scrapers-591 | [
{
"changes": {
"added_entities": [
"recipe_scrapers/food.py:Food.image"
],
"added_modules": null,
"edited_entities": [
"recipe_scrapers/food.py:Food.title",
"recipe_scrapers/food.py:Food.total_time",
"recipe_scrapers/food.py:Food.yields",
"recipe_s... | hhursev/recipe-scrapers | 998a3ad5501fad8b101a03b441e0866a88248b7e | Broken Scraper for food.com
Thanks for filing a bug report with us!
If your request is about a website that is not supported, please open a 'new scraper' issue request instead.
To help get the issue fixed, please fill in the information below.
**Pre-filing checks**
- [x] I have searched for open issues that... | diff --git a/recipe_scrapers/food.py b/recipe_scrapers/food.py
index 3950ad29..0b3b37ca 100644
--- a/recipe_scrapers/food.py
+++ b/recipe_scrapers/food.py
@@ -1,5 +1,4 @@
from ._abstract import AbstractScraper
-from ._utils import get_minutes, get_yields, normalize_string
class Food(AbstractScraper):
@@ -8,22 +7,... |
hhursev__recipe-scrapers-839 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/realsimple.py:RealSimple.yields",
"recipe_scrapers/realsimple.py:RealSimple.ingredients"
],
"edited_modules": [
"recipe_scrapers/realsimple.py:RealSimple"
... | hhursev/recipe-scrapers | 8ced0227b3b16c532fc5ebf3060c99ee0452adab | Real Simple Ingredients
**Pre-filing checks**
- [x] I have searched for open issues that report the same problem
- [x] I have checked that the bug affects the latest version of the library
**The URL of the recipe(s) that are not being scraped correctly**
- [https://www.realsimple.com/crispy-peanut-tofu-with-s... | diff --git a/recipe_scrapers/realsimple.py b/recipe_scrapers/realsimple.py
index 29ef67ff..cfed0b8a 100644
--- a/recipe_scrapers/realsimple.py
+++ b/recipe_scrapers/realsimple.py
@@ -20,12 +20,26 @@ class RealSimple(AbstractScraper):
return self.schema.total_time()
def yields(self):
- return get_... |
hhursev__recipe-scrapers-895 | [
{
"changes": {
"added_entities": [
"recipe_scrapers/_schemaorg.py:SchemaOrg._find_entity"
],
"added_modules": null,
"edited_entities": [
"recipe_scrapers/_schemaorg.py:SchemaOrg.__init__",
"recipe_scrapers/_schemaorg.py:SchemaOrg.author"
],
"edited_mod... | hhursev/recipe-scrapers | 86e57c54337c530c0b47c903ece3dc93e4234f50 | Support retrieval of author information when it is cross-referenced from schema.org recipe entities
Sometimes, author information for a `schema.org` `Recipe` entity is provided directly within the entity itself, as nested fields/properties.
However, often the metadata we're extracting is presented using [JSON-LD](ht... | diff --git a/recipe_scrapers/_schemaorg.py b/recipe_scrapers/_schemaorg.py
index a3817fc4..861b8648 100644
--- a/recipe_scrapers/_schemaorg.py
+++ b/recipe_scrapers/_schemaorg.py
@@ -24,13 +24,22 @@ class SchemaOrg:
itemtypes = itemtype if isinstance(itemtype, list) else [itemtype]
return schematype.l... |
hhursev__recipe-scrapers-915 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"recipe_scrapers/_utils.py:get_minutes"
],
"edited_modules": [
"recipe_scrapers/_utils.py:get_minutes"
]
},
"file": "recipe_scrapers/_utils.py"
},
{
"changes": {... | hhursev/recipe-scrapers | 7509c98e39ed717c187226c7b4a02a4a6be984fe | bug: get_minutes returns precise-zero-minutes during fallback text matching case
**Pre-filing checks**
- [x] I have searched for open issues that report the same problem
- [x] I have checked that the bug affects the latest version of the library
**The URL of the recipe(s) that are not being scraped correctly**
... | diff --git a/recipe_scrapers/_utils.py b/recipe_scrapers/_utils.py
index fe3a401a..064046bd 100644
--- a/recipe_scrapers/_utils.py
+++ b/recipe_scrapers/_utils.py
@@ -75,6 +75,9 @@ def get_minutes(element, return_zero_on_not_found=False): # noqa: C901: TODO
matched = TIME_REGEX.search(time_text)
+ if match... |
hidrokit__hidrokit-121 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "hidrokit/__version__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hidrokit/pre... | hidrokit/hidrokit | 6f2cfd89a468405d1a6cd7e7ffe022dbc0c70951 | bug: timeseries.timestep_table error saat menggunakan keep_first
### Sistem
* Versi hidrokit: 0.4.0
* Distribusi python:
```
:: python version: 3.7.7
:: numpy version: 1.18.5
:: pandas version: 1.0.5
:: matplotlib version: 3.2.2
:: hydroerr version: 1.24
:: ... | diff --git a/CITATION.cff b/CITATION.cff
index caf5fad..550bb8c 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -9,6 +9,6 @@ date-released: 2020-01-15
doi: 10.5281/zenodo.3276220
license: MIT
message: "Jika menggunakan perangkat lunak ini, mohon sitasi menggunakan metadata ini."
-repository-code: "https://github.com... |
hidrokit__hidrokit-122 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "hidrokit/__version__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hidrokit/pre... | hidrokit/hidrokit | 504e283604ce2c726cbb9bce0af5c41fe233f4e5 | bug: timeseries.timestep_table error saat menggunakan keep_first
### Sistem
* Versi hidrokit: 0.4.0
* Distribusi python:
```
:: python version: 3.7.7
:: numpy version: 1.18.5
:: pandas version: 1.0.5
:: matplotlib version: 3.2.2
:: hydroerr version: 1.24
:: ... | diff --git a/CITATION.cff b/CITATION.cff
index caf5fad..550bb8c 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -9,6 +9,6 @@ date-released: 2020-01-15
doi: 10.5281/zenodo.3276220
license: MIT
message: "Jika menggunakan perangkat lunak ini, mohon sitasi menggunakan metadata ini."
-repository-code: "https://github.com... |
holoviz__datashader-1001 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"datashader/transfer_functions/__init__.py:dynspread",
"datashader/transfer_functions/__init__.py:_array_density",
"datashader/transfer_functions/__init__.py:_rgb_density"
],
... | holoviz/datashader | 7192cafd1033db9e4ca3b2f0c8b0a2acecc386ef | Improving dynspread
Given Datashader's model of a point as a mathematically ideal, infinitesimally small location, Datashader relies on spreading (image dilation) for making isolated datapoints visible on high-resolution displays. However, spreading inherently destroys data for non-isolated datapoints, which means that... | diff --git a/datashader/transfer_functions/__init__.py b/datashader/transfer_functions/__init__.py
index 41651b4..d7fb42e 100644
--- a/datashader/transfer_functions/__init__.py
+++ b/datashader/transfer_functions/__init__.py
@@ -744,60 +744,70 @@ def dynspread(img, threshold=0.5, max_px=3, shape='circle', how=None, nam... |
holoviz__datashader-1160 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"datashader/glyphs/line.py:LineAxis0Multi.validate",
"datashader/glyphs/line.py:LinesAxis1.validate",
"datashader/glyphs/line.py:LinesAxis1XConstant.validate",
"datashader/glyphs/... | holoviz/datashader | a1d9513915a870dda6348dec4e0df52f4f702183 | Insufficient validation of Canvas.line input lengths
The sizes of the possible inputs to `Canvas.line()` are not sufficiently validated. Consider this example of `LinesAxis1XConstant` which accepts a `numpy` array for the `x` values and a number of columns of a `pandas.DataFrame` for the `y` values:
```python
impor... | diff --git a/datashader/glyphs/line.py b/datashader/glyphs/line.py
index 47c7f7c..7ecd9d2 100644
--- a/datashader/glyphs/line.py
+++ b/datashader/glyphs/line.py
@@ -125,6 +125,10 @@ class LineAxis0Multi(_PointLike, _AntiAliasedLine):
elif not all([isreal(in_dshape.measure[str(ycol)]) for ycol in self.y]):
... |
holoviz__datashader-1213 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"datashader/compiler.py:make_info"
],
"edited_modules": [
"datashader/compiler.py:make_info"
]
},
"file": "datashader/compiler.py"
},
{
"changes": {
"added... | holoviz/datashader | 31b31826d74da38e4878f87c3e44511d08d302df | "Too many positional arguments" in pipeline when line_width>0
#### ALL software version info
datashader version 0.14.4
#### Description of expected behavior and the observed behavior
When setting non-zero line_width on `LineAxis0` glyphs (passed to `Pipeline`), an error is raised. With `set_line_width(0)`, or not ... | diff --git a/datashader/compiler.py b/datashader/compiler.py
index bc27c73..8e3f9ee 100644
--- a/datashader/compiler.py
+++ b/datashader/compiler.py
@@ -32,7 +32,7 @@ def compile_components(agg, schema, glyph, *, antialias=False, cuda=False):
Takes the aggregate shape, and returns a tuple of initialized numpy
... |
holoviz__holoviews-4898 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/plotting/util.py:color_intervals"
],
"edited_modules": [
"holoviews/plotting/util.py:color_intervals"
]
},
"file": "holoviews/plotting/util.py"
}
] | holoviz/holoviews | f39e0a08f4eb598f8cb802cdb7c98cf99f46d87b | Color levels not respected
#### ALL software version info
holoviews 1.13.5 pypi_0 pypi
Python 3.8.5 (default, Sep 4 2020, 02:22:02) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin
#### Description of expected behavior and the observed behavior
When passing colour_levels to an i... | diff --git a/holoviews/plotting/util.py b/holoviews/plotting/util.py
index 6dcd6bb2f..4cb3fc26d 100644
--- a/holoviews/plotting/util.py
+++ b/holoviews/plotting/util.py
@@ -989,8 +989,7 @@ def color_intervals(colors, levels, clip=None, N=255):
if clip is not None:
clmin, clmax = clip
lidx = int(r... |
holoviz__holoviews-5383 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/dimension.py:Dimension.pprint_value"
],
"edited_modules": [
"holoviews/core/dimension.py:Dimension"
]
},
"file": "holoviews/core/dimension.py"
}
] | holoviz/holoviews | 67f1fcf35586fdd2e9d83786e3110f87310123dd | Rendering an NdOverlay with bool kdim raises TypeError
<details>
<summary>
The conda environment's packages are collapsed here.
</summary>
```
# Name Version Build Channel
abseil-cpp 20210324.2 hd77b12b_0
aom 3.3.0 ... | diff --git a/holoviews/core/dimension.py b/holoviews/core/dimension.py
index 6559a3c53..e8a1d7b42 100644
--- a/holoviews/core/dimension.py
+++ b/holoviews/core/dimension.py
@@ -416,7 +416,7 @@ class Dimension(param.Parameterized):
else:
formatted_value = formatter % value
... |
holoviz__holoviews-5418 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/plotting/plotly/element.py:ColorbarPlot.get_color_opts"
],
"edited_modules": [
"holoviews/plotting/plotly/element.py:ColorbarPlot"
]
},
"file": "holoviews/plo... | holoviz/holoviews | ccd0bc8f52ccb8ffe62fe6413b2f9902ae1e70c9 | Plotly Scatter 3D not rendering colorbar title correctly
#### ALL software version info
python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27)
[GCC 9.3.0]
python-bits: 64
OS: Linux
OS-release: 5.4.0-1030-aws
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8
... | diff --git a/examples/reference/elements/plotly/Scatter3D.ipynb b/examples/reference/elements/plotly/Scatter3D.ipynb
index 92b89aef8..fd5fa3102 100644
--- a/examples/reference/elements/plotly/Scatter3D.ipynb
+++ b/examples/reference/elements/plotly/Scatter3D.ipynb
@@ -20,6 +20,7 @@
"outputs": [],
"source": [
... |
holoviz__holoviews-5950 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/plotting/bokeh/element.py:ElementPlot._create_extra_axes",
"holoviews/plotting/bokeh/element.py:ElementPlot._axis_properties"
],
"edited_modules": [
"holoviews/plot... | holoviz/holoviews | ad31edadbd1d56e7eb215f36b912ac17ed0e13e2 | `subcoordinate_y` y-tick misalignment when overlaying VSpan
When using `subcoordinate_y`, the y-tick becomes misaligned when overlaying an annotation (hv.VSpan).
<details>
<summary>Code with ANNOTATE switch</summary>
```python
ANNOTATE = False
import numpy as np
import holoviews as hv
from bokeh.models i... | diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
index 60bf7f45c..d1d44b4be 100644
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -605,7 +605,7 @@ class ElementPlot(BokehPlot, GenericElementPlot):
'axis_label_text_font_si... |
holoviz__holoviews-5961 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/util.py:unique_array"
],
"edited_modules": [
"holoviews/core/util.py:unique_array"
]
},
"file": "holoviews/core/util.py"
},
{
"changes": {
... | holoviz/holoviews | 3adb9989d90ccdb83102f32f7c1bc391bb22e91a | ImageStack doesn't allow non-square data
#### ALL software version info
holoviews 1.18.0
bokeh 3.3.0
#### Description of expected behavior and the observed behavior
Looks like the x/y dimensions got swapped somewhere.
```python
hv.ImageStack(np.random.random((10,10,3))) # works
hv.ImageStack(np.random.random... | diff --git a/examples/reference/elements/bokeh/ImageStack.ipynb b/examples/reference/elements/bokeh/ImageStack.ipynb
index 903364b3c..7db2084ca 100644
--- a/examples/reference/elements/bokeh/ImageStack.ipynb
+++ b/examples/reference/elements/bokeh/ImageStack.ipynb
@@ -9,7 +9,7 @@
" <dt>Title</dt> <dd> ImageStack ... |
holoviz__holoviews-6234 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/sheetcoords.py:Slice.__new__"
],
"edited_modules": [
"holoviews/core/sheetcoords.py:Slice"
]
},
"file": "holoviews/core/sheetcoords.py"
},
{
"cha... | holoviz/holoviews | 945e1798fa7c7b97a1135e8db78eac3b994541c1 | Test suite are sensitive to run order
When trying to apply parallelization with `pytest-xdist` to the test suite (in `holoviews/pytest`), I noticed that it is very dependent on the run order.
If the order is randomized with something like `pytest-random-order` and the following command: `pytest holoviews/tests --r... | diff --git a/.github/workflows/nightly_lock.yaml b/.github/workflows/nightly_lock.yaml
index c6fda817a..9b93b85a2 100644
--- a/.github/workflows/nightly_lock.yaml
+++ b/.github/workflows/nightly_lock.yaml
@@ -4,6 +4,9 @@ on:
schedule:
- cron: "0 0 * * *"
+env:
+ PACKAGE: "holoviews"
+
jobs:
pixi_lock:
... |
holoviz__holoviews-6250 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/options.py:Store.info"
],
"edited_modules": [
"holoviews/core/options.py:Store"
]
},
"file": "holoviews/core/options.py"
}
] | holoviz/holoviews | d458f604ecf07bd264bef0dab788c742d30e88c9 | hv.help errors on object created using hvplot: AttributeError: 'NoneType' object has no attribute 'registry'
I'm trying to add tooltips for hvplot in https://github.com/holoviz/hvplot/issues/789. As a part of would like to use `hv.help` to demonstrate how easy it is to drop into HoloViews for more power and flexibility... | diff --git a/holoviews/core/options.py b/holoviews/core/options.py
index 1bb4a7a12..35f7b4e79 100644
--- a/holoviews/core/options.py
+++ b/holoviews/core/options.py
@@ -1253,7 +1253,7 @@ class Store:
parameterized_class = (isinstance(obj,type)
and issubclass(obj,param.Parameter... |
holoviz__holoviews-6269 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/dimension.py:LabelledData.__setstate__"
],
"edited_modules": [
"holoviews/core/dimension.py:LabelledData"
]
},
"file": "holoviews/core/dimension.py"
},... | holoviz/holoviews | 4bd31bcf1ac2aa6f11897de6f4e7fe830d088aee | Empty output in Colab
#### ALL software version info
Google Colab
```
sys.version_info: sys.version_info(major=3, minor=10, micro=12, releaselevel='final', serial=0)
ipywidgets.__version__: 8.1.1
bokeh.__version__: 3.3.2
jupyter_bokeh.__version__: 3.0.7
holoviews.__version__: 1.17.1
```
#### Description... | diff --git a/holoviews/core/dimension.py b/holoviews/core/dimension.py
index 56b348a63..fa05ac8e5 100644
--- a/holoviews/core/dimension.py
+++ b/holoviews/core/dimension.py
@@ -716,37 +716,27 @@ class LabelledData(param.Parameterized):
"Restores options applied to this object."
d = param_aliases(d)
... |
holoviz__holoviews-6290 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/data/pandas.py:PandasInterface.init",
"holoviews/core/data/pandas.py:PandasInterface.groupby"
],
"edited_modules": [
"holoviews/core/data/pandas.py:PandasInter... | holoviz/holoviews | e243fe080963956d4a1bc87aa6ccfad676cea671 | Spans and Lines don’t support half-open hard ranges
#### ALL software version info
HoloViews: 1.18.1
Pandas: 2.1.4
NumPy: 1.26.3
Bokeh: 3.3.3
Matplotlib: 3.8.2
Python: 3.10.12
#### Description of error
The `*Spans` and `*Lines` annotations don’t support hard ranges unless both ends are specified.
Singula... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b07bbc720..75b25b119 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -20,7 +20,7 @@ repos:
- id: check-json
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.4.9
+ rev:... |
holoviz__holoviews-6297 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/data/pandas.py:PandasInterface.init"
],
"edited_modules": [
"holoviews/core/data/pandas.py:PandasInterface"
]
},
"file": "holoviews/core/data/pandas.py"
... | holoviz/holoviews | febe07506bda2c433ac31938ce4c5aa62335559d | Popup is clipped / hidden behind plot
Not sure if it's possible to adjust the zorder of the Bokeh popup panel?
```
import numpy as np
import panel as pn
import holoviews as hv
points = hv.Points(np.random.randn(1000, 2))
def form(name):
text_input = pn.widgets.TextInput(name='Description')
butto... | diff --git a/holoviews/core/data/pandas.py b/holoviews/core/data/pandas.py
index a097bdf95..a667fd92d 100644
--- a/holoviews/core/data/pandas.py
+++ b/holoviews/core/data/pandas.py
@@ -72,7 +72,7 @@ class PandasInterface(Interface, PandasAPI):
if kdims and not (len(kdims) == len(index_names) and {dimensi... |
holoviz__holoviews-6301 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/plotting/bokeh/chart.py:BarPlot.get_data"
],
"edited_modules": [
"holoviews/plotting/bokeh/chart.py:BarPlot"
]
},
"file": "holoviews/plotting/bokeh/chart.py"
... | holoviz/holoviews | e5f7aede7a58902677eb995b8fd67c54ae9ae3ab | Continous Bars no longer working
I'm trying to make a `bar` plot with hvplot using timeseries data. I would like to give positive values a green bar color and negative values a red bar color to make it very clear where the changes are positive and negative.
I've tried formatting my time as strings, ints and datatime... | diff --git a/holoviews/plotting/bokeh/chart.py b/holoviews/plotting/bokeh/chart.py
index 0bbd705ad..17ef69983 100644
--- a/holoviews/plotting/bokeh/chart.py
+++ b/holoviews/plotting/bokeh/chart.py
@@ -922,7 +922,8 @@ class BarPlot(BarsMixin, ColorbarPlot, LegendPlot):
is_dt = isdatetime(xvals)
... |
holoviz__holoviews-6346 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/core/data/pandas.py:PandasInterface.groupby",
"holoviews/core/data/pandas.py:PandasInterface.aggregate"
],
"edited_modules": [
"holoviews/core/data/pandas.py:Pandas... | holoviz/holoviews | c1e22a3e2d38046da285ae3c67f076e60c19226a | Pandas `observed=False` warnings
The warnings:
```
[/Users/mliquet/dev/holoviews/holoviews/core/data/pandas.py:298](http://localhost:8889/Users/mliquet/dev/holoviews/holoviews/core/data/pandas.py#line=297): FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of... | diff --git a/holoviews/core/data/pandas.py b/holoviews/core/data/pandas.py
index 300391cbf..c09b0348e 100644
--- a/holoviews/core/data/pandas.py
+++ b/holoviews/core/data/pandas.py
@@ -7,6 +7,7 @@ from .. import util
from ..dimension import Dimension, dimension_name
from ..element import Element
from ..ndmapping imp... |
holoviz__holoviews-6462 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holoviews/plotting/bokeh/raster.py:QuadMeshPlot.get_data"
],
"edited_modules": [
"holoviews/plotting/bokeh/raster.py:QuadMeshPlot"
]
},
"file": "holoviews/plotting/boke... | holoviz/holoviews | e2d948ed2acc69dce1477cb777fee39134b1fefa | hv.QuadMesh - strange behavior with the `vdim` parameter
<!--
Thanks for contacting us! Please read and follow these instructions carefully, then you can delete this introductory text. Note that the issue tracker is NOT the place for usage questions and technical assistance; post those at [Discourse](https://discourse.... | diff --git a/holoviews/plotting/bokeh/raster.py b/holoviews/plotting/bokeh/raster.py
index 056e49e5c..99f524752 100644
--- a/holoviews/plotting/bokeh/raster.py
+++ b/holoviews/plotting/bokeh/raster.py
@@ -363,7 +363,7 @@ class QuadMeshPlot(ColorbarPlot):
if self.invert_axes: x, y = y, x
cmapper = se... |
home-assistant__core-134506 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"homeassistant/components/backup/manager.py:CoreBackupReaderWriter.async_receive_backup"
],
"edited_modules": [
"homeassistant/components/backup/manager.py:CoreBackupReaderWriter"
... | home-assistant/core | 629d108078c05d8b032452fc678955ad6029ac31 | Restoring a backup from a fresh instance fails
### The problem
When attempting to upload and restore a backup of a brand new instance of Home Assistant (without the backups directory) the uploader fails with a 500 status code.
No entries are seen in HA logs, however you can see the following in the HTTP request r... | diff --git a/homeassistant/components/backup/manager.py b/homeassistant/components/backup/manager.py
index 33405d97883..4d509003a21 100644
--- a/homeassistant/components/backup/manager.py
+++ b/homeassistant/components/backup/manager.py
@@ -1294,6 +1294,7 @@ class CoreBackupReaderWriter(BackupReaderWriter):
if... |
honeybadger-io__honeybadger-python-58 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"honeybadger/utils.py:filter_dict"
],
"edited_modules": [
"honeybadger/utils.py:filter_dict"
]
},
"file": "honeybadger/utils.py"
}
] | honeybadger-io/honeybadger-python | 2e9b4bc4c2db84d815882e01919d7bece0805668 | Filter nested params with params_filters
A customer mentioned that the following params are not being filtered:
> My flask app receives some sensitive information in request's form data:
>
> {"thing": {"password": "xxx"}}
@demsullivan could we support this? | diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 0bca898..01a125d 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -34,7 +34,7 @@ jobs:
run: |
export ${{ matrix.env }}
python -m pip install --upgrade pip
- pip install psutil si... |
honeybadger-io__honeybadger-python-63 | [
{
"changes": {
"added_entities": [
"honeybadger/payload.py:stats_payload"
],
"added_modules": [
"honeybadger/payload.py:stats_payload"
],
"edited_entities": [
"honeybadger/payload.py:server_payload"
],
"edited_modules": [
"honeybadger/pay... | honeybadger-io/honeybadger-python | db28b0c5326efc95d7e1760cefc86d48545faf52 | Use in AWS Glue
I'm trying to use `honeybadger-python` in an AWS Glue job. I'm able to install this module, along with `psutil` and `six` by specifying them in the "Python library path" option and providing them as either zip or whl archives.
Unfortunately, when I try running the job I get the error below. I don't t... | diff --git a/honeybadger/payload.py b/honeybadger/payload.py
index 67d519d..1dc22b0 100644
--- a/honeybadger/payload.py
+++ b/honeybadger/payload.py
@@ -7,8 +7,6 @@ from six.moves import zip
from io import open
from datetime import datetime
-import psutil
-
from .version import __version__
from .plugins import de... |
honeybadger-io__honeybadger-python-66 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"honeybadger/config.py:Configuration.__init__"
],
"edited_modules": [
"honeybadger/config.py:Configuration"
]
},
"file": "honeybadger/config.py"
},
{
"changes": ... | honeybadger-io/honeybadger-python | 885f673a45bd00703fe2aa4cbd2701ece1e7fded | Filter sensitive HTTP headers with params_filters
See https://github.com/honeybadger-io/honeybadger-python/pull/39#issuecomment-573796861
I'm not sure how to do this for Flask; for Django, it looks like we could do something like this, like we do for Session:
https://github.com/honeybadger-io/honeybadger-python/b... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 799930b..a2fc5e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ CHANGELOG](http://keepachangelog.com/) for how to update this file. This project
adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+### Added
+- Add `CSRF_COOKIE` to defa... |
honeybadger-io__honeybadger-python-73 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/aws_lambda/handler.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edi... | honeybadger-io/honeybadger-python | 71eeb60b2dcef9202b3c8c7f0de5bce25c7c9c64 | Register Lambda plugin automatically?
@Kelvin4664 Would it be possible to detect the AWS Lambda environment and register the Lambda plugin automatically, so that the user can skip doing [this](https://github.com/honeybadger-io/honeybadger-python/blob/master/examples/aws_lambda/handler.py#L6)? | diff --git a/examples/aws_lambda/handler.py b/examples/aws_lambda/handler.py
index 6b30b5b..79d6011 100644
--- a/examples/aws_lambda/handler.py
+++ b/examples/aws_lambda/handler.py
@@ -3,7 +3,6 @@ from honeybadger.contrib.aws_lambda import AWSLambdaPlugin
from honeybadger.plugins import default_plugin_manager
honey... |
horejsek__python-fastjsonschema-112 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04.generate_unique_items"
],
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonsche... | horejsek/python-fastjsonschema | 4b0d76cb07d78f047813c6bcda01879ee0a0216c | Incorrect validation of "uniqueItems"
While evaluating this library, I noticed that it's incorrectly validating `uniqueItems`.
Minimal example:
```python
from fastjsonschema import compile
validate = compile({"type": "array", "uniqueItems": "true"})
def print_validity(data):
try:
validate(data... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 5c40de7..b79b1f9 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -349,8 +349,16 @@ class CodeGeneratorDraft04(CodeGenerator):
"""
self.create_variable_is_list()
with self.l('if {variable}_is_lis... |
horejsek__python-fastjsonschema-116 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/draft04.py"
}
] | horejsek/python-fastjsonschema | 32476cfd4d97f92cae52d686eb471361503bf4ba | "date-time" not full supported
e.g.:
```python
>>> import fastjsonschema
>>> fastjsonschema.validate({'type': 'string', 'format': 'date-time'},'2020-09-09T01:01:01+0100')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jens/repos/python-fastjsonschema/fastjsonschema/__init... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index a5b132b..394f263 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -26,7 +26,7 @@ class CodeGeneratorDraft04(CodeGenerator):
# vs. 9 ms with a regex! Other modules are also ineffective or not available in standard
... |
horejsek__python-fastjsonschema-126 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/__init__.py:compile"
],
"edited_modules": [
"fastjsonschema/__init__.py:compile"
]
},
"file": "fastjsonschema/__init__.py"
},
{
"changes": {
... | horejsek/python-fastjsonschema | 1e214911fe83dbaeea3d50dfb3a539118de8a442 | Error in output of `compile_to_code` when using custom formats
Hello and thank you very much for the very nice package.
I notice that when compiling code to string, the generated file assumes a `custom_formats` global variable that is not defined anywhere, and therefore results in errors.
In #126, I propose addin... | diff --git a/fastjsonschema/__init__.py b/fastjsonschema/__init__.py
index 6dd90f6..572e6c1 100644
--- a/fastjsonschema/__init__.py
+++ b/fastjsonschema/__init__.py
@@ -75,6 +75,7 @@ Note that there are some differences compared to JSON schema standard:
API
***
"""
+from functools import partial, update_wrapper
f... |
horejsek__python-fastjsonschema-130 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/__init__.py:compile",
"fastjsonschema/__init__.py:_factory"
],
"edited_modules": [
"fastjsonschema/__init__.py:compile",
"fastjsonschema/__init__.py:_f... | horejsek/python-fastjsonschema | e4b9c469ec36dc8463d46794499546de557cfac3 | Unexpected caching when swapping `handlers` on `compile` function
Hello, recently I noticed that I cannot use the `compile` function twice if there is a change in the schemas...
Even when I change the handlers, the schemas are getting globally cached somehow...
The following example illustrates the problem:
```p... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 6f97d76..1b1232d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,11 +1,3 @@
-=== 2.15.2 (2021-12-12)
-
-* Fix nested oneOf and anyOf
-* Fix if-else block in anyOf block
-* Fix uniqueItems including lists or dicts
-* Add option to pass custom formats in generated cod... |
horejsek__python-fastjsonschema-140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/generator.py:CodeGenerator.generate_validation_function",
"fastjsonschema/generator.py:CodeGenerator.generate_ref",
"fastjsonschema/generator.py:CodeGenerator.l"
],
... | horejsek/python-fastjsonschema | d03f3835da4899bdeb597a9d3f30a709e7c3254f | Keep the variable name and path through references
> for me the most important feature is to keep track of the context/scope of where the validation process is at when the exception is thrown. so given: a schema:
article.json
```{
"$schema": "http://json-schema.org/draft-07/schema#",
"type" : "object",
"ad... | diff --git a/fastjsonschema/exceptions.py b/fastjsonschema/exceptions.py
index 63d9819..d2dddd6 100644
--- a/fastjsonschema/exceptions.py
+++ b/fastjsonschema/exceptions.py
@@ -16,8 +16,8 @@ class JsonSchemaValueException(JsonSchemaException):
* ``message`` containing human-readable information what is wrong (e... |
horejsek__python-fastjsonschema-144 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04.generate_items"
],
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/draf... | horejsek/python-fastjsonschema | d63d682e003aa89a5cf6fc0b8cf6f477c34931ba | Missleading IndentationError with a faulty schema
The following (faulty) schema
```
{
"type": "object",
"properties": {
"a": {
"type": "array",
"items": {
"b": {
"type": "string"
}
}
}
}
}... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 7dd097e..8c25863 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -413,19 +413,23 @@ class CodeGeneratorDraft04(CodeGenerator):
self.exc('{name} must contain only specified items', rule='items'... |
horejsek__python-fastjsonschema-176 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04.generate_required"
],
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/d... | horejsek/python-fastjsonschema | aa7be271c233278c43096ed0a401dcb3c4a12708 | errors for missing required properties
currently, if a required property is missing, the error message lists _all the required properties. could we consider listing only the missing ones?
```
>>> fastjsonschema.validate({'required': ['foo', 'bar']}, {'foo': 1})
JsonSchemaValueException: data must contain ['foo', ... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index cfc3b7b..25cb374 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -457,9 +457,10 @@ class CodeGeneratorDraft04(CodeGenerator):
with self.l('if {variable}_is_dict:'):
if not isinstance(self._definition... |
horejsek__python-fastjsonschema-24 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/draft04.py"
}
] | horejsek/python-fastjsonschema | dc3ae94332ce901181120db8a2f9f8b6d5339622 | JsonSchemaException when using date-time with RFC 3339 compliant string
Validation fails with this example:
```
import json
import fastjsonschema
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/example.schema.json",
"title": "Example",
"descript... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 3ee257b..6d79a1e 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -18,7 +18,7 @@ JSON_TYPE_TO_PYTHON_TYPE = {
class CodeGeneratorDraft04(CodeGenerator):
# pylint: disable=line-too-long
FORMAT_REGEXS = {
- ... |
horejsek__python-fastjsonschema-25 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/draft04.py"
},
{
"changes": {
"added_entities": null,
"added_... | horejsek/python-fastjsonschema | 97d45db2d13c3a769d9805cca2a672643b17bb6b | ipv6 format leads to cut off string in generated code
Thanks for the quick fix of #21 !
I just tried it, and indeed, the regex pattern is now there. But the code is still broken due to a different issue.
When I generate the code for this schema:
```
{
"$schema": "http://json-schema.org/draft-07/schema#",... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 6d79a1e..3ee257b 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -18,7 +18,7 @@ JSON_TYPE_TO_PYTHON_TYPE = {
class CodeGeneratorDraft04(CodeGenerator):
# pylint: disable=line-too-long
FORMAT_REGEXS = {
- ... |
horejsek__python-fastjsonschema-27 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"fastjsonschema/draft04.py:CodeGeneratorDraft04"
]
},
"file": "fastjsonschema/draft04.py"
}
] | horejsek/python-fastjsonschema | 6c07d2300c5018628dab9487bd5a89b85acb3084 | 'example.de' (and many others hostnames) not valid with hostname format
Aaand another one. Hope you aren't getting annoyed. Running this example throws a JsonSchemaException:
```
import fastjsonschema
schema = {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/example.... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 6d79a1e..57b2a85 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -20,10 +20,7 @@ class CodeGeneratorDraft04(CodeGenerator):
FORMAT_REGEXS = {
'date-time': r'^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.... |
horejsek__python-fastjsonschema-88 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "fastjsonschema/draft04.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"fastjsonsc... | horejsek/python-fastjsonschema | e845f622d6340703342a58318d94a295d86bbfaf | Support for validating tuples as arrays?
Would a PR be accepted that modified fastjsonschema to validate a `tuple` object as an array? Possible as an optional behavior?
The array validation function here https://github.com/horejsek/python-fastjsonschema/blob/master/fastjsonschema/generator.py#L275 only accepts a li... | diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py
index 01cc07e..6c50a21 100644
--- a/fastjsonschema/draft04.py
+++ b/fastjsonschema/draft04.py
@@ -11,7 +11,7 @@ JSON_TYPE_TO_PYTHON_TYPE = {
'number': 'int, float',
'integer': 'int',
'string': 'str',
- 'array': 'list',
+ 'array': 'l... |
hpcflow__valida-7 | [
{
"changes": {
"added_entities": [
"valida/conditions.py:ConditionLike.from_json_like",
"valida/conditions.py:Condition.to_json_like",
"valida/conditions.py:NullCondition.to_json_like"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
... | hpcflow/valida | 0adb064cccdb0df9453dde2c04c1f6b64a068084 | Add `to_json_like`, `from_json_like` method to `ConditionLike`
This is so we can use `ConditionLike` objects in hpcflow `ActionCondition`s. | diff --git a/valida/conditions.py b/valida/conditions.py
index 47da55b..934a882 100644
--- a/valida/conditions.py
+++ b/valida/conditions.py
@@ -526,6 +526,9 @@ class ConditionLike:
return condition_like
+ @classmethod
+ def from_json_like(cls, json_like, *args, **kwargs):
+ return cls.from_sp... |
hpi-bp1819-naumann__shift-detector-161 | [
{
"changes": {
"added_entities": [
"shift_detector/checks/dq_metrics_check.py:DQMetricsCheck.text_metadata_report",
"shift_detector/checks/dq_metrics_check.py:DQMetricsCheck.numerical_categorical_report",
"shift_detector/checks/dq_metrics_check.py:DQMetricsCheck.attribute_val_repor... | hpi-bp1819-naumann/shift-detector | d9dab18e269c19be1c961fa56ab78b09197e0472 | Simplecheck Numerical Metrics
I think the metric `num_distinct` should not be used for numerical values as it does make any sense if they are not categorical.
However this means that the metric would be useful for categorical columns.
The metric `completeness` could be used for categorical columns, too.
This met... | diff --git a/docs/source/checks/dq_metrics.rst b/docs/source/checks/dq_metrics.rst
index 0e368df..3bf66c7 100644
--- a/docs/source/checks/dq_metrics.rst
+++ b/docs/source/checks/dq_metrics.rst
@@ -7,14 +7,14 @@ Description
-----------
The :ref:`dq_metrics` gives you basic information about your datasets and detects... |
hsahovic__poke-env-153 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/poke_env/data.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_module... | hsahovic/poke-env | b83e29de2991846345f23c738a78fb7b5caf6911 | toxic status counter
Hey,
It seems to me that the status counter for toxic was off, so I added a reset to the counter under def _switch_in(self, details=None)
and I think solved the problem. Let me know if this is correct :) | diff --git a/src/poke_env/data.py b/src/poke_env/data.py
index e04eb89..950ee16 100644
--- a/src/poke_env/data.py
+++ b/src/poke_env/data.py
@@ -38,7 +38,7 @@ def _compute_type_chart(chart_path: str) -> Dict[str, Dict[str, float]]:
return type_chart
-@lru_cache(2 ** 13) # pyre-ignore
+@lru_cache(2 ** 13)
def... |
hsahovic__poke-env-158 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/poke_env/environment/abstract_battle.py:AbstractBattle._field_start"
],
"edited_modules": [
"src/poke_env/environment/abstract_battle.py:AbstractBattle"
]
},
"file"... | hsahovic/poke-env | ac8182abbcaf27c776916987382121605933ae23 | battle.fields
Hi Haris,
It seems to me like sometimes more than one terrain is returned by battle.fields
Could you please look into it
| diff --git a/src/poke_env/environment/abstract_battle.py b/src/poke_env/environment/abstract_battle.py
index eb70606..ed07d0d 100644
--- a/src/poke_env/environment/abstract_battle.py
+++ b/src/poke_env/environment/abstract_battle.py
@@ -241,6 +241,14 @@ class AbstractBattle(ABC):
def _field_start(self, field):
... |
hsahovic__poke-env-68 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/poke_env/teambuilder/teambuilder.py:Teambuilder.parse_showdown_team"
],
"edited_modules": [
"src/poke_env/teambuilder/teambuilder.py:Teambuilder"
]
},
"file": "src/... | hsahovic/poke-env | 8c0fbbde4587fd8ff984bc64ac1baab9b102de51 | parsing error on showdown-format teams without items
Teambuilder class doesn't work with showdown-format teams when a Pokémon doesn't have items. Same team functioned properly when adding an item to each Pokémon.
Log:
```
---------------------------------------------------------------------------
UnboundLocalErro... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 3349981..f40d161 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -37,7 +37,7 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- - requirements-{{ checksum "requirements.txt" }}-{{ checksum... |
html5lib__html5lib-python-256 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"html5lib/treewalkers/lxmletree.py:Root.__init__",
"html5lib/treewalkers/lxmletree.py:TreeWalker.__init__"
],
"edited_modules": [
"html5lib/treewalkers/lxmletree.py:Root",
... | html5lib/html5lib-python | 66a2f7763f2dda24d3d2681c22bf799c94ee049c | AttributeError: 'TreeWalker' object has no attribute 'fragmentChildren'
For some reason my `tree` (`lxml.etree._Element`) object has no attribute getroot and is not a list so there is no `fragmentChildren` attribute on `TreeWalker`: 270a2ca14fafc989f8f1bd4f79db2f4bd9f4d1fc
lxml 3.5.0
html5lib-python f796cca5f9ddaaf... | diff --git a/html5lib/treewalkers/lxmletree.py b/html5lib/treewalkers/lxmletree.py
index 7d99adc..ff31a44 100644
--- a/html5lib/treewalkers/lxmletree.py
+++ b/html5lib/treewalkers/lxmletree.py
@@ -22,13 +22,20 @@ class Root(object):
def __init__(self, et):
self.elementtree = et
self.children = []... |
html5lib__html5lib-python-259 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"html5lib/treebuilders/etree.py:Element.removeChild"
],
"edited_modules": [
"html5lib/treebuilders/etree.py:Element"
]
},
"file": "html5lib/treebuilders/etree.py"
}
] | html5lib/html5lib-python | 2d376737a6246ebb38a79600a7fe75abd923cf3e | etree treewalker infinite loop
This goes into an infinite loop:
```python
import html5lib
frag = html5lib.parseFragment("<b><em><foo><foob><fooc><aside></b></em>")
walker = html5lib.getTreeWalker("etree")
print list(walker(frag))
``` | diff --git a/html5lib/treebuilders/etree.py b/html5lib/treebuilders/etree.py
index d394148..4d12bd4 100644
--- a/html5lib/treebuilders/etree.py
+++ b/html5lib/treebuilders/etree.py
@@ -100,6 +100,7 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=False):
node.parent = self
def removeCh... |
html5lib__html5lib-python-324 | [
{
"changes": {
"added_entities": [
"html5lib/filters/alphabeticalattributes.py:_attr_key"
],
"added_modules": [
"html5lib/filters/alphabeticalattributes.py:_attr_key"
],
"edited_entities": [
"html5lib/filters/alphabeticalattributes.py:Filter.__iter__"
... | html5lib/html5lib-python | 984f934d30ba2fde0e9ce5d4581c73fb81654474 | alphabeticalattributes filter TypeError when comparing namespaced attributes with non-namespaced attributes
In SVG 1.1, you could have something like this:
```
<svg><pattern id="patt1" xlink:href="http://example.com/#whatever" /></svg>
```
In Python 3, that creates the following attributes:
```
dict_items([... | diff --git a/html5lib/filters/alphabeticalattributes.py b/html5lib/filters/alphabeticalattributes.py
index 4795bae..f938ba1 100644
--- a/html5lib/filters/alphabeticalattributes.py
+++ b/html5lib/filters/alphabeticalattributes.py
@@ -8,13 +8,24 @@ except ImportError:
from ordereddict import OrderedDict
+def _at... |
html5lib__html5lib-python-377 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"html5lib/filters/sanitizer.py:Filter.sanitize_css"
],
"edited_modules": [
"html5lib/filters/sanitizer.py:Filter"
]
},
"file": "html5lib/filters/sanitizer.py"
}
] | html5lib/html5lib-python | d595d0a51253b8f9f5e1f14f15b285cadedf806e | support uppercase hex characters in css color check
This covers adding support for uppercase hex characters in the css color check regex.
From #287:
> Adds uppercase check (A-F) in the css regex to pass css of the following format:
> border-top: 2px #DA4534 solid; | diff --git a/.gitignore b/.gitignore
index 6aed95b..ecd62df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,3 +80,6 @@ target/
# Generated by parse.py -p
stats.prof
+
+# IDE
+.idea
diff --git a/html5lib/filters/sanitizer.py b/html5lib/filters/sanitizer.py
index dc80166..6315a1c 100644
--- a/html5lib/filters/sanitiz... |
html5lib__html5lib-python-396 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "html5lib/constants.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modul... | html5lib/html5lib-python | 82047b0e8506886255c5cca5954c870f84e3adda | Sanitizer removes the <ol> "reversed" attribute
`reversed` is a boolean attribute on `<ol>` that can be used to make descending lists. The sanitizer seems to be stripping this (it's not included in `allowed_attributes`).
https://html.spec.whatwg.org/multipage/semantics.html#attr-ol-reversed | diff --git a/CHANGES.rst b/CHANGES.rst
index cf95ea0..47dcda3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -11,10 +11,15 @@ Features:
* Add support for the ``<wbr>`` element in the sanitizer, `which indicates
a line break opportunity <https://html.spec.whatwg.org/#the-wbr-element>`_.
This element is allowed by ... |
html5lib__html5lib-python-562 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
... | html5lib/html5lib-python | c64a1115daa463c7c60b32104e07f37c26b8a097 | 1.1: sphinx warnings about `reference target not found`
On building my packages I'm using `sphinx-build` command with `-n` switch which shows warmings about missing references. These are not critical issues.
Here is the output with warnings:
```console
+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Runni... | diff --git a/CHANGES.rst b/CHANGES.rst
index 3ed63a9..f28caa8 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,13 @@
Change Log
----------
+1.2
+~~~
+
+Bug fixes:
+
+* The sanitizer now permits ``<summary>`` tags.
+
1.1
~~~
@@ -22,7 +29,6 @@ Other changes:
``html5lib`` keeps working in future Python ver... |
hu-macsy__simexpal-100 | [
{
"changes": {
"added_entities": [
"simexpal/base.py:Variant.environ",
"simexpal/base.py:Variant.extra_args"
],
"added_modules": null,
"edited_entities": [
"simexpal/base.py:Config.__init__",
"simexpal/base.py:Variant.__init__",
"simexpal/base.py:V... | hu-macsy/simexpal | 0ac4bb0ec5935aad6f027a5c534f16a6f5c43e35 | Variation types
AFAICS simexpal variations have a name and several values which need to be written manually as well as `extra_args`. It would be nice to have cases where a variation has a specific type (i.e., int, bool), and a list (or even better a range) of values that the variation can have.
For example, at the mom... | diff --git a/docs/at_variables_reference.rst b/docs/at_variables_reference.rst
index 2dcdbd3..a66821a 100644
--- a/docs/at_variables_reference.rst
+++ b/docs/at_variables_reference.rst
@@ -35,7 +35,7 @@ Below, we list all @-variables and where they can be used.
- ``@THIS_COMPILE_DIR@``: :ref:`compilation directory <Bu... |
hu-macsy__simexpal-93 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simexpal/base.py:BuildInfo.git_repo"
],
"edited_modules": [
"simexpal/base.py:BuildInfo"
]
},
"file": "simexpal/base.py"
},
{
"changes": {
"added_entities... | hu-macsy/simexpal | fa86dbc4a58abf62603aeca5abaecd9836ccc984 | Support builds without VCS
Support builds that do not use git. Note that since revisions need some kind of commit identifier, we can only support git-less builds for dev revisions. | diff --git a/docs/builds.rst b/docs/builds.rst
index 184c220..695bb4b 100644
--- a/docs/builds.rst
+++ b/docs/builds.rst
@@ -14,12 +14,15 @@ only Git is supported) and build them automatically. To achieve this, we need to
On this page we will explain the ``builds`` key and mainly use the
`C++ example <https://githu... |
hu-macsy__simexpal-96 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simexpal/base.py:Instance.extra_args"
],
"edited_modules": [
"simexpal/base.py:Instance"
]
},
"file": "simexpal/base.py"
}
] | hu-macsy/simexpal | d5e598f292b90cd7ef2e77d7a478ec52d42279df | Allow extra_args for instance repositories
Allow `extra_args:` in `repo:` blocks. For example, this would be useful to allow users to specify file formats on a per-repo basis. | diff --git a/docs/instances.rst b/docs/instances.rst
index 027bb31..ebf8b65 100644
--- a/docs/instances.rst
+++ b/docs/instances.rst
@@ -190,15 +190,41 @@ key to specify our extra arguments.
Extra Arguments
---------------
-We can set extra arguments for instances, which can be appended to the experiment arguments ... |
hu-macsy__simexpal-99 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simexpal/base.py:Config.__init__",
"simexpal/base.py:read_and_validate_setup",
"simexpal/base.py:config_for_dir"
],
"edited_modules": [
"simexpal/base.py:Config",
... | hu-macsy/simexpal | 792a1a0fd5a4cd0da14e3e2add79c8444a80e168 | Performance of no-op simex runs
I noticed that just running `simex e` on an empty file takes 300ms on my (decently fast) laptop. This seems to be mainly due to the import of external packages: base.py imports instances.py and that imports `requests`, which takes quite a bit of time. Additionally, importing `jsonschema`... | diff --git a/simexpal/base.py b/simexpal/base.py
index 44b9519..65457f3 100644
--- a/simexpal/base.py
+++ b/simexpal/base.py
@@ -9,7 +9,6 @@ import sys
import tempfile
import warnings
-from . import instances
from . import util
DEFAULT_DEV_BUILD_NAME = '_dev'
@@ -120,6 +119,9 @@ class Config:
yield Var... |
huffmanjohnf__temp-humidity-hexbin-9 | [
{
"changes": {
"added_entities": [
"temp_humidity_hexbin/visual.py:get_range",
"temp_humidity_hexbin/visual.py:find_edge",
"temp_humidity_hexbin/visual.py:gridsize"
],
"added_modules": [
"temp_humidity_hexbin/visual.py:get_range",
"temp_humidity_hexbin/v... | huffmanjohnf/temp-humidity-hexbin | 2d30946d8044582d1bbe0127e53bb16c6ac14fa4 | Automate Defaults
**What's your idea?**
Automate suggested defaults that are data-driven. Specifically:
- [x] gridsize
- [x] graph window
| diff --git a/temp_humidity_hexbin/visual.py b/temp_humidity_hexbin/visual.py
index a85a92f..79ffb86 100644
--- a/temp_humidity_hexbin/visual.py
+++ b/temp_humidity_hexbin/visual.py
@@ -1,8 +1,46 @@
+from typing import Tuple
+
import pandas as pd
import seaborn as sns
-def hexbin_plt(df: pd.DataFrame, sp_cool: flo... |
huggingface__diffusers-10604 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/diffusers/loaders/single_file_model.py:FromOriginalModelMixin.from_single_file"
],
"edited_modules": [
"src/diffusers/loaders/single_file_model.py:FromOriginalModelMixin"
]... | huggingface/diffusers | 6fe05b9b93593bca41afac79b32b7a23526b0e96 | [Core] refactor model loading
Currently, we have got two codepaths:
1. For non-sharded checkpoints we do: https://github.com/huggingface/diffusers/blob/047bf492914ddc9393070b8f73bba5ad5823eb29/src/diffusers/models/modeling_utils.py#L855
2. For sharded checkpoints we do: https://github.com/huggingface/diffusers/blob... | diff --git a/src/diffusers/loaders/single_file_model.py b/src/diffusers/loaders/single_file_model.py
index b51db6d33..b6eaffbc8 100644
--- a/src/diffusers/loaders/single_file_model.py
+++ b/src/diffusers/loaders/single_file_model.py
@@ -52,7 +52,7 @@ logger = logging.get_logger(__name__)
if is_accelerate_available... |
huggingface__smolagents-1088 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/smolagents/_function_type_hints_utils.py"
}
] | huggingface/smolagents | 3240fa878ac288a217d62fcf516241ac54ab4184 | [BUG] DocstringParsingException when creating a tool with types in docstring
**Describe the bug**
When creating a new tool, I get an error "DocstringParsingException: Cannot generate JSON schema for ... because the docstring has no description for the argument '...'", if the type of arguments is given.
**Code to repro... | diff --git a/docs/source/en/tutorials/tools.mdx b/docs/source/en/tutorials/tools.mdx
index a075fd7..0786a2f 100644
--- a/docs/source/en/tutorials/tools.mdx
+++ b/docs/source/en/tutorials/tools.mdx
@@ -229,6 +229,14 @@ To speed up the start, tools are loaded only if called by the agent.
Leverage tools from the hundre... |
huggingface__smolagents-226 | [
{
"changes": {
"added_entities": [
"src/smolagents/agents.py:CodeAgent.initialize_system_prompt"
],
"added_modules": null,
"edited_entities": [
"src/smolagents/agents.py:CodeAgent.__init__"
],
"edited_modules": [
"src/smolagents/agents.py:CodeAgent"
... | huggingface/smolagents | a4ec1e5be3fb553b45af5f38f134f7be26d3a274 | [Bug] CodeAgent's system prompt does not contain authorized_imports
I think there is a small bug with the CodeAgent's system prompt.
In `agent.run` [initialize_system_prompt()](https://github.com/huggingface/smolagents/blob/2a69f1574e3c1ddee11d8344b1cd1272608fe5f7/src/smolagents/agents.py#L493) is called again, whic... | diff --git a/docs/source/en/examples/multiagents.md b/docs/source/en/examples/multiagents.md
index 7901de2..c4bb514 100644
--- a/docs/source/en/examples/multiagents.md
+++ b/docs/source/en/examples/multiagents.md
@@ -64,7 +64,7 @@ model_id = "Qwen/Qwen2.5-Coder-32B-Instruct"
## 🔍 Create a web search tool
-For web... |
huggingface__smolagents-285 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/local_python_executor.py:evaluate_augassign"
],
"edited_modules": [
"src/smolagents/local_python_executor.py:evaluate_augassign"
]
},
"file": "src/smolag... | huggingface/smolagents | bd08d6485daad3a8eba8d22ca0c185c6653acf2c | local interpreter overrides in-place operators
The `smolagents` local python interpreter implements in_place operators like `y += x` as `y = y + x`, which bypasses any `__iadd__` operator that is implemented on the `y` object. This can lead to poor memory usage (at best) if y is large, and incorrect behavior if the obj... | diff --git a/src/smolagents/local_python_executor.py b/src/smolagents/local_python_executor.py
index effb488..4212688 100644
--- a/src/smolagents/local_python_executor.py
+++ b/src/smolagents/local_python_executor.py
@@ -368,31 +368,70 @@ def evaluate_augassign(
if isinstance(current_value, list):
... |
huggingface__smolagents-385 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/agents.py:MultiStepAgent.write_inner_memory_from_logs",
"src/smolagents/agents.py:MultiStepAgent.planning_step"
],
"edited_modules": [
"src/smolagents/agents.p... | huggingface/smolagents | 68f3da12ea303c2bcb32c4224291eaa6f006c8a4 | "Error in generating tool call with model: 'NoneType' object is not subscriptable" when using FinalAnswerTool
I am trying to reproduce the agentic RAG cookbook example (https://github.com/huggingface/cookbook/blob/main/notebooks/en/agent_rag.ipynb). But I noticed that the FinalAnswerTool was almost always throwing me a... | diff --git a/docs/source/zh/examples/rag.md b/docs/source/zh/examples/rag.md
index acbdf14..23efa9e 100644
--- a/docs/source/zh/examples/rag.md
+++ b/docs/source/zh/examples/rag.md
@@ -17,39 +17,34 @@ rendered properly in your Markdown viewer.
[[open-in-colab]]
-Retrieval-Augmented-Generation (RAG) is “using an LL... |
huggingface__smolagents-478 | [
{
"changes": {
"added_entities": [
"src/smolagents/agents.py:MultiStepAgent.visualize"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/smolagents/agents.py:MultiStepAgent"
]
},
"file": "src/smolagents/agents.py"
},
{
... | huggingface/smolagents | 39908439d29d3004ec59313be2fd89f43f06b485 | [BUG] SpeechToTextTool not working
**Describe the bug**
When I try to use the SpeechToTextTool, it fails
**Code to reproduce the error**
```
from smolagents import (
CodeAgent,
OpenAIServerModel,
SpeechToTextTool,
)
model = OpenAIServerModel(
api_base="http://localhost:8000/v1",
model_id="Qwen/Qwe... | diff --git a/README.md b/README.md
index b49f9fc..928b65d 100644
--- a/README.md
+++ b/README.md
@@ -32,14 +32,17 @@ limitations under the License.
`smolagents` is a library that enables you to run powerful agents in a few lines of code. It offers:
-✨ **Simplicity**: the logic for agents fits in ~thousand lines of... |
huggingface__smolagents-693 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/local_python_executor.py:get_safe_module",
"src/smolagents/local_python_executor.py:check_module_authorized",
"src/smolagents/local_python_executor.py:import_modules"
... | huggingface/smolagents | e5a71dab1cf83fd0c1f24ffeee30f193e05d5aa2 | [BUG] CI test fails: TypeError: LlavaProcessor: got multiple values for keyword argument 'images'
**Describe the bug**
CI test fails: TypeError: LlavaProcessor: got multiple values for keyword argument 'images'
> FAILED tests/test_models.py::ModelTests::test_transformers_message_vl_no_tool - TypeError: LlavaProcessor:
... | diff --git a/docs/source/en/conceptual_guides/intro_agents.md b/docs/source/en/conceptual_guides/intro_agents.mdx
similarity index 100%
rename from docs/source/en/conceptual_guides/intro_agents.md
rename to docs/source/en/conceptual_guides/intro_agents.mdx
diff --git a/docs/source/en/conceptual_guides/react.md b/docs/s... |
huggingface__smolagents-790 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/local_python_executor.py:get_safe_module"
],
"edited_modules": [
"src/smolagents/local_python_executor.py:get_safe_module"
]
},
"file": "src/smolagents/l... | huggingface/smolagents | df617bb4c1c3956ed327212ed6b17f0df9efe6f3 | Code execution failed at line 'from sklearn.linear_model import LinearRegression' due to: AttributeError:module 'scipy.sparse._coo' has no attribute 'upcast'
I run following codes in local PC as well as colab. Error as indicated by the title occured when smolagents try to run the python codes suggested by deepseek comp... | diff --git a/examples/open_deep_research/README.md b/examples/open_deep_research/README.md
index 915bfc8..1324e46 100644
--- a/examples/open_deep_research/README.md
+++ b/examples/open_deep_research/README.md
@@ -13,7 +13,7 @@ pip install -r requirements.txt
And install smolagents dev version
```bash
-pip install s... |
huggingface__smolagents-868 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/cli.py:load_model"
],
"edited_modules": [
"src/smolagents/cli.py:load_model"
]
},
"file": "src/smolagents/cli.py"
},
{
"changes": {
"added_... | huggingface/smolagents | e2a469032a3625b00048416437c02a57fde5d9cb | [BUG] CI is broken: AssertionError with message role in test_action_step_to_messages
**Describe the bug**
CI is broken: https://github.com/huggingface/smolagents/actions/runs/13647944821/job/38150144811?pr=861
```
FAILED tests/test_memory.py::test_action_step_to_messages - AssertionError: assert <MessageRole....: 'tool... | diff --git a/src/smolagents/cli.py b/src/smolagents/cli.py
index 6d5c070..7d93a3b 100644
--- a/src/smolagents/cli.py
+++ b/src/smolagents/cli.py
@@ -79,7 +79,7 @@ def parse_arguments(description):
return parser.parse_args()
-def load_model(model_type: str, model_id: str, api_base: str | None, api_key: str | No... |
huggingface__smolagents-891 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/gradio_ui.py:GradioUI.__init__"
],
"edited_modules": [
"src/smolagents/gradio_ui.py:GradioUI"
]
},
"file": "src/smolagents/gradio_ui.py"
},
{
"ch... | huggingface/smolagents | 0329674dcb515e2f0130e6fb22b4f2cd5652038f | [BUG] Agents can create infinite loops using functions
Hello,
there is a nice protection against infinite loops in the local python interpreter, but unfortunately, it doesn't work if an agent creates a double loop with a second loop in a function.
**Code to reproduce the error**
Here is an example of a correct inter... | diff --git a/pyproject.toml b/pyproject.toml
index 207ba44..af19a50 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -72,7 +72,7 @@ vision = [
"selenium",
]
all = [
- "smolagents[audio,docker,e2b,gradio,litellm,mcp,openai,telemetry,transformers,vision]",
+ "smolagents[audio,docker,e2b,gradio,litellm,mcp,mlx-l... |
huggingface__smolagents-900 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/smolagents/cli.py:parse_arguments",
"src/smolagents/cli.py:main"
],
"edited_modules": [
"src/smolagents/cli.py:parse_arguments",
"src/smolagents/cli.py:main"
... | huggingface/smolagents | b67cc947985a22ae4f6771aab6e76eae74dd8df9 | [BUG] Error during jinja template rendering: UndefinedError: 'tool_descriptions' is undefined
**Describe the bug**
I have the message " Error during jinja template rendering: UndefinedError: 'tool_descriptions' is undefined " when i customize the prompt
**Code to reproduce the error**
```
import os
import fitz
fro... | diff --git a/docs/source/en/tutorials/building_good_agents.mdx b/docs/source/en/tutorials/building_good_agents.mdx
index 8c17de1..97e257a 100644
--- a/docs/source/en/tutorials/building_good_agents.mdx
+++ b/docs/source/en/tutorials/building_good_agents.mdx
@@ -43,7 +43,7 @@ This leads to a few takeaways:
### Improve... |
hugovk__pypistats-12 | [
{
"changes": {
"added_entities": [
"pypistats/__init__.py:_grand_total"
],
"added_modules": [
"pypistats/__init__.py:_grand_total"
],
"edited_entities": [
"pypistats/__init__.py:pypi_stats_api"
],
"edited_modules": [
"pypistats/__init__.p... | hugovk/pypistats | 785472f89297591317126f5ce95420c6d0b12205 | Add total row to tables
| category | downloads |
|----------|------------:|
| 2.7 | 1,594,594 |
| 2.6 | 1,968 |
| 3.3 | 1,824 |
| 3.2 | 244 |
| 3.1 | 3 |
| Total | 1,598,633 | | diff --git a/README.md b/README.md
index 46cbe21..850c1d8 100644
--- a/README.md
+++ b/README.md
@@ -19,35 +19,32 @@ pip install .
## Example use
-Return values are the JSON responses documented in the API:
+Return values are from the JSON responses documented in the API:
https://pypistats.org/api/
```python... |
hugovk__pypistats-13 | [
{
"changes": {
"added_entities": [
"pypistats/__init__.py:_percent"
],
"added_modules": [
"pypistats/__init__.py:_percent"
],
"edited_entities": [
"pypistats/__init__.py:pypi_stats_api",
"pypistats/__init__.py:_tabulate"
],
"edited_module... | hugovk/pypistats | d36199f422c751e4dc9cf13bb409a94142121430 | Add percent column to tables
Put it before the downloads column. | diff --git a/pypistats/__init__.py b/pypistats/__init__.py
index 9ebc7e6..79cbc13 100644
--- a/pypistats/__init__.py
+++ b/pypistats/__init__.py
@@ -4,8 +4,8 @@
Python interface to PyPI Stats API
https://pypistats.org/api
"""
-import pytablewriter
import requests
+from pytablewriter import Align, MarkdownTableWrite... |
hugovk__pypistats-15 | [
{
"changes": {
"added_entities": [
"pypistats/__init__.py:_custom_list"
],
"added_modules": [
"pypistats/__init__.py:_custom_list"
],
"edited_entities": [
"pypistats/__init__.py:_tabulate"
],
"edited_modules": [
"pypistats/__init__.py:_ta... | hugovk/pypistats | cb8c6f022318ff41a2b880a486dd2adbf72d7458 | Add commas to downloads in table
| category | downloads |
|----------|----------:|
| 2.6 | 1968 |
| 2.7 | 1594594 |
| 3.1 | 3 |
| 3.2 | 244 |
| 3.3 | 1824 |
->
| category | downloads |
|----------|----------:|
| 2.6 | 1,968 |
| 2.7 | ... | diff --git a/pypistats/__init__.py b/pypistats/__init__.py
index 7e0da54..1b99b6f 100644
--- a/pypistats/__init__.py
+++ b/pypistats/__init__.py
@@ -5,7 +5,7 @@ Python interface to PyPI Stats API
https://pypistats.org/api
"""
import requests
-from pytablewriter import Align, MarkdownTableWriter
+from pytablewriter i... |
hugovk__pypistats-41 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pypistats/cli.py:_month"
],
"edited_modules": [
"pypistats/cli.py:_month"
]
},
"file": "pypistats/cli.py"
}
] | hugovk/pypistats | f6a9e33aaf41d1b08f6490febe1f542c1e093271 | ValueError: month must be in 1..12
```console
$ pypistats python_minor pylast -m 2018-11
| category | percent | downloads |
|----------|--------:|----------:|
| 2.7 | 48.62% | 2,307 |
| 3.6 | 31.63% | 1,501 |
| null | 7.31% | 347 |
| 3.7 | 6.91% | 328 |
| 3.5 | ... | diff --git a/pypistats/cli.py b/pypistats/cli.py
index 092f9b7..8eb62cd 100644
--- a/pypistats/cli.py
+++ b/pypistats/cli.py
@@ -243,7 +243,7 @@ def _month(yyyy_mm):
"""Helper to return start_date and end_date of a month as yyyy-mm-dd"""
year, month = map(int, yyyy_mm.split("-"))
first = date(year, month... |
hugovk__pypistats-438 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pypistats/__init__.py:pypi_stats_api"
],
"edited_modules": [
"src/pypistats/__init__.py:pypi_stats_api"
]
},
"file": "src/pypistats/__init__.py"
}
] | hugovk/pypistats | bfda2c984f05adfc794a11744db621476a71a836 | Improper IndexError handling
`File "/home/..../lib/python3.11/site-packages/pypistats/__init__.py", line 261, in _date_range
first = data[0]["date"]
~~~~^^^
IndexError: list index out of range`
The exception does not handle the data list is empty.
The error will cause the program to stop without ... | diff --git a/src/pypistats/__init__.py b/src/pypistats/__init__.py
index 3bd7ac4..db31394 100644
--- a/src/pypistats/__init__.py
+++ b/src/pypistats/__init__.py
@@ -124,6 +124,9 @@ def pypi_stats_api(
_save_cache(cache_file, res)
+ if not res.get("data", []):
+ return f"No data found for https://... |
hugovk__pypistats-73 | [
{
"changes": {
"added_entities": [
"src/pypistats/__init__.py:_date_range"
],
"added_modules": [
"src/pypistats/__init__.py:_date_range"
],
"edited_entities": [
"src/pypistats/__init__.py:pypi_stats_api"
],
"edited_modules": [
"src/pypist... | hugovk/pypistats | d2cb1f12aa5edde24dc31bba5b86ad118d3cf4b0 | Some functional question
When I wrote the code as `pypistats overall pandas`, is that means the number of downloading pandas from PyPi in the history? | diff --git a/src/pypistats/__init__.py b/src/pypistats/__init__.py
index 36f5a49..f184ce2 100644
--- a/src/pypistats/__init__.py
+++ b/src/pypistats/__init__.py
@@ -125,9 +125,16 @@ def pypi_stats_api(
_save_cache(cache_file, res)
+ first, last = _date_range(res["data"])
+
if start_date or end_date... |
hugovk__pypistats-8 | [
{
"changes": {
"added_entities": [
"pypistats/__init__.py:_sort"
],
"added_modules": [
"pypistats/__init__.py:_sort"
],
"edited_entities": [
"pypistats/__init__.py:pypi_stats_api"
],
"edited_modules": [
"pypistats/__init__.py:pypi_stats_a... | hugovk/pypistats | b9514c436ebde9441532e6875f196d5a2be55fb7 | Sort table by downloads
| category | downloads |
|----------|----------:|
| 2.6 | 1968 |
| 2.7 | 1594594 |
| 3.1 | 3 |
| 3.2 | 244 |
| 3.3 | 1824 |
->
| category | downloads |
|----------|----------:|
| 2.7 | 1,594,594 |
| 2.6 | 1,96... | diff --git a/pypistats/__init__.py b/pypistats/__init__.py
index 21c78e2..719f31a 100644
--- a/pypistats/__init__.py
+++ b/pypistats/__init__.py
@@ -15,7 +15,13 @@ BASE_URL = "https://pypistats.org/api/"
def pypi_stats_api(
- endpoint, params=None, output="table", start_date=None, end_date=None, total=True
+ ... |
hugovk__pypistats-86 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pypistats/__init__.py:pypi_stats_api"
],
"edited_modules": [
"src/pypistats/__init__.py:pypi_stats_api"
]
},
"file": "src/pypistats/__init__.py"
}
] | hugovk/pypistats | 99b3d7c65d7d2b1d6610b29b6449a6bc75123949 | Fail to have the data more than half year
It seems the download numbers are not available for the timeline more than half year.
```
pypistats python_major torchtext --start-date 2019-06-01 --end-date 2019-06-30
```
returned:
```
| category | downloads |
|----------|----------:|
| Total | 0 |
Dat... | diff --git a/LICENSE.txt b/LICENSE.txt
index f1a4761..0d4270c 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2018-2019 Hugo van Kemenade
+Copyright (c) 2018-2020 Hugo van Kemenade
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software ... |
hylang__hy-1266 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/lex/__init__.py:tokenize"
],
"edited_modules": [
"hy/lex/__init__.py:tokenize"
]
},
"file": "hy/lex/__init__.py"
},
{
"changes": {
"added_entities": nu... | hylang/hy | bb9f543246dfa519e03bb3b315a850973020c503 | Single quote crashes hy2py
## x.hy
```
'
```
## `hy2py x.hy`
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "hy/cmdline.py", line 406, in hy2py_main
if stdin_text is None
File "hy/cmdline.py", line 186, in pretty_error
print(e, file=sys.stderr)
File "h... | diff --git a/NEWS b/NEWS
index 9ae36128..fd3a1e1a 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@ Changes from 0.12.1
* `setv` no longer unnecessarily tries to get attributes
* `loop` no longer replaces string literals equal to "recur"
* The REPL now prints the correct value of `do` and `try` forms
+ * Fix... |
hylang__hy-1294 | [
{
"changes": {
"added_entities": [
"hy/models.py:check_inf_nan_cap"
],
"added_modules": [
"hy/models.py:check_inf_nan_cap"
],
"edited_entities": [
"hy/models.py:HyFloat.__new__",
"hy/models.py:HyComplex.__new__"
],
"edited_modules": [
... | hylang/hy | 7c53a07b93084a0970cdf192d4aa2d712d557154 | Any capitalization of "nan" or "inf" is interpreted as a float, not a symbol
For example:
=> (setv Nan 5)
File "<input>", line 1, column 7
(setv Nan 5)
^--^
HyTypeError: b"Can't assign or delete a HyFloat"
The fact that Hy accepts literals for floating-point infinity and NaN,... | diff --git a/NEWS b/NEWS
index a21c5142..4c963f4f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Changes from 0.13.0
* The compiler now automatically promotes values to Hy model objects
as necessary, so you can write ``(eval `(+ 1 ~n))`` instead of
``(eval `(+ 1 ~(HyInteger n)))``
+ * Literal `Inf`s and... |
hylang__hy-1296 | [
{
"changes": {
"added_entities": [
"hy/lex/parser.py:symbol_like"
],
"added_modules": [
"hy/lex/parser.py:symbol_like"
],
"edited_entities": [
"hy/lex/parser.py:t_identifier"
],
"edited_modules": [
"hy/lex/parser.py:t_identifier"
]
... | hylang/hy | e92ef484a0f4102b964525527b485bcc18b47ef8 | Attributes of literals
TL;DR: the way attributes, integers, and identifiers are parsed is a hot, hot mess.
So, right now, parsing a number or symbol looks like this:
- Lexer sees token and tags it as an identifier.
- Parser grabs token, tries to covert it to an integer, float, or fraction, and, failing that, com... | diff --git a/Makefile b/Makefile
index 1b618a76..4658b6fb 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ tox: venv
tox
flake:
- flake8 hy tests --ignore=E121,E123,E126,E226,E24,E704,W503,E305
+ flake8 hy tests --ignore=E121,E123,E126,E226,E24,E704,W503,E302,E305,E701
clear:
clear
diff --git a/NEWS b/N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.