openghg

A platform for greenhouse gas (GHG) data analysis and collaboration.

https://github.com/openghg/openghg

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    7 of 15 committers (46.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.8%) to scientific vocabulary

Keywords

analysis cloud collaboration data-science greenhouse-gas
Last synced: 6 months ago · JSON representation

Repository

A platform for greenhouse gas (GHG) data analysis and collaboration.

Basic Info
  • Host: GitHub
  • Owner: openghg
  • License: apache-2.0
  • Language: Python
  • Default Branch: devel
  • Homepage: https://www.openghg.org
  • Size: 272 MB
Statistics
  • Stars: 40
  • Watchers: 3
  • Forks: 9
  • Open Issues: 222
  • Releases: 0
Topics
analysis cloud collaboration data-science greenhouse-gas
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct

README.md

OpenGHG logo

OpenGHG - a cloud platform for greenhouse gas data analysis and collaboration

License OpenGHG tests

OpenGHG is a project based on the prototype HUGS platform which aims to be a platform for collaboration and analysis of greenhouse gas (GHG) data.

The platform will be built on open-source technologies and will allow researchers to collaborate on large datasets by harnessing the power and scalability of the cloud.

For more information please see our documentation.

Install locally

To run OpenGHG locally you'll need Python 3.8 or later on Linux or MacOS, we don't currently support Windows.

You can install OpenGHG using pip or conda, though conda allows the complete functionality to be accessed at once.

Using pip

To use pip, first create a virtual environment

bash python -m venv openghg_env

Then activate the environment

bash source openghg_env/bin/activate

It's best to make sure you have the most up to date versions of the packages that pip will use behind the scenes when installing OpenGHG.

bash pip install --upgrade pip wheel setuptools

Then we can install OpenGHG itself

bash pip install openghg

Each time you use OpenGHG please make sure to activate the environment using the source step above.

NOTE: Some functionality is not completely accessible when OpenGHG is installed with pip. This only affects some map regridding functionality. See the Additional Functionality section below for more information.

Using conda

To get OpenGHG installed using conda we'll first create a new environment

bash conda create --name openghg_env

Then activate the environment

bash conda activate openghg_env

Then install OpenGHG and its dependencies from our conda channel and conda-forge.

bash conda install --channel conda-forge --channel openghg openghg

Note: the xesmf library is already incorporated into the conda install from vx.x onwards and so does not need to be installed separately.

Create the configuration file

OpenGHG stores object store and user data in a configuration file in the user's home directory at ~/.config/openghg/openghg.conf. As this sets the path of the object store, the user must create this file in one of two ways

Command line

Using the openghg command line tool

``` openghg --quickstart

OpenGHG configuration

Enter path for object store (default /home/gareth/openghg_store): INFO:openghg.util:Creating config at /home/gareth/.config/openghg/openghg.conf

INFO:openghg.util:Configuration written to /home/gareth/.config/openghg/openghg.conf ```

Python

Using the create_config function from the openghg.util submodule.

``` from openghg.util import create_config

create_config()

OpenGHG configuration

Enter path for object store (default /home/gareth/openghg_store): INFO:openghg.util:Creating config at /home/gareth/.config/openghg/openghg.conf

INFO:openghg.util:Configuration written to /home/gareth/.config/openghg/openghg.conf ```

You will be prompted to enter the path to the object store, leaving the prompt empty tells OpenGHG to use the default path in the user's home directory at ~/openghg_store.

Additional functionality

Some optional functionality is available within OpenGHG to allow for multi-dimensional regridding of map data (openghg.tranform sub-module). This makes use of the xesmf package. This Python library is built upon underlying FORTRAN and C libraries (ESMF) which cannot be installed directly within a Python virtual environment.

To use this functionality these libraries must be installed separately. One suggestion for how to do this is as follows.

If still within the created virtual environment, exit this using bash deactivate

We will need to create a conda environment to contain just the additional C and FORTRAN libraries necessary for the xesmf module (and dependencies) to run. This can be done by installing the esmf package using conda bash conda create --name openghg_add esmf -c conda-forge

Then activate the Python virtual environment in the same way as above: bash source openghg_env/bin/activate

Run the following lines to link the Python virtual environment to the installed dependencies, doing so by installing the esmpy Python wrapper (a dependency of xesmf): bash ESMFVERSION='v'$(conda list -n openghg_add esmf | tail -n1 | awk '{print $2}') $ export ESMFMKFILE="$(conda env list | grep openghg_add | awk '{print $2}')/lib/esmf.mk" $ pip install "git+https://github.com/esmf-org/esmf.git@${ESMFVERSION}#subdirectory=src/addon/ESMPy/"

Note: The pip install command above for esmf module may produce an AttributeError. At present (19/07/2022) an error of this type is expected and may not mean the xesmf module cannot be installed. This error will be fixed if PR #49 is merged.

Now the dependencies have all been installed, the xesmf library can be installed within the virtual environment

bash pip install xesmf

Developers

If you'd like to contribute to OpenGHG please see the contributing section of our documentation. If you'd like to take a look at the source and run the tests follow the steps below.

Clone

bash git clone https://github.com/openghg/openghg.git

Install dependencies

We recommend you create a virtual environment first

bash python -m venv openghg_env

Then activate the environment

bash source openghg_env/bin/activate

Then install the dependencies

bash cd openghg pip install --upgrade pip wheel setuptools pip install -r requirements.txt -r requirements-dev.txt

Next you can install OpenGHG in editable mode using the -e flag. This installs the package from the local path and means any changes you make to the code will be immediately available when using the package.

