Skip to content

Commit

Permalink
Add documentation on developing echoSMs
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmacaulay committed Oct 8, 2024
1 parent ed89293 commit 23fa922
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
__pycache__/
/dist
/site
/.ipynb_checkpoints
/.ipynb_checkpoints
echoSMs.code-workspace
/.vscode
43 changes: 43 additions & 0 deletions docs/developing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Developing echoSMs

> These notes are a work in progress.
This page contains notes and instructions on developing and adding new models to echoSMs.

## Obtaining the source code

The echoSMs [source code](https://github.com/ices-tools-dev/echoSMs) is kept on github under an [ICES](http://www.ices.dk/) account. Clone the repository with this URL:

https://github.com/ices-tools-dev/echoSMs.git



## Generating packages for PyPI

EchoSMs is a pure Python package. The build configuration is done via a [pyproject.toml](https://github.com/ices-tools-dev/echoSMs/blob/main/pyproject.toml) file and [`hatchling`](https://hatch.pypa.io/latest/) is used to produce packages.

A github [action](https://github.com/ices-tools-dev/echoSMs/blob/main/.github/workflows/publish-to-pypi.yml) in the echoSMS repository will generate a Python wheel and source package and upload these to [PyPI](https://pypi.org/project/echosms/). This action is triggered whenever a tagged commit occurs to the repository. The tag is used as the new version number. EchoSMs version numbers follow the [semantic versioning](http://semver.org) convention.

Every commit to the echoSMs repository will generate a development package being uploaded to [TestPyPI](https://test.pypi.org/project/echosms/#history). This is used to always check that a commit does not prevent production of a package and is where a package containing the latest commit can be obtained.

## Documentation

The echoSMs documentation is produced using [`mkdocs`](https://www.mkdocs.org/) and [`mkdocstring`](https://mkdocstrings.github.io/). The static documentation pages are hosted by github and are regenerated after every commit to the repository using a github [action](https://github.com/ices-tools-dev/echoSMs/actions/workflows/build-docs.yml).

Documentation edits can be tested locally by running:

mkdocs serve

in the top level of the echoSMs repository. The documentation is then available at <http://127.0.0.1:8000>.

## Tests

EchoSMs uses the pytest testing framework. After installing pytest, run the tests using

pytest -v

in the top level of the echoSMs repository.

## Adding a new scattering model

TBD.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ nav:
- Conventions: conventions.md
- Benchmarks: benchmark_data.md
- API reference: api_reference.md
- Developing echoSMs: developing.md
- Other software: other_software.md

theme:
Expand Down

0 comments on commit 23fa922

Please sign in to comment.