Skip to content

Commit 3f4308a

Browse files
committed
Added sh script to generate coverage.txt in the project
1 parent d5282f7 commit 3f4308a

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ htmlcov/
4545
.cache
4646
nosetests.xml
4747
coverage.xml
48-
coverage.txt
4948
*.cover
5049
*.py,cover
5150
.hypothesis/

coverage.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
============================= test session starts ==============================
2+
platform linux -- Python 3.9.19, pytest-5.4.3, py-1.11.0, pluggy-0.13.1
3+
rootdir: /home/josepizarro/nomad, inifile: pytest.ini
4+
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
5+
collected 299 items
6+
7+
tests/test_atoms_state.py ............................................. [ 15%]
8+
tests/test_band_gap.py ..................... [ 22%]
9+
tests/test_band_structure.py ................................ [ 32%]
10+
tests/test_energies.py .. [ 33%]
11+
tests/test_fermi_surface.py .. [ 34%]
12+
tests/test_general.py .......... [ 37%]
13+
tests/test_hopping_matrix.py .... [ 38%]
14+
tests/test_model_method.py ........................................... [ 53%]
15+
tests/test_model_system.py ........................ [ 61%]
16+
tests/test_numerical_settings.py ................................ [ 71%]
17+
tests/test_outputs.py ......................... [ 80%]
18+
tests/test_permittivity.py .......... [ 83%]
19+
tests/test_physical_properties.py ................... [ 89%]
20+
tests/test_spectral_profile.py .................. [ 95%]
21+
tests/test_utils.py ....... [ 98%]
22+
tests/test_variables.py ..... [100%]
23+
24+
---------- coverage: platform linux, python 3.9.19-final-0 -----------
25+
Name Stmts Miss Cover
26+
--------------------------------------------------------------------------
27+
src/nomad_simulations/__init__.py 1 0 100%
28+
src/nomad_simulations/atoms_state.py 187 18 90%
29+
src/nomad_simulations/general.py 68 5 93%
30+
src/nomad_simulations/model_method.py 259 74 71%
31+
src/nomad_simulations/model_system.py 257 19 93%
32+
src/nomad_simulations/numerical_settings.py 260 62 76%
33+
src/nomad_simulations/outputs.py 89 6 93%
34+
src/nomad_simulations/physical_property.py 90 1 99%
35+
src/nomad_simulations/properties/__init__.py 7 0 100%
36+
src/nomad_simulations/properties/band_gap.py 48 2 96%
37+
src/nomad_simulations/properties/band_structure.py 107 20 81%
38+
src/nomad_simulations/properties/energies.py 21 2 90%
39+
src/nomad_simulations/properties/fermi_surface.py 12 1 92%
40+
src/nomad_simulations/properties/hopping_matrix.py 24 2 92%
41+
src/nomad_simulations/properties/permittivity.py 45 5 89%
42+
src/nomad_simulations/properties/spectral_profile.py 254 123 52%
43+
src/nomad_simulations/utils/__init__.py 1 0 100%
44+
src/nomad_simulations/utils/utils.py 66 11 83%
45+
src/nomad_simulations/variables.py 61 8 87%
46+
--------------------------------------------------------------------------
47+
TOTAL 1857 359 81%
48+
49+
50+
============================= 299 passed in 2.18s ==============================
51+
52+
53+
54+
55+
Generated using './scripts/generate_coverage_txt.sh' in the terminal in the root folder of the project

scripts/generate_coverage_txt.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# Run pytest with coverage
4+
python -m pytest --cov=src | tee coverage.txt
5+
6+
# Append the generation message
7+
echo " " >> coverage.txt
8+
echo " " >> coverage.txt
9+
echo -e "\n\nGenerated using './scripts/generate_coverage_txt.sh' in the terminal in the root folder of the project" >> coverage.txt

0 commit comments

Comments
 (0)