Skip to content

Commit

Permalink
Update packaging for distribution doc section
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed May 9, 2024
1 parent 3c43eff commit 3c59c23
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,35 @@ The files that are outside from the `openfisca_country_template` folder are used

## Packaging your Country Package for Distribution

Country packages are python distributions. To distribute your package via `pip`, follow the steps given by the [Python Packaging Authority](https://python-packaging-user-guide.readthedocs.io/tutorials/distributing-packages/#packaging-your-project).
Country packages are Python distributions. You can choose to distribute your package automatically via our continuous deployment system on GitHub, or manually.

### Automatic continuous deployment on GitHub

This repository is configured with a continuous deployment system to automate the distribution of your package via `pip`.

#### Setting up continuous deployment

To activate the continuous deployment:

1. Create an account on [PyPI](https://pypi.org/) if you don't already have one.
2. Generate a token in your PyPI account. This token will allow GitHub Actions to securely upload new versions of your package to PyPI.
3. Add this token to your GitHub repository's secrets under the name `PYPI_TOKEN`.

Once set up, changes to the `main` branch will trigger an automated workflow to build and publish your package to PyPI, making it available for `pip` installation.

### Manual distribution

If you prefer to manually manage the release and distribution of your package, follow the guidelines provided by the [Python Packaging Authority](https://python-packaging-user-guide.readthedocs.io/tutorials/distributing-packages/#packaging-your-project).

This involves detailed steps on preparing your package, creating distribution files, and uploading them to PyPI.

### Accessing your package

Once deployed, your package can be easily installed by users with the following command:

```sh
pip install openfisca-<your_country_name>
```

## Install Instructions for Users and Contributors

Expand Down

0 comments on commit 3c59c23

Please sign in to comment.