2020-11-06 10:44:25 +00:00
Contribute
==========
2020-11-05 16:51:59 +00:00
Contributions are welcome!
2020-11-06 10:44:25 +00:00
Unit tests
----------
2020-11-05 16:51:59 +00:00
To run the tests, you just need to run `tox` . Everything must be green before patches get merged.
2022-11-14 17:32:31 +00:00
.. warning ::
On Debian or Ubuntu systems, the OpenLDAP `slapd` binary usage might be restricted by apparmor, and thus makes the test fail. This can be mitigated by removing apparmor restrictions on `slapd` .
.. code-block :: console
sudo apt install --yes apparmor-utils
sudo aa-complain /usr/sbin/slapd
2020-11-06 10:44:25 +00:00
Style
-----
2020-11-05 16:51:59 +00:00
We use `black` to format our code. Please apply `black` on your patches before submiting them.
2020-11-06 10:44:25 +00:00
Development environment
-----------------------
.. code-block :: console
2022-05-06 15:00:32 +00:00
python3 setup.py compile_catalog
2020-11-10 16:52:52 +00:00
cd demo
2022-03-18 16:44:58 +00:00
./run.sh # or `docker-compose up` to run it with docker
2020-11-12 08:30:39 +00:00
Then you have access to:
2022-03-18 16:44:58 +00:00
- A canaille server at http://localhost:5000
- A dummy client at http://localhost:5001
- Another dummy client at http://localhost:5002
2020-11-12 08:30:39 +00:00
The canaille server has some default users:
- A regular user which login and password are **user** ;
- A moderator user which login and password are **moderator** ;
- An admin user which admin and password are **admin** .
2022-05-06 15:00:32 +00:00
Documentation
-------------
The documentation is generated when the tests run:
.. code-block :: console
tox
The generated documentation is in `./build/sphinx/html/` directory.