Skip to content

Commit

Permalink
Add some dev notes to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-j committed May 15, 2024
1 parent 52e2adb commit 3d7a37a
Showing 1 changed file with 47 additions and 5 deletions.
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This repository contains the supplementary information / metadata around site, s
## Installation

Note that `openghg_defs` should be installed in the same virtual environment as OpenGHG.
There are two ways of installing `openghg_defs`, as an editable install of this git repository or via PyPI.
There are two ways of installing `openghg_defs`, as an editable install of this git repository or via PyPI.

### Editable install

Expand All @@ -21,7 +21,7 @@ git clone https://github.com/openghg/openghg_defs.git

Next, move into the repository and use pip to create an editable install using the `-e` flag.

> **_NOTE:_** If you're using OpenGHG, please install `openghg_defs` in the [same virtual environment](https://docs.openghg.org/install.html#id1).
> **_NOTE:_** If you're using OpenGHG, please install `openghg_defs` in the [same virtual environment](https://docs.openghg.org/install.html#id1).
```console
cd openghg_defs
Expand Down Expand Up @@ -59,10 +59,52 @@ site_info_file = openghg_defs.site_info_file
domain_info_file = openghg_defs.domain_info_file
```

## Updating information
## Development

### Updating information

We invite users to update the information we have stored. If you find a mistake in the data or want to add something, please
[open an issue](https://github.com/openghg/supplementary_data/issues/new) and fill out the template that matches your
problem.
problem. You're also welcome to submit a pull-request with your fix.

For the recommended development process please see the [OpenGHG documentation](https://docs.openghg.org/development/python_devel.html)

### Run the tests

After making changes to the package please ensure you've added a test if adding new functionality and run the tests making sure they all pass.

```console
pytest -v tests/
```

### Release

The package is released using GitHub actions and pushed to conda and PyPI.

#### 1. Update the CHANGELOG

- Update the changelog to add the header for the new version and add the date.
- Update the Unreleased header to match the version you're releasing and `...HEAD`.

#### 2. Update `pyproject.toml`

For a new release the package version must be updated in the `pyproject.toml` file. Try and follow the [Semantic Versioning](https://semver.org/) method.

#### 3. Tag the commit

Now tag the commit. First we create the tag and add a message (remember to insert correct version numbers here).

```console
git tag -a x.x.x -m "openghg_defs release vx.x.x"
```

Next push the tag. This will trigger the automated release by GitHub Actions.

```console
git push origin x.x.x
```

#### 4. Check GitHub Actions runners

You're also welcome to submit a pull-request with your fix.
Check the GitHub Actions [runners](https://github.com/openghg/openghg_defs/actions) to ensure the tests have
all passed and the build for conda and PyPI has run successfully.

0 comments on commit 3d7a37a

Please sign in to comment.