Skip to content

Commit 559cc9e

Browse files
committed
Update README.md: how to run tests, examples locally
1 parent abc928d commit 559cc9e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,29 @@ Preliminary roadmap:
4545
4. Add supporting helpers, which can import existing MAD-X, Elegant, SXF files.
4646
4.1. Try to be as feature complete as possible in these importers.
4747
5. Reuse the reference implementations and implement readers in community codes for beamline modeling (e.g., the [BLAST codes](https://blast.lbl.gov)).
48+
49+
50+
## How to run the tests and examples locally
51+
52+
In order to run the tests and examples locally, please follow these steps:
53+
54+
1. Create a conda environment from the environment.yml file:
55+
```bash
56+
conda env create -f environment.yml
57+
```
58+
2. Activate the conda environment:
59+
```bash
60+
conda activate pals-python
61+
```
62+
Please double check the environment name in the environment.yml file.
63+
3. Run the tests locally:
64+
```bash
65+
pytest tests -v
66+
```
67+
The command line option `-v` increases the verbosity of the output.
68+
You can also use the command line option `-s` to display any test output directly in the console (useful for debugging).
69+
Please refer to [pytest's documentation](https://docs.pytest.org/en/stable/) for further details on the available command line options.
70+
4. Run the examples locally (e.g., `fodo.py`):
71+
```bash
72+
python examples/fodo.py
73+
```

0 commit comments

Comments
 (0)