Clone the repo to your local machine:
git clone git@github.com:deloarts/glados-backend.git❗️ Never develop new features and fixes in the main branch!
The main branch is protected: it's not allowed to make changes directly to it. Create a new branch in order work on issues. The new branch should follow the naming convention from below.
- Use grouping tokens at the beginning of your branch names, such as:
- feature: A new feature that will be added to the project
- fix: For bugfixes
- tests: Adding or updating tests
- docs: For updating the docs
- wip: Work in progress, won't be finished soon
- junk: Just for experimenting
- Use slashes
/as delimiter in branch names (feature/docket-export) - Avoid long descriptive names, rather refer to an issue
- Do not use bare numbers as leading parts (
fix/108is bad,fix/issue108is good)
Use the issue templates for creating an issue. Please don't open a new issue if you haven't met the requirements and add as much information as possible. Further:
- Format your code in an issue correctly with three backticks, see the markdown guide.
- Add the full error trace.
- Do not add screenshots for code or traces.
Dependency management is done with Poetry.
If you prefer the environment inside the projects root, use:
poetry config virtualenvs.in-project true
⚠️ Make sure not to commit the virtual environment to GitHub. See .gitignore to find out which folders are ignored.
Install all dependencies (assuming you are inside the projects root folder):
poetry installCheck your active environment with:
poetry env list
poetry env infoUpdate packages with:
poetry updateTests are done with pytest. For testing with poetry run:
poetry run pytestDon't forget to install the pre-commit hooks:
pre-commit installThe API docs are available only when the app runs in debug mode (see config.yml for details).
The docs can be viewed at localhost:port/docs, where the port is the port you've defined in the config file.
- Update dependencies:
poetry update - Update the version in
- Run all tests:
poetry run pytest - Check pylint output:
poetry run pylint app/ - Update the lockfile:
poetry lock - Update the requirements.txt:
poetry export -f requirements.txt -o requirements.txt
Using VS Code Comment Anchors to keep track of to-dos.