The latest published documentation for this project can be found here.
Publish the documentation somewhere (ReadTheDocs?) and insert a link in the sentence above.
- The project top-level directory is also the source root.
- We use PyTest for tests.
- PyTest can be integrated with SetupTools (see https://docs.pytest.org/en/latest/goodpractices.html). We don’t do this.
- Common commands for builds, distributing, packaging, documentation etcetera are in
Makefile
anddocs/Makefile
. - RST-files and -docstrings are indented with 4 spaces.
- Globals must be immutable.
Docstrings are formatted like this:
"""This is a one-line docstring.""" """One line description, terminated with a period. More info, with a trailing empty line. """
# Clone the repository:
git clone git@github.com:Amsterdam/authz_admin.git
cd authz_admin
# Create and activate a virtual environment, for example with:
python3.6 -m venv --copies --prompt authz_admin .venv
source ./.venv/bin/activate
pip install -e .[docs,test,dev]
# Start a database server (required for all sub-services):
docker-compose up -d database
# To test the service:
source env.sh && make test
# To start the service:
source env.sh && make run
# To start a documentation server:
make -C docs server
After starting the server, the API can be accessed through http://localhost:8000/authz_admin/\. The Swagger UI front-end is available at http://localhost:8000/authz_admin/swagger-ui/index.html\.
The service can be started in at least 2 ways:
Directly, like this:
PYTHONPATH=${PROJECT_HOME:-.}/src python -m authz_admin.main
Through setuptools console script. This is functionally identical to the previous method, and only provided as a shortcut:
authz_admin
We use alembic <http://alembic.zzzcomputing.com/en/latest/index.html> for database schema management. The configuration can be found in the alembic
subdirectory.
write about the semantics of scopes in our implementation.