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 |
|---|---|---|---|---|---|
line__line-bot-sdk-python-290 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linebot/api.py:LineBotApi.narrowcast"
],
"edited_modules": [
"linebot/api.py:LineBotApi"
]
},
"file": "linebot/api.py"
},
{
"changes": {
"added_entities":... | line/line-bot-sdk-python | 1d0653e32f6c1bf4334751fc23d98419dbdaf709 | Messaging API - September 2020 update
News: https://developers.line.biz/en/news/2020/09/01/messaging-api-update-september-2020/
- [ ] [limit.upToRemainingQuota property has been added to narrowcast messages.](https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message) | diff --git a/linebot/api.py b/linebot/api.py
index bb6075b..85bee50 100644
--- a/linebot/api.py
+++ b/linebot/api.py
@@ -228,7 +228,8 @@ class LineBotApi(object):
def narrowcast(
self, messages,
- retry_key=None, recipient=None, filter=None, limit=None, timeout=None):
+ retry_k... |
line__line-bot-sdk-python-317 | [
{
"changes": {
"added_entities": [
"linebot/api.py:LineBotApi.get_followers_ids"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linebot/api.py:LineBotApi"
]
},
"file": "linebot/api.py"
},
{
"changes": {
"added_ent... | line/line-bot-sdk-python | fa9e927b1ac58d132ec7c8cc23e90bc13a4d832a | Emoji is not supported by linebot.models.TextSendMessage
I want to use LINE emoji in Text message (https://developers.line.biz/en/reference/messaging-api/#text-message), but current linebot.models.TextSendMessage does not support emojis.
## System Informations
* Python version: 3.8.5
* SDK version: 1.17.0
* OS:... | diff --git a/linebot/api.py b/linebot/api.py
index 9565c61..8bc5df0 100644
--- a/linebot/api.py
+++ b/linebot/api.py
@@ -30,7 +30,7 @@ from .models import (
InsightMessageEventResponse, BroadcastResponse, NarrowcastResponse,
MessageProgressNarrowcastResponse, BotInfo, GetWebhookResponse, TestWebhookResponse,
... |
line__line-bot-sdk-python-332 | [
{
"changes": {
"added_entities": [
"linebot/api.py:LineBotApi.get_rich_menu_alias",
"linebot/api.py:LineBotApi.get_rich_menu_alias_list",
"linebot/api.py:LineBotApi.create_rich_menu_alias",
"linebot/api.py:LineBotApi.update_rich_menu_alias",
"linebot/api.py:LineBotA... | line/line-bot-sdk-python | 3c7283ed15cde430ceb9d4e3bcc28f4f4b4343c0 | Support Rich menu aliases Rich menu switch action apis
News: https://developers.line.biz/en/news/2021/06/21/switch-between-multiple-rich-menus/ | diff --git a/README.rst b/README.rst
index 5bce98b..1308679 100644
--- a/README.rst
+++ b/README.rst
@@ -698,7 +698,7 @@ TextSendMessage-Emoji
"emojiId": "002"
}
]
- text_message = TextSendMessage(text='$ LINE emoji $', emojis=[emoji])
+ text_message = TextSendMessage(text='$ LINE emoji... |
line__line-bot-sdk-python-369 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linebot/api.py:LineBotApi.get_followers_ids"
],
"edited_modules": [
"linebot/api.py:LineBotApi"
]
},
"file": "linebot/api.py"
},
{
"changes": {
"added_ent... | line/line-bot-sdk-python | d97d488876d504ab3cb6ecfc1574ea42bd669565 | Messaging API Update - November 2021
News: https://developers.line.biz/en/news/2021/11/09/messaging-api-update/
- [ ] [You can now retrieve the text entered by the user in a message sticker](https://developers.line.biz/en/news/2021/11/09/messaging-api-update/#messaging-api-202111-01)
- [ ] [You can now retrieve up ... | diff --git a/README.rst b/README.rst
index 022def1..e7563e6 100644
--- a/README.rst
+++ b/README.rst
@@ -650,6 +650,19 @@ https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint
print(test_result.reason)
print(test_result.detail)
+get\_followers\_ids(self, limit=300, start=None, timeou... |
line__line-bot-sdk-python-373 | [
{
"changes": {
"added_entities": [
"linebot/api.py:LineBotApi.get_statistics_per_unit",
"linebot/api.py:LineBotApi.get_number_of_units_used_this_month",
"linebot/api.py:LineBotApi.get_name_list_of_units_used_this_month"
],
"added_modules": null,
"edited_entities":... | line/line-bot-sdk-python | 394bc06298dac54d09f699b692f99bf93c960690 | Support get statistics per aggregation unit
News: https://developers.line.biz/en/news/2021/03/10/messaging-api-update-march-2021/#202103-02
Doc: https://developers.line.biz/en/reference/partner-docs/#get-statistics-per-unit | diff --git a/README.rst b/README.rst
index e7563e6..a41a7b3 100644
--- a/README.rst
+++ b/README.rst
@@ -114,8 +114,8 @@ https://developers.line.biz/en/reference/messaging-api/#send-reply-message
line_bot_api.reply_message(reply_token, TextSendMessage(text='Hello World!'))
-push\_message(self, to, messages, no... |
linkedin__shiv-167 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/bootstrap/__init__.py:cache_path"
],
"edited_modules": [
"src/shiv/bootstrap/__init__.py:cache_path"
]
},
"file": "src/shiv/bootstrap/__init__.py"
},
{
... | linkedin/shiv | 502731dcaae4cc3305848c2ac05f931bee544318 | Set default $SHIV_HOME as CWD while packaging?
Is there a way to set the default SHIV_HOME path with current work dir?
These days I used app.pyz which packaged with shiv and raised an error for missing the HOME path on hadoop data nodes.
So could I set the default shiv cache folder path as ./_shiv_cache instead o... | diff --git a/docs/index.rst b/docs/index.rst
index bb58db3..dca92e0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -24,7 +24,7 @@ unpack those dependencies to a known location, add them to your interpreter's se
.. note::
"Conventional" zipapps don't include any dependencies, which is what sets shiv apart fro... |
linkedin__shiv-27 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/shiv/constants.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/pip.p... | linkedin/shiv | 3c5c81fdd2c060e540e76c5df52424fc92980f37 | distutils.errors.DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
With shiv 0.0.14 from PyPI:
```console
$ shiv aws -c aws -p $(which python3.6) -o blergh
shiv! 🔪
Collecting aws
Collecting fabric>=1.6 (from aws)
Collecting boto (from aws)
Using cached https://files.pythonhost... | diff --git a/src/shiv/constants.py b/src/shiv/constants.py
index 1b82477..33d742b 100644
--- a/src/shiv/constants.py
+++ b/src/shiv/constants.py
@@ -18,3 +18,4 @@ BLACKLISTED_ARGS: Dict[Tuple[str, ...], str] = {
("-d", "--download"): "Shiv needs to actually perform an install, not merely a download.",
("--use... |
linkedin__shiv-34 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/builder.py:write_file_prefix",
"src/shiv/builder.py:create_archive"
],
"edited_modules": [
"src/shiv/builder.py:write_file_prefix",
"src/shiv/builder.py:crea... | linkedin/shiv | 7860130f09ad81c0e5c7a813d5e14d5aec7112e2 | allow use generic "/usr/bin/env python3.6" shebang?
Hello,
I played a bit with shiv and noticed that it always writes the full path to a python interpreter (sys.executable or user provided one) in the zipapp's shebang. Which means, if I try to run the same pyz on a different machine where python3.6 is installed in a... | diff --git a/docs/history.rst b/docs/history.rst
index a3f49f4..244d72d 100644
--- a/docs/history.rst
+++ b/docs/history.rst
@@ -36,9 +36,11 @@ injecting said dependencies at runtime. We have to credit the great work by @wic
The primary differences between PEX and shiv are:
* ``shiv`` completey avoids the use of ``... |
linkedin__shiv-52 | [
{
"changes": {
"added_entities": [
"src/shiv/bootstrap/__init__.py:_first_sitedir_index"
],
"added_modules": [
"src/shiv/bootstrap/__init__.py:_first_sitedir_index"
],
"edited_entities": [
"src/shiv/bootstrap/__init__.py:bootstrap"
],
"edited_mod... | linkedin/shiv | 6d00b754852f4f3e79d494d7577a029ecb72c1a1 | The change to sys.path potentially overrides standard library modules.
The change in #48 makes sure that shiv packed content (packages) has the precedence over the vended Python distribution packages or things installed into system Python site-packages. Fair enough. We want to run what we packed into the shiv.
Howev... | diff --git a/src/shiv/bootstrap/__init__.py b/src/shiv/bootstrap/__init__.py
index 82169bf..02488ba 100644
--- a/src/shiv/bootstrap/__init__.py
+++ b/src/shiv/bootstrap/__init__.py
@@ -83,6 +83,12 @@ def extract_site_packages(archive, target_path):
shutil.move(str(target_path_tmp), str(target_path))
+def _firs... |
linkedin__shiv-55 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/bootstrap/__init__... | linkedin/shiv | 4558fd9c77650482ecb949471a0231e8193a92e1 | large zipapp in a memory limited docker container fails to bootstrap due to using max workers for compiling site packages
I have a microservice zipapp with a lot of dependencies, which fails to bootstrap in a memory limited docker container:
``` traceback
Traceback (most recent call last):
File "/usr/local/lib/pyt... | diff --git a/setup.cfg b/setup.cfg
index c504615..0e35d76 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,6 @@ commit = True
tag = True
[flake8]
-ignore = C901
max-line-length = 160
max-complexity = 12
exclude = docs test/package/setup.py
diff --git a/setup.py b/setup.py
index 43da6db..7fe9d53 100644
--- a/set... |
linkedin__shiv-70 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/bootstrap/__init__.py:bootstrap"
],
"edited_modules": [
"src/shiv/bootstrap/__init__.py:bootstrap"
]
},
"file": "src/shiv/bootstrap/__init__.py"
},
{
"... | linkedin/shiv | 801db3717d3957c0b7e59e9cbd10ac4f714a0dfb | The "create a pyz of shiv using shiv" example doesn't work
As written, the example leaves the shiv pyz file with a shebang pointing at the (presumably temporary) virtual environment used to build it.
The example should probably include a `-p "/usr/bin/env python3"` argument to specify an explicit interpreter.
Act... | diff --git a/README.md b/README.md
index 831be3b..656dfb2 100644
--- a/README.md
+++ b/README.md
@@ -69,8 +69,8 @@ pip install shiv
You can even create a pyz _of_ shiv _using_ shiv!
```sh
-python3 -m venv shiv
-source shiv/bin/activate
+python3 -m venv .
+source bin/activate
pip install shiv
shiv -c shiv -o shiv ... |
linkedin__shiv-94 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/shiv/bootstrap/__init__.py:extract_site_packages"
],
"edited_modules": [
"src/shiv/bootstrap/__init__.py:extract_site_packages"
]
},
"file": "src/shiv/bootstrap/__i... | linkedin/shiv | 7aba2d94b62c7e587ce5e26cf59464a1c9a3b0df | FileNotFoundError during bootstrapping to acquire_nix lock
Attempting to follow the example given in the readme, using OSX 10.11.6:
```
$ mktmpenv --python=`which python3.6`
$ which python3
/Users/<username>/Virtualenvs/tmp-cf98a678da0c70e/bin/python3
$ python -V
Python 3.6.2
$ python3 -m pip download boto
... | diff --git a/src/shiv/bootstrap/__init__.py b/src/shiv/bootstrap/__init__.py
index 997f288..fc62175 100644
--- a/src/shiv/bootstrap/__init__.py
+++ b/src/shiv/bootstrap/__init__.py
@@ -73,8 +73,13 @@ def extract_site_packages(archive, target_path, compile_pyc, compile_workers=0,
:param ZipFile archive: The zipfile... |
linkml__linkml-1054 | [
{
"changes": {
"added_entities": [
"linkml/generators/jsonschemagen.py:JsonSchema.__init__",
"linkml/generators/jsonschemagen.py:JsonSchema.add_def",
"linkml/generators/jsonschemagen.py:JsonSchema.add_lax_def",
"linkml/generators/jsonschemagen.py:JsonSchema.add_property",
... | linkml/linkml | 8e8202424b0aa90cb9a388581ba87e04e6826616 | Refactor jsonschema generator to use schemaview
Currently jsonschemagen uses the older restricted visitor pattern, which makes it harder to implement things like jsonschema composition, which are inherently recursive.
There are a few other things that it would be good to change, the order I would do this
- [ ] Ex... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 06314bf0..ec595e62 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -1,17 +1,18 @@
+import json
import logging
import os
+from collections import UserDict
from copy import deepcopy
f... |
linkml__linkml-1082 | [
{
"changes": {
"added_entities": [
"linkml/generators/docgen.py:DocGenerator.links",
"linkml/generators/docgen.py:DocGenerator.get_slot_inherited_from"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linkml/generators/docgen.py:DocGen... | linkml/linkml | 5ecd9c402b7e8f5ad1775904a9247df26a1918fa | personinfo.yaml: CHILD_OF should be famrel:03
https://github.com/linkml/linkml/blob/main/examples/PersonSchema/personinfo.yaml#L252:
`CHILD_OF meaning: famrel:01` conflicts with SIBLING_OF.
Should be eg `famrel:03` | diff --git a/examples/PersonSchema/personinfo.yaml b/examples/PersonSchema/personinfo.yaml
index 78b68fff..4cc629eb 100644
--- a/examples/PersonSchema/personinfo.yaml
+++ b/examples/PersonSchema/personinfo.yaml
@@ -249,7 +249,7 @@ enums:
PARENT_OF:
meaning: famrel:02
CHILD_OF:
- meaning: f... |
linkml__linkml-1095 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_subschema_for_slot"
],
"edited_modules": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator"
]
},
"fil... | linkml/linkml | d5663bfcc409ea94f072ad90a521e8b0947805ed | pydanticgen doesn't support inlined dicts
It doesn't seem to be possible to get an inlined dictionary with a class range.
Using this example schema:
```
classes:
person:
slots:
- id
- bikes
attributes:
- bikes:
range: bike
multivalued: true
inline... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 788219b1..1dd89da3 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -376,6 +376,18 @@ class JsonSchemaGenerator(Generator):
if slot.equals_number is not None:
prop[... |
linkml__linkml-1130 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_subschema_for_slot"
],
"edited_modules": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator"
]
},
"fil... | linkml/linkml | b8a1c8a247059d64d24a2e4f2cbe19934de776a7 | JSON Schema generation fails when slot uses `any_of` to combine multiple value conditions
**Describe the bug**
The `gen-json-schema` command fails when the input schema contains a slot with an `any_of` (or likely any other boolean operator) to combine multiple value conditions. The error is:
```
AttributeError: 'A... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index fe3c7ff5..788219b1 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -378,17 +378,17 @@ class JsonSchemaGenerator(Generator):
if slot.any_of is not None and len(slot.any_of) > ... |
linkml__linkml-1226 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/linkmlgen.py:LinkmlGenerator.__post_init__"
],
"edited_modules": [
"linkml/generators/linkmlgen.py:LinkmlGenerator"
]
},
"file": "linkml/generators/li... | linkml/linkml | c33ab57563d01123d2e0a937239607119f44ed57 | gen-linkml CLI tool does not honor (default) --mergeimports parameter
`gen-linkml` advertises a `--mergeimports` parameter and even states that merging is the default state, as compared to `--no-mergeimports`
> --mergeimports / --no-mergeimports
Merge imports into source file
... | diff --git a/linkml/generators/linkmlgen.py b/linkml/generators/linkmlgen.py
index df94c703..a03a58ce 100644
--- a/linkml/generators/linkmlgen.py
+++ b/linkml/generators/linkmlgen.py
@@ -35,8 +35,8 @@ class LinkmlGenerator(Generator):
def __post_init__(self):
# TODO: consider moving up a level
- ... |
linkml__linkml-1276 | [
{
"changes": {
"added_entities": [
"linkml/generators/jsonschemagen.py:JsonSchema.add_keyword",
"linkml/generators/jsonschemagen.py:JsonSchema.is_array",
"linkml/generators/jsonschemagen.py:JsonSchema.is_object"
],
"added_modules": null,
"edited_entities": [
... | linkml/linkml | df69f0f588175fac627e369c43f3f984d04744db | JSON Schema generator should implicitly apply value constraints to all members of multivalued slots
**Describe the bug**
Using this schema as an example:
```yaml
id: http://example.com/test
name: test
imports:
- https://w3id.org/linkml/types
slots:
e_words_only:
range: string
multivalued: tr... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 66d5f85c..ebbf9b27 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -4,7 +4,7 @@ import os
from collections import UserDict
from copy import deepcopy
from dataclasses import dataclass... |
linkml__linkml-1313 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/docgen.py:DocGenerator.serialize",
"linkml/generators/docgen.py:DocGenerator.all_class_objects",
"linkml/generators/docgen.py:DocGenerator.all_slot_objects",
"l... | linkml/linkml | fe0642b7e7ff5c4495a22d99603975eb06afa2aa | docgen.py no-mergeimports creates incorrect docs
**Describe the bug**
The script `docgen.py` generates incorrect `index.md` by populating merged imports even though `--no-mergeimports` should be respected.
The code fails to generate <parentclass>.md pages because `--no-mergeimports` is respected (but should be i... | diff --git a/linkml/generators/docgen.py b/linkml/generators/docgen.py
index 7cd853cb..8ab2978e 100644
--- a/linkml/generators/docgen.py
+++ b/linkml/generators/docgen.py
@@ -186,14 +186,14 @@ class DocGenerator(Generator):
)
return
template = self._get_template("schema")
- for... |
linkml__linkml-1335 | [
{
"changes": {
"added_entities": [
"linkml/generators/excelgen.py:ExcelGenerator.create_workbook",
"linkml/generators/excelgen.py:ExcelGenerator.get_workbook_name",
"linkml/generators/excelgen.py:ExcelGenerator.remove_worksheet_by_name",
"linkml/generators/excelgen.py:Excel... | linkml/linkml | d7b6ad51997e9dd9a49effba5b956cf57da24d20 | pythongen ifabsent generates incorrect values for class_curie and slot_curie
the metamodel has a slot class_uri, with an `ifabsent` defined as follows:
```yaml
classes:
ClassDefinition:
slots:
- ...
- class_uri
- ...
slots:
class_uri:
range: uriorcurie
descripti... | diff --git a/linkml/generators/excelgen.py b/linkml/generators/excelgen.py
index fd697895..5fb493f8 100644
--- a/linkml/generators/excelgen.py
+++ b/linkml/generators/excelgen.py
@@ -1,144 +1,173 @@
import os
-from dataclasses import dataclass, field
-from typing import List, Optional, TextIO, Union
+
+from dataclasse... |
linkml__linkml-1343 | [
{
"changes": {
"added_entities": [
"linkml/utils/ifabsent_functions.py:default_ns_for"
],
"added_modules": [
"linkml/utils/ifabsent_functions.py:default_ns_for"
],
"edited_entities": null,
"edited_modules": null
},
"file": "linkml/utils/ifabsent_functi... | linkml/linkml | a3bc3761821576ca02a383c8aeb518aff3d132ce | pythongen ifabsent generates incorrect values for class_curie and slot_curie
the metamodel has a slot class_uri, with an `ifabsent` defined as follows:
```yaml
classes:
ClassDefinition:
slots:
- ...
- class_uri
- ...
slots:
class_uri:
range: uriorcurie
descripti... | diff --git a/linkml/utils/ifabsent_functions.py b/linkml/utils/ifabsent_functions.py
index fa4aa7e5..5d88b9e8 100644
--- a/linkml/utils/ifabsent_functions.py
+++ b/linkml/utils/ifabsent_functions.py
@@ -54,6 +54,17 @@ def uri_for(s: str, loader: SchemaLoader) -> str:
return loader.namespaces.curie_for(uri, True, T... |
linkml__linkml-1410 | [
{
"changes": {
"added_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator._get_range_associated_slots"
],
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_subschema_for_slot"
],
"edited_mo... | linkml/linkml | 503ab9b6575deae9edfe2444138c0143d87b217f | Add command line tool: linkml-schema-validate
Currently we get schema validation indirectly, whenever any command in the gen-X suite is executed, but it would be good to have a more direct command, `linkml-schema-validate`
This would be a convenience wrapper for running `linkml-validate` on the schema, using the ver... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 3d21a670..4d6158f3 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -371,11 +371,34 @@ class JsonSchemaGenerator(Generator):
if slot_is_inlined:
# I... |
linkml__linkml-1420 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/validators/jsonschemavalidator.py:JsonSchemaDataValidator.validate_object",
"linkml/validators/jsonschemavalidator.py:cli"
],
"edited_modules": [
"linkml/validators/js... | linkml/linkml | db3f98a024a3fec97f3687faae54b165e6cdf02d | jsonschema validation caching should be keyed on both schema and entry point
The changes made in https://github.com/linkml/linkml/pull/1363 consider only the _schema_ when implementing the caching logic.
However, the JSON Schema that the instance data needs to be validated against is dependent on two parameters - th... | diff --git a/linkml/validators/jsonschemavalidator.py b/linkml/validators/jsonschemavalidator.py
index 96c585e1..74f74c17 100644
--- a/linkml/validators/jsonschemavalidator.py
+++ b/linkml/validators/jsonschemavalidator.py
@@ -52,7 +52,8 @@ class JsonSchemaDataValidator(DataValidator):
if self.jsonschema_objs ... |
linkml__linkml-1458 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/docgen.py:cli"
],
"edited_modules": [
"linkml/generators/docgen.py:DocGenerator",
"linkml/generators/docgen.py:cli"
]
},
"file": "linkml/gener... | linkml/linkml | 3e523096b7d24a52511fa777a2c00ee2dfdeb2bd | docgen: Make it easier (or default) to have a hierarchical layout for index page
NMDC does this with a custom index.md.jinja2:
https://github.com/microbiomedata/nmdc-schema/blob/main/src/doc-templates/index.md.jinja2
compare with the default
https://github.com/linkml/linkml/blob/main/linkml/generators/docgen/i... | diff --git a/linkml/generators/docgen.py b/linkml/generators/docgen.py
index 1307fc23..b8ce4a5b 100644
--- a/linkml/generators/docgen.py
+++ b/linkml/generators/docgen.py
@@ -139,6 +139,7 @@ class DocGenerator(Generator):
gen_slots: bool = field(default_factory=lambda: True)
no_types_dir: bool = field(default... |
linkml__linkml-1461 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_type_info_for_slot_subschema",
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_subschema_for_slot"
],
"edited_m... | linkml/linkml | 298990fcd16f036611bae0e6844f83ebe5247062 | "exactly_one_of" generates erroneous JSON-schema
**Describe the bug**
The generation of the JSON-schema corresponding a schema with a `exactly_one_of` slot/attribute is wrong.
**To reproduce**
Steps to reproduce the behavior:
1. Create the schema `test.schema.yaml` provided in the section *Additional context*
2.... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 4d6158f3..6c24089e 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -317,15 +317,17 @@ class JsonSchemaGenerator(Generator):
(typ, fmt) = json_schema_types.get(schema_type.b... |
linkml__linkml-1543 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/validators/jsonschemavalidator.py:_generate_jsonschema",
"linkml/validators/jsonschemavalidator.py:JsonSchemaDataValidator.iter_validate_dict",
"linkml/validators/jsonschemavalida... | linkml/linkml | bb525c266dc120cb81db8c987f58418b0e50c33b | Add `--include-range-class-descendants` option to "linkml-validate"
**Is your feature request related to a problem? Please describe.**
`linkml-validate` doesn't accept children of a class specified in a range as valid. Being used to the behavior of inheritance in OOP that also applies to the generated Python code, I... | diff --git a/linkml/validators/jsonschemavalidator.py b/linkml/validators/jsonschemavalidator.py
index 551db8a2..039ca65a 100644
--- a/linkml/validators/jsonschemavalidator.py
+++ b/linkml/validators/jsonschemavalidator.py
@@ -26,7 +26,7 @@ class HashableSchemaDefinition(SchemaDefinition):
@lru_cache(maxsize=None)... |
linkml__linkml-1593 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_subschema_for_anonymous_class",
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_value_constraints_for_slot"
],
... | linkml/linkml | 8b46560a97ebbfeee155a89c49da2b03df93b99e | Make closed state of SHACL shapes configurable
**Is your feature request related to a problem? Please describe.**
linkML generated all SHACL shapes as closed shapes, except of Mixin shapes and shapes, that have a parent class. See [shaclgen.py#L66](https://github.com/linkml/linkml/blob/main/linkml/generators/shaclgen.... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 5043414b..9cf8aabc 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -15,6 +15,7 @@ from linkml_runtime.linkml_model.meta import (
EnumDefinition,
PermissibleValue,
Permiss... |
linkml__linkml-1623 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.get_value_constraints_for_slot"
],
"edited_modules": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator"
]
},
... | linkml/linkml | 3e04645fc5faf1d9a3486d9ff2fac7c7d7ea54ab | LinkML Patterns should generate JSON Schema Patterns
**Describe the bug**
Specifying a [LinkML Pattern](https://linkml.io/linkml-model/docs/pattern/) in a **TypeDefinition**, for example, results in a pattern in a JSON-LD `pattern` attribute. But it doesn't generate a [JSON Schema `pattern`](https://json-schema.org/... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index 9cf8aabc..f1440339 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -387,6 +387,14 @@ class JsonSchemaGenerator(Generator):
return JsonSchema()
constraints = Json... |
linkml__linkml-1660 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/pydanticgen.py:default_template"
],
"edited_modules": [
"linkml/generators/pydanticgen.py:default_template",
"linkml/generators/pydanticgen.py:PydanticGener... | linkml/linkml | 594f2af72c9291c7e31f9a45a727fab8f7f43a88 | Outdated lockfile hides test failures
**Describe the bug**
The CI installs the package using poetry, which respects the poetry lockfile.
not all installation methods respect the lockfile, and will install the most recent versions of packages that are allowed by the version pinning. This causes the tests to be overcon... | diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index cdb7701d..c34a7a5e 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -20,9 +20,16 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
+ pydanti... |
linkml__linkml-1697 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/validator/validator.py:Validator.__init__"
],
"edited_modules": [
"linkml/validator/validator.py:Validator"
]
},
"file": "linkml/validator/validator.py"
}
] | linkml/linkml | 5c0dfa25f65b7170768b52c94f67ec609afeb745 | LinkML 1.6.2 breaks local imports
**Describe the bug**
Validation using local imports doesn't work is not run from directory of importing schema
**To reproduce**
Steps to reproduce the behavior:
1. Create a schema importing another local schema
2. Run `linkml-validate` from another directory than that of the imp... | diff --git a/linkml/validator/validator.py b/linkml/validator/validator.py
index 860a0b0b..1ddc9f4f 100644
--- a/linkml/validator/validator.py
+++ b/linkml/validator/validator.py
@@ -36,6 +36,8 @@ class Validator:
self._schema = schema
else:
self._schema: SchemaDefinition = yaml_loade... |
linkml__linkml-1709 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/docgen.py:DocGenerator.serialize",
"linkml/generators/docgen.py:cli"
],
"edited_modules": [
"linkml/generators/docgen.py:DocGenerator",
"linkml/gene... | linkml/linkml | 598376ce7f8c11bd3cf31f0ca7e3d5c34770021a | `gen-doc` should allow renaming the index page
**Is your feature request related to a problem? Please describe.**
The `gen-doc` tool automatically generates an index page for the documentation it generates. That page is always named `index.html`. This is annoying as most web servers are configured by default to return... | diff --git a/linkml/generators/docgen.py b/linkml/generators/docgen.py
index c7d04a89..0dee9da8 100644
--- a/linkml/generators/docgen.py
+++ b/linkml/generators/docgen.py
@@ -130,6 +130,9 @@ class DocGenerator(Generator):
directory: str = None
"""directory in which to write documents"""
+ index_name: str... |
linkml__linkml-1714 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/docgen.py:DocGenerator.serialize",
"linkml/generators/docgen.py:cli"
],
"edited_modules": [
"linkml/generators/docgen.py:DocGenerator",
"linkml/gene... | linkml/linkml | 598376ce7f8c11bd3cf31f0ca7e3d5c34770021a | rdflib v7 introduces breaking changes
When we migrated from v5 to v6 (https://github.com/linkml/linkml/issues/291) we left the `.decode()`s in place; while no longer necessary, they worked in both 5 and 6.
v7 seems to drop support for this altogether, which introduces breaking changes in owlgen
`AttributeError: '... | diff --git a/linkml/generators/docgen.py b/linkml/generators/docgen.py
index c7d04a89..0dee9da8 100644
--- a/linkml/generators/docgen.py
+++ b/linkml/generators/docgen.py
@@ -130,6 +130,9 @@ class DocGenerator(Generator):
directory: str = None
"""directory in which to write documents"""
+ index_name: str... |
linkml__linkml-1795 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.__post_init__"
],
"edited_modules": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator"
]
},
"file": "link... | linkml/linkml | 2549522d967ea53a5a3974ad978d2ac85d166ccf | gen-json-schema should warn or error if --top-class option does not correspond to class in schema
If I run `gen-json-schema` with and the value I provide for the `--top-class` does _not_ correspond to a class in the schema, I have made an obvious mistake that `gen-json-schema` can easily detect. I think it should eithe... | diff --git a/linkml/generators/jsonschemagen.py b/linkml/generators/jsonschemagen.py
index c287696a..aa8dbc5d 100644
--- a/linkml/generators/jsonschemagen.py
+++ b/linkml/generators/jsonschemagen.py
@@ -181,6 +181,10 @@ class JsonSchemaGenerator(Generator):
super().__post_init__()
+ if self.top_clas... |
linkml__linkml-263 | [
{
"changes": {
"added_entities": [
"linkml/generators/markdowngen.py:MarkdownGenerator.visit_subset",
"linkml/generators/markdowngen.py:MarkdownGenerator.subset_link"
],
"added_modules": null,
"edited_entities": [
"linkml/generators/markdowngen.py:MarkdownGenerato... | linkml/linkml | bd80db2f32d02200853bb6a0ef165c1f96bbc17f | Add more detailed markdowngen testing | diff --git a/linkml/generators/markdowngen.py b/linkml/generators/markdowngen.py
index 9d2523b3..4365c268 100644
--- a/linkml/generators/markdowngen.py
+++ b/linkml/generators/markdowngen.py
@@ -8,7 +8,7 @@ from jsonasobj2 import JsonObj, values
from linkml.generators.yumlgen import YumlGenerator
from linkml_runtim... |
linkml__linkml-275 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator.visit_schema"
],
"edited_modules": [
"linkml/generators/jsonschemagen.py:JsonSchemaGenerator"
]
},
"file": "linkm... | linkml/linkml | 7588d9b7e50cba2f76eef40ac79e60bed582b6b2 | jsonschema generation should generate additionalProperties: false for enclosing properties
we correctly generate
"additionalProperties": false,
for each class
but we should also do this on the enclosing object
| diff --git a/AUTHORS b/AUTHORS
index 6d3bd0c7..aa67ab24 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,4 @@
-Bill Duncan <wdduncan@users.noreply.github.com>
+Bill Duncan <wdduncan@gmail.com>
Chris Mungall <cjm@berkeleybop.org>
Donny Winston <donny@polyneme.xyz>
EC2 Default User <ec2-user@ip-172-31-29-45.ec2.internal>... |
linkml__linkml-283 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/generators/jsonldcontextgen.py:ContextGenerator.add_prefix",
"linkml/generators/jsonldcontextgen.py:ContextGenerator.add_mappings",
"linkml/generators/jsonldcontextgen.py:ContextG... | linkml/linkml | 08866026f4a0ae6977cabc9de1a984079873823b | Abstract add_mappings code into common generator superclass
`def add_mappings` is duplicated across different generators with drift between the code, causing a variety of subtle issues relating to loss of prefix information
See my comment here:
https://github.com/linkml/linkml/issues/192#issuecomment-883537162
... | diff --git a/linkml/generators/jsonldcontextgen.py b/linkml/generators/jsonldcontextgen.py
index 343874ff..d7067140 100644
--- a/linkml/generators/jsonldcontextgen.py
+++ b/linkml/generators/jsonldcontextgen.py
@@ -165,42 +165,6 @@ class ContextGenerator(Generator):
if slot_def:
self.context_body[... |
linkml__linkml-390 | [
{
"changes": {
"added_entities": [
"linkml/generators/owlgen.py:OwlSchemaGenerator._range_is_datatype",
"linkml/generators/owlgen.py:OwlSchemaGenerator.slot_owl_type"
],
"added_modules": null,
"edited_entities": [
"linkml/generators/owlgen.py:OwlSchemaGenerator.__... | linkml/linkml | 3bc7d407dd833aaefabb34e1d32ceb896a145b88 | slots in OWL output have unexpected IRIs and are not declared as properties
I'm investigating some problems with the generated OWL for the CCDH model: https://github.com/cancerDHC/ccdhmodel/issues/64
I started by following the [linkml tutorial](https://linkml.io/linkml/intro/tutorial01.html#), and I think I see some... | diff --git a/linkml/generators/owlgen.py b/linkml/generators/owlgen.py
index 61c79c06..46f5333d 100644
--- a/linkml/generators/owlgen.py
+++ b/linkml/generators/owlgen.py
@@ -9,12 +9,12 @@ import logging
import click
from rdflib import Graph, URIRef, RDF, OWL, Literal, BNode
from rdflib.collection import Collection
... |
linkml__linkml-992 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/linter/cli.py:main"
],
"edited_modules": [
"linkml/linter/cli.py:main"
]
},
"file": "linkml/linter/cli.py"
},
{
"changes": {
"added_entities": null... | linkml/linkml | a4d277de1b25fb00f0a4df5a3cc0256accf323d3 | linkml-lint command should have a verbose flag
The `linkml-link` command should have a verbose flag. If provided it should list all the files checked, even if they have no issues.
| diff --git a/linkml/linter/cli.py b/linkml/linter/cli.py
index 07483e43..1d9718b4 100644
--- a/linkml/linter/cli.py
+++ b/linkml/linter/cli.py
@@ -51,6 +51,7 @@ def get_yaml_files(root: Path) -> Iterable[str]:
help="Report format.",
show_default=True,
)
+@click.option("-v", "--verbose", is_flag=True)
@click... |
linkml__linkml-994 | [
{
"changes": {
"added_entities": [
"linkml/linter/rules.py:LinterRule.format_element"
],
"added_modules": null,
"edited_entities": [
"linkml/linter/rules.py:NoEmptyTitleRule.check",
"linkml/linter/rules.py:NoXsdIntTypeRule.check",
"linkml/linter/rules.py:P... | linkml/linkml | 3ea865ec1fcb7ea2c4f34f5291cab81f127285d7 | linter is inconsistent in how it mentions meta model elements
For example, in the `message` column of the TSV output, one may see wither of these styles:
- SlotDefinition 'source_file_size' has no title
- slot_definition 'associated_part' does not have recommended slot 'description'
| diff --git a/linkml/linter/rules.py b/linkml/linter/rules.py
index d3893001..9deef5d4 100644
--- a/linkml/linter/rules.py
+++ b/linkml/linter/rules.py
@@ -1,10 +1,10 @@
-from functools import lru_cache
import re
from abc import ABC, abstractmethod
+from functools import lru_cache
from typing import Callable, Iterabl... |
linkml__linkml-995 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml/linter/cli.py:main"
],
"edited_modules": [
"linkml/linter/cli.py:main"
]
},
"file": "linkml/linter/cli.py"
}
] | linkml/linkml | 3ea865ec1fcb7ea2c4f34f5291cab81f127285d7 | linkml-lint exit codes
I would prefer for the linter to exit with code 0 if it did not find errors and just emitted warnings.
If others prefer that warnings lead to a non-zero exit code, having exit codes that correspond to warnings only vs errors would be good, e.g.
warnings => exit 1
errors => exit 10
warnin... | diff --git a/docs/schemas/linter.md b/docs/schemas/linter.md
index 1e1759cc..a5fb0336 100644
--- a/docs/schemas/linter.md
+++ b/docs/schemas/linter.md
@@ -126,3 +126,11 @@ For example, to generate a markdown report in a file named `linter-results.md`:
```bash
linkml-lint --format markdown --output linter-results.md m... |
linkml__linkml-runtime-132 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml_runtime/utils/metamodelcore.py:URI.is_valid",
"linkml_runtime/utils/metamodelcore.py:Curie.is_valid"
],
"edited_modules": [
"linkml_runtime/utils/metamodelcore.py:URI"... | linkml/linkml-runtime | 6eb0d71d38aeb3f1f02fc8f99f12dae0f814585e | question about missing dependency wheel files (shexjsg depends on antlr)
Not a python user, but I'm just trying to do enough to use linkml-runtime in a browser with javascript. I'm using Pyodide and micropip.install and it comes up with an error about missing wheel files in pyldmod and others:
oops: PythonError: Tr... | diff --git a/linkml_runtime/utils/metamodelcore.py b/linkml_runtime/utils/metamodelcore.py
index 755a808..6e34daf 100644
--- a/linkml_runtime/utils/metamodelcore.py
+++ b/linkml_runtime/utils/metamodelcore.py
@@ -6,7 +6,6 @@ from decimal import Decimal
from typing import Union, Optional, Tuple
from urllib.parse impor... |
linkml__linkml-runtime-183 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml_runtime/utils/schema_as_dict.py:_remove_names"
],
"edited_modules": [
"linkml_runtime/utils/schema_as_dict.py:_remove_names"
]
},
"file": "linkml_runtime/utils/s... | linkml/linkml-runtime | 3a1a0107a36006df7a95c2b0a18fc4894c928f33 | schema_as_dict is over eager and eliminates "name" slots
schema_as_dict will compact the direct yaml representation of a schema such that `name` keys are not repeated in the element when they are used as keys - but this is over-eager and gets rid of name slots | diff --git a/linkml_runtime/utils/schema_as_dict.py b/linkml_runtime/utils/schema_as_dict.py
index c590936..edaabca 100644
--- a/linkml_runtime/utils/schema_as_dict.py
+++ b/linkml_runtime/utils/schema_as_dict.py
@@ -29,12 +29,20 @@ def _remove_names(obj: Any, parent: Optional[str]) -> Any:
Also compacts represe... |
linkml__linkml-runtime-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml_runtime/utils/schemaview.py:SchemaView.load_import",
"linkml_runtime/utils/schemaview.py:SchemaView.induced_slot"
],
"edited_modules": [
"linkml_runtime/utils/schemavi... | linkml/linkml-runtime | 1b6804049220ab7a6b31e1c584fb0f9507a7b11c | induce_slot returns incorrect range
In the NMDC Schema the `slot_usage` for [has input](https://github.com/microbiomedata/nmdc-schema/blob/d493f804d5aaed8b1c23e40e834a80e06308196a/src/schema/nmdc.yaml#L373) defines the range as `biosample`. However, `view.induced_slot('has input', 'biosample processing').range` returns... | diff --git a/linkml_runtime/utils/schemaview.py b/linkml_runtime/utils/schemaview.py
index 1e56887..ab1346d 100644
--- a/linkml_runtime/utils/schemaview.py
+++ b/linkml_runtime/utils/schemaview.py
@@ -132,7 +132,7 @@ class SchemaView(object):
sname = self.importmap.get(str(imp), imp) # Import map... |
linkml__linkml-runtime-43 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linkml_runtime/utils/formatutils.py:remove_empty_items"
],
"edited_modules": [
"linkml_runtime/utils/formatutils.py:remove_empty_items"
]
},
"file": "linkml_runtime/uti... | linkml/linkml-runtime | 325ad3df708560b092c5140ee091c5db37eace6a | jsonasobj2.as_json_obj turns enums into empty dicts
```python
book = Book(id='B1', genres=['fantasy'])
print(book.genres)
print(type(book.genres[0]))
print(as_json_obj(book.genres[0]))
```
out:
```
[(text='fantasy')]
<class 'tests.test_loaders_dumpers.models.books_normalized.GenreEnum'>
{}
```
This is... | diff --git a/linkml_runtime/utils/formatutils.py b/linkml_runtime/utils/formatutils.py
index d1ced86..f43877e 100644
--- a/linkml_runtime/utils/formatutils.py
+++ b/linkml_runtime/utils/formatutils.py
@@ -133,8 +133,9 @@ def remove_empty_items(obj: Any, hide_protected_keys: bool = False, inside: bool
:return: copy... |
linkml__linkml-runtime-69 | [
{
"changes": {
"added_entities": [
"linkml_runtime/utils/schemaview.py:SchemaView._metaslots_for_slot"
],
"added_modules": null,
"edited_entities": [
"linkml_runtime/utils/schemaview.py:SchemaView.induced_slot"
],
"edited_modules": [
"linkml_runtime/ut... | linkml/linkml-runtime | bbf4187479c4eba1860828a5a472e57f174a47e9 | SchemaView not retrieving induced slot description
I have put together a small test to for retrieving an induced slots description.
Schema:
```
id: https://example.com/test-induced
name: test-induced
title: test induced
description: >-
test schema view's finding of induced slot information.
classes:
... | diff --git a/linkml_runtime/utils/schemaview.py b/linkml_runtime/utils/schemaview.py
index d29392c..b100e24 100644
--- a/linkml_runtime/utils/schemaview.py
+++ b/linkml_runtime/utils/schemaview.py
@@ -775,7 +775,7 @@ class SchemaView(object):
has all properties materialized.
This makes use of schema... |
linode__linode_api4-python-154 | [
{
"changes": {
"added_entities": [
"linode_api4/objects/linode.py:Type._populate"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linode_api4/objects/linode.py:Type"
]
},
"file": "linode_api4/objects/linode.py"
}
] | linode/linode_api4-python | ee2789013fbaa20498a812f5ec7ca5e1711d7332 | Linode type class
The `Type` model seems to be missing the `class` attribute documented for GET /linode/types. It would probably need to get a different name here since `class` is a Python keyword. | diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py
index 978d8fc..8cd2b4e 100644
--- a/linode_api4/objects/linode.py
+++ b/linode_api4/objects/linode.py
@@ -11,6 +11,7 @@ from linode_api4.common import load_and_validate_keys
from linode_api4.errors import UnexpectedResponseError
from linode_ap... |
linode__linode_api4-python-176 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linode_api4/objects/linode.py:Type"
]
},
"file": "linode_api4/objects/linode.py"
}
] | linode/linode_api4-python | c6e47b42efd6b8f7d52e854305517bfaa266d9e4 | Linode plan types do not include gpu count | diff --git a/linode_api4/objects/linode.py b/linode_api4/objects/linode.py
index b9c0d52..1bba3b3 100644
--- a/linode_api4/objects/linode.py
+++ b/linode_api4/objects/linode.py
@@ -145,6 +145,7 @@ class Type(Base):
'memory': Property(filterable=True),
'transfer': Property(filterable=True),
'v... |
linode__linode_api4-python-193 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linode_api4/objects/nodebalancer.py:NodeBalancerConfig"
]
},
"file": "linode_api4/objects/nodebalancer.py"
}
] | linode/linode_api4-python | 0add81ad0e8b6136ab7d8d627a8a1710f2d79e40 | `proxy_protocol` on `NodeBalancerConfig` is missing
[Official API documentation](https://www.linode.com/docs/api/nodebalancers/#config-create) says that there is a `proxy_protocol` field on `NodeBalancerConfig`. Trying to get/set one with `linode_api4` causes:
```
File "python3.9/site-packages/linode_api4/objects/... | diff --git a/linode_api4/objects/nodebalancer.py b/linode_api4/objects/nodebalancer.py
index b56b6c0..7a3ec1b 100644
--- a/linode_api4/objects/nodebalancer.py
+++ b/linode_api4/objects/nodebalancer.py
@@ -65,6 +65,7 @@ class NodeBalancerConfig(DerivedBase):
"ssl_fingerprint": Property(),
"cipher_suite... |
linode__linode_api4-python-220 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"linode_api4/linode_client.py:SupportGroup.ticket_open"
],
"edited_modules": [
"linode_api4/linode_client.py:SupportGroup"
]
},
"file": "linode_api4/linode_client.py"
... | linode/linode_api4-python | 26987bf1fe1937a11e024ef9869b2b1654cdaabd | LinodeLoginClient.finish_oauth() doesn't handle tokens with more than one scope
# Steps to reproduce
1. Initiate the OAuth flow with a request for multiple scopes
```
login_client.generate_login_url(
scopes=[OAuthScopes.Account.read_write, OAuthScopes.Domains.read_write ]
)
```
2. In the O... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8c425fe..ae876b7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ['3.7','3.8','3.9','3.10', '3.11']
+ pyth... |
linode__linode_api4-python-247 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"linode_api4/objects/longview.py:LongviewSubscription"
]
},
"file": "linode_api4/objects/longview.py"
},
{
"changes": {
"added_entities": [
... | linode/linode_api4-python | b2bb9b7cab895459430a335952a1d993a3076486 | inconsistent update behavior
This works:
```
client = ...
instance = client.load(Instance, 123)
instance.tags = ['new-tags']
instance.save()
```
This does nothing:
```
client = ...
instance = Instance(client, 123) # from documentation it is not clear that this will make call at all
instance.tags = ['new-tags... | diff --git a/README.rst b/README.rst
index 3cd7aca..9b8430b 100644
--- a/README.rst
+++ b/README.rst
@@ -84,8 +84,8 @@ Check out the `Getting Started guide`_ for more details on getting started
with this library, or read `the docs`_ for more extensive documentation.
.. _Linode Personal Access Token: https://www.lin... |
linw1995__data_extractor-18 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"data_extractor/abc.py:ComplexExtractorMeta.__init__"
],
"edited_modules": [
"data_extractor/abc.py:ComplexExtractorMeta"
]
},
"file": "data_extractor/abc.py"
}
] | linw1995/data_extractor | ee4cc11a17b617461cf93168bbcd81fbbc14db07 | The field name is the same as Item's parameter in Item.
```python3
class Parameter(Item):
name = Field(XPathExtractor("./span[@class='name']"))
default = Field(XPathExtractor("./span[@class='default']"))
extractor = Parameter(XPathExtractor("./li[@class='parameter']", default=None)
```
the `default=No... | diff --git a/data_extractor/abc.py b/data_extractor/abc.py
index 0c2434e..115b15e 100644
--- a/data_extractor/abc.py
+++ b/data_extractor/abc.py
@@ -3,6 +3,7 @@
====================================
"""
# Standard Library
+import inspect
import warnings
from abc import abstractmethod
@@ -20,8 +21,41 @@ class Comp... |
linw1995__data_extractor-19 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"data_extractor/abc.py:ComplexExtractorMeta.__init__"
],
"edited_modules": [
"data_extractor/abc.py:ComplexExtractorMeta"
]
},
"file": "data_extractor/abc.py"
},
{
... | linw1995/data_extractor | 99a4a7f9ca7908d9e15399a8cfb96a50af7a1f01 | Add optional param name for special field name into Item and Field. | diff --git a/data_extractor/abc.py b/data_extractor/abc.py
index 115b15e..5c3df63 100644
--- a/data_extractor/abc.py
+++ b/data_extractor/abc.py
@@ -52,7 +52,10 @@ class ComplexExtractorMeta(type):
line = line.strip()
raise SyntaxError(
- f"{line!r} ove... |
linw1995__data_extractor-22 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"data_extractor/abc.py:ComplexExtractorMeta.__init__"
],
"edited_modules": [
"data_extractor/abc.py:ComplexExtractorMeta"
]
},
"file": "data_extractor/abc.py"
}
] | linw1995/data_extractor | 6315f8913b2776832d4e6aab25e02c47194b1d00 | Can't locate SytanxError.text from source code.
```python3
class Parameter(Item): name = Field(XPathExtractor("./span[@class='name']"))
```
```python3
class User(Item):
uid = Field(JSONExtractor("id")); name = Field(JSONExtractor("name"))
```
```python3
Parameter = type(
"Parameter", (Item,), {"nam... | diff --git a/data_extractor/abc.py b/data_extractor/abc.py
index f26a4a2..865a7c3 100644
--- a/data_extractor/abc.py
+++ b/data_extractor/abc.py
@@ -26,7 +26,10 @@ class ComplexExtractorMeta(type):
for key, attr in attr_dict.items():
if isinstance(type(attr), ComplexExtractorMeta):
- ... |
linw1995__data_extractor-69 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"data_extractor/core.py:ComplexExtractorMeta.__init__"
],
"edited_modules": [
"data_extractor/core.py:ComplexExtractorMeta"
]
},
"file": "data_extractor/core.py"
}
] | linw1995/data_extractor | 0c5c8640a207e9785a856787cc5b327ff7b7724c | need to check extractors of the super class available or not
https://github.com/linw1995/data_extractor/blob/0c5c8640a207e9785a856787cc5b327ff7b7724c/data_extractor/core.py#L198-L214
Below test case means to be pass.
```python
@pytest.mark.usefixtures("json_extractor_backend")
def test_item_remove_super... | diff --git a/README.rst b/README.rst
index 903d19c..efbd40c 100644
--- a/README.rst
+++ b/README.rst
@@ -112,6 +112,7 @@ Unreleased
- remove LICENSE file from dist files
- duplicated extracting if class attrs overlap happened #67
+- remove super class sub-extractors error #68
**Refactor**
diff --git a/data_ext... |
lipoja__URLExtract-134 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"urlextract/urlextract_core.py:URLExtract._complete_url"
],
"edited_modules": [
"urlextract/urlextract_core.py:URLExtract"
]
},
"file": "urlextract/urlextract_core.py"
... | lipoja/URLExtract | 6bc2f30fb09ec8eac1fb9c2f1b1435174d827f99 | Does Not extract the URL that is leading special character
Hi,
I am trying to extract the URL from the following text,
But it is not grabbing the link due to the hyphen.
EncodedText="* test link -https://www.google.com";
extractor = URLExtract()
urls = extractor.find_urls(EncodedText)
print(URLs)
---ou... | diff --git a/urlextract/urlextract_core.py b/urlextract/urlextract_core.py
index 0f5bc0a..8f7d5c8 100644
--- a/urlextract/urlextract_core.py
+++ b/urlextract/urlextract_core.py
@@ -488,6 +488,9 @@ class URLExtract(CacheFile):
# URL should not start with two backslashes
if complete_url.startswith("//")... |
lipoja__URLExtract-135 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"urlextract/urlextract_core.py:URLExtract._is_domain_valid"
],
"edited_modules": [
"urlextract/urlextract_core.py:URLExtract"
]
},
"file": "urlextract/urlextract_core.py... | lipoja/URLExtract | 1159482fca5c2db82a987b68c44d172135741d1f | should not grab email fragments
```
>>> from urlextract import URLExtract
>>> extractor = URLExtract()
>>> extractor.find_urls("@gmail.com")
['@gmail.com']
>>> extractor.find_urls("bad.email @gmail.com")
['bad.email', '@gmail.com']
```
should not be grabbing `@gmail.com` at all | diff --git a/urlextract/urlextract_core.py b/urlextract/urlextract_core.py
index 8f7d5c8..dec043c 100644
--- a/urlextract/urlextract_core.py
+++ b/urlextract/urlextract_core.py
@@ -577,6 +577,10 @@ class URLExtract(CacheFile):
url_parts = uritools.urisplit(url)
# <scheme>://<authority>/<path>?<query>#... |
lipoja__URLExtract-138 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"urlextract/urlextract_core.py:URLExtract._is_domain_valid"
],
"edited_modules": [
"urlextract/urlextract_core.py:URLExtract"
]
},
"file": "urlextract/urlextract_core.py... | lipoja/URLExtract | 1f872e8126b66f369ba3be8f4933890b3193c688 | urlextract without authority causes AttributeError
Hi, ever since 1.7.0 -- in particular it looks like #135, some URLs cause an error since the authority is None:
on 1.6.0:
```
In [1]: text = '[[ "$(giturl)" =~ ^https://gitlab.com ]] echo "found" || echo "didnt'
In [2]: import urlextract
In [3]: u = urlext... | diff --git a/urlextract/urlextract_core.py b/urlextract/urlextract_core.py
index 5fb3ee7..6d70d2c 100644
--- a/urlextract/urlextract_core.py
+++ b/urlextract/urlextract_core.py
@@ -578,7 +578,7 @@ class URLExtract(CacheFile):
# <scheme>://<authority>/<path>?<query>#<fragment>
# authority can't start... |
lipoja__URLExtract-140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"urlextract/urlextract_core.py:URLExtract._get_tld_pos"
],
"edited_modules": [
"urlextract/urlextract_core.py:URLExtract"
]
},
"file": "urlextract/urlextract_core.py"
... | lipoja/URLExtract | d2071f4a0f497898ae4d763d43de4c380897470f | Wrong indices with uppercase characters in domain name
I am getting wrong indices when the domain name of a URL contains uppercase characters.
To reproduce:
```
from urlextract import URLExtract
extractor = URLExtract()
urls = extractor.find_urls("www.Google.com", get_indices=True)
print(urls[0])
urls = extrac... | diff --git a/urlextract/urlextract_core.py b/urlextract/urlextract_core.py
index b6b3767..8283024 100644
--- a/urlextract/urlextract_core.py
+++ b/urlextract/urlextract_core.py
@@ -760,8 +760,11 @@ class URLExtract(CacheFile):
url_parts = uritools.urisplit(tpm_url)
host = str(url_parts.gethost())
- ... |
litl__backoff-161 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"backoff/_sync.py:retry_predicate",
"backoff/_sync.py:retry_exception"
],
"edited_modules": [
"backoff/_sync.py:retry_predicate",
"backoff/_sync.py:retry_exception"
... | litl/backoff | 92e7b6e910accee30118a6f3d2cef4c62caa38f5 | Behavior change when reading max_tries and max_time from callables
Hi there!
Using a callable to read `max_tries` and `max_time` was really useful to query an application config object.
Every time the function was called, the value would be read again and so it remained configurable.
After updating to version 2... | diff --git a/backoff/_sync.py b/backoff/_sync.py
index ecc592d..1c54ecc 100644
--- a/backoff/_sync.py
+++ b/backoff/_sync.py
@@ -28,11 +28,8 @@ def retry_predicate(target, wait_gen, predicate,
@functools.wraps(target)
def retry(*args, **kwargs):
-
- # update variables from outer function args
- ... |
litl__backoff-172 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"backoff/_async.py:retry_exception"
],
"edited_modules": [
"backoff/_async.py:retry_exception"
]
},
"file": "backoff/_async.py"
},
{
"changes": {
"added_en... | litl/backoff | 24ae1b9d5e29b2770944d431f9e0cca98481f412 | [Feature Suggestion] - Exception in _call_handlers
Would be great to know which exception was thrown in handlers from decorator exception tuple in `backoff.on_exception`. Maybe receive exception as extra kwargs in _call_handlers. What you guys think?
| diff --git a/README.rst b/README.rst
index d80f98f..720c3a8 100644
--- a/README.rst
+++ b/README.rst
@@ -288,7 +288,9 @@ In the case of the ``on_exception`` decorator, all ``on_backoff`` and
``on_giveup`` handlers are called from within the except block for the
exception being handled. Therefore exception info is ava... |
llimllib__limbo-183 | [
{
"changes": {
"added_entities": [
"limbo/plugins/weather.py:parse_forecast"
],
"added_modules": [
"limbo/plugins/weather.py:parse_forecast"
],
"edited_entities": [
"limbo/plugins/weather.py:weather",
"limbo/plugins/weather.py:on_message"
],
... | llimllib/limbo | ae611814ce5701885615346cc2e5cc931a77d6e2 | Remove DarkSky dependency in Weather Plugin
In recent news Dark Sky was acquired by Apple and they will stop accepting new signups to use the API.
Current API users will work until end 2021. (Source of information: https://blog.darksky.net/dark-sky-has-a-new-home/)
Currently the [weather plugin](https://github.com... | diff --git a/README.md b/README.md
index 06d2c82..134fd3c 100644
--- a/README.md
+++ b/README.md
@@ -92,3 +92,4 @@ These are the current default plugins:
* [@eSoares](https://github.com/eSoares)
* [@sweinstein89](https://github.com/sweinstein89)
* [@fenwar](https://github.com/fenwar)
+* [@rdimartino](https://github.... |
lmfit__lmfit-py-487 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/parameter.py:Parameter.__set_expression"
],
"edited_modules": [
"lmfit/parameter.py:Parameter"
]
},
"file": "lmfit/parameter.py"
}
] | lmfit/lmfit-py | 6c87262fcfd3c361b197c6769852f76366113246 | asteval errors are not flushed after raising
#### Description
With parameter.set(expr="foo"), if the expression raises an exception in asteval, this error is stored in parameter._expr_eval.errors. Now, the function https://github.com/lmfit/lmfit-py/blob/6c87262fcfd3c361b197c6769852f76366113246/lmfit/parameter.py#L18... | diff --git a/lmfit/parameter.py b/lmfit/parameter.py
index 9a5c7d1a..235a919b 100644
--- a/lmfit/parameter.py
+++ b/lmfit/parameter.py
@@ -826,6 +826,8 @@ class Parameter(object):
if val is None:
self._expr_ast = None
if val is not None and self._expr_eval is not None:
+ self._... |
lmfit__lmfit-py-554 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/parameter.py:Parameters.__setstate__"
],
"edited_modules": [
"lmfit/parameter.py:Parameters"
]
},
"file": "lmfit/parameter.py"
}
] | lmfit/lmfit-py | aa642a8b9e3e17057937d21aac5975a3a82640fd | saved models fail to restore when using Voigt or other models that use complex constraints
Saving a model result with a Voigt Function works, but the saved model cannot be restored.
The problem can be reproduced with
``` python
import numpy as np
import matplotlib.pyplot as plt
from lmfit.model import save_mod... | diff --git a/lmfit/parameter.py b/lmfit/parameter.py
index 9c8b6990..880f869d 100644
--- a/lmfit/parameter.py
+++ b/lmfit/parameter.py
@@ -4,6 +4,7 @@ from __future__ import division
from collections import OrderedDict
from copy import deepcopy
import json
+import importlib
from asteval import Interpreter, get_as... |
lmfit__lmfit-py-589 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/minimizer.py:Minimizer.least_squares"
],
"edited_modules": [
"lmfit/minimizer.py:Minimizer"
]
},
"file": "lmfit/minimizer.py"
}
] | lmfit/lmfit-py | ffe550c9c1e3f2c6b82b7175dd101f5c6cd8f685 | Passing jac_sparsity to least_squares breaks minimize()
#### Description
Calls of the form:
```python
lmfit.minimize(..., method="least_squares", jac_sparsity=obj)
```
result in the Jacobian being returned as a sparse matrix, which breaks the calculation of the Hessian:
https://github.com/lmfit/lmfit-py/b... | diff --git a/lmfit/minimizer.py b/lmfit/minimizer.py
index ce2cbed5..22c275be 100644
--- a/lmfit/minimizer.py
+++ b/lmfit/minimizer.py
@@ -29,6 +29,8 @@ from scipy.optimize import dual_annealing as scipy_dual_annealing
from scipy.optimize import leastsq as scipy_leastsq
from scipy.optimize import minimize as scipy_mi... |
lmfit__lmfit-py-598 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/confidence.py:ConfidenceInterval.__init__",
"lmfit/confidence.py:ConfidenceInterval.find_limit"
],
"edited_modules": [
"lmfit/confidence.py:ConfidenceInterval"
]
... | lmfit/lmfit-py | 449c6ed9f2d70c853507933c0e5f39c2ff75635e | BUG: lmfit.conf_interval does not work with len(p_names) = 1
#### Description
The lmfit confidence calculation fails when len(p_names) < 2. This is due to bug in the counting of the free variables: Instead counting all parameters where vary is True, it counts only the one which are in p_names.
| diff --git a/doc/confidence.rst b/doc/confidence.rst
index 7fad4859..c9d2323f 100644
--- a/doc/confidence.rst
+++ b/doc/confidence.rst
@@ -88,6 +88,23 @@ around the best fit value. For this problem, it is not necessary to
calculate confidence intervals, and the estimates of the uncertainties from
the covariance matr... |
lmfit__lmfit-py-714 | [
{
"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
... | lmfit/lmfit-py | 500ee04da487d11573e73b63f7990cd97cac81a1 | failed tests/test_model.py::TestUserDefiniedModel::test_composite_plotting
Hi all,
This is my first issue here. Yes, I read the instructions and I am sure this is a GitHub Issue.
I just forked the repo, created a clean conda env, installed the dependencies (using `pip`), and ran `py.test`. I got a single failing ... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 32c03609..a76743cc 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,7 +2,7 @@ exclude: 'versioneer.py|lmfit/_version|doc/conf.py'
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v2.10.0
+ rev: v2.9.0
... |
lmfit__lmfit-py-821 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/lineshapes.py:step",
"lmfit/lineshapes.py:rectangle"
],
"edited_modules": [
"lmfit/lineshapes.py:step",
"lmfit/lineshapes.py:rectangle"
]
},
"file... | lmfit/lmfit-py | 99952a223dfad467fb36c20c5f1e535cd3832f71 | Incorrect value in MinimizerResult.init_values
#### First Time Issue Code
Yes, I read the instructions and I am sure this is a GitHub Issue.
#### Description
Using the [simple example] from the documentation and printing `result.init_values` (or `result.init_vals`) as in the MWE below reveals an incorrect initial ... | diff --git a/doc/constraints.rst b/doc/constraints.rst
index dbe439e3..cc82bb98 100644
--- a/doc/constraints.rst
+++ b/doc/constraints.rst
@@ -13,7 +13,7 @@ highly desirable to place mathematical constraints on parameter values.
For example, one might want to require that two Gaussian peaks have the
same width, or ha... |
lmfit__lmfit-py-895 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/model.py:Model.make_params"
],
"edited_modules": [
"lmfit/model.py:Model"
]
},
"file": "lmfit/model.py"
}
] | lmfit/lmfit-py | 980a5d10e8876f3466b7c31a01233c923b237afe | Model.make_params() sometimes ignores set a parameter with a prefix
#### Description
<!-- Provide a short description of the issue, describe the expected outcome, and give the actual result -->
This issue was shown in #892
###### A Minimal, Complete, and Verifiable example
<!-- see, for example, https://stack... | diff --git a/lmfit/model.py b/lmfit/model.py
index 26b0b646..843e307e 100644
--- a/lmfit/model.py
+++ b/lmfit/model.py
@@ -700,7 +700,7 @@ class Model:
if basename in kwargs:
setpar(par, kwargs[basename])
if name in kwargs:
- setpar(par, kwargs[basename])
+ ... |
lmfit__lmfit-py-961 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/model.py:CompositeModel.__init__",
"lmfit/model.py:ModelResult.fit"
],
"edited_modules": [
"lmfit/model.py:CompositeModel",
"lmfit/model.py:ModelResult"
]... | lmfit/lmfit-py | b72cfb28e7a9ea835dd287ceb7fda9d549fd924f | ModelResult.fit() does not use provided params
#### First Time Issue Code
Yes, I read the instructions and I am sure this is a GitHub Issue.
#### Description
When using ModelResult.fit() the provided params are not being used as the initial values.
In the below example, result_leastsq.params shows that result_bru... | diff --git a/lmfit/model.py b/lmfit/model.py
index c19bcef1..34a78c78 100644
--- a/lmfit/model.py
+++ b/lmfit/model.py
@@ -1255,10 +1255,14 @@ class CompositeModel(Model):
if 'nan_policy' not in kws:
kws['nan_policy'] = self.left.nan_policy
+ # CompositeModel cannot have a prefix.
+ ... |
lmfit__lmfit-py-989 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lmfit/models.py:SplineModel.__init__"
],
"edited_modules": [
"lmfit/models.py:SplineModel"
]
},
"file": "lmfit/models.py"
}
] | lmfit/lmfit-py | 8cece2f3f68e1c96f86649b4af2f26cda9e849a8 | Loading a saved SplineModel fit result using `load_modelresult` does not work for more than 6 knots
lmfit 1.3.2
scipy 1.12.0
numpy 1.26.4
asteval 1.0.5
Windows 10
Python 3.10.4
Code run in a jupyter notebook using DataSpell
I would like to save the results of a fit using `SplineModel` for later use. I used the functio... | diff --git a/doc/whatsnew.rst b/doc/whatsnew.rst
index 87e5a5b3..6f500512 100644
--- a/doc/whatsnew.rst
+++ b/doc/whatsnew.rst
@@ -11,6 +11,15 @@ significant to the use and behavior of the library. This is not meant
to be a comprehensive list of changes. For such a complete record,
consult the `lmfit GitHub repositor... |
lmmentel__mendeleev-112 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mendeleev/electronegativity.py:mulliken"
],
"edited_modules": [
"mendeleev/electronegativity.py:mulliken"
]
},
"file": "mendeleev/electronegativity.py"
},
{
"ch... | lmmentel/mendeleev | de12240ee378231a552dc96d75d8195395f8b8fc | boiling and melting points in the elements table?
## Describe the bug
The documentation about the bulk data shows boiling and melting points in the elements table, but I do not have them when I access it as described in the examples in the documentation.
## To Reproduce
Steps to reproduce the behavior:
exactly as... | diff --git a/mendeleev/electronegativity.py b/mendeleev/electronegativity.py
index 4fdcb53..62d47cc 100644
--- a/mendeleev/electronegativity.py
+++ b/mendeleev/electronegativity.py
@@ -3,7 +3,7 @@ Electronegativity scale formulas.
"""
import math
-from typing import List
+from typing import List, Union
import nu... |
lmmentel__mendeleev-116 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mendeleev/electronegativity.py:mulliken"
],
"edited_modules": [
"mendeleev/electronegativity.py:mulliken"
]
},
"file": "mendeleev/electronegativity.py"
},
{
"ch... | lmmentel/mendeleev | 9e9a594e9097ed4fe377f28c77c718d0fb61a3b8 | Calculation of Mulliken Electronegativity
Hi!
I realized that during Mulliken electronegativity calculations, electron affinity is not taken into account. When I checked the source code, I think this is related to last if condition. Can you please check if there is an issue, or do I miss something?
mendeleev versio... | diff --git a/mendeleev/electronegativity.py b/mendeleev/electronegativity.py
index 4fdcb53..62d47cc 100644
--- a/mendeleev/electronegativity.py
+++ b/mendeleev/electronegativity.py
@@ -3,7 +3,7 @@ Electronegativity scale formulas.
"""
import math
-from typing import List
+from typing import List, Union
import nu... |
lmmentel__mendeleev-233 | [
{
"changes": {
"added_entities": [
"mendeleev/electronegativity.py:interpolate_property"
],
"added_modules": [
"mendeleev/electronegativity.py:interpolate_property"
],
"edited_entities": null,
"edited_modules": null
},
"file": "mendeleev/electronegativ... | lmmentel/mendeleev | a19f676ebc7346343301df6fd7d0ab7f0eb74d99 | [MNT] Move `fetch_attrs_for_group` and `estimate_from_group` from `models.py` to `electronegativity.py`
**Is your feature request related to a problem? Please describe.**
**Describe the solution you'd like**
The two functions are only needed for calculating Sanderson's electronegativity and should live in the electro... | diff --git a/mendeleev/electronegativity.py b/mendeleev/electronegativity.py
index 514aac5..608a4a6 100644
--- a/mendeleev/electronegativity.py
+++ b/mendeleev/electronegativity.py
@@ -43,6 +43,38 @@ def n_effective(n: int, source: str = "slater") -> Union[float, None]:
)
+def interpolate_property(
+ x:... |
locustio__locust-1088 | [
{
"changes": {
"added_entities": [
"locust/stats.py:RequestStats.num_none_requests"
],
"added_modules": null,
"edited_entities": [
"locust/stats.py:calculate_response_time_percentile",
"locust/stats.py:StatsEntry.reset",
"locust/stats.py:StatsEntry._log_re... | locustio/locust | 24e0a8e797af2ef182c1cdbe65338f15543b3602 | Samples with response_time None crashes stats.py
Certain async protocols/clients (like websockets, MQ etc) dont really have a response time. They should be able to report a None response time. Using zero is not good enough, because a test may contain a mix of synchronous requests (like HTTP) and async, and we dont want... | diff --git a/locust/stats.py b/locust/stats.py
index b49beaf3..e27076c3 100644
--- a/locust/stats.py
+++ b/locust/stats.py
@@ -52,6 +52,8 @@ def calculate_response_time_percentile(response_times, num_requests, percent):
processed_count += response_times[response_time]
if(num_requests - processed_count... |
locustio__locust-1113 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/runners.py:LocustRunner.weight_locusts"
],
"edited_modules": [
"locust/runners.py:LocustRunner"
]
},
"file": "locust/runners.py"
}
] | locustio/locust | 40f64e0594d04b883bd68fefa294a4f849d6879c | Tests fail to run when providing a small number of clients
Hello,
My current setup in locustfile.py currently looks something like this:
```python
class VolumeTests(object):
host = 'http://example.com'
min_wait = 5000
max_wait = 15000
class ExampleTest(VolumeTests, HttpLocust):
task_... | diff --git a/locust/runners.py b/locust/runners.py
index 268f7033..97df507f 100644
--- a/locust/runners.py
+++ b/locust/runners.py
@@ -68,6 +68,7 @@ class LocustRunner(object):
"""
bucket = []
weight_sum = sum((locust.weight for locust in self.locust_classes if locust.task_set))
+ resi... |
locustio__locust-1359 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/argument_parser.py:get_empty_argument_parser"
],
"edited_modules": [
"locust/argument_parser.py:get_empty_argument_parser"
]
},
"file": "locust/argument_parser.p... | locustio/locust | 5cad1cb5921ff84298d357e0a5ba42bdc0390acc | Add --config parameter
<!--
If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust".
-->
### Is your... | diff --git a/docs/configuration.rst b/docs/configuration.rst
index a876e34a..a7f95a6c 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -27,3 +27,33 @@ Most of the configuration that can be set through command line arguments can als
environment variables. Here's a table of all the available environme... |
locustio__locust-1380 | [
{
"changes": {
"added_entities": [
"locust/user/task.py:TaskSet.user",
"locust/user/task.py:TaskSet.parent"
],
"added_modules": null,
"edited_entities": [
"locust/user/task.py:TaskSet.__init__"
],
"edited_modules": [
"locust/user/task.py:TaskSe... | locustio/locust | 06266b265c295d01231a756bb16a0baebc86392c | SequentialTaskSet is broken when using local class members (headless mode)
<!--
If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to ... | diff --git a/README.md b/README.md
index fa986ca2..258aa179 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
[](https://travis-ci.com/locustio/locust)
[](https:/... |
locustio__locust-1395 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/util/deprecation.py:MetaClass.__new__"
],
"edited_modules": [
"locust/util/deprecation.py:MetaClass"
]
},
"file": "locust/util/deprecation.py"
},
{
"chan... | locustio/locust | c4bdbd30a52273498a400c19c2ef3672f9fd46ed | Update flask version
Our minimum required flask version is too old (saw at least one person having an issue https://stackoverflow.com/questions/61969924/typeerror-when-i-run-a-locustfile-py)
https://flask.palletsprojects.com/en/1.1.x/changelog/#version-0-12-5 is a minimum, but we should probably go to 1.x right away... | diff --git a/locust/util/deprecation.py b/locust/util/deprecation.py
index cd974678..95a8e312 100644
--- a/locust/util/deprecation.py
+++ b/locust/util/deprecation.py
@@ -20,7 +20,7 @@ def deprecated_locust_meta_class(deprecation_message):
if classname in ["DeprecatedLocustClass", "DeprecatedHttpLocustClas... |
locustio__locust-1525 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/stats.py:StatsEntry.to_string",
"locust/stats.py:StatsEntry.percentile",
"locust/stats.py:print_stats",
"locust/stats.py:print_percentile_stats"
],
"edited_mod... | locustio/locust | 12bfb268e68cb268830d78034f5fc0c43e4c2fee | Change the position of dividers in command line report
Currently it looks like this:
```
Name # reqs # fails Avg Min Max | Median req/s failures/s
-----------------------------------------------------------------------------------------... | diff --git a/locust/stats.py b/locust/stats.py
index adf5ce2d..80c1ae3a 100644
--- a/locust/stats.py
+++ b/locust/stats.py
@@ -13,7 +13,7 @@ import logging
console_logger = logging.getLogger("locust.stats_logger")
STATS_NAME_WIDTH = 60
-STATS_TYPE_WIDTH = 20
+STATS_TYPE_WIDTH = 8
"""Default interval for how freq... |
locustio__locust-1560 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/runners.py:Runner.stop_users"
],
"edited_modules": [
"locust/runners.py:Runner"
]
},
"file": "locust/runners.py"
},
{
"changes": {
"added_entities"... | locustio/locust | 532f33aa9368713259f1483229c0e8568f0fede5 | On Stop causes the task to continue
### Describe the bug
If I add a new table concurrently, I click Stop, and then my on_stop method will be executed. On_stop is deleting the table. At this moment, one user will start executing on_stop and the other user will continue to execute task
### Expected behavior
Task... | diff --git a/locust/runners.py b/locust/runners.py
index c4ab2f87..a2980408 100644
--- a/locust/runners.py
+++ b/locust/runners.py
@@ -9,14 +9,18 @@ from uuid import uuid4
from time import time
import gevent
+import greenlet
import psutil
from gevent.pool import Group
+from . import User
from .log import green... |
locustio__locust-1626 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"examples/add_command_line_argument.py:WebsiteUser"
]
},
"file": "examples/add_command_line_argument.py"
},
{
"changes": {
"added_entities": null... | locustio/locust | 1ce7e9f349d2675a3ca1d82cffff5cfa226b8208 | Make wait_time default to zero (vote up/down for this ticket please :)
Today all Locust classes need to have a wait_time specified. I suggest we change that to make no wait time the default. I think having no wait time is what a reasonable user would expect, and it significantly lowers the bar for new locust users.
... | diff --git a/README.md b/README.md
index 9216eedc..0ed1ae7d 100644
--- a/README.md
+++ b/README.md
@@ -16,11 +16,9 @@ Locust is an easy to use, scriptable and scalable performance testing tool. You
If you want your users to loop, perform some conditional behaviour or do some calculations, you just use the regular prog... |
locustio__locust-1864 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/argument_parser.py:setup_parser_arguments"
],
"edited_modules": [
"locust/argument_parser.py:setup_parser_arguments"
]
},
"file": "locust/argument_parser.py"
}... | locustio/locust | 603dc310667010452bc0ece822f231cf64f8ac5e | Starting load test from the cli but monitoring from the web UI
I think this is a feature request. I'm expecting that I can use locust CLI to start the load test, but monitor the results from the web UI.
### Description of issue / feature request
When I run `locust --host=... -c 10 -r 5` it doesn't start anything... | diff --git a/locust/argument_parser.py b/locust/argument_parser.py
index 4c65c41b..c4887908 100644
--- a/locust/argument_parser.py
+++ b/locust/argument_parser.py
@@ -141,14 +141,14 @@ def setup_parser_arguments(parser):
"--users",
type=int,
dest="num_users",
- help="Number of concurre... |
locustio__locust-2059 | [
{
"changes": {
"added_entities": [
"locust/clients.py:LocustHttpAdapter.__init__",
"locust/clients.py:LocustHttpAdapter.init_poolmanager"
],
"added_modules": [
"locust/clients.py:LocustHttpAdapter"
],
"edited_entities": [
"locust/clients.py:HttpSessi... | locustio/locust | 94422654a469291c99874f11b1b8f0912e6b28d8 | Make each virtual user to share same connections
<!--
If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "lo... | diff --git a/docs/increase-performance.rst b/docs/increase-performance.rst
index b201e41a..e20c51c9 100644
--- a/docs/increase-performance.rst
+++ b/docs/increase-performance.rst
@@ -42,7 +42,7 @@ FastHttpUser class
--------------------
.. autoclass:: locust.contrib.fasthttp.FastHttpUser
- :members: network_time... |
locustio__locust-2155 | [
{
"changes": {
"added_entities": [
"locust/runners.py:MasterRunner.get_worker_index"
],
"added_modules": null,
"edited_entities": [
"locust/runners.py:MasterRunner.__init__",
"locust/runners.py:MasterRunner.client_listener",
"locust/runners.py:WorkerRunner... | locustio/locust | e6d978ac2563f3ac863c396f4585d861134fd288 | Worker processes should have an id number
Often you will want different workers performing using different data, doing things in different ways etc.
Right now that is kind of hard to implement (the best workaround I'm aware of involves passing different env vars to different worker processes)
But we could build t... | diff --git a/docs/api.rst b/docs/api.rst
index 423b1e88..f4044dbc 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -133,7 +133,7 @@ Runner classes
:members: register_message, send_message
.. autoclass:: locust.runners.WorkerRunner
- :members: register_message, send_message
+ :members: register_message, sen... |
locustio__locust-2375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/main.py:main"
],
"edited_modules": [
"locust/main.py:main"
]
},
"file": "locust/main.py"
}
] | locustio/locust | 4fa026977b930bd27b1c4451b7a8f658c191222d | KeyboardInterrupt does not gracefully exit custom load shape
### Describe the bug
KeyboardInterrupt does not gracefully exit custom load shape.
### Expected behavior
A report should be generated after Ctrl-C, like with a normal test case.
### Actual behavior
The program crashes:
```
[2021-10-21 10:07:23,... | diff --git a/locust/main.py b/locust/main.py
index df6caa3b..cab7824e 100644
--- a/locust/main.py
+++ b/locust/main.py
@@ -378,9 +378,13 @@ See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-numb
if options.run_time:
sys.stderr.write("It makes no sense to c... |
locustio__locust-2663 | [
{
"changes": {
"added_entities": [
"locust/dispatch.py:compatible_math_gcd"
],
"added_modules": [
"locust/dispatch.py:compatible_math_gcd"
],
"edited_entities": [
"locust/dispatch.py:UsersDispatcher._user_gen"
],
"edited_modules": [
"locu... | locustio/locust | a214363ab5becd2860d95b622cb467a7309ca049 | Wrong distribution of virtual users by user classes
### Prerequisites
- [X] I am using [the latest version of Locust](https://github.com/locustio/locust/releases/)
- [X] I am reporting a bug, not asking a question
### Description
Hi, thanks for the awesome project. I came across the behavior of locust that is... | diff --git a/locust/dispatch.py b/locust/dispatch.py
index 5569f296..d8c676a9 100644
--- a/locust/dispatch.py
+++ b/locust/dispatch.py
@@ -1,8 +1,10 @@
from __future__ import annotations
import contextlib
+import functools
import itertools
import math
+import sys
import time
from collections import defaultdict
... |
locustio__locust-992 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/main.py:parse_options",
"locust/main.py:main"
],
"edited_modules": [
"locust/main.py:parse_options",
"locust/main.py:main"
]
},
"file": "locust/m... | locustio/locust | 8b17c286034178ba31c6d48b93f29202514f5659 | Locust exits with 1 on timeouts / errors
Depending on how others are deploying this tool from the command line it may be a non-issue, but it's causing problems for us. Returning non-zero with the same code that we use when there are misconfigurations for, say, one 500 response code out of thousands is not subtle enough... | diff --git a/locust/main.py b/locust/main.py
index fe3186d8..a42308b4 100644
--- a/locust/main.py
+++ b/locust/main.py
@@ -282,6 +282,16 @@ def parse_options():
help="show program's version number and exit"
)
+ # set the exit code to post on errors
+ parser.add_option(
+ '--exit-code-on-err... |
locustio__locust-994 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"locust/stats.py:StatsEntry.fail_ratio"
],
"edited_modules": [
"locust/stats.py:StatsEntry"
]
},
"file": "locust/stats.py"
}
] | locustio/locust | 8b17c286034178ba31c6d48b93f29202514f5659 | Fail ratio calculation for individual requests is incorrect
### Description of issue
The fail ratio for each individual request is incorrect, and doesn't match the total fail ratio.
### Expected behavior
The fail ratio is correct.
### Actual behavior
The fail ratio is incorrect. For example, if 10 out of... | diff --git a/locust/stats.py b/locust/stats.py
index 4ba20644..3feacc05 100644
--- a/locust/stats.py
+++ b/locust/stats.py
@@ -276,7 +276,7 @@ class StatsEntry(object):
@property
def fail_ratio(self):
try:
- return float(self.num_failures) / (self.num_requests + self.num_failures)
+ ... |
log2timeline__dftimewolf-280 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dftimewolf/lib/collectors/filesystem.py:FilesystemCollector.Process"
],
"edited_modules": [
"dftimewolf/lib/collectors/filesystem.py:FilesystemCollector"
]
},
"file": "... | log2timeline/dftimewolf | 7820fc4947cc717be41e984d83291ffdf173d6d5 | Get rid of input / output semantics
They are brittle, and given that we switched to a non-linear execution model, these don't make much sense anymore.
Let's model data exchange between modules using AttributeContainers | diff --git a/dftimewolf/lib/collectors/filesystem.py b/dftimewolf/lib/collectors/filesystem.py
index f0ce2a1..c461f31 100644
--- a/dftimewolf/lib/collectors/filesystem.py
+++ b/dftimewolf/lib/collectors/filesystem.py
@@ -5,7 +5,7 @@ import os
from dftimewolf.lib import module
from dftimewolf.lib.modules import mana... |
log2timeline__dftimewolf-331 | [
{
"changes": {
"added_entities": [
"dftimewolf/lib/processors/localplaso.py:LocalPlasoProcessor._DeterminePlasoPath"
],
"added_modules": null,
"edited_entities": [
"dftimewolf/lib/processors/localplaso.py:LocalPlasoProcessor.__init__",
"dftimewolf/lib/processors/l... | log2timeline/dftimewolf | 550898e52be4c67ce27ba604843b2c5513a59bf1 | Check that log2timeline.py executable is present on system
No check is currently done. | diff --git a/dftimewolf/lib/processors/localplaso.py b/dftimewolf/lib/processors/localplaso.py
index 61c3072..0e36dae 100644
--- a/dftimewolf/lib/processors/localplaso.py
+++ b/dftimewolf/lib/processors/localplaso.py
@@ -21,6 +21,16 @@ class LocalPlasoProcessor(module.BaseModule):
super(LocalPlasoProcessor, self).... |
log2timeline__dftimewolf-535 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dftimewolf/lib/processors/turbinia_artifact.py:TurbiniaArtifactProcessor.SetUp"
],
"edited_modules": [
"dftimewolf/lib/processors/turbinia_artifact.py:TurbiniaArtifactProcessor"
... | log2timeline/dftimewolf | 62bca933d223e6187936a376a292c06729dd5328 | Add support for Turbinia recipes
Add support for specifying turbinia recipe names.
The user should be able to pass a new cli parameter (e.g. --turbinia_recipe) from any dfTimewolf recipe that utilizes Turbinia.
This will enable use of new Trubiania triage recipes. | diff --git a/data/recipes/aws_turbinia_ts.json b/data/recipes/aws_turbinia_ts.json
index 8ea4134..c6f8248 100644
--- a/data/recipes/aws_turbinia_ts.json
+++ b/data/recipes/aws_turbinia_ts.json
@@ -66,8 +66,8 @@
"turbinia_config_file": null,
"disk_names": null,
"project": "@gcp_project",
+ ... |
log2timeline__dftimewolf-603 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dftimewolf/lib/collectors/grr_hosts.py:GRRFileCollector.PreProcess"
],
"edited_modules": [
"dftimewolf/lib/collectors/grr_hosts.py:GRRFileCollector"
]
},
"file": "dftim... | log2timeline/dftimewolf | ecc49241e63527c3b4d9d1551528c46831c5f246 | FR - configure GRRFileFinder flows and hunts via state containers.
Currently, the GRRFileFinder flow and hunt modules accept file paths via a recipe argument.
It would be useful if the file paths for these modules are also configurable via FSPath containers. This would enable the GRRFileFinder modules to be used ... | diff --git a/dftimewolf/lib/collectors/grr_hosts.py b/dftimewolf/lib/collectors/grr_hosts.py
index 58cf867..93a56d6 100644
--- a/dftimewolf/lib/collectors/grr_hosts.py
+++ b/dftimewolf/lib/collectors/grr_hosts.py
@@ -322,7 +322,7 @@ class GRRFlow(GRRBaseModule, module.ThreadAwareModule):
flow_id (str): GRR ident... |
log2timeline__dftimewolf-612 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dftimewolf/lib/containers/containers.py:Report.__init__"
],
"edited_modules": [
"dftimewolf/lib/containers/containers.py:Report"
]
},
"file": "dftimewolf/lib/containers... | log2timeline/dftimewolf | cf2702bd45d991ea1c3a34ce928ad762af964868 | Change AttributeContainer "attributes" to a Dict and rename
The container base class `dftimewolf.lib.containers.interface.AttributeContainer` has a generic `attributes` attribute for subclasses to use as "A list of generic attributes that can be used for passing metadata between collection/processing module and output ... | diff --git a/dftimewolf/lib/containers/containers.py b/dftimewolf/lib/containers/containers.py
index ef0557f..555e18f 100644
--- a/dftimewolf/lib/containers/containers.py
+++ b/dftimewolf/lib/containers/containers.py
@@ -68,7 +68,7 @@ class Report(interface.AttributeContainer):
module_name: str,
text: str... |
logzio__logzio-python-handler-36 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"logzio/handler.py:LogzioHandler.__init__"
],
"edited_modules": [
"logzio/handler.py:LogzioHandler"
]
},
"file": "logzio/handler.py"
},
{
"changes": {
"add... | logzio/logzio-python-handler | 8380c4d3cfe290eea43b34157fce19376763b82c | Allow to disable logs to disk
Currently there is no way to override the `should_backup_to_disk` so that it doesn't log even if the sending failed. In our application this is problematic. | diff --git a/README.md b/README.md
index 9ecc9a3..58150b1 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,7 @@ format={"additional_field": "value"}
- Time to sleep between draining attempts (defaults to "3")
- Logz.io Listener address (defaults to "https://listener.logz.io:8071")
- Debug flag. Set to True, wi... |
lokal-profil__runeberg-21 | [
{
"changes": {
"added_entities": [
"runeberg/article.py:Article.text"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"runeberg/article.py:Article"
]
},
"file": "runeberg/article.py"
},
{
"changes": {
"added_entitie... | lokal-profil/runeberg | c69b097494be738662d192f88305fe8031e92206 | Add text prop to work and article
Add a `text` property (or similar) to the Work and Article classes which returns the ocred text of the included pages. Once found the text should be stored in e.g. `_text` for subsequent use.
For Article this should respect any `<chapter>`/`</chapter>` limits.
Rename page.ocr
If #18 i... | diff --git a/runeberg/article.py b/runeberg/article.py
index 671fa87..c444f84 100644
--- a/runeberg/article.py
+++ b/runeberg/article.py
@@ -16,6 +16,7 @@ advertisement might interrupt it.
Note that some entries in Articles.lst are only used as Table of Content
headers, as such they should not be treated as proper ar... |
lovasoa__marshmallow_dataclass-110 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:field_for_schema"
]
},
"file": "marshmallow_dataclass/__in... | lovasoa/marshmallow_dataclass | 7c20fb97b982cb96538c484bdfbd16ff47815476 | Literal field and tagged union
The following simple example, which uses a [`Literal`](https://www.python.org/dev/peps/pep-0586/), doesn't work (because `marshmallow-dataclass` doesn't seem to support `Literal`):
```python
from dataclasses import dataclass
from marshmallow_dataclass import class_schema
from typi... | diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
index 05f39b9..9f4b770 100644
--- a/marshmallow_dataclass/__init__.py
+++ b/marshmallow_dataclass/__init__.py
@@ -451,6 +451,17 @@ def field_for_schema(
metadata.setdefault("allow_none", True)
return marshmallow.fields.... |
lovasoa__marshmallow_dataclass-121 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:field_for_schema"
]
},
"file": "marshmallow_dataclass/__in... | lovasoa/marshmallow_dataclass | cd0d2cf8c0ad38509259abf3ac8fd5555301cec8 | Error serialisation of Optional field and default value set is not None
```python
from dataclasses import dataclass, field
from typing import List, Optional
import marshmallow_dataclass
import marshmallow.validate
@dataclass
class Building:
# field metadata is used to instantiate the marshmallow field
... | diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
index 6367163..7da3ac2 100644
--- a/marshmallow_dataclass/__init__.py
+++ b/marshmallow_dataclass/__init__.py
@@ -297,6 +297,19 @@ def class_schema(
Traceback (most recent call last):
...
marshmallow.exceptions.ValidationE... |
lovasoa__marshmallow_dataclass-150 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:field_for_schema"
]
},
"file": "marshmallow_dataclass/__in... | lovasoa/marshmallow_dataclass | f34066f9785c55e6a39451ae86cedeb59e51da30 | Final type
The following simple example, which uses the [`Final`](https://docs.python.org/3/library/typing.html#typing.Final) type hint, doesn't work (because `marshmallow-dataclass` doesn't seem to support `Final`):
```python
from dataclasses import dataclass
from marshmallow_dataclass import class_schema
from... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f47ee64..53fa59e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,7 @@
# marshmallow\_dataclass change log
+- Add support for the Final type. See [#150](https://github.com/lovasoa/marshmallow_dataclass/pull/150)
+
## v8.4.1
- Fix compatibility with older pyt... |
lovasoa__marshmallow_dataclass-257 | [
{
"changes": {
"added_entities": [
"marshmallow_dataclass/__init__.py:_field_for_annotated_type",
"marshmallow_dataclass/__init__.py:_field_for_union_type"
],
"added_modules": [
"marshmallow_dataclass/__init__.py:_field_for_annotated_type",
"marshmallow_dataclas... | lovasoa/marshmallow_dataclass | 5504913268a950ca41d13806f70e70eaa1af53e4 | Refactor 'NewType' as it no longer conforms to the typing spec
Python is updating the Typing spec which causes `Variable not allowed in type expression` for types created with marshmallow_dataclass's `NewType`
https://github.com/microsoft/pyright/issues/7268
The modern way is to use `typing.Annotated`. (Python ... | diff --git a/.gitignore b/.gitignore
index cbfc4da..02da417 100644
--- a/.gitignore
+++ b/.gitignore
@@ -95,6 +95,9 @@ venv.bak/
# Rope project settings
.ropeproject
+# VSCode project settings
+.vscode
+
# mkdocs documentation
/site
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0aa3b11..b... |
lovasoa__marshmallow_dataclass-53 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:add_schema",
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:add_schema",
... | lovasoa/marshmallow_dataclass | 2de0d398d63e2f783867bfded6a9276326effda1 | `base_schema` of nested dataclasses is ingored
The base_schema of the nested field is ignored.
## Example:
```py
from marshmallow import Schema, post_dump
from marshmallow_dataclass import dataclass
class DoubleSchema(Schema):
@post_dump
def double(self, data, **kwargs):
return dict(double... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 982f4eb..ffe5fdc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# marshmallow_dataclass change log
+## v7.1.1
+ - Fix behavior when `base_schema` is passed to a nested dataclass/schema
+ ([#52](https://github.com/lovasoa/marshmallow_dataclass/issues/52)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.