Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 1.52 KB

CONTRIBUTING.md

File metadata and controls

77 lines (53 loc) · 1.52 KB

Development Instructions

Setup

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

Integration tests

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 as dataset:integration_tests

  • Set the below environment variables.

    • CLIENT_ID
    • CLIENT_SECRET
    • TENANT_ID
    • COGNITE_PROJECT
    • CDF_CLUSTER

Testing

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

Code Style

Use google style guide

Documentation

Build html files of documentation locally by running

cd docs
make html

Open build/html/index.html to look at the result.