Create an issue at GitHub.
https://github.com/fairy-select/chronovoyage/issues
The title should summarize the issue and the description should include the following information:
- Condition and operation ("given" and "when" in test structure)
- Expected behavior ("then" in test structure)
- Actual behavior
- You have a GitHub account.
- You have forked this repository.
- You have set
user.name
anduser.email
of your git config. - You have installed Python >= 3.8.
- You have installed Docker.
Clone your fork.
git clone https://github.com/{your account}/chronovoyage
cd chronovoyage
Setup pre-commit hooks.
chmod -vR a+x .githooks
git config --local core.hooksPath .githooks
We usually develop with Hatch. Install into your python via pip or something else (Installation Guide here).
pip install hatch
Install OS dependencies required for DB connectors.
- Ubuntu
sudo apt-get install libmariadb-dev # for MariaDB
Then, enter the environment. Required pip dependencies will be installed automatically.
hatch shell
The prompt shows the prefix if you are in the environment.
(chronovoyage) you@hostname:~/path/to/chronovoyage$
You can leave the environment by typing exit
.
Create your branch from origin/main
.
git fetch origin
git checkout -b {branch name} origin/main
Code and commit. We use Conventional Commits. You should prefix a message with the following:
feat:
- when you add any featuresfix:
- when you fix bugstest:
- when you code only testsrefactor:
- when you code without the existing specification in tests.docs:
- when you add/modify docs (not just in documentation but also in code)ci:
- when you add/modify the config of GitHub Actions.build:
- when you add/modify the config of building packages.
Then, push you code.
git push --set-upstream origin {branch name}
Create the testing database via Docker.
cd tests
docker compose up -d
Run tests. The testing environment will be created automatically.
hatch test
Formatting and checking types are executed automatically when you commit. If you want to lint your code manually, type the following:
- Format
hatch fmt
- Check types
hatch run types:check
Create a pull request at GitHub.
https://github.com/fairy-select/chronovoyage/pulls
The title should summarize the request and the description should include the following information:
- Impact on users using Chronovoyage
- Summary of the code changes
- Evidence of tests (such as operation of command, added testcases, behavior of built documentation, and so on)