Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.16 KB

development.md

File metadata and controls

73 lines (48 loc) · 1.16 KB

Development

Linting

pip install black==23.7.0 pre-commit install black --check . black .

Import users from active directory

./manage.py import_users

Import projects, datasets or partners from external system

Single file mode:

./manage.py import_projects -f path/to/json_file.json

Batch mode:

./manage.py import_projects -d path/to/dir/with/json/files/

Available commands: import_projects, import_datasets, import_partners.

In case of problems, add --verbose flag to the command, and take a look inside ./log/daisy.log.

Install js and css dependencies

cd web/static/vendor/
npm ci

Compile daisy.scss and React

cd web/static/vendor
npm run-script build

Run the built-in web server (for development)

./manage.py runserver

Run the tests

The following command will install the test dependencies and execute the tests:

python setup.py pytest

run test for a specific file:

python setup.py pytest --addopts web/tests/test_dataset.py

If tests dependencies are already installed, one can also run the tests just by executing:

pytest