From 6f8d3b4b0dd19293dad2e210367d561893a76726 Mon Sep 17 00:00:00 2001 From: juliecoust Date: Thu, 28 Mar 2024 10:53:37 +0100 Subject: [PATCH] DEV : update to match new api specification --- .openapi-generator/FILES | 1 - README.md | 4 ++-- docs/Constants.md | 3 +-- docs/UserModelWithRights.md | 1 + ecotaxa_py_client/__init__.py | 2 +- ecotaxa_py_client/api_client.py | 2 +- ecotaxa_py_client/configuration.py | 2 +- ecotaxa_py_client/models/constants.py | 8 +++----- ecotaxa_py_client/models/user_model_with_rights.py | 4 +++- pyproject.toml | 2 +- setup.py | 2 +- 11 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 24703a7..baae140 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,7 +1,6 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml -.openapi-generator-ignore .travis.yml README.md docs/AcquisitionModel.md diff --git a/README.md b/README.md index 6afc371..132c816 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.0.36 -- Package version: 1.0.23 +- Package version: 2.0.0 - Generator version: 7.4.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -49,8 +49,8 @@ Execute `pytest` to run the tests. Please follow the [installation procedure](#installation--usage) and then run the following: - ```python + import ecotaxa_py_client from ecotaxa_py_client.models.login_req import LoginReq from ecotaxa_py_client.rest import ApiException diff --git a/docs/Constants.md b/docs/Constants.md index 85e3704..72e70ce 100644 --- a/docs/Constants.md +++ b/docs/Constants.md @@ -10,13 +10,12 @@ Name | Type | Description | Notes **app_manager** | **List[str]** | The application manager identity (name, mail), from config file. | [optional] [default to ["",""]] **countries** | **List[str]** | List of known countries names. | [optional] [default to []] **user_status** | **Dict[str, int]** | Application User status values | [optional] -**password_regexp** | **str** | 8 char. minimum, at least one uppercase, one lowercase, one number and one special char in '#?!@%^&*-' | [optional] [default to '^(?:(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#?%^&*-+])).{8,20}$'] +**password_regexp** | **str** | 8 char. minimum, at least one uppercase, one lowercase, one number and one special char in '#?!@%^&*-+' | [optional] [default to '^(?:(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#?%^&*-+])).{8,20}$'] **email_verification** | **bool** | Require verification before activation. | [optional] [default to True] **account_validation** | **bool** | Require validation by a Users Administrator before activation. | [optional] [default to False] **short_token_age** | **int** | Email confirmation, password reset token lifespan. | [optional] [default to 1] **profile_token_age** | **int** | Profile modification token lifespan. | [optional] [default to 24] **recaptchaid** | **bool** | use Google ReCaptcha | [optional] [default to False] -**add_ticket** | **str** | string separator, permits to add ticket number when asking more information before user validation | [optional] [default to ''] ## Example diff --git a/docs/UserModelWithRights.md b/docs/UserModelWithRights.md index 11ed929..18d9c4e 100644 --- a/docs/UserModelWithRights.md +++ b/docs/UserModelWithRights.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **status_date** | **datetime** | Timestamp status modification date | [optional] **status_admin_comment** | **str** | Optional Users admininistrator comment about the account status. | [optional] **country** | **str** | The country name, as text (but chosen in a consistent list). | [optional] +**orcid** | **str** | The orcid id https://support.orcid.org. | [optional] **usercreationdate** | **datetime** | The date of creation of the user, as text formatted according to the ISO 8601 standard. | [optional] **usercreationreason** | **str** | Paragraph describing the usage of EcoTaxa made by the user. | [optional] **mail_status** | **bool** | True for verified, False for waiting for verification, None for no action. | [optional] diff --git a/ecotaxa_py_client/__init__.py b/ecotaxa_py_client/__init__.py index 66372bd..83d5d52 100644 --- a/ecotaxa_py_client/__init__.py +++ b/ecotaxa_py_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.0.23" +__version__ = "2.0.0" # import apis into sdk package from ecotaxa_py_client.api.files_api import FilesApi diff --git a/ecotaxa_py_client/api_client.py b/ecotaxa_py_client/api_client.py index f01144f..b1408a1 100644 --- a/ecotaxa_py_client/api_client.py +++ b/ecotaxa_py_client/api_client.py @@ -87,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.23/python' + self.user_agent = 'OpenAPI-Generator/2.0.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/ecotaxa_py_client/configuration.py b/ecotaxa_py_client/configuration.py index 9cc9894..564fa13 100644 --- a/ecotaxa_py_client/configuration.py +++ b/ecotaxa_py_client/configuration.py @@ -378,7 +378,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.0.36\n"\ - "SDK Package Version: 1.0.23".\ + "SDK Package Version: 2.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/ecotaxa_py_client/models/constants.py b/ecotaxa_py_client/models/constants.py index 7ca764e..dafe9d3 100644 --- a/ecotaxa_py_client/models/constants.py +++ b/ecotaxa_py_client/models/constants.py @@ -31,14 +31,13 @@ class Constants(BaseModel): app_manager: Optional[Annotated[List[StrictStr], Field(min_length=2, max_length=2)]] = Field(default=None, description="The application manager identity (name, mail), from config file.") countries: Optional[Annotated[List[StrictStr], Field(min_length=1)]] = Field(default=None, description="List of known countries names.") user_status: Optional[Dict[str, StrictInt]] = Field(default=None, description="Application User status values") - password_regexp: Optional[StrictStr] = Field(default='^(?:(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#?%^&*-+])).{8,20}$', description="8 char. minimum, at least one uppercase, one lowercase, one number and one special char in '#?!@%^&*-' ") + password_regexp: Optional[StrictStr] = Field(default='^(?:(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#?%^&*-+])).{8,20}$', description="8 char. minimum, at least one uppercase, one lowercase, one number and one special char in '#?!@%^&*-+' ") email_verification: Optional[StrictBool] = Field(default=True, description="Require verification before activation.") account_validation: Optional[StrictBool] = Field(default=False, description="Require validation by a Users Administrator before activation.") short_token_age: Optional[StrictInt] = Field(default=1, description="Email confirmation, password reset token lifespan.") profile_token_age: Optional[StrictInt] = Field(default=24, description="Profile modification token lifespan.") recaptchaid: Optional[StrictBool] = Field(default=False, description="use Google ReCaptcha") - add_ticket: Optional[StrictStr] = Field(default='', description="string separator, permits to add ticket number when asking more information before user validation") - __properties: ClassVar[List[str]] = ["license_texts", "app_manager", "countries", "user_status", "password_regexp", "email_verification", "account_validation", "short_token_age", "profile_token_age", "recaptchaid", "add_ticket"] + __properties: ClassVar[List[str]] = ["license_texts", "app_manager", "countries", "user_status", "password_regexp", "email_verification", "account_validation", "short_token_age", "profile_token_age", "recaptchaid"] model_config = ConfigDict( populate_by_name=True, @@ -100,8 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "account_validation": obj.get("account_validation") if obj.get("account_validation") is not None else False, "short_token_age": obj.get("short_token_age") if obj.get("short_token_age") is not None else 1, "profile_token_age": obj.get("profile_token_age") if obj.get("profile_token_age") is not None else 24, - "recaptchaid": obj.get("recaptchaid") if obj.get("recaptchaid") is not None else False, - "add_ticket": obj.get("add_ticket") if obj.get("add_ticket") is not None else '' + "recaptchaid": obj.get("recaptchaid") if obj.get("recaptchaid") is not None else False }) return _obj diff --git a/ecotaxa_py_client/models/user_model_with_rights.py b/ecotaxa_py_client/models/user_model_with_rights.py index 4c46db4..cf3836d 100644 --- a/ecotaxa_py_client/models/user_model_with_rights.py +++ b/ecotaxa_py_client/models/user_model_with_rights.py @@ -37,13 +37,14 @@ class UserModelWithRights(BaseModel): status_date: Optional[datetime] = Field(default=None, description="Timestamp status modification date") status_admin_comment: Optional[StrictStr] = Field(default=None, description="Optional Users admininistrator comment about the account status.") country: Optional[StrictStr] = Field(default=None, description="The country name, as text (but chosen in a consistent list).") + orcid: Optional[StrictStr] = Field(default=None, description="The orcid id https://support.orcid.org.") usercreationdate: Optional[datetime] = Field(default=None, description="The date of creation of the user, as text formatted according to the ISO 8601 standard.") usercreationreason: Optional[StrictStr] = Field(default=None, description="Paragraph describing the usage of EcoTaxa made by the user.") mail_status: Optional[StrictBool] = Field(default=None, description="True for verified, False for waiting for verification, None for no action.") mail_status_date: Optional[datetime] = Field(default=None, description="Timestamp mail status modification date") can_do: Optional[List[StrictInt]] = Field(default=None, description="List of User's allowed actions : 1 create a project, 2 administrate the app, 3 administrate users, 4 create taxon.") last_used_projects: Optional[List[ProjectSummaryModel]] = Field(default=None, description="List of User's last used projects.") - __properties: ClassVar[List[str]] = ["id", "email", "password", "name", "organisation", "status", "status_date", "status_admin_comment", "country", "usercreationdate", "usercreationreason", "mail_status", "mail_status_date", "can_do", "last_used_projects"] + __properties: ClassVar[List[str]] = ["id", "email", "password", "name", "organisation", "status", "status_date", "status_admin_comment", "country", "orcid", "usercreationdate", "usercreationreason", "mail_status", "mail_status_date", "can_do", "last_used_projects"] model_config = ConfigDict( populate_by_name=True, @@ -112,6 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status_date": obj.get("status_date"), "status_admin_comment": obj.get("status_admin_comment"), "country": obj.get("country"), + "orcid": obj.get("orcid"), "usercreationdate": obj.get("usercreationdate"), "usercreationreason": obj.get("usercreationreason"), "mail_status": obj.get("mail_status"), diff --git a/pyproject.toml b/pyproject.toml index 02e0bd8..d97cf9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ecotaxa_py_client" -version = "1.0.23" +version = "2.0.0" description = "EcoTaxa" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 0b4e038..bd6f431 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "ecotaxa_py_client" -VERSION = "1.0.23" +VERSION = "2.0.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0",