Skip to content

Commit

Permalink
DEV : update to match new api specification
Browse files Browse the repository at this point in the history
  • Loading branch information
juliecoust committed Mar 28, 2024
1 parent 2a76a61 commit 6f8d3b4
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.openapi-generator-ignore
.travis.yml
README.md
docs/AcquisitionModel.md
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions docs/Constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/UserModelWithRights.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion ecotaxa_py_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 3 additions & 5 deletions ecotaxa_py_client/models/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion ecotaxa_py_client/models/user_model_with_rights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ecotaxa_py_client"
version = "1.0.23"
version = "2.0.0"
description = "EcoTaxa"
authors = ["OpenAPI Generator Community <[email protected]>"]
license = "NoLicense"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6f8d3b4

Please sign in to comment.