Commit Graph

11 Commits

Author SHA1 Message Date
Sebastián Ramírez
41a2f15d8f 🎨 Format fixes (#159)
* 📝 Update release notes

* 🎨 Update format and structure
2020-04-20 19:27:45 +02:00
Sebastián Ramírez
eed33d276d ♻️ Refactor backend, settings, DB sessions, types, configs, plugins (#158)
* ♻️ Refactor backend, update DB session handling

*  Add mypy config and plugins

*  Use Python-jose instead of PyJWT

as it has some extra functionalities and features

*  Add/update scripts for test, lint, format

* 🔧 Update lint and format configs

* 🎨 Update import format, comments, and types

* 🎨 Add types to config

*  Add types for all the code, and small fixes

* 🎨 Use global imports to simplify exploring with Jupyter

* ♻️ Import schemas and models, instead of each class

* 🚚 Rename db_session to db for simplicity

* 📌 Update dependencies installation for testing
2020-04-20 19:03:13 +02:00
Brendon Smith
21c4d11659 🎨 Bring Python code into compliance with Black and Flake8 (#121)
* Ignore Flake8 unused import error F401

https://flake8.readthedocs.io/en/latest/user/error-codes.html

The apparently unused imports may be needed for SQLAlchemy.

As the code comment says:

make sure all SQL Alchemy models are imported before initializing DB
otherwise, SQL Alchemy might fail to initialize properly relationships

See GitHub 28 and 29

* Ignore Flake8 unused variable error F841

https://flake8.readthedocs.io/en/latest/user/error-codes.html

The apparently unused variables may be needed for tests.

* Bring line length into compliance with Black

Should be 88 characters.

* Format alembic code with Black
2020-04-17 14:20:48 +02:00
Mocsár Kálmán
fb874fea35 Update CRUD utils for users handling password hashing (#106)
* Add some information how to run backand test for local backand development

* Bug fixes in backend app

* 🎨 Update format

*  Use random_email for test_update_user

Co-authored-by: Mocsar Kalman <mocsar.kalman@gravityrd.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-17 09:20:00 +02:00
Stephen Brown II
79631c7619 Use Pydantic BaseSettings for config settings (#87)
* Use Pydantic BaseSettings for config settings

* Update fastapi dep to >=0.47.0 and email_validator to email-validator

* Fix deprecation warning for Pydantic >=1.0

* Properly support old-format comma separated strings for BACKEND_CORS_ORIGINS

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-17 07:56:10 +02:00
Manu
ab46165387 Add base class to simplify CRUD (#23) 2020-01-19 22:40:50 +01:00
Sebastián Ramírez
92b757fc96 ♻️ Create Item from all fields in Pydantic model 2019-04-20 19:57:34 +04:00
Sebastián Ramírez
ecd634e497 Add Items (crud, models, endpoints), utils, refactor (#14)
* Update CRUD utils to use types better.
* Simplify Pydantic model names, from `UserInCreate` to `UserCreate`, etc.
* Upgrade packages.
* Add new generic "Items" models, crud utils, endpoints, and tests. To facilitate re-using them to create new functionality. As they are simple and generic (not like Users), it's easier to copy-paste and adapt them to each use case.
* Update endpoints/*path operations* to simplify code and use new utilities, prefix and tags in `include_router`.
* Update testing utils.
* Update linting rules, relax vulture to reduce false positives.
* Update migrations to include new Items.
* Update project README.md with tips about how to start with backend.
2019-04-19 09:45:23 +04:00
Sebastián Ramírez
cd112bd683 Refactor/upgrade backend and frontend parts (#2)
* ♻️ Refactor and simplify backend code

* ♻️ Refactor frontend state, integrate typesafe-vuex accessors into state files

* ♻️ Use new state accessors and standardize layout

* 🔒 Upgrade and fix npm security audit

* 🔧 Update local re-generation scripts

* 🔊 Log startup exceptions to detect errors early

* ✏️ Fix password reset token content

* 🔥 Remove unneeded Dockerfile directives

* 🔥 Remove unnecessary print

* 🔥 Remove unnecessary code, upgrade dependencies in backend

* ✏️ Fix typos in docstrings and comments

* 🏗️ Improve user Depends utilities to simplify and remove code

* 🔥 Remove deprecated SQLAlchemy parameter
2019-03-11 13:36:42 +04:00
Sebastián Ramírez
6fdba19639 Update all for Postgres and new techniques 2019-02-23 18:44:29 +04:00
Sebastián Ramírez
7f8bfc8faa 🎉 First commit, from couchbase generator, basic changes
not tested / updated yet
2019-02-09 19:42:36 +04:00