Closed RemDelaporteMathurin closed 1 year ago
I noticed that if contributors forget to add the properties to the database, tests may pass (because the properties are not tested!).
One way to catch this automatically would be to use vulture.
Running
python -m vulture .\h_transport_materials\property_database\
Would provide a report of unused variables and attributes.
We would then integrate that in the CI workflow
jobs: pyflakes: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.x # Choose your desired Python version - name: Install vulture run: pip install vulture - name: Check for unused variables run: vulture h_transport_materials\property_database\ - name: Check vulture output run: | if [ -n "$(vulture h_transport_materials\property_database\ )" ]; then echo "unused variable" exit 1 fi
I noticed that if contributors forget to add the properties to the database, tests may pass (because the properties are not tested!).
One way to catch this automatically would be to use vulture.
Running
Would provide a report of unused variables and attributes.
We would then integrate that in the CI workflow