Skip to content

RAPyDo 1.1 (#39)

Choose a tag to compare

@mdantonio mdantonio released this 24 Apr 04:20
· 10 commits to master since this release
e5bdf5b
* Bump RAPyDo version to 1.1

* Deprecated multiple URI mapping (i.e. multiple @endpoints decorators)

* Split AdminUsers GET endpoint to prevent multiple URI mapping

* Replaced custom neo4j relationship conversion with the Neo4jRelationshipToSingle field

* Added dedicated schemas module in restapi.endpoints to collect all endpoints input and output schemas

* Dropped /swagger alias url on swagger specs endpoint

* Dropped baseuri and merged with path parameter on endpoint decorator

* Introduced auth.is_admin auth.is_staff and auth.is_coordinator and deprecated verify_admin verify_staff and verify_coordinator in definition

* Dropped deprecated get_user_if_logged

* Added CeleryExt.task decorator to replace CeleryExt.celery_app.task, send_errors_by_email and CeleryExt.app.app_context()

* Moved all notification functions in a dedicated module in smtp.notifications

* Upgraded isort from 5.5.2 to 5.7.0

* Upgraded mypy from v0.790 to v0.812

* Upgraded neomodel from 4.0.1 to 4.0.2

* Upgraded celery from 5.0.4 to 5.0.5

* Upgraded python-telegram-bot from 13.1 to 13.3

* Upgraded pytest-cov from 2.10.1 to 2.11.1

* Upgraded Sentry from 0.19.5 to 0.20.3

* Upgraded PyYAML from 5.3.1 to 5.4.1

* graph_transactions decorator renamed into database_transaction

* Added tests on database_transaction decorator

* catch_exceptions now automatically convert DatabaseDuplicatedEntry into 409 Conflict responses

* Basic implementation of alchemy transactions in generic database_transaction decorator

* Added missing required fields to database models

* Added DatabaseMissingRequiredProperty exceptions

* Extended get template utility to fallback to core templates if custom ones are missing

* Added core templates for notification emails

* Automatic html to plain text conversion in send email templating

* Moved get_html_template from utilities.templates to connectors.smtp.notifications

* Added initialize_testing_environment to initializer class

* Prevent mocked emails to be base64 encoded

* Set default role on admin users input schema

* Introduced Group Coordinator role

* Name parameter in @CeleryExt.task() is now optional. If missing will be automatically defaulted with by the decorated function name

* Upgraded Faker from 6.4.1 to 6.5.0

* Extended buildData test utility to correctly provide input values aware of expected min and max string length

* Extended buildData test utility to correctly provide array values

* Extended buildData test utility to correctly provide inputs for nested schemas

* Uploader class is now based on Pathlib

* Extended buildData test utility with the ability to extract x-minimum and x-maximum fields for date

* Implemented password validation checks to reject password containing email, name or surname

* Upgraded Telethon from 1.19.5 to 1.20

* Upgraded pytest-flask from 1.1.0 to 1.2.0

* Date email header is now RFC 2822 compliant

* Dropped app parameter from Initializer

* Added --durations=0 parameter to pytest to report the duration of exeuted tests

* Dropped explicit flag _multiple_ from input models and replaced by array types (anytype[])

* Added autocomplete parameter to output models

* Moved marshmallow additional metadata from kwargs to metadata dict

* Switched deprecation warning from normal logging to warnings module

* Replaced fields.List with AdvancedList, replaced fields.Nested with AdvancedNested

* Refactor of the restapi.models module to replace webargs.fields with a custom fields module including custom types (TOTP, Neo4jRelationshipToCount, etc), types replacements (List, Nested, DelimitedList) and base types extended with custom metadata all in one

* Added tests on endpoint depends_on and depends_on negated

* Added tests on endpoint input to swagger conversion and on Nested nullable fields

* Extended autocomplete properties

* Added tests on autocomplete endpoints

* Added tests on custom user input/output fields

* Added --test flag when creating the extra template used from tests. This flag will extend che customizer lass with additinal input/output fields to test these customizations. The flag is not included in all templates to be able to also tests the cases when input and output models are not extended

* Added tests on Neo4jRelationshipTo Many/Single/Count fields

* Uploaded files are now stored as read only (440 permissions mask)

* Bug fix to prevent upload on a non-initialized endpoint

* Upload responses in case of already exists file changed from 400 to 409

* Implemented generation of jwt secrets

* Basic test to start working on neomodel type hints

* Added thorough authorization tests

* Fixed sqlalchemy to 1.3.23 due to breaking changes introduced by version 1.4.0

* pre-commit autoupdate

* Skipping authorization tests on staff role if not enabled

* TOTP validity window can now be setup by AUTH_TOTP_VALIDITY_WINDOW env variable

* Bug fix to prevent gzip compression on streamed responses

* Added seconds_to_human utilities to time module download a folder

* Added email notification in case of credentals block due to failed logins

* Added send_async smtp method to send email asynchronously

* Async mail in TESTING mode is kept in sync by waiting the thread to ease the tests

* Added endpoint to unlock credentials after failed logins ban

* Implemented group/user endpoint allowed to coordinators

* Implemented admin/mail endpoint

* Added support for mail header and footer

* Added host variable to html email templates

* Added replyto variable to smtp templates

* Added default mail disclaimer in footer template to prevent short email annoying spam filters

* Cleaned urls in trace stacks send by email in case of celery notification errors

* Bug fix to prevent max email line length errors

* Bug fix to always enable celery if connector is enabled

* Bug fix to connect celery on redis db 1

* Added mocked celery tasks tests

* Added smtp retry (only enabled in async mode)

* Upgraded PyJWT from 1.7.1 to 2.0.1

* Temporary disabled pushpin due to incompatibilities with PyJWT 2+

* Temporary disabled websocket endpoint