Get the code!
git clone [email protected]:cognitedata/cdffs.git
cd cdffs
We use poetry for dependency- and virtual environment management.
Install dependencies and initialize a shell within the virtual environment, with these commands:
poetry install --without test
poetry shell
Install pre-commit hooks to run static code checks on every commit:
pre-commit install
Choose your own CDF Project to run integration tests.
-
Install test dependencies with the below command.
poetry install --only test
-
Create a dataset with name as
Integration Tests
and External Id asdataset:integration_tests
-
Set the below environment variables.
CLIENT_ID
CLIENT_SECRET
TENANT_ID
COGNITE_PROJECT
CDF_CLUSTER
Run unit tests with a following command from the root directory:
pytest tests/tests_spec.py
Run integration tests with a following command from the root directory:
pytest tests/tests_spec_integration.py
Generate code coverage reports with a following command from the root directory:
coverage run -m pytest tests/tests_spec.py
coverage report -m
Build html files of documentation locally by running
cd docs
make html
Open build/html/index.html
to look at the result.