Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump mypy from 0.982 to 1.4.1 #208

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7ea8421
feat: Add allOf support for model definitions BNCH-18722 (#12)
packyg Dec 8, 2020
70cb4bb
feat: Add setup.py support BNCH-18722 (#11)
packyg Dec 4, 2020
ce30b4c
fix: require setuptools >50 in pyproject.toml
packyg Dec 9, 2020
0b9a99a
fix: Fix bug parsing `allOf` in nested keys BNCH-20174 (#29)
forest-benchling Jan 14, 2021
f49d0bc
fix: Fix optional model properties BNCH-20284 (#35)
forest-benchling Jan 27, 2021
b0109cd
feat: Serialize model query parameters with `style=form, explode=true…
forest-benchling Jan 27, 2021
f469553
Cherry-pick optional params
forest-benchling Jan 27, 2021
a5d09f4
Regenerate tests
forest-benchling Jan 27, 2021
b33df4d
Undo diffs
forest-benchling Jan 27, 2021
97063d5
Fix tests
forest-benchling Jan 27, 2021
67bce41
Regen
forest-benchling Jan 27, 2021
f02e943
Add tests for union
forest-benchling Jan 27, 2021
f9788d7
Make progress toward fixing it
forest-benchling Jan 28, 2021
55e16f3
feat: Change optional Open API query parameters to allow `None (#40)
forest-benchling Jan 28, 2021
2ad1051
Fix tests
forest-benchling Jan 28, 2021
8e88fa4
Refactor
forest-benchling Jan 28, 2021
915d7c3
Check type
forest-benchling Jan 28, 2021
9c00256
Revert changes to Unset
forest-benchling Jan 28, 2021
64c31ce
Regenerate tests
forest-benchling Jan 28, 2021
eece180
fix: Handle Unset Enums when deserializing (#306)
bowenwr Jan 22, 2021
981fade
fix: Lower version requirements for python-dateutil in generated clie…
bowenwr Jan 14, 2021
6b665b7
Change model from_dict from staticmethod to classmethod
forest-benchling Jan 11, 2021
f4becc3
fix: Handle Unset Enums when deserializing (#306)
bowenwr Jan 22, 2021
248d566
Cherry-pick a755ed9dc77b7d7e394057159831fbfa327be113 (#54)
forest-benchling Apr 6, 2021
0e1afa8
fix: Generate parameters to generated client without adding None BNCH…
GitOnUp Jul 8, 2021
e22c235
feat: Add description to Property definitions BNCH-29178
GitOnUp Sep 23, 2021
6c40881
feat: Implement discriminators knowledge in code generation BNCH-3044…
GitOnUp Sep 25, 2021
800bf60
fix: null in openapi enums breaks client generation BNCH-32257 (#95)
GitOnUp Oct 14, 2021
cef60fe
attrs dependencies (#105)
straz Feb 11, 2022
57f732b
fix: Support discriminators that map multiple keys to the same schema…
rweinberger Feb 17, 2022
e01b09e
bumped importlib_metadata version to >=4.4 to fix a conflict with Sph…
Apr 4, 2022
65510b5
trivial: fix typo "ommitted" -> "omitted"
straz Apr 5, 2022
d5085e4
Remove unintended updates (#114)
Apr 5, 2022
53ba39c
fix: Upgraded Jinja2 version to 3.x.x CEPLAT-477 (#113)
Apr 5, 2022
c197208
chore: Loosen httpx dependency BNCH-38599 (#115)
daniel-deutsch-benchling Apr 8, 2022
a73037d
chore: Bump up httpx in template / generated pyproject.yaml BNCH-3859…
daniel-deutsch-benchling Apr 8, 2022
5fe002c
chore: Bump up httpx in template / generated pyproject.yaml BNCH-3859…
daniel-deutsch-benchling Apr 11, 2022
97f3908
feat: Added support for text/yaml in OpenAPI to be used in benchling-…
Apr 22, 2022
50ee795
fix: Fixed parsing logic for yaml files to use PyYaml instead of ruam…
Apr 28, 2022
c286ac9
chore: Ran gen-setuppy to update openapi setup.py BNCH-42828 (#127)
May 19, 2022
6606024
chore: Upgrade project dependencies for generated client BNCH-43401 (…
bowenwr Sep 7, 2022
8cfef65
chore: Update setup.py with new version info for publishing BNCH-4340…
bowenwr Sep 8, 2022
4fdbe26
chore: Fix sed expression and restore setup.py package name BNCH-4340…
bowenwr Sep 8, 2022
351b9fe
chore: Revert Python version changes to attempt to fix packaging issu…
bowenwr Sep 9, 2022
46e4d85
fix: Allow __version__ to be ignored for package mismatch BNCH-43401 …
bowenwr Sep 13, 2022
cebe643
Feat/detect discriminator bnch 49688 (#143)
straz Oct 6, 2022
469f25c
bump version (#155)
straz Oct 10, 2022
c380c1e
dedupe union typestrings (#157)
straz Oct 11, 2022
8d504f6
feat: Rev attrs package CUST-3710
GitOnUp Oct 18, 2022
fadd74b
Bump Version to 1.0.6
GitOnUp Oct 25, 2022
884ea5f
chore(deps-dev): bump mypy from 0.982 to 1.4.1
dependabot[bot] Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Unreleased
### Additions
- New `--meta` command line option for specifying what type of metadata should be generated:
- `poetry` is the default value, same behavior you're used to in previous versions
- `setup` will generate a pyproject.toml with no Poetry information, and instead create a `setup.py` with the
project info.
- `none` will not create a project folder at all, only the inner package folder (which won't be inner anymore)
<<<<<<< HEAD
- Lowered the minimum version of `python-dateutil` for improved dependency compatibility with other projects
=======
- Attempt to detect and alert users if they are using an unsupported version of OpenAPI (#281).
- Fixes `Enum` deserialization when the value is `UNSET`.

### Changes
>>>>>>> aa6972c... fix: Handle Unset Enums when deserializing (#306)


## 0.7.3 - 2020-12-21
### Fixes
- Spacing and extra returns for Union types of `additionalProperties` (#266 & #268). Thanks @joshzana & @packyg!
- Title of inline schemas will no longer be missing characters (#271 & #274). Thanks @kalzoo!
- Handling of nulls (Nones) when parsing or constructing dates (#267). Thanks @fyhertz!


## 0.7.2 - 2020-12-08
### Fixes
- A bug in handling optional properties that are themselves models (introduced in 0.7.1) (#262). Thanks @packyg!
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,17 @@ Example:
package_version_override: 1.2.3
```

## How to publish changes
Quip doc that highlights how to pull the dependency to Aurelia and publish using a buildkite pipeline can be found [here](https://benchling.quip.com/PgytA283Rlyo/2022-02-16-Guide-for-Publishing-a-Package)

After changes are made to this package, to publish a new version of this package:
* Bump the version on pyproject.toml
* Install `gnu-sed` (assuming that you're running on a mac) by running `brew install gnu-sed`
* macOS uses BSD sed, which is similar to Linux's GNU sed but cannot explicitly edit files in place i.e. cannot utilize `-i` tag
* Set GNU sed PATH by running `brew info gnu-sed` to check for PATH
* Run `poetry run task gen-setuppy` which updates setup.py
* Kick off a buildkite pipeline build as highlighted in the quip doc (would need to designate the branch of which to check for publish)


[changelog.md]: CHANGELOG.md
[poetry]: https://python-poetry.org/
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
Client = httpx.Client

import datetime
from typing import Dict, List, Union
from typing import Dict, List, Optional, Union

from dateutil.parser import isoparse

from ...models.an_enum import AnEnum
from ...models.http_validation_error import HTTPValidationError
from ...models.model_with_union_property import ModelWithUnionProperty
from ...types import UNSET, Unset


Expand Down Expand Up @@ -40,76 +41,119 @@ def _build_response(*, response: httpx.Response) -> Response[Union[None, HTTPVal
def httpx_request(
*,
client: Client,
string_prop: Union[Unset, str] = "the default string",
datetime_prop: Union[Unset, datetime.datetime] = isoparse("1010-10-10T00:00:00"),
date_prop: Union[Unset, datetime.date] = isoparse("1010-10-10").date(),
float_prop: Union[Unset, float] = 3.14,
int_prop: Union[Unset, int] = 7,
boolean_prop: Union[Unset, bool] = False,
list_prop: Union[Unset, List[AnEnum]] = UNSET,
union_prop: Union[Unset, float, str] = "not a float",
union_prop_with_ref: Union[Unset, float, AnEnum] = 0.6,
enum_prop: Union[Unset, AnEnum] = UNSET,
string_prop: Union[Unset, None, str] = "the default string",
not_required_not_nullable_datetime_prop: Union[Unset, None, datetime.datetime] = isoparse("1010-10-10T00:00:00"),
not_required_nullable_datetime_prop: Union[Unset, None, datetime.datetime] = isoparse("1010-10-10T00:00:00"),
required_not_nullable_datetime_prop: datetime.datetime = isoparse("1010-10-10T00:00:00"),
required_nullable_datetime_prop: Optional[datetime.datetime] = isoparse("1010-10-10T00:00:00"),
date_prop: Union[Unset, None, datetime.date] = isoparse("1010-10-10").date(),
float_prop: Union[Unset, None, float] = 3.14,
int_prop: Union[Unset, None, int] = 7,
boolean_prop: Union[Unset, None, bool] = False,
list_prop: Union[Unset, None, List[AnEnum]] = UNSET,
union_prop: Union[Unset, None, float, str] = "not a float",
union_prop_with_ref: Union[Unset, None, float, AnEnum] = 0.6,
enum_prop: Union[Unset, None, AnEnum] = UNSET,
model_prop: Union[Unset, None, ModelWithUnionProperty] = UNSET,
) -> Response[Union[None, HTTPValidationError]]:

json_datetime_prop: Union[Unset, str] = UNSET
if not isinstance(datetime_prop, Unset):
json_datetime_prop = datetime_prop.isoformat()
json_not_required_not_nullable_datetime_prop: Union[Unset, None, str] = UNSET
if not isinstance(not_required_not_nullable_datetime_prop, Unset):
json_not_required_not_nullable_datetime_prop = (
not_required_not_nullable_datetime_prop.isoformat() if not_required_not_nullable_datetime_prop else None
)

json_date_prop: Union[Unset, str] = UNSET
json_not_required_nullable_datetime_prop: Union[Unset, None, str] = UNSET
if not isinstance(not_required_nullable_datetime_prop, Unset):
json_not_required_nullable_datetime_prop = (
not_required_nullable_datetime_prop.isoformat() if not_required_nullable_datetime_prop else None
)

json_required_not_nullable_datetime_prop = required_not_nullable_datetime_prop.isoformat()

json_required_nullable_datetime_prop = (
required_nullable_datetime_prop.isoformat() if required_nullable_datetime_prop else None
)

json_date_prop: Union[Unset, None, str] = UNSET
if not isinstance(date_prop, Unset):
json_date_prop = date_prop.isoformat()
json_date_prop = date_prop.isoformat() if date_prop else None

json_list_prop: Union[Unset, List[Any]] = UNSET
json_list_prop: Union[Unset, None, List[Any]] = UNSET
if not isinstance(list_prop, Unset):
json_list_prop = []
for list_prop_item_data in list_prop:
list_prop_item = list_prop_item_data.value
if list_prop is None:
json_list_prop = None
else:
json_list_prop = []
for list_prop_item_data in list_prop:
list_prop_item = list_prop_item_data.value

json_list_prop.append(list_prop_item)
json_list_prop.append(list_prop_item)

json_union_prop: Union[Unset, float, str]
json_union_prop: Union[Unset, None, float, str]
if isinstance(union_prop, Unset):
json_union_prop = UNSET
elif union_prop is None:
json_union_prop = None
else:
json_union_prop = union_prop

json_union_prop_with_ref: Union[Unset, float, AnEnum]
json_union_prop_with_ref: Union[Unset, None, float, int]
if isinstance(union_prop_with_ref, Unset):
json_union_prop_with_ref = UNSET
elif union_prop_with_ref is None:
json_union_prop_with_ref = None
elif isinstance(union_prop_with_ref, AnEnum):
json_union_prop_with_ref = UNSET
if not isinstance(union_prop_with_ref, Unset):
json_union_prop_with_ref = union_prop_with_ref
json_union_prop_with_ref = union_prop_with_ref.value

else:
json_union_prop_with_ref = union_prop_with_ref

json_enum_prop: Union[Unset, AnEnum] = UNSET
json_enum_prop: Union[Unset, None, int] = UNSET
if not isinstance(enum_prop, Unset):
json_enum_prop = enum_prop
json_enum_prop = enum_prop.value if enum_prop else None

json_model_prop: Union[Unset, None, Dict[str, Any]] = UNSET
if not isinstance(model_prop, Unset):
json_model_prop = model_prop.to_dict() if model_prop else None

params: Dict[str, Any] = {}
if string_prop is not UNSET:
params: Dict[str, Any] = {
"required_not_nullable_datetime_prop": json_required_not_nullable_datetime_prop,
}
if not isinstance(string_prop, Unset) and string_prop is not None:
params["string_prop"] = string_prop
if datetime_prop is not UNSET:
params["datetime_prop"] = json_datetime_prop
if date_prop is not UNSET:
if (
not isinstance(json_not_required_not_nullable_datetime_prop, Unset)
and json_not_required_not_nullable_datetime_prop is not None
):
params["not_required_not_nullable_datetime_prop"] = json_not_required_not_nullable_datetime_prop
if (
not isinstance(json_not_required_nullable_datetime_prop, Unset)
and json_not_required_nullable_datetime_prop is not None
):
params["not_required_nullable_datetime_prop"] = json_not_required_nullable_datetime_prop
if json_required_nullable_datetime_prop is not None:
params["required_nullable_datetime_prop"] = json_required_nullable_datetime_prop
if not isinstance(json_date_prop, Unset) and json_date_prop is not None:
params["date_prop"] = json_date_prop
if float_prop is not UNSET:
if not isinstance(float_prop, Unset) and float_prop is not None:
params["float_prop"] = float_prop
if int_prop is not UNSET:
if not isinstance(int_prop, Unset) and int_prop is not None:
params["int_prop"] = int_prop
if boolean_prop is not UNSET:
if not isinstance(boolean_prop, Unset) and boolean_prop is not None:
params["boolean_prop"] = boolean_prop
if list_prop is not UNSET:
if not isinstance(json_list_prop, Unset) and json_list_prop is not None:
params["list_prop"] = json_list_prop
if union_prop is not UNSET:
if not isinstance(json_union_prop, Unset) and json_union_prop is not None:
params["union_prop"] = json_union_prop
if union_prop_with_ref is not UNSET:
if not isinstance(json_union_prop_with_ref, Unset) and json_union_prop_with_ref is not None:
params["union_prop_with_ref"] = json_union_prop_with_ref
if enum_prop is not UNSET:
if not isinstance(json_enum_prop, Unset) and json_enum_prop is not None:
params["enum_prop"] = json_enum_prop
if not isinstance(json_model_prop, Unset) and json_model_prop is not None:
params.update(json_model_prop)

response = client.request(
"post",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,18 @@ def _build_response(*, response: httpx.Response) -> Response[Union[None, HTTPVal
def httpx_request(
*,
client: Client,
query_param: Union[Unset, List[str]] = UNSET,
query_param: Union[Unset, None, List[str]] = UNSET,
) -> Response[Union[None, HTTPValidationError]]:

json_query_param: Union[Unset, List[Any]] = UNSET
json_query_param: Union[Unset, None, List[Any]] = UNSET
if not isinstance(query_param, Unset):
json_query_param = query_param
if query_param is None:
json_query_param = None
else:
json_query_param = query_param

params: Dict[str, Any] = {}
if query_param is not UNSET:
if not isinstance(json_query_param, Unset) and json_query_param is not None:
params["query_param"] = json_query_param

response = client.request(
Expand Down
Loading