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 |
|---|---|---|---|---|---|
mapbox__mapbox-sdk-py-128 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/encoding.py:encode_polyline"
],
"edited_modules": [
"mapbox/encoding.py:encode_polyline"
]
},
"file": "mapbox/encoding.py"
}
] | mapbox/mapbox-sdk-py | 2c11fdee6eee83ea82398cc0756ac7f35aada801 | Encoded polylines in wrong coordinate order
Currently, we take the geojson point array and encode the point directly in [lon, lat] order. Polylines should be [lat, lon]. | diff --git a/docs/surface.md b/docs/surface.md
index 8fcbb77..c6e9676 100644
--- a/docs/surface.md
+++ b/docs/surface.md
@@ -86,7 +86,7 @@ contours).
... polyline=True, zoom=12, interpolate=False)
>>> points = response.geojson()
>>> [f['properties']['ele'] for f in points['features']]
-[None, None, None]
+[2190, ... |
mapbox__mapbox-sdk-py-150 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/services/base.py:Service.__init__"
],
"edited_modules": [
"mapbox/services/base.py:Service"
]
},
"file": "mapbox/services/base.py"
},
{
"changes": {
... | mapbox/mapbox-sdk-py | 1481f35d31bf102a2affe97073694ae16e0c40a8 | Configurable baseuri
Currently, the endpoint for all services is hardcoded for each service as `baseuri`
```
mapbox/services/datasets.py: baseuri = 'https://api.mapbox.com/datasets/v1'
mapbox/services/directions.py: baseuri = 'https://api.mapbox.com/v4/directions'
mapbox/services/distance.py: baseuri = '... | diff --git a/CHANGES b/CHANGES
index 3fcb802..d7154d0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,9 @@
-Next
-----
+0.11.0 (Soon)
+-------------
- Require boto3>=1.4 to get `upload_fileobj()`.
- Add a callback function for AWS SDK uploads to `uploads.stage()` (#147).
+- Allow configuration of API host using MAPBOX_... |
mapbox__mapbox-sdk-py-191 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"mapbox/errors.py:MapboxDeprecationWarning"
],
"edited_entities": null,
"edited_modules": null
},
"file": "mapbox/errors.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null... | mapbox/mapbox-sdk-py | ac54c0dd453c61020f1f42eafdc3af34a7664718 | Retina with Static Api?
Hello, it seems I can't choose the retina format for my static generated maps.
If I look in the code:
` if auto:
pth = '/{mapid}/geojson({overlay})/auto/{width}x{height}.{fmt}'`
But if I look at the global documentation, the url scheme is `{width}x{height}@2x.{fmt}`
So the is not t... | diff --git a/mapbox/errors.py b/mapbox/errors.py
index 005796a..95d982f 100644
--- a/mapbox/errors.py
+++ b/mapbox/errors.py
@@ -46,14 +46,22 @@ class InvalidParameterError(ValidationError):
class InvalidFileError(ValidationError):
pass
+
class InvalidResourceTypeError(ValidationError):
pass
-
+
+... |
mapbox__mapbox-sdk-py-192 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/services/geocoding.py:Geocoder.forward",
"mapbox/services/geocoding.py:Geocoder.place_types"
],
"edited_modules": [
"mapbox/services/geocoding.py:Geocoder"
]
... | mapbox/mapbox-sdk-py | ac54c0dd453c61020f1f42eafdc3af34a7664718 | Isn't `forward()` supporting the language query?
In `https://github.com/mapbox/mapbox-sdk-py/blob/master/mapbox/services/geocoding.py` ' s current definition, language queries - according to `https://www.mapbox.com/api-documentation/?language=Python#geocoding` are not supported. Am I right, or did I something wrong? | diff --git a/README.rst b/README.rst
index fd8f00c..d5e4771 100644
--- a/README.rst
+++ b/README.rst
@@ -15,6 +15,11 @@ The Mapbox Python SDK is a low-level client API, not a Resource API such as the
Services
========
+- **Analytics** `examples <./docs/analytics.md>`__, `website <https://www.mapbox.com/api-document... |
mapbox__mapbox-sdk-py-193 | [
{
"changes": {
"added_entities": [
"mapbox/services/uploads.py:Uploader._validate_tileset"
],
"added_modules": null,
"edited_entities": [
"mapbox/services/uploads.py:Uploader.create",
"mapbox/services/uploads.py:Uploader.upload"
],
"edited_modules": [
... | mapbox/mapbox-sdk-py | d503098e549834471e0857adf5163085af6b4355 | Raise exception for too-long tileset names
Uploads API limits tileset names to 64 characters. Let's raise an exception before making an API call that will fail.
cc: @geografa | diff --git a/mapbox/services/uploads.py b/mapbox/services/uploads.py
index b085cd5..86d49d4 100644
--- a/mapbox/services/uploads.py
+++ b/mapbox/services/uploads.py
@@ -2,6 +2,7 @@ from boto3.session import Session as boto3_session
from uritemplate import URITemplate
from mapbox.errors import InvalidFileError
+from... |
mapbox__mapbox-sdk-py-203 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/encoding.py:encode_waypoints"
],
"edited_modules": [
"mapbox/encoding.py:encode_waypoints"
]
},
"file": "mapbox/encoding.py"
},
{
"changes": {
"add... | mapbox/mapbox-sdk-py | e95e63b401eca29004aeea72f7a99592ea591215 | Directions API update
@perrygeo let's coordinate a new release to go along with the next Directions API update.
| diff --git a/CHANGES b/CHANGES
index 2770b78..d7b48d9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Changes
+=======
+
+Next
+----
+- Added support for Directions v5.
+
0.15.1 (2018-01-16)
-------------------
- Restore the valid_profiles attribute needed by the Mapbox CLI's distance
diff --git a/docs/geocodin... |
mapbox__mapbox-sdk-py-208 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/services/analytics.py:Analytics.baseuri"
],
"edited_modules": [
"mapbox/services/analytics.py:Analytics"
]
},
"file": "mapbox/services/analytics.py"
},
{
... | mapbox/mapbox-sdk-py | 2a5971f9b4f90ae23bb52ff5f273ce7061b23461 | Add api_name and api_version Service class attributes
These can be used in constructing the the base URI and in debugging. | diff --git a/.travis.yml b/.travis.yml
index b8e7592..ff98592 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ python:
- '3.4'
- '3.5'
- '3.6'
- - pypy
+ - pypy-5.3.1
cache:
directories:
- $HOME/.pip-cache/
diff --git a/CHANGES b/CHANGES
index ee8f2dd..9a18eff 100644
--- a/CHANGES
+++ b/CH... |
mapbox__mapbox-sdk-py-21 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "mapbox/compat.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/scripts/cli.... | mapbox/mapbox-sdk-py | 7859e5abc3ad69a001a24bb9ae66dcdd38da064c | Move --access-token option from command to group
New commands won't have to implement the option if it's on the group.
This means `mbx --access-token MY_TOKEN geocode` instead of `mbx geocode --access-token MY_TOKEN`.
Support for the token environment variable will be unchanged. | diff --git a/mapbox/compat.py b/mapbox/compat.py
index baf551f..a46774e 100644
--- a/mapbox/compat.py
+++ b/mapbox/compat.py
@@ -4,7 +4,4 @@ import itertools
import sys
-if sys.version_info < (3,):
- map = itertools.imap
-else:
- map = map
+map = itertools.imap if sys.version_info < (3,) else map
diff --git ... |
mapbox__mapbox-sdk-py-217 | [
{
"changes": {
"added_entities": [
"mapbox/services/distance.py:Distance.__init__"
],
"added_modules": null,
"edited_entities": [
"mapbox/services/distance.py:Distance.baseuri",
"mapbox/services/distance.py:Distance._validate_profile",
"mapbox/services/dis... | mapbox/mapbox-sdk-py | 9593552604be25b1f4db96804ffadc729995f1a7 | Deprecate distance module
As of version 0.15, users should get their travel times from the Matrix API, not from the Distance API. We'll mark the methods of the distance module deprecated and call those of the matrix module instead of hitting the Distance API endpoint. | diff --git a/README.rst b/README.rst
index fc69108..635c48b 100644
--- a/README.rst
+++ b/README.rst
@@ -26,11 +26,7 @@ Services
- GeoJSON & Polyline formatting
- Instructions as text or HTML
-- **Distance V1** `examples <./docs/distance.md#distance>`__, `website <https://www.mapbox.com/api-documentation/?langu... |
mapbox__mapbox-sdk-py-218 | [
{
"changes": {
"added_entities": [
"mapbox/services/uploads.py:Uploader._resolve_username"
],
"added_modules": null,
"edited_entities": [
"mapbox/services/uploads.py:Uploader.create",
"mapbox/services/uploads.py:Uploader.list",
"mapbox/services/uploads.py:... | mapbox/mapbox-sdk-py | d29f0c4bf475f3a126b61e89bcd1336fec5a7675 | Uploads API parameters should be username, not account
For consistency with the HTTP api documentation. I'd like to keep the `account` kwarg as a deprecated alias until 1.0. | diff --git a/CHANGES b/CHANGES
index fe6cdbb..571cacb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,12 @@
- Add support for sequences of geometries and coordinate pairs to read_points
(#212).
+Deprecations:
+
+- 'account' keyword argument of `Uploader` class's `list()`, `delete()`,
+ and `status()` methods will ... |
mapbox__mapbox-sdk-py-26 | [
{
"changes": {
"added_entities": [
"mapbox/__init__.py:Geocoder._validate_place_types",
"mapbox/__init__.py:Geocoder.place_types"
],
"added_modules": [
"mapbox/__init__.py:InvalidPlaceTypeError"
],
"edited_entities": [
"mapbox/__init__.py:Service.get... | mapbox/mapbox-sdk-py | f56c2ffa9477819ce29fb42e87534244f14e43fe | Add proximity feature to forward geocoding
https://www.mapbox.com/developers/api/geocoding/#proximity | diff --git a/mapbox/__init__.py b/mapbox/__init__.py
index c1889b3..362ae7c 100644
--- a/mapbox/__init__.py
+++ b/mapbox/__init__.py
@@ -9,11 +9,18 @@ from uritemplate import URITemplate
__version__ = "0.1.0"
+class InvalidPlaceTypeError(KeyError):
+ pass
+
+
class Service:
"""Base service class"""
... |
mapbox__mapbox-sdk-py-261 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "mapbox/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/services/t... | mapbox/mapbox-sdk-py | 15989e7c61d23ba16745a2394a87d46b6f7675de | Tilequery coordinate encoding is wrong
Version 0.17.0 puts `-105.0%2C40.0` in the request URL, but the Tilequery API requires `-105.0,40.0`. | diff --git a/CHANGES b/CHANGES
index 6133da9..537d555 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,13 @@
Changes
=======
+0.17.1 (2018-09-26)
+-------------------
+
+Bug fixes:
+
+- Fix for the encoding of Tilequery coordinates (#259).
+
0.17.0 (TBD)
------------
diff --git a/mapbox/__init__.py b/mapbox/__init... |
mapbox__mapbox-sdk-py-85 | [
{
"changes": {
"added_entities": [
"mapbox/services/base.py:Service.username"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"mapbox/services/base.py:Service"
]
},
"file": "mapbox/services/base.py"
},
{
"changes": {
... | mapbox/mapbox-sdk-py | 06728ffc30fba83003e9c76645ecec3eec1c63de | Get user from token
As in https://github.com/mapbox/mapbox-sdk-js/blob/master/lib/get_user.js. This allows us to eliminate a duplicate parameter when creating dataset and upload service instances. | diff --git a/mapbox/services/base.py b/mapbox/services/base.py
index 4a25402..efd0eeb 100644
--- a/mapbox/services/base.py
+++ b/mapbox/services/base.py
@@ -1,6 +1,8 @@
"""Base Service class"""
import os
+import base64
+import json
import requests
@@ -27,6 +29,20 @@ class Service:
"""A product token f... |
mapillary__mapillary_tools-497 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "mapillary_tools/constants.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapilla... | mapillary/mapillary_tools | 92624ccb416e9649bb93d6be04c8b3be03a44525 | tools 0.8.0 upload images over and over again
### Basic information
* Release version: `0.8.0`
* System: `Linux`
* Capture Device: `Action Camera`
It seems that with 0.8.0 the tools don't know which pictures have already been uploaded, and starts all over again. I uploaded 2597 pictures yesterday, and I was as... | diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 1e05323..0d903f9 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -31,6 +31,13 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyth... |
mapping-commons__sssom-py-341 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sssom/parsers.py:_get_mdict_ms_and_bad_attrs"
],
"edited_modules": [
"sssom/parsers.py:_get_mdict_ms_and_bad_attrs"
]
},
"file": "sssom/parsers.py"
},
{
"change... | mapping-commons/sssom-py | c490d6740dab1f6c9213984bfae98d7306238c0f | SSSOM code broken
It's really frustrating to rely on this package. Sometimes it just breaks and then my builds that are relying on it don't work. This makes me want to make my own SSSOM package, which I won't have time to maintain either, but at least I will be able to know how it works...
Can someone help figure ou... | diff --git a/setup.cfg b/setup.cfg
index 595b94a..f61ded4 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -49,6 +49,7 @@ keywords =
[options]
install_requires =
+ sqlalchemy<2.0.0
pyparsing
bioregistry
click
diff --git a/sssom/io.py b/sssom/io.py
index 69bf759..b47cd2a 100644
--- a/sssom/io.py
+++ b/sss... |
mapping-commons__sssom-py-394 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/sssom/constants.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/sssom/con... | mapping-commons/sssom-py | dc13f361a25fb99cad8fcaff3774da6c00aeed9a | Fix all the other `^` dependencies to '>='.
Why not fix all the other `^` dependencies to '>='. As a core library that
is reused in multiple other projects, sssom-py simply has to be less
opinionated about versions.
Do we even need scipy as a core dependency?
I think I am responsible for introduc... | diff --git a/Makefile b/Makefile
index c07d292..933a415 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ schema/cliquesummary.py: schema/cliquesummary.yaml
gen-py-classes $< > $@
schema/%.schema.json: .FORCE
wget $(SSSOM_JSON_SCHEMA) -O $@
-schema/sssom.external.context.jsonld:
+src/sssom/sssom.external.cont... |
mapping-commons__sssom-py-440 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/sssom/__init__.py"
},
{
"changes": {
"added_entities": [
"src/sssom/util.py:MappingSetDataFrame.from_mappings",
"src/sssom/u... | mapping-commons/sssom-py | 678ad516d01821b0e6cd6fd8f8000980e07e5e45 | What to do when I have a list of `Mapping` objects?
I can't find anywhere in sssom-py a utility function that will take a list of `Mapping` objects and turn them into either a MSDF, MappingSet, or MappingSetDoc.
OAK implemented its own janky solution for this, but we should provide something first-party
https://g... | diff --git a/src/sssom/__init__.py b/src/sssom/__init__.py
index 7cab420..80b1c1a 100644
--- a/src/sssom/__init__.py
+++ b/src/sssom/__init__.py
@@ -9,6 +9,7 @@ except importlib_metadata.PackageNotFoundError:
from sssom_schema import Mapping, MappingSet, slots # noqa:401
+from sssom.sssom_document import MappingS... |
marcaurele__gce-ipx800-11 | [
{
"changes": {
"added_entities": [
"ipx800/ipx800.py:BaseSwitch.__init__",
"ipx800/ipx800.py:BaseSwitch.status",
"ipx800/ipx800.py:BaseSwitch.on",
"ipx800/ipx800.py:BaseSwitch.off",
"ipx800/ipx800.py:BaseSwitch.toggle",
"ipx800/ipx800.py:BaseSwitch.__repr__"... | marcaurele/gce-ipx800 | baa6e57f27ca87a35b1fa57b3a6a23f298e91fa4 | Implement Virtual outputs features in this package
"ipx.relays" is working fine. My project is using Virtual outputs, can this be added to the wishlist?
Thank you
Inz | diff --git a/README.rst b/README.rst
index 537c1cc..585f7db 100644
--- a/README.rst
+++ b/README.rst
@@ -29,7 +29,13 @@ A python library to control a GCE-Electronics IPX800 V4 device through its API.
IPX800 features implemented
---------------------------
-* Control relays
+* Control:
+
+ - relays (``ipx.relays[]`... |
marcelm__cutadapt-608 | [
{
"changes": {
"added_entities": [
"src/cutadapt/adapters.py:LinkedMatch.score"
],
"added_modules": null,
"edited_entities": [
"src/cutadapt/adapters.py:SingleMatch.__init__",
"src/cutadapt/adapters.py:SingleMatch.__repr__",
"src/cutadapt/adapters.py:Singl... | marcelm/cutadapt | f1ef8314894d4e79889973cc9593e6180035b881 | Penalize indels more
Indels are enabled by default, but cost the same as mismatches. This often leads to unexpected results, typically longer sequences being trimmed than expected, see #597.
We could penalize indels more, but should also re-consider whether optimizing the number of matches is the best thing to do. | diff --git a/CHANGES.rst b/CHANGES.rst
index 986a674..0a14734 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,11 @@ Changelog
development version
-------------------
+* :issue:`604`, :pr:`608`: The `alignment algorithm was tweaked <algorithm-indel-scores>`_
+ to penalize indels more and to more accurately pi... |
marcelm__cutadapt-750 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/cutadapt/adapters.py:SingleAdapter._make_kmer_finder"
],
"edited_modules": [
"src/cutadapt/adapters.py:SingleAdapter"
]
},
"file": "src/cutadapt/adapters.py"
}
] | marcelm/cutadapt | 5f3d9e9d333d814a6b3f17dbcbb3ed0d684126a5 | KmerFinder: x of length y is longer than the maximum of 64
I encountered this today in a pipeline I wrote a while ago after updating Cutadapt to the most recent version.
```
$ echo -e '>r\nACGT' | cutadapt --debug -a 'A{70}' -e 0 -
This is cutadapt 4.5.dev50+g0b9c325.d20231106 with Python 3.10.12
Command line param... | diff --git a/src/cutadapt/adapters.py b/src/cutadapt/adapters.py
index 849485e..6c8bd0a 100644
--- a/src/cutadapt/adapters.py
+++ b/src/cutadapt/adapters.py
@@ -610,7 +610,7 @@ class SingleAdapter(Adapter, ABC):
back_adapter: bool,
front_adapter: bool,
internal: bool = True,
- ) -> KmerFin... |
marcelm__cutadapt-781 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/cutadapt/report.py:Statistics._collect_modifier"
],
"edited_modules": [
"src/cutadapt/report.py:Statistics"
]
},
"file": "src/cutadapt/report.py"
}
] | marcelm/cutadapt | b3698c259bef4b68caf0c9fb9b3fb38646b82d0c | Pipe multiple adatper trimming steps is unsupported when using the python API.
When using the API code in cutadapt, multiple adapter trimming steps will cause error.
For example given a NGS sequencing library with the following scheme:
`(p5 adapter)-(UMI)-(inner adapter)-(insert sequence)-(p7 adapter)`
We nee... | diff --git a/src/cutadapt/report.py b/src/cutadapt/report.py
index 84ff9e0..2b47d8e 100644
--- a/src/cutadapt/report.py
+++ b/src/cutadapt/report.py
@@ -177,16 +177,28 @@ class Statistics:
if isinstance(modifier, PolyATrimmer):
self.poly_a_trimmed_lengths[i] = modifier.trimmed_bases
... |
marcelotduarte__cx_Freeze-2132 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/command/build_exe.py:BuildEXE.build_extension",
"cx_Freeze/command/build_exe.py:BuildEXE.finalize_options"
],
"edited_modules": [
"cx_Freeze/command/build_exe.py:Bu... | marcelotduarte/cx_Freeze | 27deac1b049ae1d262eac0125f365a0cbde75719 | macOS: 'File name too long' Error during bdist_mac Packaging with cx_Freeze
**Describe the bug**
When running `python setup.py bdist_mac`, the terminal outputs an error: "File name too long", preventing the packaging process from completing.
**To Reproduce**
Steps to reproduce the behavior:
1. `setup.py` contents... | diff --git a/cx_Freeze/command/build_exe.py b/cx_Freeze/command/build_exe.py
index 5a43c2ad..9bc20832 100644
--- a/cx_Freeze/command/build_exe.py
+++ b/cx_Freeze/command/build_exe.py
@@ -150,7 +150,7 @@ class BuildEXE(Command):
modules = [m for m in ext_modules if m.name == module_name]
if not modules... |
marcelotduarte__cx_Freeze-2204 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/__init__.py:plugin_install"
],
"edited_modules": [
"cx_Freeze/__init__.py:plugin_install"
]
},
"file": "cx_Freeze/__init__.py"
},
{
"changes": {
... | marcelotduarte/cx_Freeze | 7bc86a407b93eef77bfba1d3e7d1f3c18de9f97b | api-ms-*.dll are copied regardless of `include_msvcr` value
Might be related to #367. Asked bout this behavior in discussion #2171.
I run a build workflow on github, as I do not own a microsoft machine. During the build, various api-ms-*.dll are copied from the PATH. I feel that this behavior is unwarranted.
Spec... | diff --git a/cx_Freeze/__init__.py b/cx_Freeze/__init__.py
index 2c10155c..ee49f727 100644
--- a/cx_Freeze/__init__.py
+++ b/cx_Freeze/__init__.py
@@ -11,8 +11,9 @@ import setuptools
from cx_Freeze.command.build_exe import BuildEXE as build_exe
from cx_Freeze.command.install import Install as install
from cx_Freeze.... |
marcelotduarte__cx_Freeze-2379 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/command/build_exe.py:build_exe.initialize_options",
"cx_Freeze/command/build_exe.py:build_exe.finalize_options",
"cx_Freeze/command/build_exe.py:build_exe.run"
],
"... | marcelotduarte/cx_Freeze | 4ea2286caba643cf27936d2f662fbcbf1f52d98e | Flag to prevent library.zip creation
**Prerequisite**
**Describe the ~~bug~~ Feature**
I see in the past it was possible to generate directory that didn't include library.zip such as this gist:
https://gist.github.com/CountChu/c07cff7c1db062b24463a60a35eebe1e using `create_shared_zip=false`.
But on the latest v... | diff --git a/cx_Freeze/command/build_exe.py b/cx_Freeze/command/build_exe.py
index c1aef776..86a82d90 100644
--- a/cx_Freeze/command/build_exe.py
+++ b/cx_Freeze/command/build_exe.py
@@ -28,8 +28,8 @@ class build_exe(Command):
"b",
"directory for built executables and dependent files",
... |
marcelotduarte__cx_Freeze-2529 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/cli.py:main"
],
"edited_modules": [
"cx_Freeze/cli.py:main"
]
},
"file": "cx_Freeze/cli.py"
},
{
"changes": {
"added_entities": null,
"add... | marcelotduarte/cx_Freeze | 793d938a789b3ceb35b0ff0458507ae4b42c4ae4 | can't open file 'cxfreeze': [Errno 2] No such file or directory while bdist_rpm or bdist_deb
**Prerequisite**
- Make sure no duplicated issue has already been reported. You should look for closed issues, too.
- Make sure you are not asking us to help to solve your specific issue. GitHub issues are opened mainly for... | diff --git a/cx_Freeze/cli.py b/cx_Freeze/cli.py
index a0e354e8..3b4f1751 100644
--- a/cx_Freeze/cli.py
+++ b/cx_Freeze/cli.py
@@ -176,7 +176,7 @@ def main() -> None:
if script is None:
if command is None:
parser.error("--script or command must be specified")
- elif not command.startsw... |
marcelotduarte__cx_Freeze-2583 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/executable.py:Executable.init_module_name",
"cx_Freeze/executable.py:Executable.main_module_name",
"cx_Freeze/executable.py:Executable.target_name"
],
"edited_modul... | marcelotduarte/cx_Freeze | cf4dc4997e54208d90d4bdc419276da6af39dbc4 | Why is Executable target_name has to be A valid identifier?
In https://github.com/marcelotduarte/cx_Freeze/blob/7.2.1/cx_Freeze/executable.py#L234 target_name is required to be a valid identifier.
Is there any reason for that? I removed that condition and it seems to work fine.
my
target_name="6578e4ecf0464d7fb25... | diff --git a/cx_Freeze/executable.py b/cx_Freeze/executable.py
index 32f2003d..745ed026 100644
--- a/cx_Freeze/executable.py
+++ b/cx_Freeze/executable.py
@@ -116,7 +116,7 @@ class Executable:
:rtype: str
"""
- return f"{self._internal_name}__init__"
+ return f"__init__{self._internal_... |
marcelotduarte__cx_Freeze-2759 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "cx_Freeze/_compat.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cx_Freeze/execu... | marcelotduarte/cx_Freeze | aee3a1a3195a358e814c4fcbdc116e192132bbf5 | Build failure due to implicit-function-declaration and int-conversion
**Describe the bug**
Trying to build cx_Freeze on Fedora Linux Rawhide results in several errors:
```
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 43dcea7e..e4026887 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -75,8 +75,13 @@ jobs:
shell: bash
env:
UV_SYSTEM_PYTHON: true
+ UV_NO_PROGRESS: true
steps:
+ - name: Install dependenci... |
marcospereirampj__python-keycloak-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"keycloak/keycloak_admin.py:KeycloakAdmin.__init__"
],
"edited_modules": [
"keycloak/keycloak_admin.py:KeycloakAdmin"
]
},
"file": "keycloak/keycloak_admin.py"
},
{
... | marcospereirampj/python-keycloak | 73544819dbc76dbae096242085296e248b8c2e03 | Feature request: add custom headers to requests
Keycloak can be placed behind a reverse proxy that require some custom header to be present for security reason.
It would be nice to have an option to add those custom headers to objects creation | diff --git a/docs/source/index.rst b/docs/source/index.rst
index f524920..af697da 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -92,6 +92,14 @@ Main methods::
client_secret_key="secret",
verify=True)
+ # Optionally, you can pass custom headers t... |
marcosschroh__dataclasses-avroschema-172 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields.py:RecordField.get_avro_type"
],
"edited_modules": [
"dataclasses_avroschema/fields.py:RecordField"
]
},
"file": "dataclasses_avroschema/f... | marcosschroh/dataclasses-avroschema | d88afb8df16039cf86fc0598e2d4c0431613987a | Nested metadata not respected
**Describe the bug**
If I override a `schema_name` attribute for a class that's used as a field, that schema_name isn't respected.
**To Reproduce**
```python
from dataclasses_avroschema import AvroModel
from dataclasses import dataclass
@dataclass
class MyClass(AvroModel):
... | diff --git a/dataclasses_avroschema/fields.py b/dataclasses_avroschema/fields.py
index bb973af..8ec1397 100644
--- a/dataclasses_avroschema/fields.py
+++ b/dataclasses_avroschema/fields.py
@@ -685,8 +685,16 @@ class UUIDField(LogicalTypeField):
@dataclasses.dataclass
class RecordField(BaseField):
def get_avro_ty... |
marcosschroh__dataclasses-avroschema-198 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields.py:RecordField.get_avro_type"
],
"edited_modules": [
"dataclasses_avroschema/fields.py:RecordField"
]
},
"file": "dataclasses_avroschema/f... | marcosschroh/dataclasses-avroschema | 7dac7caec0b424c6146f521186aaa5add7fe8d47 | Name Collision for certain relationship even when using namespace
**Describe the bug**
The avro serialization with `fastavro` for three classes
- `A`,
- `B` (depending on `A`),
- `C` (depending on `A` and `B`),
fails with
```
fastavro._schema_common.SchemaParseException: redefined named type: namespace... | diff --git a/dataclasses_avroschema/fields.py b/dataclasses_avroschema/fields.py
index 46fc999..dee3f84 100644
--- a/dataclasses_avroschema/fields.py
+++ b/dataclasses_avroschema/fields.py
@@ -817,9 +817,9 @@ class RecordField(BaseField):
if not self.exist_type() or alias is not None:
user_defin... |
marcosschroh__dataclasses-avroschema-236 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator._parse_decimal"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator"
]... | marcosschroh/dataclasses-avroschema | c5a9f9b6bd3fba8301a57787605b84ef06724c63 | ModelGenerator's output raises NameError for decimal fields
**Describe the bug**
Code generated by the `ModelGenerator` for schemas containing a decimal logical type field cannot run due to a missing import.
**To Reproduce**
```py
import dataclasses_avroschema
schema = {
"type": "record",
"name": "de... | diff --git a/dataclasses_avroschema/model_generator/generator.py b/dataclasses_avroschema/model_generator/generator.py
index 3c9326c..8a5b4ee 100644
--- a/dataclasses_avroschema/model_generator/generator.py
+++ b/dataclasses_avroschema/model_generator/generator.py
@@ -253,8 +253,9 @@ class ModelGenerator:
... |
marcosschroh__dataclasses-avroschema-243 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields.py:DecimalField.set_precision_scale"
],
"edited_modules": [
"dataclasses_avroschema/fields.py:DecimalField"
]
},
"file": "dataclasses_avro... | marcosschroh/dataclasses-avroschema | 2a100666c93afb3f4916ea84b2ed9904b71a3632 | Problem with persistent schema and model inheritance
Thanks for this great package! I use it a lot for registering Faust Records in a schema registry. A problem that I noticed is that the Avro schemes are not correct when complex models are built which inherit from other models.
**Describe the bug**
When a model is... | diff --git a/dataclasses_avroschema/fields.py b/dataclasses_avroschema/fields.py
index 4e2aac5..c263d29 100644
--- a/dataclasses_avroschema/fields.py
+++ b/dataclasses_avroschema/fields.py
@@ -38,7 +38,6 @@ p = inflect.engine()
@dataclasses.dataclass # type: ignore
class BaseField:
-
__slots__ = (
"n... |
marcosschroh__dataclasses-avroschema-244 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields.py:ListField.generate_items_type"
],
"edited_modules": [
"dataclasses_avroschema/fields.py:ListField"
]
},
"file": "dataclasses_avroschema... | marcosschroh/dataclasses-avroschema | b8ccaaac4c38168644f8e4c60e50f2f97246b9eb | AttributeError: 'NoneType' object has no attribute 'fake'
**Describe the bug**
In my pydantic data model I have the following attribute `X: List[Optional[types.Float32]]`. When I call fake() of this class I get the error 'AttributeError: 'NoneType' object has no attribute 'fake''
**To Reproduce**
```py
from dat... | diff --git a/dataclasses_avroschema/fields.py b/dataclasses_avroschema/fields.py
index c263d29..74a22a9 100644
--- a/dataclasses_avroschema/fields.py
+++ b/dataclasses_avroschema/fields.py
@@ -287,23 +287,22 @@ class ListField(ContainerField):
items_type = self.type.__args__[0]
if utils.is_union(ite... |
marcosschroh__dataclasses-avroschema-253 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/exceptions.py:NameSpaceRequiredException.__init__",
"dataclasses_avroschema/exceptions.py:NameSpaceRequiredException.__repr__",
"dataclasses_avroschema/exceptions.... | marcosschroh/dataclasses-avroschema | d2334ff743df40cf11ad427cab45de9b714c6920 | NameSpaceRequiredException when reusing child class
Hi there! First off, thank you for the fantastic library. 🍰
I'm running into the following issue in a migration to dataclasess-avroschema:
```python
from dataclasses_avroschema.avrodantic import AvroBaseModel
class ChildA(AvroBaseModel):
id: int
... | diff --git a/dataclasses_avroschema/exceptions.py b/dataclasses_avroschema/exceptions.py
index f694907..079718a 100644
--- a/dataclasses_avroschema/exceptions.py
+++ b/dataclasses_avroschema/exceptions.py
@@ -1,22 +1,6 @@
import typing
-class NameSpaceRequiredException(Exception):
- def __init__(self, field_typ... |
marcosschroh__dataclasses-avroschema-332 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator.render_field"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator"
]
... | marcosschroh/dataclasses-avroschema | 40cb80c8ca051ae1aa9c9ac99dde17e690e8c518 | ModelGenerator fails to generate model with primitive type wrapped in object
```python
import json
from dataclasses_avroschema import ModelGenerator
schema = """
{
"namespace": "Foo.Boo",
"name": "Zoo",
"type": "record",
"fields": [
{
"name": "value_a",
"type": [
"null", ... | diff --git a/dataclasses_avroschema/model_generator/generator.py b/dataclasses_avroschema/model_generator/generator.py
index 9a14353..599e4a3 100644
--- a/dataclasses_avroschema/model_generator/generator.py
+++ b/dataclasses_avroschema/model_generator/generator.py
@@ -227,8 +227,10 @@ class ModelGenerator:
... |
marcosschroh__dataclasses-avroschema-383 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields/fields.py:RecordField.default_to_avro"
],
"edited_modules": [
"dataclasses_avroschema/fields/fields.py:RecordField"
]
},
"file": "dataclas... | marcosschroh/dataclasses-avroschema | 883d147c3a8c2f2bd5e854741cb3374abc18f3e5 | RecordField default_to_avro produces non serializable output
**Describe the bug**
When having a nested model the avro_schema function of the model fails if the nested attribute contains a non json serializable field e.g. datetime.
**To Reproduce**
```python
import dataclasses
from dataclasses_avroschema import A... | diff --git a/dataclasses_avroschema/fields/fields.py b/dataclasses_avroschema/fields/fields.py
index b7fee26..56b3a9e 100644
--- a/dataclasses_avroschema/fields/fields.py
+++ b/dataclasses_avroschema/fields/fields.py
@@ -692,7 +692,11 @@ class RecordField(Field):
return record_type
def default_to_avro(s... |
marcosschroh__dataclasses-avroschema-402 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator.parse_enum"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator"
]
... | marcosschroh/dataclasses-avroschema | d1e856e0a7c6c610741f54061f17df2aa8d9180e | Issue with case sensitivity in enums
**Describe the bug**
python Fields that represent enums values are translated directly to UPPERCASE regardless of their original casing.
This results in duplicate fields if original values from the schema only differ in casing.
I encounted this is issue in our from standards de... | diff --git a/dataclasses_avroschema/model_generator/generator.py b/dataclasses_avroschema/model_generator/generator.py
index 57290e3..acce0e1 100644
--- a/dataclasses_avroschema/model_generator/generator.py
+++ b/dataclasses_avroschema/model_generator/generator.py
@@ -424,10 +424,18 @@ class ModelGenerator:
... |
marcosschroh__dataclasses-avroschema-403 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator.render_field"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/generator.py:ModelGenerator"
]
... | marcosschroh/dataclasses-avroschema | f009f4a98e50c5051dbc016f4f2c5724150c0b53 | field ordering issue causing invalid python models
**Describe the bug**
Whenever there is a field with some additional metadata like "aliases" or "doc" it causes the generated python field to look like this:
```
fieldwithdefault: str = "some default value"
someotherfield: int = dataclasses.field(metadata={'... | diff --git a/dataclasses_avroschema/model_generator/generator.py b/dataclasses_avroschema/model_generator/generator.py
index acce0e1..6da2653 100644
--- a/dataclasses_avroschema/model_generator/generator.py
+++ b/dataclasses_avroschema/model_generator/generator.py
@@ -275,14 +275,16 @@ class ModelGenerator:
... |
marcosschroh__dataclasses-avroschema-690 | [
{
"changes": {
"added_entities": [
"dataclasses_avroschema/model_generator/lang/python/avrodantic/avrodantic_model_generator.py:AvroDanticModelGenerator.add_class_imports"
],
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/lang/python/a... | marcosschroh/dataclasses-avroschema | ebaf5ba48a139ff1b550b5de3ca8d2e99af59bc4 | Support for python class to be generated for enum type AVRO schema (without `fields`)
**Is your feature request related to a problem? Please describe.**
I have a valid AVRO schema which I am unable to translate into a Python class.
Example:
```
{
"type": "enum",
"name": "Color",
"symbols": [
"... | diff --git a/dataclasses_avroschema/model_generator/generator.py b/dataclasses_avroschema/model_generator/generator.py
index 90f49e4..2276f3d 100644
--- a/dataclasses_avroschema/model_generator/generator.py
+++ b/dataclasses_avroschema/model_generator/generator.py
@@ -29,6 +29,59 @@ class ModelType(str, enum.Enum):
... |
marcosschroh__dataclasses-avroschema-723 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/case.py:case_item"
],
"edited_modules": [
"dataclasses_avroschema/case.py:case_item"
]
},
"file": "dataclasses_avroschema/case.py"
}
] | marcosschroh/dataclasses-avroschema | 6541274beed1c77426ce21fd538a29b23bfd7e87 | When creating avro schema in camel case, nested class fields are not getting converted to proper camel case.
**Describe the bug**
A clear and concise description of what the bug is.
I am trying to use the <ClassName>.avro_schema(case_type=case.CAMELCASE) to generate my schema in camelcase. But the function was not ... | diff --git a/dataclasses_avroschema/case.py b/dataclasses_avroschema/case.py
index 8c99ea3..02632e6 100644
--- a/dataclasses_avroschema/case.py
+++ b/dataclasses_avroschema/case.py
@@ -58,6 +58,10 @@ def case_item(item: typing.Dict, case_type: str) -> typing.Dict:
# means that it is a complex type with a r... |
marcosschroh__dataclasses-avroschema-724 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/lang/python/base.py:BaseGenerator.parse_logical_type"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/lang/python/base.py:BaseGe... | marcosschroh/dataclasses-avroschema | 36dbe4e75283db628fc720f045b1ae5c02a5e2cb | Handling logical types
**Is your feature request related to a problem? Please describe.**
I have a case where I'd like to use `ModelGenerator` to generate model from avro schema, however I noticed some issues. Let's say that I have schema defined as below:
```json
{
"type": "record",
"name": "TestEvent",
... | diff --git a/dataclasses_avroschema/model_generator/lang/python/base.py b/dataclasses_avroschema/model_generator/lang/python/base.py
index 4890380..2c59d12 100644
--- a/dataclasses_avroschema/model_generator/lang/python/base.py
+++ b/dataclasses_avroschema/model_generator/lang/python/base.py
@@ -327,6 +327,9 @@ class B... |
marcosschroh__dataclasses-avroschema-751 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "dataclasses_avroschema/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"d... | marcosschroh/dataclasses-avroschema | 31e3724d46eba689b098916cdcf01bdfce253cc6 | Avro schemas containing a union where two subschemas have same fields but different name result in incorrect serialization
**Context**
We use this library in combination with Kafka where we have a topic containing multiple type of events. All must be on the same topic since we need the ordering.
**Describe the bug*... | diff --git a/dataclasses_avroschema/__init__.py b/dataclasses_avroschema/__init__.py
index 80659a8..12aa797 100644
--- a/dataclasses_avroschema/__init__.py
+++ b/dataclasses_avroschema/__init__.py
@@ -1,12 +1,5 @@
from .schema_generator import AvroModel # noqa: I001
-from .types import (
- Int32,
- Float32,
- ... |
marcosschroh__dataclasses-avroschema-776 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/lang/python/avrodantic/avrodantic_model_generator.py:AvroDanticModelGenerator._resolve_type_from_metadata",
"dataclasses_avroschema/model_generator/lang/py... | marcosschroh/dataclasses-avroschema | 1207e065ee8e5f3ded5f6d1334b06e54b20c5de0 | Incorrect model file when avsc contains ""avro.java.string": "String" metadata
**Describe the bug**
The avsc file should generate valid python class but the generated class is invalid
**To Reproduce**
Sample Code
---Model Generation Code----
```
from dataclasses_avroschema import ModelGenerator, ModelType
... | diff --git a/dataclasses_avroschema/model_generator/lang/python/avrodantic/avrodantic_model_generator.py b/dataclasses_avroschema/model_generator/lang/python/avrodantic/avrodantic_model_generator.py
index 01250a7..0e7fa73 100644
--- a/dataclasses_avroschema/model_generator/lang/python/avrodantic/avrodantic_model_genera... |
marcosschroh__dataclasses-avroschema-777 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/main.py:AvroModel.generate_dataclass",
"dataclasses_avroschema/main.py:AvroModel.generate_schema"
],
"edited_modules": [
"dataclasses_avroschema/main.p... | marcosschroh/dataclasses-avroschema | 0a2991e2a0e2080766d5b95a9a7b0e7c7659ef19 | Unclear error message
**Describe the bug**
While doing `AvroBaseModel.avro_schema_to_python()`, I get the following exception:
```
RuntimeError: Type not yet supported: <class 'dataclasses_avroschema.pydantic.main.AvroBaseModel'>
```
I don't have any idea which type this is or where it is in the code. It would b... | diff --git a/dataclasses_avroschema/main.py b/dataclasses_avroschema/main.py
index 34e02cd..63f7cfe 100644
--- a/dataclasses_avroschema/main.py
+++ b/dataclasses_avroschema/main.py
@@ -25,12 +25,15 @@ class AvroModel:
_parser: Optional[Parser] = None
_klass: Optional[Type] = None
_metadata: Optional[Sche... |
marcosschroh__dataclasses-avroschema-815 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/fields/base.py:Field.__post_init__",
"dataclasses_avroschema/fields/base.py:Field.get_metadata"
],
"edited_modules": [
"dataclasses_avroschema/fields/b... | marcosschroh/dataclasses-avroschema | 90e487b0dc497dacb6b622e10ae422e89c3a5483 | exclude_default is ignored on Pydantic model from the second call
**Describe the bug**
If you try to get avro schema from a pydantic model multiple times it starts ignoring the exclude_default feature
**To Reproduce**
```
import uuid
from dataclasses_avroschema.pydantic import AvroBaseModel
from pydantic import... | diff --git a/dataclasses_avroschema/fields/base.py b/dataclasses_avroschema/fields/base.py
index 11e60d1..69ecb0d 100644
--- a/dataclasses_avroschema/fields/base.py
+++ b/dataclasses_avroschema/fields/base.py
@@ -32,10 +32,17 @@ class Field:
metadata: typing.Dict = dataclasses.field(default_factory=dict)
mode... |
marcosschroh__dataclasses-avroschema-835 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dataclasses_avroschema/model_generator/lang/python/base.py:FieldRepresentation.get_field_default"
],
"edited_modules": [
"dataclasses_avroschema/model_generator/lang/python/base.py:F... | marcosschroh/dataclasses-avroschema | 2bec52e49a789dfa90d5f4f0448498632cba33a6 | Wrong code generation for default fields with custom type
**Describe the bug**
Wrong default field value generation for custom field record
**To Reproduce**
Code generation code for this schema:
```
{
"type": "record",
"name": "Test",
"fields": [
{
"name": "info",
"type": {
"type": "recor... | diff --git a/dataclasses_avroschema/model_generator/lang/python/base.py b/dataclasses_avroschema/model_generator/lang/python/base.py
index 8916a2d..b33a4dc 100644
--- a/dataclasses_avroschema/model_generator/lang/python/base.py
+++ b/dataclasses_avroschema/model_generator/lang/python/base.py
@@ -111,9 +111,14 @@ class ... |
mardiros__aioxmlrpc-10 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"aioxmlrpc/client.py:AioTransport.request"
],
"edited_modules": [
"aioxmlrpc/client.py:AioTransport"
]
},
"file": "aioxmlrpc/client.py"
}
] | mardiros/aioxmlrpc | 5480f35630d166bfa686e2e02b28c581e16bb723 | AttributeError when server closes socket
If the XMLRPC server closes the socket, which is rather common if it's Apache, I get this error:
```
Traceback (most recent call last):
File "/usr/share/routest/env/lib/python3.5/site-packages/aioxmlrpc/client.py", line 71, in request
connector=self._connector, loop=... | diff --git a/aioxmlrpc/client.py b/aioxmlrpc/client.py
index 35bca86..5ed292b 100644
--- a/aioxmlrpc/client.py
+++ b/aioxmlrpc/client.py
@@ -79,8 +79,14 @@ class AioTransport(xmlrpc.Transport):
raise
except Exception as exc:
log.error('Unexpected error', exc_info=True)
- ra... |
markkho__msdm-60 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"msdm/core/distributions/dictdistribution.py:UniformDistribution.__init__",
"msdm/core/distributions/dictdistribution.py:UniformDistribution.__len__",
"msdm/core/distributions/dictdistrib... | markkho/msdm | bee462397c41f72e5150b51abcf73d3d494a92d2 | Uniform distribution
The behavior for the `UniformDistribution` is inconsistent when it receives multiple copies of the same element. For instance:
```python
from msdm.core.distributions import UniformDistribution, DictDistribution
dist1 = UniformDistribution('abb')
dist2 = DictDistribution({'a': 1/3, 'b': 2/3}... | diff --git a/msdm/core/distributions/dictdistribution.py b/msdm/core/distributions/dictdistribution.py
index b271752..88fce1f 100644
--- a/msdm/core/distributions/dictdistribution.py
+++ b/msdm/core/distributions/dictdistribution.py
@@ -4,7 +4,11 @@ import random
class UniformDistribution(FiniteDistribution):
- ... |
markusressel__container-app-conf-11 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/__init__.py:Config.__new__",
"container_app_conf/__init__.py:Config.generate_reference_config",
"container_app_conf/__init__.py:Config._find_config_entries",
"... | markusressel/container-app-conf | 74e436721397cf5e4b818b1eb48c6373214d24c9 | Make singleton behaviour optional
**Is your feature request related to a problem? Please describe.**
It can be useful to be able to actually have multiple instances of a single config subclass, f.ex. for testing or when running multiple instances of the same program with different configurations.
**Describe the sol... | diff --git a/README.md b/README.md
index 07383a2..7eceaf8 100644
--- a/README.md
+++ b/README.md
@@ -108,6 +108,21 @@ env_key = "_".join(yaml_path).upper()
yields `MY_APP_EXAMPLE`.
+## Singleton
+
+By default every `Config` subclass instance will behave like a
+singleton. This means if you change the config value... |
markusressel__container-app-conf-19 | [
{
"changes": {
"added_entities": [
"container_app_conf/entry/float.py:FloatConfigEntry.__init__"
],
"added_modules": null,
"edited_entities": [
"container_app_conf/entry/float.py:FloatConfigEntry._value_to_type"
],
"edited_modules": [
"container_app_co... | markusressel/container-app-conf | 64bf901676d19ecae5a78308d89c057e3b511a78 | limit range of IntConfigEntry using range parameter
Add a constructor parameter to `IntConfigEntry` and `FloatConfigEntry` to limit valid input to a specific range. | diff --git a/container_app_conf/entry/float.py b/container_app_conf/entry/float.py
index 6ddb2ca..ee85223 100644
--- a/container_app_conf/entry/float.py
+++ b/container_app_conf/entry/float.py
@@ -17,6 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION... |
markusressel__container-app-conf-22 | [
{
"changes": {
"added_entities": [
"container_app_conf/entry/string.py:StringConfigEntry.__init__"
],
"added_modules": null,
"edited_entities": [
"container_app_conf/entry/string.py:StringConfigEntry._value_to_type"
],
"edited_modules": [
"container_ap... | markusressel/container-app-conf | 64e0448c5a66680391958a2f1ff2b76de255ac2c | Restrict valid input of StringConfigEntry using regex
As the title states. | diff --git a/container_app_conf/entry/string.py b/container_app_conf/entry/string.py
index ce12615..e2d2a6a 100644
--- a/container_app_conf/entry/string.py
+++ b/container_app_conf/entry/string.py
@@ -17,6 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNEC... |
markusressel__container-app-conf-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/entry/__init__.py:ConfigEntry.__init__",
"container_app_conf/entry/__init__.py:ConfigEntry._parse_value",
"container_app_conf/entry/__init__.py:ConfigEntry._raise_inva... | markusressel/container-app-conf | ee7a2081f5ae1335a1cd4f63176a06f2d0048b1d | Rename 'none_allowed' to 'required' and invert meaning
`none_allowed` is a very technical term and although accurate, a more descriptive name like `required` should make its use more intuitive. | diff --git a/README.md b/README.md
index f7cff93..5d0888d 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ class AppConfig(ConfigBase):
"my_app",
"example"
],
- none_allowed=False)
+ required=True)
```
@@ -63,14 +63,20 @@ own by extending the `ConfigEntry` b... |
markusressel__container-app-conf-28 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/__init__.py:ConfigBase.load_config"
],
"edited_modules": [
"container_app_conf/__init__.py:ConfigBase"
]
},
"file": "container_app_conf/__init__.py"
... | markusressel/container-app-conf | c68b268c9981fc2eabafa8ab060d0196dfab70ee | Automatically load data source values
**Is your feature request related to a problem? Please describe.**
When using a custom YAML data source the dev has to call `load()` manually which is cumbersome and easy to forget.
**Describe the solution you'd like**
Automatically load values of data sources when loading con... | diff --git a/container_app_conf/__init__.py b/container_app_conf/__init__.py
index edc7853..8100383 100644
--- a/container_app_conf/__init__.py
+++ b/container_app_conf/__init__.py
@@ -98,6 +98,7 @@ class ConfigBase:
Loads the configuration from all available sources
"""
for source in reverse... |
markusressel__container-app-conf-31 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/entry/__init__.py:ConfigEntry.__init__"
],
"edited_modules": [
"container_app_conf/entry/__init__.py:ConfigEntry"
]
},
"file": "container_app_conf/en... | markusressel/container-app-conf | e584ef008c893ae3b915762b9089529c061fd7c3 | Mark configuration options as "secret"
**Is your feature request related to a problem? Please describe.**
Outputting the current configuration can leak secrets.
**Describe the solution you'd like**
Allow developers to mark individual config entries as `secret`. This information needs to be used in #29 to replace t... | diff --git a/container_app_conf/entry/__init__.py b/container_app_conf/entry/__init__.py
index c892a15..6f8c63a 100644
--- a/container_app_conf/entry/__init__.py
+++ b/container_app_conf/entry/__init__.py
@@ -29,7 +29,7 @@ class ConfigEntry:
_example = None
def __init__(self, key_path: [str], example: any =... |
markusressel__container-app-conf-61 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/source/env_source.py:EnvSource.has",
"container_app_conf/source/env_source.py:EnvSource.get"
],
"edited_modules": [
"container_app_conf/source/env_source.p... | markusressel/container-app-conf | e4ec0c8c51b5a460744c033bc19ab76b4f74617c | Normalize hyphens in env source
The current [KEY_PATH_REGEX](https://github.com/markusressel/container-app-conf/blob/e4ec0c8c51b5a460744c033bc19ab76b4f74617c/container_app_conf/const.py#L22) allows both hyphens and underscores. As brought up in https://github.com/markusressel/keel-telegram-bot/issues/29 hyphens are not... | diff --git a/Pipfile.lock b/Pipfile.lock
index 884d1ae..700bcba 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -42,11 +42,11 @@
},
"ruamel.yaml": {
"hashes": [
- "sha256:0850def9ebca23b3a8c64c4b4115ebb6b364a10d49f89d289a26ee965e1e7d9d",
- "sha256:8f1e1542166... |
markusressel__container-app-conf-8 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"container_app_conf/entry/file.py:FileConfigEntry._value_to_type",
"container_app_conf/entry/file.py:DirectoryConfigEntry._value_to_type"
],
"edited_modules": [
"container_app... | markusressel/container-app-conf | 563f0070757a9b97255287cf13ffcb1ad5af3fdd | Use of pathlib for File- and DirectoryConfigEntry
Since **container-app-conf** uses an object-oriented approach and [pathlib](https://docs.python.org/3.5/library/pathlib.html) provides objects for paths it would be the more suitable implementation. This also makes further handling of the path way easier. | diff --git a/README.md b/README.md
index 28db477..07383a2 100644
--- a/README.md
+++ b/README.md
@@ -53,8 +53,8 @@ class AppConfig(Config):
| `StringConfigEntry` | Takes the raw string input | `str` |
| `DateConfigEntry` | Parses various datetime formats (see [python-dateutil](https://github.com/dateutil/... |
markusressel__telegram-click-15 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"example.py:MyBot.__init__",
"example.py:MyBot._message_callback",
"example.py:MyBot._name_command_callback"
],
"edited_modules": [
"example.py:MyBot"
]
},
... | markusressel/telegram-click | 7c8450849ba4a05bb153204aea2f1e4eeafe3769 | Optional arguments
Although default values for arguments are already supported the current implementation does not allow the use of `None` as a default value.
It should be possible to use `None` as a default value by simply making an argument optional. The default default value will then be `None` and can be changed... | diff --git a/example.py b/example.py
index 0e22e94..44b4dbc 100644
--- a/example.py
+++ b/example.py
@@ -43,11 +43,13 @@ class MyPermission(Permission):
class MyBot:
def __init__(self):
- self._updater = Updater(token=os.environ.get("TELEGRAM_BOT_KEY"),
- use_context=True)
... |
marrink-lab__vermouth-martinize-144 | [
{
"changes": {
"added_entities": [
"vermouth/processors/canonicalize_modifications.py:find_ptm_atoms",
"vermouth/processors/canonicalize_modifications.py:_cover_graph"
],
"added_modules": [
"vermouth/processors/canonicalize_modifications.py:find_ptm_atoms",
"ver... | marrink-lab/vermouth-martinize | 9771325c20e2b7c352e1a32ad29f6c929fe6bffc | KeyError in canonicalize_modifications
One error I encountered as I am screening many structures:
```
/coarse/jon/Envs/apricot/bin/martinize2 -f /coarse/jon/pdb_screen/1MTPA/pdb2gmx/conf.gro -x cg.pdb -o topol.top -ff martini30 -write-graph graph.pdb -vv
INFO - step - vermouth - Guessing the bonds.
INFO -... | diff --git a/vermouth/processors/canonicalize_modifications.py b/vermouth/processors/canonicalize_modifications.py
index 5cf9a7b..bc84b12 100644
--- a/vermouth/processors/canonicalize_modifications.py
+++ b/vermouth/processors/canonicalize_modifications.py
@@ -14,6 +14,11 @@
# See the License for the specific language... |
marrink-lab__vermouth-martinize-196 | [
{
"changes": {
"added_entities": [
"vermouth/molecule.py:Molecule._sort_interactions",
"vermouth/molecule.py:Molecule.__str__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"vermouth/molecule.py:Molecule"
]
},
"file": "... | marrink-lab/vermouth-martinize | c935d675b567a21cea8099c1721a0a2a389cc143 | Printing Molecule does not display anything
`print(Molecule())` does not display anything. | diff --git a/bin/martinize2 b/bin/martinize2
index 3b810f8..a27bc9b 100755
--- a/bin/martinize2
+++ b/bin/martinize2
@@ -426,6 +426,10 @@ def entry():
write_canon=args.write_canon,
)
+ LOGGER.info('Read input.', type='step')
+ for molecule in system.molecules:
+ LOGGER.debug("Read molecule ... |
marrink-lab__vermouth-martinize-205 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/processors/average_beads.py:do_average_bead"
],
"edited_modules": [
"vermouth/processors/average_beads.py:do_average_bead"
]
},
"file": "vermouth/processors/av... | marrink-lab/vermouth-martinize | ca5856e938333dbd85aeb88f25316ba54f1fd84a | DoAverageBead breaks if a node has no constructing atoms
In case e.g. an amino acid sidechain is completely missing there are no atoms constructing the SC1 bead (in Martini). `do_average_bead` does not like this, since `np.stack([])` raises an error.
The fix should be a fairly straightforward if/else statement that ... | diff --git a/vermouth/processors/average_beads.py b/vermouth/processors/average_beads.py
index b126dd7..8c57f2d 100644
--- a/vermouth/processors/average_beads.py
+++ b/vermouth/processors/average_beads.py
@@ -77,7 +77,7 @@ def do_average_bead(molecule, ignore_missing_graphs=False, weight=None):
for node in molec... |
marrink-lab__vermouth-martinize-254 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/processors/repair_graph.py:make_reference"
],
"edited_modules": [
"vermouth/processors/repair_graph.py:make_reference"
]
},
"file": "vermouth/processors/repair... | marrink-lab/vermouth-martinize | c9ddb66729527ed8abde1ee71c683e0219043d19 | DSSP error (duplicated nr. of residues)
I'm getting the following error. The protein has 156 residues. So it appears that at some step, they are being incorrectly duplciated.
```
Traceback (most recent call last):
File "/lustre1/work/courtade/software/miniconda3/envs/py37/bin/martinize2", line 669, in <module>
... | diff --git a/vermouth/processors/repair_graph.py b/vermouth/processors/repair_graph.py
index b95db34..1e4ea66 100644
--- a/vermouth/processors/repair_graph.py
+++ b/vermouth/processors/repair_graph.py
@@ -193,7 +193,15 @@ def make_reference(mol):
residue = residues.nodes[residx]['graph']
reference = _... |
marrink-lab__vermouth-martinize-279 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/dssp/dssp.py:run_dssp",
"vermouth/dssp/dssp.py:convert_dssp_annotation_to_martini"
],
"edited_modules": [
"vermouth/dssp/dssp.py:run_dssp",
"vermouth/dssp/ds... | marrink-lab/vermouth-martinize | d1f0f1997867f5e0a6ad6e82ecb3897d08e4eb88 | run_dssp doesn't work on Windows
The DSSP processor doesn't work on windows, since it tries the following:
```python3
process = subprocess.Popen(
[executable, "-i", "/dev/stdin"],
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE
)
```
In other words, it ... | diff --git a/requirements-docs.txt b/requirements-docs.txt
index 27f3ca8..19fd51c 100644
--- a/requirements-docs.txt
+++ b/requirements-docs.txt
@@ -1,4 +1,4 @@
-sphinx >= 1.8.0
+sphinx == 3.1.2
sphinxcontrib-apidoc
pbr
setuptools >= 30.3.0
diff --git a/vermouth/dssp/dssp.py b/vermouth/dssp/dssp.py
index 8b834d1..16... |
marrink-lab__vermouth-martinize-280 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/processors/canonicalize_modifications.py:fix_ptm"
],
"edited_modules": [
"vermouth/processors/canonicalize_modifications.py:fix_ptm"
]
},
"file": "vermouth/pro... | marrink-lab/vermouth-martinize | 074bb12d17cdbbdf40723e7cf4b2fb83406cd983 | Increase usability by removing unrecognized atoms
Currently, if a PTM is not recognized martinize turns into a mushroom. This is not great. Instead, all atoms that are not recognized should be removed and warning(s) issued. This should either be done by CanonicalizeModifications, or a separate processor. In the second ... | diff --git a/vermouth/processors/canonicalize_modifications.py b/vermouth/processors/canonicalize_modifications.py
index 2679131..33a9722 100644
--- a/vermouth/processors/canonicalize_modifications.py
+++ b/vermouth/processors/canonicalize_modifications.py
@@ -276,14 +276,18 @@ def fix_ptm(molecule):
try:
... |
marrink-lab__vermouth-martinize-286 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/processors/make_bonds.py:_bonds_from_distance",
"vermouth/processors/make_bonds.py:make_bonds",
"vermouth/processors/make_bonds.py:MakeBonds.__init__"
],
"edited_mod... | marrink-lab/vermouth-martinize | ff99729af681bc384f67b683b56c197ed52ffa97 | -cys auto is not working
My current tests with vermouth 0.3.2.dev122 and martini22 models showed that -cys auto ist not working. The extra bond between the cysteine bridge was not added in the example a tested. In martinize1 works well. | diff --git a/bin/martinize2 b/bin/martinize2
index 98964c7..9286793 100755
--- a/bin/martinize2
+++ b/bin/martinize2
@@ -307,7 +307,7 @@ def entry():
"If 'none', only bonds from the input file (CONECT)"
" will be used.")
file_group.add_argument('-bonds-fudg... |
marrink-lab__vermouth-martinize-561 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/processors/do_links.py:_atoms_match"
],
"edited_modules": [
"vermouth/processors/do_links.py:_atoms_match"
]
},
"file": "vermouth/processors/do_links.py"
}
] | marrink-lab/vermouth-martinize | 71710c57e7602a3ca8ec70feb4314f0d2982b51d | Incorrect Martini 2.2 topologies for alpha-helical peptides
#### Short description
`vermouth-martinize` generates incorrect Martini 2.2 topologies for alpha-helical peptides.
#### Detailed description
Using MODELLER, I generated a short 20 amino acids long polyleucine peptide in an alpha-helical conformation. I t... | diff --git a/.gitignore b/.gitignore
index c3fe7be..fae21f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ test.pdb
**/__pycache__
**.pyc
**.bak
+\#*
**.lprof
diff --git a/doc/source/tutorials/6_adding_residues_links/index.rst b/doc/source/tutorials/6_adding_residues_links/index.rst
index effb5b1..87b... |
marrink-lab__vermouth-martinize-572 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/dssp/dssp.py:convert_dssp_to_martini"
],
"edited_modules": [
"vermouth/dssp/dssp.py:convert_dssp_to_martini"
]
},
"file": "vermouth/dssp/dssp.py"
}
] | marrink-lab/vermouth-martinize | cb8a9f68771e358bf1562fffa61304456347ef0d | Martini 2.2 topologies for alpha-helical peptides are still incorrect
**Context**
This issue is related to Issue #560. Thank you for addressing the main problems mentioned in the issue. However, not all problems of the opened issue have been fixed.
**Short description**
While bead types for charged termini backbon... | diff --git a/vermouth/dssp/dssp.py b/vermouth/dssp/dssp.py
index 79f89ed..b9c0998 100644
--- a/vermouth/dssp/dssp.py
+++ b/vermouth/dssp/dssp.py
@@ -417,8 +417,15 @@ def convert_dssp_to_martini(sequence):
cg_sequence = ''.join(ss_cg[secstruct] for secstruct in sequence)
wildcard_sequence = ''.join('H' if secs... |
marrink-lab__vermouth-martinize-653 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vermouth/dssp/dssp.py:run_dssp"
],
"edited_modules": [
"vermouth/dssp/dssp.py:run_dssp"
]
},
"file": "vermouth/dssp/dssp.py"
}
] | marrink-lab/vermouth-martinize | f86d35d8c46df23db0e58012a47e8938477eda1a | handle missing dssp error better
there are two options for `-dssp`, either give the path to the installed binary, or just give the flag and hope that mdtraj is installed.
If the latter is done (which it increasingly is in tutorials etc.), but mdtraj is not installed, then the error is not terribly helpful:
```
F... | diff --git a/vermouth/dssp/dssp.py b/vermouth/dssp/dssp.py
index 6491ffa..d0221eb 100644
--- a/vermouth/dssp/dssp.py
+++ b/vermouth/dssp/dssp.py
@@ -271,8 +271,13 @@ def run_dssp(system, executable='dssp', savedir=None, defer_writing=True):
savefile = _savefile_path(system, savedir)
else:
savefil... |
marshmallow-code__apispec-338 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/core.py:Components.schema",
"apispec/core.py:Components.parameter",
"apispec/core.py:Components.response",
"apispec/core.py:APISpec.tag",
"apispec/core.py:APISpec... | marshmallow-code/apispec | 3f25523d8373e67278017e0e8c593cc65ea2894d | Make APISpec and Components methods chainable
See discussion in https://github.com/marshmallow-code/apispec/pull/305.
Just let `path`, `tag`, etc. return `self`. | diff --git a/apispec/core.py b/apispec/core.py
index d7d2a00..9d8ca93 100644
--- a/apispec/core.py
+++ b/apispec/core.py
@@ -139,6 +139,7 @@ class Components(object):
if extra_fields:
ret.update(extra_fields)
self._schemas[name] = ret
+ return self
def parameter(self, param_... |
marshmallow-code__apispec-382 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/core.py:APISpec.path"
],
"edited_modules": [
"apispec/core.py:APISpec"
]
},
"file": "apispec/core.py"
}
] | marshmallow-code/apispec | f630cfcb69679f5b64ff1b2e9e2ddacc7cf51c55 | Add support for `summary` and `description` fields for paths
Documented [here](https://swagger.io/docs/specification/paths-and-operations/):
> Paths may have an optional short summary and a longer description for documentation purposes. This information is supposed to be relevant to all operations in this path. desc... | diff --git a/apispec/core.py b/apispec/core.py
index b3142e7..ddada9e 100644
--- a/apispec/core.py
+++ b/apispec/core.py
@@ -277,13 +277,17 @@ class APISpec(object):
self._tags.append(tag)
return self
- def path(self, path=None, operations=None, **kwargs):
+ def path(
+ self, path=None,... |
marshmallow-code__apispec-386 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/ext/marshmallow/openapi.py:OpenAPIConverter.resolve_nested_schema",
"apispec/ext/marshmallow/openapi.py:OpenAPIConverter.schema2jsonschema"
],
"edited_modules": [
"ap... | marshmallow-code/apispec | bf3faf4125d98396912d9c7d3e5bbe55aa179106 | Docstring-only schemas incorrectly referenced as arrays?
Tested with Marshmallow 3.0.0rc3 and APISpec 1.0.0rc1.
Took a copy of the APISpec quickstart code and removed the defintions, so that schemas were only being referenced from the docstrings. I'm seeing that the nested schema is being picked up as an array (inc... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 36548f9..e32ad35 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v1.11.1
+ rev: v1.11.0
hooks:
- id: pyupgrade
exclude: docopt.py
@@ -10,7 +1... |
marshmallow-code__apispec-424 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/core.py:clean_operations"
],
"edited_modules": [
"src/apispec/core.py:clean_operations"
]
},
"file": "src/apispec/core.py"
}
] | marshmallow-code/apispec | d6e798e6a281ab7f77ce754bd9a32f763bd64a31 | Consider coercing response codes to strings
The OpenAPI specification [allows responses of the form 2XX, 4XX, etc](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#patterned-fields-1). Using this library, it's possible in a docstring to write something like this:
```yaml
responses:
... | diff --git a/src/apispec/core.py b/src/apispec/core.py
index 33304a8..1b7a105 100644
--- a/src/apispec/core.py
+++ b/src/apispec/core.py
@@ -45,7 +45,7 @@ def clean_operations(operations, openapi_major_version):
Otherwise, it is assumed to be a reference name as string and the corresponding $ref
strin... |
marshmallow-code__apispec-435 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter.field2type_and_format"
],
"edited_modules": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter"
]
},
"fi... | marshmallow-code/apispec | aca2ec378e67e4541cef7fc7a7fec0e0c2a9587e | Subclassed Lists marked as string type
I am using a tool to generate a Marshmallow schema that I then present as a RESTful API. In order to override some of the methods of marshmallow.fields.List, the generated schema can have generated classes that subclass List. The resulting APISpec is _almost_ perfect because opena... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 3bb7ca8..f5c38c0 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -55,3 +55,4 @@ Contributors (chronological)
- Jonathan Beezley `@jbeezley <https://github.com/jbeezley>`_
- David Stapleton `@dstape <https://github.com/DStape>`_
- Szabolcs Blága `@blagasz <https://github.com... |
marshmallow-code__apispec-495 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.field2type_and_format",
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.nested2properties"
],
"... | marshmallow-code/apispec | 7016ebc7550780a54277f40959b1686774be08f9 | Representing openapi's "Any Type"
I am trying to use `marshmallow.fields.Raw` to represent a "arbitrary json" field. Currently I do not see a way to represent a field in marshmallow that will produce a openapi property that is empty when passed through apispec.
The code in `apispec.marshmallow.openapi.OpenAPIConvert... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d30d8db..18cb18c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,9 @@ Changelog
Features:
+- *Backwards-incompatible* Marshmallow ``fields.Raw`` and ``fields.Field`` are
+ now represented by OpenAPI `Any Type <https://swagger.io/docs/specification/data-mo... |
marshmallow-code__apispec-50 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/core.py:APISpec.add_path"
],
"edited_modules": [
"apispec/core.py:APISpec"
]
},
"file": "apispec/core.py"
}
] | marshmallow-code/apispec | 684da986e6c77232cc3e8618a51e271e9cd474f8 | How should I add an existing Path instance to an APISpec instance
I tried to do something like:
```python
spec = APISpec(**kwargs)
spec.add_path(Path(**kwargs))
```
And I received the following error (as I should have)
```
File "/Users/Josh/Developer/Kaplan/AWS-Lambda-APIGateway-POC/env/lib/python2.7/site-pack... | diff --git a/apispec/core.py b/apispec/core.py
index 029d311..fbb3cc3 100644
--- a/apispec/core.py
+++ b/apispec/core.py
@@ -136,11 +136,21 @@ class APISpec(object):
"""Add a new path object to the spec.
https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#paths-object-
+
+ ... |
marshmallow-code__apispec-539 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/core.py:APISpec.__init__"
],
"edited_modules": [
"src/apispec/core.py:APISpec"
]
},
"file": "src/apispec/core.py"
}
] | marshmallow-code/apispec | 20b5ed34366c720fc5a0f50e0b7546cd526cb178 | Ability to access APISpec.components in plugin init_spec method
Is there a specific reason why components is initialized after plugins init_spec methods are called?
If not, then I am willing to open a PR to solve this issue. | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 1ad3e9a..84c119e 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -62,3 +62,4 @@ Contributors (chronological)
- Bastien Gerard `@bagerard <https://github.com/bagerard>`_
- Ashutosh Chaudhary `@codeasashu <https://github.com/codeasashu>`_
- Fedor Fominykh `@fedorfo <https://g... |
marshmallow-code__apispec-554 | [
{
"changes": {
"added_entities": [
"src/apispec/core.py:APISpec._resolve_schema"
],
"added_modules": null,
"edited_entities": [
"src/apispec/core.py:APISpec.clean_operations"
],
"edited_modules": [
"src/apispec/core.py:APISpec"
]
},
"file... | marshmallow-code/apispec | 043af20446d0e5f2e59d05347b7c7e56a1cec1b3 | Sample does not reference components
When I run the sample from https://github.com/marshmallow-code/apispec/blob/dev/docs/quickstart.rst
the expected output
```
# {'components': {'parameters': {},
# 'responses': {},
# 'schemas': {'Gist': {'properties': {'id': {'format': 'int64',... | diff --git a/src/apispec/core.py b/src/apispec/core.py
index 8c6bb6c..11a7c88 100644
--- a/src/apispec/core.py
+++ b/src/apispec/core.py
@@ -300,13 +300,26 @@ class APISpec:
Otherwise, it is assumed to be a reference name as string and the corresponding $ref
string is returned.
- :param str o... |
marshmallow-code__apispec-568 | [
{
"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/apispec/ext/marshmallow... | marshmallow-code/apispec | 8ec05f8686a199f6fcf537d7fbd94953a22cc48b | Marshmallow plugin bug with string schema ref and schema_name_resolver
`resolve_schema_dict` claims to support `string` as its schema parameter type. It can get there for example when you are parsing schema from docstring using the provided yaml util, or using FlaskPlugin to do it for you.
But, when `schema_name_re... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d24fdd5..475e50c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,16 @@
Changelog
---------
+3.3.1 (unreleased)
+******************
+
+Bug fixes:
+
+- Fix ``MarshmallowPlugin`` crash when ``resolve_schema_dict`` is passed a
+ schema as string and ``schema_n... |
marshmallow-code__apispec-616 | [
{
"changes": {
"added_entities": [
"src/apispec/ext/marshmallow/field_converter.py:make_min_max_attributes"
],
"added_modules": [
"src/apispec/ext/marshmallow/field_converter.py:make_min_max_attributes"
],
"edited_entities": [
"src/apispec/ext/marshmallow/fi... | marshmallow-code/apispec | 5762c831fccf9d8dedcdfb901d106c02addc278b | Minimum/maximum date is not jsonschema compliant
I'm using flask-apispec (but I think that the issue is related to apispec) to generate a swagger 2.0 schema from webargs/marshmallow models that include datetimes with min/max boundaries like this:
```
mydate = fields.DateTime(
required=True,
validate=vali... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index 0b3798a..8583ec0 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -83,6 +83,8 @@ class FieldConverterMixin:
def init_attribute_func... |
marshmallow-code__apispec-671 | [
{
"changes": {
"added_entities": [
"src/apispec/core.py:Components._resolve_refs_in_schema",
"src/apispec/core.py:Components._resolve_refs_in_parameter_or_header"
],
"added_modules": null,
"edited_entities": [
"src/apispec/core.py:Components.schema",
"src/... | marshmallow-code/apispec | 4c84e22b010512e3dbb443a0a8e9fb53d56a9c07 | Resolve components references in components
Currently, we resolve component references in operations but not in components themselves.
It could be nice to do it there as well to allow a user to pass references as strings inside components.
There should be an opportunity for factorization with the code that resolv... | diff --git a/docs/special_topics.rst b/docs/special_topics.rst
index 892d4a0..43170a1 100644
--- a/docs/special_topics.rst
+++ b/docs/special_topics.rst
@@ -53,14 +53,29 @@ JSON
Documenting Top-level Components
--------------------------------
-The ``APISpec`` object contains helpers to add top-level components.
-
... |
marshmallow-code__apispec-672 | [
{
"changes": {
"added_entities": [
"src/apispec/ext/marshmallow/field_converter.py:make_type_list"
],
"added_modules": [
"src/apispec/ext/marshmallow/field_converter.py:make_type_list"
],
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:F... | marshmallow-code/apispec | e95cdd4641e12727fc7cd63dca9ad6ac66864f4a | OpenAPI 3.1 support
There's been a 3.1.0 RC release and they decided to make breaking changes.
https://github.com/OAI/OpenAPI-Specification/releases
It didn't go through all the changes yet to see if and how we are impacted.
At least, since they don't follow semver anymore and things can change in minor versio... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index b5e6ba2..620ffc7 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -261,7 +261,7 @@ class FieldConverterMixin:
attributes["wri... |
marshmallow-code__apispec-674 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/common.py:get_fields"
],
"edited_modules": [
"src/apispec/ext/marshmallow/common.py:get_fields"
]
},
"file": "src/apispec/ext/marshmallow/co... | marshmallow-code/apispec | 490948cbcf36e6da081e5f6f746fb3957208fea8 | Marshmallow 3.12 schema with `fields` property produce error
Marshmallow added Fields be accessed by name as Schema attributes
I have a schema like this
```python
import marshmallow as ma
class Schema(ma.Schema):
fields = ma.fields.List(ma.fields.Int)
```
Produces error
```
File "/venv/lib/py... | diff --git a/src/apispec/ext/marshmallow/common.py b/src/apispec/ext/marshmallow/common.py
index 9f773a8..7f757f1 100644
--- a/src/apispec/ext/marshmallow/common.py
+++ b/src/apispec/ext/marshmallow/common.py
@@ -43,14 +43,12 @@ def get_fields(schema, *, exclude_dump_only=False):
:param bool exclude_dump_only: whe... |
marshmallow-code__apispec-677 | [
{
"changes": {
"added_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.pluck2properties"
],
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.init_attribute_functions",
"... | marshmallow-code/apispec | f64ff702646375120320a09a85753a3be6e4995c | Marshmallow Pluck type not supported correctly?
Hi guys,
I was just trying to use Marshmallow 3 "nesting" via Pluck field (example taken from docs https://marshmallow.readthedocs.io/en/3.0/nesting.html) and swagger documentation rendered via `apispec` shows nested object in an array instead of flat array.
When us... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index 620ffc7..b1e4de8 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -96,6 +96,7 @@ class FieldConverterMixin:
self.field2patter... |
marshmallow-code__apispec-678 | [
{
"changes": {
"added_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.timedelta2properties"
],
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.init_attribute_functions"
... | marshmallow-code/apispec | 63aa0af6c40687e6b0834c2f9b0b234829f4d815 | TimeDelta fields not generating useful documentation
Documentation for `marshmallow.fields.TimeDelta` is not capturing anything about the field type except the description. Under the hood, Marshmallow treats it as an `int` that gets converted to a `datetime.timedelta` on deserialization.
Here is the line from the sc... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index b1e4de8..470ed07 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -29,6 +29,7 @@ DEFAULT_FIELD_MAPPING = {
marshmallow.fields.DateTim... |
marshmallow-code__apispec-690 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.field2nullable"
],
"edited_modules": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin"
]... | marshmallow-code/apispec | aeb0ee556534cb1862129fd1ad98b28728bc80ce | Nullable in OAS 3.1 rendered as "'null'" string instead of "null"
Nullable fields should be rendered as `"type": ["fieldType", "null"]`, not `["fieldType", "'null'"]`.
The field converter currently includes quotes around `null` _in the literal string value_, see https://github.com/marshmallow-code/apispec/blob/5cf76... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index c1304a9..7db713a 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -280,7 +280,7 @@ class FieldConverterMixin:
elif self.opena... |
marshmallow-code__apispec-70 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/ext/flask.py:path_from_view"
],
"edited_modules": [
"apispec/ext/flask.py:path_from_view"
]
},
"file": "apispec/ext/flask.py"
}
] | marshmallow-code/apispec | fe3f7a02358e65a7942d3d5d4d81c6a17844c6ce | Flask extension does not support application root
The flask extension only outputs the route path, but `flask.url_for()` takes into consideration that the path should be prefixed with the configured `APPLICATION_ROOT` path. [apispec/ext/flask.py#L58](https://github.com/marshmallow-code/apispec/blob/1076180/apispec/ext/... | diff --git a/apispec/ext/flask.py b/apispec/ext/flask.py
index 19c029f..a6c1e97 100644
--- a/apispec/ext/flask.py
+++ b/apispec/ext/flask.py
@@ -27,6 +27,11 @@ function to `add_path`. Inspects URL rules and view docstrings.
from __future__ import absolute_import
import re
+try:
+ from urllib.parse import urljoin... |
marshmallow-code__apispec-716 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter.schema2jsonschema"
],
"edited_modules": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter"
]
},
"file":... | marshmallow-code/apispec | 64d3718a998f843a1f0dbd171f6ce507084f698f | ordered is part of the Meta of a schema
ordered is part of Meta see https://marshmallow.readthedocs.io/en/stable/marshmallow.schema.html#marshmallow.schema.Schema.Meta, however it is currently pulled from the schema see https://github.com/marshmallow-code/apispec/blob/dev/src/apispec/ext/marshmallow/openapi.py#L180
... | diff --git a/src/apispec/ext/marshmallow/openapi.py b/src/apispec/ext/marshmallow/openapi.py
index 273af20..24866c2 100644
--- a/src/apispec/ext/marshmallow/openapi.py
+++ b/src/apispec/ext/marshmallow/openapi.py
@@ -177,7 +177,7 @@ class OpenAPIConverter(FieldConverterMixin):
fields = get_fields(schema)
... |
marshmallow-code__apispec-778 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | marshmallow-code/apispec | cbcff0d7d7a3539df57e5f80fe32642314493e91 | explode and style are hardcoded in OpenAPIConverter.property2parameter
I've been trying to document webargs's `DelimitedList` (child class of `List`) and I'm stuck because I'd need to override hardcoded stuff.
```py
def field2parameter(self, field, name, default_in):
location = field.metadata.get("loca... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7d64b92..85c0224 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,26 +1,26 @@
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v2.38.0
+ rev: v2.32.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo:... |
marshmallow-code__apispec-802 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.enum2properties"
... | marshmallow-code/apispec | 2261de98c8201eba831cef30250b1870c7632e1f | Support with marshmallow.fields.Enum
[marshmallow.fields.Enum](https://marshmallow.readthedocs.io/en/stable/marshmallow.fields.html#marshmallow.fields.Enum) can be used now.
Could apispec supports with it, Thanks! | diff --git a/setup.py b/setup.py
index be79866..089f23e 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
INSTALL_REQUIRES = "packaging>=21.3"
EXTRAS_REQUIRE = {
- "marshmallow": ["marshmallow>=3.13.0"],
+ "marshmallow": ["marshmallow>=3.18.0"],
"yaml": ["Py... |
marshmallow-code__apispec-804 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/__init__.py:MarshmallowPlugin.map_to_openapi_type"
],
"edited_modules": [
"src/apispec/ext/marshmallow/__init__.py:MarshmallowPlugin"
]
},
"... | marshmallow-code/apispec | c084e1c4078231ac9423d30553350426a6b7b862 | Allow map_to_openapi_type to be called like a function
Hi,
so I have a schema which uses a custom field. Currently you expect that we do the following:
```
ma = MarshmallowPlugin()
@ma.map_to_openapi_type(fields.Dict)
class Custom(field.Field): pass
```
However, it's not very nice if the fields are in se... | diff --git a/docs/using_plugins.rst b/docs/using_plugins.rst
index 0f02be9..8dd2b4b 100644
--- a/docs/using_plugins.rst
+++ b/docs/using_plugins.rst
@@ -243,7 +243,7 @@ custom field subclasses a standard marshmallow `Field` class then it will
inherit the default mapping. If you want to override the OpenAPI type and fo... |
marshmallow-code__apispec-807 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.enum2properties"
],
"edited_modules": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin"
... | marshmallow-code/apispec | 7abbf7dfea6b77d50504ad33262f6a8ed643781e | exported marshmallow Enum fields should be arrays, not CSV strings
Hi,
I really love new support for marshmalow Enum fields but... these are not correctly exported into OAS3 :disappointed: .
We get strings:
```json
"status": {
"type": "string",
"enum": "INACTIVE, ACTIVE"
}
```
but we need lists:... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index 5c9abc5..20bc56f 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -509,7 +509,11 @@ class FieldConverterMixin:
ret = {}
... |
marshmallow-code__apispec-811 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter.__init__"
],
"edited_modules": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter"
]
},
"file": "src/api... | marshmallow-code/apispec | 986b46428ef4af293f9541121f1e80cc99f4dfb1 | Marshmallow OpenApiConverter does not support str openapi_version
The [mashmallow ext documentation](https://apispec.readthedocs.io/en/latest/api_ext.html#apispec.ext.marshmallow.openapi.OpenAPIConverter) says
```
openapi_version (Version) – The OpenAPI version to use. Should be in the form ‘2.x’ or ‘3.x.x’ to comp... | diff --git a/src/apispec/ext/marshmallow/openapi.py b/src/apispec/ext/marshmallow/openapi.py
index 011af55..6d6fcb5 100644
--- a/src/apispec/ext/marshmallow/openapi.py
+++ b/src/apispec/ext/marshmallow/openapi.py
@@ -40,7 +40,7 @@ __location_map__ = {
class OpenAPIConverter(FieldConverterMixin):
"""Adds methods f... |
marshmallow-code__apispec-851 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter._field2parameter"
],
"edited_modules": [
"src/apispec/ext/marshmallow/openapi.py:OpenAPIConverter"
]
},
"file": ... | marshmallow-code/apispec | 95d73b45c472d312dea28cf6c89581bfe5fdc969 | Deprecated flag is not configured correctly on query parameter objects
When using the `metadata` parameter on a Marshmallow field, the `deprecated` field is not properly configured on parameter objects with a location of `"query"` in the generated spec (the `description` field is set as expected, but not `deprecated`):... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 02662ce..17bea2b 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -77,3 +77,4 @@ Contributors (chronological)
- Edwin Erdmanis `@vorticity <https://github.com/vorticity>`_
- Mounier Florian `@paradoxxxzero <https://github.com/paradoxxxzero>`_
- Renato Damas `@codectl <https:... |
marshmallow-code__apispec-92 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"apispec/core.py:APISpec.add_path"
],
"edited_modules": [
"apispec/core.py:APISpec"
]
},
"file": "apispec/core.py"
}
] | marshmallow-code/apispec | 14be6d8be8608dec4af9e215a154e521f9d8ff78 | Core path does not support swagger basePath
Related to #69.
Flask allows configuring the `APPLICATION_ROOT`, which provides the base path for the routes. #70 fixed this issue so that the flask extension reports the fully qualified path.
When the specs are dumped as swagger specs using `to_dict()`, the full path is sh... | diff --git a/apispec/core.py b/apispec/core.py
index 66028b1..170ca0b 100644
--- a/apispec/core.py
+++ b/apispec/core.py
@@ -154,12 +154,19 @@ class APISpec(object):
:param dict|None operations: describes the http methods and options for `path`
:param dict kwargs: parameters used by any path helpers s... |
marshmallow-code__apispec-950 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.dict2properties"
],
"edited_modules": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin"
... | marshmallow-code/apispec | b1bcefb0084527a1856a0cbc13ac23a872f97c66 | `Dict()` should resolve to `{"type": "object", "additionalProperties": {}}`
`Dict` will output the schema of the `values` field as `additionalProperties`, you can see that in the example below with `Dict(values=Integer)` -> `additionalProperties: {type: integer}` and `Dict(values=Raw)` -> `additionalProperties: {}` (Op... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 16fb499..2d5ed60 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -83,3 +83,4 @@ Contributors (chronological)
- Tobias Kolditz `@kolditz-senec <https://github.com/kolditz-senec>`_
- Christian Proud `@cjproud <https://github.com/cjproud>`_
- `<https://github.com/kolditz-senec... |
marshmallow-code__apispec-953 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.field2nullable",
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.datetime2properties"
],
"edite... | marshmallow-code/apispec | 0b2ff4506f88ab2c011b4da0b8c2ccd508c536b1 | Incorrect handling of marshmallow nested schema with allow_none=True in OpenAPI 3.0
This is a spinoff of #833, but for OpenAPI 3.0.
The following schemas:
```
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from marshmallow import Schema, fields
spec = APISpec(
title="... | diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index a284f9b..63fbe96 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -301,9 +301,13 @@ class FieldConverterMixin:
if self.openap... |
marshmallow-code__apispec-961 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin.field2nullable"
],
"edited_modules": [
"src/apispec/ext/marshmallow/field_converter.py:FieldConverterMixin"
]... | marshmallow-code/apispec | 59751b7154270ea94838019fd103a1a8b4590e29 | Nullable `Raw` fields are not handled well for OAS 3.1.0
When converting a nullable `Raw` Marshmallow field into its corresponding OpenAPI representation for OAS 3.1.0, the generated representation does not match the behaviour of the actual schema/field:
```python
import jsonschema
from marshmallow import Schema, ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 60c8bb1..5cd1319 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,9 +1,14 @@
Changelog
---------
-6.9.0 (unreleased)
+6.8.1 (unreleased)
******************
+Bug fixes:
+
+- Fix handling of nullable Raw fields for OAS 3.1.0 (:issue:`960`).
+ Thanks :user:`tsok... |
marshmallow-code__apispec-webframeworks-64 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/apispec_webframeworks/bottle.py"
}
] | marshmallow-code/apispec-webframeworks | fa71207b856ce549886020f3ea9d7371d02eb2dc | Bottle plugin path regex bug when using argument type in the url
<a href="https://github.com/genbits"><img src="https://avatars0.githubusercontent.com/u/3424362?v=4" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [genbits](https://github.com/genbits)**
_Monday May 21, 2018 at 10:56 GMT_
_Original... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index b42ae4a..86f2842 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,12 @@
Changelog
---------
+0.5.2 (unreleased)
+++++++++++++++++++
+
+* BottlePlugin: Fix support for typed path arguments (:issue:`16`).
+ Thanks :user:`genbits` for reporting and thanks :use... |
marshmallow-code__flask-marshmallow-249 | [
{
"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/flask_marshmallow/__ini... | marshmallow-code/flask-marshmallow | 13f673979937bc5b366863eeff4eefadfb8433d1 | DeprecationWarning from Flask-SQLAlchemy for app.extensions["sqlalchemy"]
Flask-SQLAlchemy has rewritten the way to load the extension. No longer `app.extensions["sqlalchemy"].db` but simply `app.extensions["sqlalchemy"]` see https://github.com/pallets-eco/flask-sqlalchemy/issues/698.
This is used here: https://gith... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 95aebfa..103c30d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,9 +3,9 @@ repos:
rev: v2.31.0
hooks:
- id: pyupgrade
- args: [--py36-plus]
+ args: [--py37-plus]
- repo: https://github.com/python/black
- rev: ... |
marshmallow-code__flask-smorest-313 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"flask_smorest/__init__.py:Api.register_blueprint"
],
"edited_modules": [
"flask_smorest/__init__.py:Api"
]
},
"file": "flask_smorest/__init__.py"
},
{
"changes"... | marshmallow-code/flask-smorest | ec4fbecc71686535a38f8642760bab390f0fdc44 | Documenting path parameters in blueprint url_prefix
How do I document path parameters that appear in `url_prefix` in a Blueprint? Example:
```
blueprint = Blueprint(
'Media',
__name__,
url_prefix='/brands/<int:brand_id>/media',
)
@blueprint.route(...)
...
```
I've read through https://github... | diff --git a/docs/openapi.rst b/docs/openapi.rst
index 794b767..89d5ea1 100644
--- a/docs/openapi.rst
+++ b/docs/openapi.rst
@@ -117,6 +117,10 @@ argument to pass documentation for parameters that are shared by all operations
of a path. It can be used to pass extra documentation, such as examples, for
path parameters... |
marshmallow-code__flask-smorest-318 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"flask_smorest/spec/__init__.py:APISpecMixin._register_responses"
],
"edited_modules": [
"flask_smorest/spec/__init__.py:APISpecMixin"
]
},
"file": "flask_smorest/spec/_... | marshmallow-code/flask-smorest | 475febd63f00f7655348d156dcf99d20a4355a6b | 304 wrongly documented as following ErrorSchema
Automatic doc says 304 comes with a JSON payload. This is not true.
From https://httpstatuses.com/304:
> A 304 response cannot contain a message-body; it is always terminated by the first empty line after the header fields.
Flask/werkzeug respect that and 304 res... | diff --git a/flask_smorest/spec/__init__.py b/flask_smorest/spec/__init__.py
index d78332d..7116b8e 100644
--- a/flask_smorest/spec/__init__.py
+++ b/flask_smorest/spec/__init__.py
@@ -307,8 +307,9 @@ class APISpecMixin(DocBlueprintMixin):
for status in http.HTTPStatus:
response = {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.