bash pip install -e .

OpenGHG should now be installed in your virtual environment.

See above for additional steps to install the xesmf library as required.

Run the tests

To run the tests

bash pytest -v tests/

NOTE: Some of the tests require the udunits2 library to be installed.

The udunits package is not pip installable so we've added a separate flag to specifically run these tests. If you're on Debian / Ubuntu you can do

bash sudo apt-get install libudunits2-0

Running CF Checker tests

You can then run the cfchecks marked tests using

bash pytest -v --run-cfchecks tests/

Running ICOS tests

Some of our tests retrieve data from the ICOS Carbon Portal and so to avoid load on the ICOS severs these should not be run frequently. They should only be run when working on this functionality or before a release. These tests are marked icos with pytest.mark.

bash pytest -v --run-icos tests/

If all the tests pass then you're good to go. If they don't please open an issue and let us know some details about your setup.

Documentation

For further documentation and tutorials please visit our documentation.

Community

If you'd like further help or would like to talk to one of the developers of this project, please join our Gitter at gitter.im/openghg/lobby.

Owner

  • Name: OpenGHG
  • Login: openghg
  • Kind: organization
  • Email: contact@openghg.org

GitHub Events

Total
  • Create event: 121
  • Issues event: 202
  • Watch event: 9
  • Delete event: 85
  • Issue comment event: 248
  • Push event: 719
  • Gollum event: 106
  • Pull request event: 233
  • Pull request review event: 513
  • Pull request review comment event: 373
  • Fork event: 5
Last Year
  • Create event: 121
  • Issues event: 202
  • Watch event: 9
  • Delete event: 85
  • Issue comment event: 248
  • Push event: 719
  • Gollum event: 106
  • Pull request event: 233
  • Pull request review event: 513
  • Pull request review comment event: 373
  • Fork event: 5

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 4,724
  • Total Committers: 15
  • Avg Commits per committer: 314.933
  • Development Distribution Score (DDS): 0.551
Past Year
  • Commits: 1,137
  • Committers: 8
  • Avg Commits per committer: 142.125
  • Development Distribution Score (DDS): 0.526
Top Committers
Name Email Commits
Gareth Jones o****g@g****m 2,123
Rachel Tunnicliffe r****3@b****k 1,012
SutarPrasad v****5@b****k 809
Brendan Murphy b****y@b****k 569
Ben q****0@b****k 55
Alexandre Danjou a****o@g****m 49
joe-pitt j****t@b****k 23
Matt Rigby m****y@b****k 20
Christopher Woods c****s@g****m 17
Elena Fillola e****8@b****k 17
EricSaboya e****4@g****m 11
zh21490 z****0@b****v 11
Helene De Longueville q****4@b****e 5
ro21302 r****2@b****v 2
Noah Brelage b****e@e****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 768
  • Total pull requests: 889
  • Average time to close issues: 4 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 21
  • Total pull request authors: 16
  • Average comments per issue: 1.39
  • Average comments per pull request: 0.98
  • Merged pull requests: 684
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 143
  • Pull requests: 302
  • Average time to close issues: 18 days
  • Average time to close pull requests: 8 days
  • Issue authors: 10
  • Pull request authors: 8
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.41
  • Merged pull requests: 207
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • gareth-j (363)
  • rt17603 (200)
  • brendan-m-murphy (77)
  • SutarPrasad (44)
  • joe-pitt (25)
  • EricSaboya (10)
  • alexdanjou (8)
  • elenafillo (8)
  • mrghg (7)
  • aliceramsden (5)
  • ag12733 (5)
  • hdelongueville (3)
  • qq23840 (3)
  • hanchawn (3)
  • jess-randell (1)
Pull Request Authors
  • gareth-j (263)
  • rt17603 (220)
  • SutarPrasad (185)
  • brendan-m-murphy (138)
  • alexdanjou (28)
  • joe-pitt (13)
  • elenafillo (11)
  • mrghg (10)
  • EricSaboya (9)
  • qq23840 (4)
  • pearson01 (2)
  • Brelage (2)
  • aliceramsden (1)
  • achhayapathak (1)
  • hdelongueville (1)
Top Labels
Issue Labels
enhancement (262) bug (183) tidy (91) high-priority (83) documentation (57) storage-and-metadata (47) question (42) fine first issue (41) analysis (20) low-priority (20) refactor (15) umbrella (14) CodeRetreatDec22 (12) user-request (10) new feature (9) cloud (8) search-and-retrieve (8) help wanted (7) parsing/transform (7) bugfix (7) investigate (5) overview-task (5) wishlist (4) plotting (4) overview task (4) duplicate (3) packaging (3) obspack (2) github_workflows (2) release (2)
Pull Request Labels
enhancement (110) bugfix (74) tidy (36) documentation (23) release (13) high-priority (11) github_workflows (5) obs_dashboard (5) new feature (5) analysis (4) packaging (4) logging (4) refactor (3) deprecation (3) question (2) bug (2) storage-and-metadata (2) CodeRetreatDec22 (1) help wanted (1) plotting (1) icos_retrieve (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 473 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 26
  • Total maintainers: 1
pypi.org: openghg

OpenGHG: A platform for greenhouse​ gas data analysis

  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 473 Last month
Rankings
Dependent packages count: 7.3%
Stargazers count: 13.9%
Forks count: 15.4%
Average: 16.7%
Dependent repos count: 22.1%
Downloads: 25.0%
Maintainers (1)
Last synced: 6 months ago