Skip to content

Commit

Permalink
Fix readme, cleanup
Browse files Browse the repository at this point in the history
m-fehr committed Nov 29, 2024
1 parent c4a4ae9 commit 67e893f
Showing 6 changed files with 24 additions and 99 deletions.
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

10 changes: 0 additions & 10 deletions Dockerfile

This file was deleted.

27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -52,18 +52,21 @@ documentation of all classes check the API Documentation below.
## API Documentation
[https://firedynamics.github.io/fdsreader/](https://firedynamics.github.io/fdsreader/)

## Deployment
As the fdsreader has come a long way and the free capabilities of Travis CI have been used up, we now moved to manual CI/CD using a local docker container.
First, the Dockerfile has to be modified to make authentication to GitHub and PyPI possible from within the container.
To do so generate these two tokens:
PyPI: https://pypi.org/manage/account/token/
GitHub: https://github.com/settings/tokens/new (set the repo_deployment and public_repo scopes)
Now add these Tokens in the Dockerfile. To now deploy the fdsreader to PyPI and update the Github Pages (Documentation), run the following commands after pushing your changes to the FDSReader to GitHub (apart from the Dockerfile).
```bash
cd $REPO_ROOT_DIR
docker build . -t fdsreader-ci # Only needed the very first time
docker run --rm fdsreader-ci
```
Deployment now follows the [Python Packaging User Guide's recommendation](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/).

With this setup, deployments to both TestPyPI and PyPI are automated. Every push to GitHub triggers a deployment to TestPyPI, simplifying the testing of new changes and validating the CI pipeline. Therefore, it is necessary to set the package version to `.dev` to avoid blocking version numbers.

### Deploying an Untested/Unstable Version:
1. Execute: `python3 -m incremental.update fdsreader --dev`
2. Push changes to GitHub.

If you are sure your changes are stable push a GitHub Tag to perform deployment
to PyPI and to pack a GitHub Release
Deploying a tested/stable version:
1. set the new version with `python3 -m incremental.update fdsreader --newversion=<version>`
2. Push changes to GitHub
3. Push Tag to GitHub with git push origin tag <version>


### Manual deployment
It is also possible to deploy to PyPI and Github pages manually using the following steps:
23 changes: 0 additions & 23 deletions docker_deployment.sh

This file was deleted.

2 changes: 1 addition & 1 deletion fdsreader/_version.py
Original file line number Diff line number Diff line change
@@ -7,5 +7,5 @@

from incremental import Version

__version__ = Version("fdsreader", 1, 10, 3)
__version__ = Version("fdsreader", 1, 11, 6)
__all__ = ["__version__"]
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
requires = [
"setuptools",
"wheel",
"incremental>=24.7.2", # ← Add incremental as a build dependency
]
build-backend = "setuptools.build_meta"

[project]
name = "fdsreader"
version = "1.11.6.dev1"
dynamic = ["version"]
description = "Python reader for data generated by FDS."
readme = "README.md"
requires-python = ">=3.6"
@@ -31,6 +35,8 @@ dev = [
"pytest >=6.0"
]

[tool.incremental]

[tool.setuptools]
packages = ["fdsreader","fdsreader.bndf","fdsreader.devc","fdsreader.evac","fdsreader.export","fdsreader.fds_classes","fdsreader.geom","fdsreader.isof","fdsreader.part","fdsreader.pl3d","fdsreader.slcf","fdsreader.smoke3d","fdsreader.utils"]

0 comments on commit 67e893f

Please sign in to comment.