Commit Graph

27 Commits

Author SHA1 Message Date
Ruslan Samoylov
c8bcc0ba0a Use Poetry for package management (#144)
* use poetry insted of Pipfile

* fix python black version

* set prepare.sh as executable

* revert postgres 11

* use multi-build stage in docker

* fix poetry path

* 🔥 Remove uneeded changes

* 🔧 Move and update Poetry file

* 🙈 Update gitignore

* 🐳 Update Dockerfiles to use Poetry

* 🐳 Update Dockerfiles with Poetry

* 🔧 Add SERVER_NAME required by Celery worker

* 🐳 Update Poetry install to avoid env conflicts

*  Add Pytest to Poetry dependencies

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-18 23:27:48 +02:00
Matthew Shu
67b384f308 🔥 Remove duplicate 'login' tag (#135)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-17 14:54:47 +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
Albert Iribarne
8a2252f654 ♻️ Simplify DB base class declaration (#117)
* Simplify DB base class declaration

* ♻️ Remove object inheritance

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-17 09:39:25 +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
Teomor Szczurek
970a182ec8 Add email validation (#40)
* modify tests

*  Add email-validator to Dockerfiles

* ♻️ Update random email generation

* ♻️ Re-apply email validation after rebase

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-06 11:36:29 +02:00
Cristobal Aguirre
dc712ac4ec 🐛 Fix typo in read_item GET view (#74) 2020-02-07 21:28:45 +01:00
Daniel Butler
fc403c9bc1 ✏️ Correct grammar (#70) 2020-02-07 21:15:10 +01:00
Manu
ab46165387 Add base class to simplify CRUD (#23) 2020-01-19 22:40:50 +01:00
Manu
248ea56c6e Add normal-user fixture for testing (#20) 2020-01-19 13:25:17 +01:00
Sebastián Ramírez
b4fa418e65 🔒 Receive token as body in reset password (#34) 2019-05-29 09:47:59 +04:00
dmontagu
546dc8bdcb 🔒 Update login.py to receive password as body (#33)
Change `new_password` from a query parameter to a body parameter for security.

(Why this is problematic is discussed in the top answer to https://stackoverflow.com/questions/2629222/are-querystring-parameters-secure-in-https-http-ssl)
2019-05-29 09:24:09 +04:00
Manu
1d30172e7a 🗃️ Fix SQLAlchemy class lookup (#29) 2019-05-22 15:29:24 +04:00
Manu
170231783a 🗃️ Fix SQLAlchemy operation error after database restarts (#32) 2019-05-22 15:18:59 +04:00
Manu
1aeb3208bf Use extra pytest arguments forwarded from shell (#17)
* removed postgres_password from alembic.ini, read it from env var instead

* ♻️ use f-strings for PostgreSQL URL

* passes given args
2019-05-03 23:44:18 +04:00
Sebastián Ramírez
47e0fe56e3 ⬆️ Upgrade Jupyter to use Lab, update util/env var for local development 2019-04-24 22:45:20 +04:00
Sebastián Ramírez
92b757fc96 ♻️ Create Item from all fields in Pydantic model 2019-04-20 19:57:34 +04:00
Manu
bece399368 ♻️ removed postgres_password from alembic.ini (#9)
♻️ removed postgres_password from alembic.ini (#9)
2019-04-20 19:56:50 +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
Manu
cd86803daa Upgrade to Python 3.7, including new compatible Celery (#10) 2019-04-16 21:36:38 +04:00
Matthew Clarkson
f947ba8749 🐛 fix read_user_by_id docstring (#4)
Fix incorrectly documented as "Get a specific user by username (email)". Changed to "Get a specific user by id".
2019-03-29 18:34:38 +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
f3ccfb4da2 🐛 Fix DB Alembic migrations generated password 2019-02-23 20:58:50 +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
a21978e374 🔧 Update config for PostgreSQL 2019-02-23 17:50:19 +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