Skip to content

Commit

Permalink
Include tests as part of package (#28)
Browse files Browse the repository at this point in the history
* move tests into package

* Run pytest CI on specified paths. Update README

* update pytest.yml
  • Loading branch information
tianluyuan authored Nov 12, 2024
1 parent cd7b695 commit 0cd93bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ name: status
on:
push:
branches: [ main ]
paths:
- '**/*.py'
- '.github/workflows/*'
pull_request:
branches: [ main ]
paths:
- '**/*.py'
- '.github/workflows/*'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '25 9 * * 2'
Expand All @@ -28,8 +34,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8
pip install -e .[testing]
- name: Lint with flake8
run: |
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ pip install nuVeto

This will install [MCEq](https://github.com/afedynitch/MCEq).

Extras are `pip install nuVeto[plotting, resources]` which will install some packages for plotting and generating muon reaching probabilities.
Since v2.3.1, a suite of tests is also installed with an optional dependency on `pytest`. The follow command should test if the installation worked as expected.

```bash
pip install nuVeto[testing]
pytest --pyargs nuVeto
```

Extras are `pip install nuVeto[plotting, resources]` which will install some packages for making example plots and generating muon reaching probabilities.

### Usage

Expand Down
File renamed without changes.

0 comments on commit 0cd93bf

Please sign in to comment.