Skip to content

Commit

Permalink
Added sh script to generate coverage.txt in the project
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Jun 5, 2024
1 parent d5282f7 commit 3f4308a
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
coverage.txt
*.cover
*.py,cover
.hypothesis/
Expand Down
55 changes: 55 additions & 0 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
============================= test session starts ==============================
platform linux -- Python 3.9.19, pytest-5.4.3, py-1.11.0, pluggy-0.13.1
rootdir: /home/josepizarro/nomad, inifile: pytest.ini
plugins: xdist-1.34.0, timeout-1.4.2, anyio-4.3.0, devtools-0.12.2, forked-1.6.0, cov-2.7.1
collected 299 items

tests/test_atoms_state.py ............................................. [ 15%]
tests/test_band_gap.py ..................... [ 22%]
tests/test_band_structure.py ................................ [ 32%]
tests/test_energies.py .. [ 33%]
tests/test_fermi_surface.py .. [ 34%]
tests/test_general.py .......... [ 37%]
tests/test_hopping_matrix.py .... [ 38%]
tests/test_model_method.py ........................................... [ 53%]
tests/test_model_system.py ........................ [ 61%]
tests/test_numerical_settings.py ................................ [ 71%]
tests/test_outputs.py ......................... [ 80%]
tests/test_permittivity.py .......... [ 83%]
tests/test_physical_properties.py ................... [ 89%]
tests/test_spectral_profile.py .................. [ 95%]
tests/test_utils.py ....... [ 98%]
tests/test_variables.py ..... [100%]

---------- coverage: platform linux, python 3.9.19-final-0 -----------
Name Stmts Miss Cover
--------------------------------------------------------------------------
src/nomad_simulations/__init__.py 1 0 100%
src/nomad_simulations/atoms_state.py 187 18 90%
src/nomad_simulations/general.py 68 5 93%
src/nomad_simulations/model_method.py 259 74 71%
src/nomad_simulations/model_system.py 257 19 93%
src/nomad_simulations/numerical_settings.py 260 62 76%
src/nomad_simulations/outputs.py 89 6 93%
src/nomad_simulations/physical_property.py 90 1 99%
src/nomad_simulations/properties/__init__.py 7 0 100%
src/nomad_simulations/properties/band_gap.py 48 2 96%
src/nomad_simulations/properties/band_structure.py 107 20 81%
src/nomad_simulations/properties/energies.py 21 2 90%
src/nomad_simulations/properties/fermi_surface.py 12 1 92%
src/nomad_simulations/properties/hopping_matrix.py 24 2 92%
src/nomad_simulations/properties/permittivity.py 45 5 89%
src/nomad_simulations/properties/spectral_profile.py 254 123 52%
src/nomad_simulations/utils/__init__.py 1 0 100%
src/nomad_simulations/utils/utils.py 66 11 83%
src/nomad_simulations/variables.py 61 8 87%
--------------------------------------------------------------------------
TOTAL 1857 359 81%


============================= 299 passed in 2.18s ==============================




Generated using './scripts/generate_coverage_txt.sh' in the terminal in the root folder of the project
9 changes: 9 additions & 0 deletions scripts/generate_coverage_txt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Run pytest with coverage
python -m pytest --cov=src | tee coverage.txt

# Append the generation message
echo " " >> coverage.txt
echo " " >> coverage.txt
echo -e "\n\nGenerated using './scripts/generate_coverage_txt.sh' in the terminal in the root folder of the project" >> coverage.txt

0 comments on commit 3f4308a

Please sign in to comment.