Skip to content

Commit

Permalink
Fixed README with more info on the script, uv
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Jun 6, 2024
1 parent c0e6553 commit 57be724
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ python3.9 -m venv .pyenv
. .pyenv/bin/activate
```

We recommend installing `uv` for fast pip installation of the packages:
```sh
pip install uv
```

Install the `nomad-lab` package:

```sh
pip install --upgrade pip
pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
uv pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
```

**Note!**
Expand All @@ -37,7 +42,7 @@ sure to include NOMAD's internal package registry (via `--index-url` in the abov
You can run local tests using the `pytest` package:

```sh
python -m pytest -sv
python -m pytest -sv tests
```

where the `-s` and `-v` options toggle the output verbosity.
Expand All @@ -46,15 +51,20 @@ Our CI/CD pipeline produces a more comprehensive test report using `coverage` an

```sh
pip install coverage coveralls
python -m pytest --cov=src
python -m pytest --cov=src tests
```

You can also run the script to generate a local file `coverage.txt` with the same information by doing:
```sh
./scripts/generate_coverage_txt.sh
```

## Development

The plugin is still under development. If you would like to contribute, install the package in editable mode (with the added `-e` flag) with the development dependencies:

```sh
pip install -e .[dev] --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
uv pip install -e .[dev] --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
```

### Setting up plugin on your local installation
Expand Down
4 changes: 1 addition & 3 deletions scripts/generate_coverage_txt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
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
echo -e "\n\n\nGenerated using './scripts/generate_coverage_txt.sh' in the terminal in the root folder of the project" >> coverage.txt

1 comment on commit 57be724

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/nomad_simulations
   atoms_state.py1871890%215–218, 242, 297–298, 366–367, 369, 551, 563–564, 625–629, 644–648, 655
   general.py68593%84, 148, 258–259, 269
   model_method.py2597471%161–164, 167–174, 265–266, 286, 307–326, 342–368, 371–388, 740, 751, 793–800, 846, 865, 945, 1004, 1079, 1191
   model_system.py2571993%507–510, 558–565, 739–740, 965–969, 975–976, 984–985, 990, 1013
   numerical_settings.py2606276%160, 230, 232–233, 236–239, 243–244, 251–254, 263–266, 270–273, 275–278, 283–286, 292–295, 466–493, 568, 603–606, 630, 633, 678, 680–683, 687, 691, 738, 742–763, 818–819, 886, 895–897, 900
   outputs.py89693%201–204, 244–247, 272, 274
   physical_property.py90199%216
   variables.py61887%110, 133, 153–154, 157, 179, 202, 222
src/nomad_simulations/properties
   band_gap.py48296%149–150
   band_structure.py1072081%235–267, 280, 287, 323–324, 327
   energies.py21290%51, 79
   fermi_surface.py12192%52
   hopping_matrix.py24292%69, 104
   permittivity.py45589%110–118
   spectral_profile.py25412352%67–70, 105–108, 209–314, 370–382, 407–410, 430, 435–438, 480–516, 540, 587–590, 606–607, 612–618
src/nomad_simulations/utils
   utils.py661183%75–84, 93–94, 99, 102
TOTAL185735981% 

Tests Skipped Failures Errors Time
299 0 💤 0 ❌ 0 🔥 2.342s ⏱️

Please sign in to comment.