Skip to main content

Supplementary definition data for OpenGHG

Project description

openghg_defs

This repository contains the supplementary information / metadata around site, species and domain details. This is used within the OpenGHG project.

Installation

Note that openghg_defs should be installed in the same virtual environment as OpenGHG.

Editable install

If you feel like you'll want to make changes to the metadata stored you should go for an editable install of the git repository. This will help ensure you always have the latest development changes we make to the repository. It also means that you can make changes to your local copy of the metadata and see the results straight away in your OpenGHG workflow.

First, clone the repository

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.

cd openghg_defs
pip install -e .

This will create a symbolic link between the folder and your Python environment, meaning any changes you make to the files in the repository folder will be accessible to OpenGHG.

Install from PyPI

If you don't think you'll need to make any changes to the metadata, you can install openghg_defs from PyPI using pip:

pip install openghg-defs

Install from conda

You can also install openghg_defs from our conda channel:

pip install -c openghg openghg-defs

Usage

The path to the overall data path and primary definition JSON files are accessible using:

import openghg_defs

species_info_file = openghg_defs.species_info_file
site_info_file = openghg_defs.site_info_file
domain_info_file = openghg_defs.domain_info_file

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 and fill out the template that matches your problem. You're also welcome to submit a pull-request with your fix.

For the recommended development process please see the OpenGHG documentation

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.

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 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).

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.

git push origin x.x.x

4. Check GitHub Actions runners

Check the GitHub Actions runners to ensure the tests have all passed and the build for conda and PyPI has run successfully.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openghg_defs-0.0.3.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

openghg_defs-0.0.3-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file openghg_defs-0.0.3.tar.gz.

File metadata

  • Download URL: openghg_defs-0.0.3.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for openghg_defs-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ee2047ff678011a4b5066217331645ded935c095c7889b911242fd5490e8d439
MD5 460154d0b3e71b020a6aa46781757e95
BLAKE2b-256 d32b47713d2c05715829951ac67cc64f234949765426353cde898f23dacc52d4

See more details on using hashes here.

File details

Details for the file openghg_defs-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: openghg_defs-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for openghg_defs-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a01c784582c2366e1ca47e3b0de9fb3b9df554846c7ee32867b618d9d8d1b75
MD5 609f841cb5569536ca9c4c33b6284fcc
BLAKE2b-256 6575b01c35625f750b3bafb91928f11f7bdb0ac18deb20dc5c16a7bc380e7900

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page