diff options
author | Paolo Melchiorre | 2022-12-04 17:28:45 +0100 |
---|---|---|
committer | GitHub | 2022-12-04 09:28:45 -0700 |
commit | 3028e83f528134bd6937b529668f56b9ab565bdf (patch) | |
tree | 9c4b5b1d2f3916a00c3691e276716ced9940f88a | |
parent | 50868971f7a1ad62940a53cba44e62c2d37a053d (diff) | |
download | takahe-3028e83f528134bd6937b529668f56b9ab565bdf.tar.gz takahe-3028e83f528134bd6937b529668f56b9ab565bdf.tar.bz2 takahe-3028e83f528134bd6937b529668f56b9ab565bdf.zip |
Direct installation contributing guide updates (#88)
-rw-r--r-- | docs/contributing.rst | 27 | ||||
-rw-r--r-- | requirements-dev.txt | 1 |
2 files changed, 19 insertions, 9 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst index 97e5c25..a2e4251 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -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. diff --git a/requirements-dev.txt b/requirements-dev.txt index 196f00d..c0dbdc3 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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 |