Skip to content

Latest commit

 

History

History
125 lines (87 loc) · 3.6 KB

File metadata and controls

125 lines (87 loc) · 3.6 KB

developing

1 repository

1.1 cloning

Clone the repo to your local machine:

git clone git@github.com:deloarts/glados-backend.git

1.2 main branch protection

❗️ 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.

1.3 branch naming convention

  1. 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
  2. Use slashes / as delimiter in branch names (feature/docket-export)
  3. Avoid long descriptive names, rather refer to an issue
  4. Do not use bare numbers as leading parts (fix/108 is bad, fix/issue108 is good)

1.4 issues

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.

2 poetry

Dependency management is done with Poetry.

2.1 setup

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.

2.2 install

Install all dependencies (assuming you are inside the projects root folder):

poetry install

Check your active environment with:

poetry env list
poetry env info

Update packages with:

poetry update

2.3 tests

Tests are done with pytest. For testing with poetry run:

poetry run pytest

3 pre-commit hooks

Don't forget to install the pre-commit hooks:

pre-commit install

4 api docs

The 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.

5 new revision checklist

  1. Update dependencies: poetry update
  2. Update the version in
  3. Run all tests: poetry run pytest
  4. Check pylint output: poetry run pylint app/
  5. Update the lockfile: poetry lock
  6. Update the requirements.txt: poetry export -f requirements.txt -o requirements.txt

6 to do

Using VS Code Comment Anchors to keep track of to-dos.