TRI-ML / dgp

ML Dataset Governance Policy for Autonomous Vehicle Datasets
https://tri-ml.github.io/dgp/
MIT License
93 stars 63 forks source link

fix: virtual environment to be able to run make test #110

Closed nehalmamgain closed 2 years ago

nehalmamgain commented 2 years ago

The virtual environment expects people can run make test without installing pytest. This PR fixes issue https://github.com/TRI-ML/dgp/issues/104

Before this fix

copying dgp/utils/torch_extension/stn.py -> build/lib/dgp/utils/torch_extension
running egg_info
creating dgp.egg-info
writing dgp.egg-info/PKG-INFO
writing dependency_links to dgp.egg-info/dependency_links.txt
writing entry points to dgp.egg-info/entry_points.txt
writing requirements to dgp.egg-info/requires.txt
writing top-level names to dgp.egg-info/top_level.txt
writing manifest file 'dgp.egg-info/SOURCES.txt'
reading manifest file 'dgp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.proto' found under directory '*'
writing manifest file 'dgp.egg-info/SOURCES.txt'
PYTHONPATH=/home/nehal/dgp: \
pytest -v /home/nehal/dgp/tests/
/bin/sh: 1: pytest: not found
make: *** [Makefile:72: test] Error 127

After this fix

================================================= 56 passed, 3 skipped, 4 warnings in 13.57s ==================================================

This change is Reviewable

nehalmamgain commented 2 years ago

Link for virtual environment doc https://github.com/TRI-ML/dgp/blob/master/docs/VIRTUAL_ENV.md

nehalmamgain commented 2 years ago

I got the following error in super linter (even though I didn't touch that comment); so fixing it

/github/workspace/docs/VIRTUAL_ENV.md
  22:208  ✓ error  Incorrect usage of the term: “repo”, use “repository” instead  terminology

✖ 1 problem (1 error, 0 warnings)
✓ 1 fixable problem.
nehalmamgain commented 2 years ago

Ever since this commit, I think we need to instruct users to pip install -r requirements.txt -r requirements-dev.txt.

Yup, I agree with you!

As for the comment issue, usually tools don't lint portions of files but the entire thing, so it looks like that might have been a latent issue since before linting was enabled?

Oh, that makes so much sense, thanks!

nehalmamgain commented 2 years ago

Thanks for the merge again!