Best digital library ever. Uses black and isort with seed-isort-config for code-formatting, and flake8 for linting. Pre-commit hooks are installed for every tool.
The project follows conventional commits style for commit messages. This naming isn't mandatory for regular commits but very appreciated among team members. However, for Pull Request's titles this style is very-very recommended.
Simply tests
python meadow/manage.py test -v=3 meadow
With coverage: firsly, the following command, then coverage html, and then open the file htmlcov/index.html in your browser
coverage run meadow/manage.py test -v=3 meadow && coverage html
All commands should be runned inside project's directory
- Create virtual environment
python3 -m venv .venv - Activate venv
. .venv/bin/activate - Install all libraries
pip install -r requirements.txt - Install pre-commit hooks
pre-commit install - Everything is installed! Run
python meadow/manage.py migrateto apply migrations andpython meadow/manage.py runserverto run server locally. (the database should listen on port ('localhost', 5432), you can run it using run_postgres.sh script.
- Add it to requirements.txt with
pip freeze > requirements.txt - Add it to stage in git
git add requirements.txt - Commit
git commit -m "feat: add *library_name* to requirements.txt" - Push
git push --set-upstream origin $(git_current_branch) - Open pull-request. You can use a web GUI of github, or with hub with command
hub pull-request -op -m "New cool PR!"
- How to update locally project?
git pull --rebase --autostash