Skip to content

Testing changes to Easydata

Amy Wooding edited this page Sep 3, 2022 · 8 revisions

It's a bit of a rat's nest right now...but tests exist.

Testing basic cookie cutter functionality

There are tests that we inherited from cookiecutter-datascience.

pytest in tests will run it

Currently fails one of the tests because our directory structure is different. This needs to get fixed.

Testing everything else

Build an easydata project

In ci this is scripted via .circleci/config.yml. Let's walk through the manual, local checks.

Run cookiecutter repo-location with the repo on the branch to be tested, input test-env as the project and repo name.

Create the environment

cd test-env
make create_environment
conda activate test-env
#touch environment.yml
make update_environment

Run tests

python src/tests/make_test_datasets.py
make test

Test documentation notebooks

cd docs
purest -v test_docs.py

Check other make commands

conda deactivate
make delete_environment

Issues that you may encounter

CircleCI

Using SSH Config Dir '/home/circleci/.ssh'
git version 2.17.1
Cloning git repository
Cloning into '.'...
Warning: Permanently added the ECDSA host key for IP address 'XXX to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

exit status 128
CircleCI received exit code 128`

Fix: there is an SSH key under project settings for each project. Reset it.