Direct installation contributing guide updates (#88)

This commit is contained in:
Paolo Melchiorre 2022-12-04 17:28:45 +01:00 committed by GitHub
parent 50868971f7
commit 3028e83f52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 9 deletions

View file

@ -82,32 +82,41 @@ Then, ``cd`` into that directory and create and activate a virtual environment
Then install the development requirements::
pip install -r requirements-dev.txt
python3 -m pip install -r requirements-dev.txt
Enable the git commit hooks to do auto-formatting and linting
(if you don't do this, our CI system will reject your PRs until they match)::
pre-commit install
python3 -m pre_commit install
You will need to set up some development settings (you can edit `.env` later)::
Create a databse in your local PostgreSQL instance::
sudo -u postgres createdb takahe
You will need to set up some (i.e. `TAKAHE_DATABASE_SERVER`) development settings
(you can edit `.env` later)::
cp development.env .env
Now you can apply migrations::
python3 -m manage migrate
You can run the web interface to see it at http://localhost:8000::
./manage.py runserver
python3 -m manage runserver
You will need to run Stator in order to have background actions work::
./manage.py runstator
python3 -m manage runstator
Make yourself a superuser account in order to log in::
./manage.py createsuperuser
python3 -m manage createsuperuser
And you can run the tests with pytest::
pytest
python3 -m pytest
If you want to edit settings, you can edit the ``.env`` file.
@ -116,8 +125,8 @@ Coding Guidelines
-----------------
We have linters, typechecking and formatters enabled for the project; ensure these
are set up locally by running `pre-commit install`, otherwise your pull request
will fail its testing phase.
are set up locally by running `python3 -m pre_commit install`, otherwise your pull
request will fail its testing phase.
Comment anything weird, unusual or complicated; if in doubt, leave a comment.

View file

@ -6,4 +6,5 @@ mock~=4.0.3
pre-commit~=2.20.0
pytest-asyncio~=0.20.2
pytest-django~=4.5.2
pytest-dotenv~=0.5.0
pytest-httpx~=0.21