Skip to main content

🧙🔧 Utils that can be reused and shared across and beyond the ESO Nowcast project

Project description

Nowcast Library

🧙‍♂️🔧 Utils that can be reused and shared across and beyond the ESO Nowcast project

This is a public repository hosted on GitHub via a push mirror setup in the internal ESO GitLab repository

Installation

Simply run

pip install nowcastlib

Usage and Documentation

At the moment, Nowcast Library is simply a collection of functions. Here is a quick example of how one may import nowcastlib and get access to one of the functions:

"""Example showing how to access compute_trig_fields function"""
import nowcastlib as ncl
import pandas as pd
import numpy as np

data_df = pd.DataFrame(
    [[0, 3, 4, np.NaN], [32, 4, np.NaN, 4], [56, 8, 0, np.NaN]],
    columns=["A", "B", "C"],
    index=pd.date_range(start="1/1/2018", periods=4, freq="2min"),
)

result = ncl.rawdata.compute_trig_fields(data_df, ["A", "C"])

Further documentation here.

Development Setup

This repository relies on Poetry for tracking dependencies, building and publishing. It is therefore recommended that developers install poetry and make use of it throughout their development of the project.

Dependencies

Make sure you are in the right Python environment and run

poetry install

This reads pyproject.toml, resolves the dependencies, and installs them.

Deployment

The repository is published to PyPi, so to make it accessible via a pip install command as mentioned earlier.

To publish changes follow these steps. Ideally this process is automated via a CI tool triggered by a push/merge to the master branch:

  1. Optionally run poetry version with the appropriate argument based on semver guidelines.

  2. Update the documentation by running

    make document
    
  3. Prepare the package by running

    poetry build
    
  4. Ensure you have TestPyPi and PyPi configured as your poetry repositories:

    poetry config repositories.testpypi https://test.pypi.org/legacy/
    poetry config repositories.pypi https://pypi.org/
    
  5. Publish the repository to TestPyPi, to see that everything works as expected:

    poetry publish -r testpypi
    
  6. Stage, commit and push your changes (to master) with git.

  7. Publish the repository to PyPi:

    poetry publish -r pypi
    

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

nowcastlib-1.2.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

nowcastlib-1.2.1-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file nowcastlib-1.2.1.tar.gz.

File metadata

  • Download URL: nowcastlib-1.2.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for nowcastlib-1.2.1.tar.gz
Algorithm Hash digest
SHA256 2039d76201e8fefa74e53f61a07b6c0030ff2a9b34fd35fbeedcfaa36ded5e52
MD5 25b8871791271cd4220dd94957f32da1
BLAKE2b-256 9160c9f92bd6344c12fcc1ddeece2637513b29617d73f3209f84abbd1de55aa3

See more details on using hashes here.

Provenance

File details

Details for the file nowcastlib-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: nowcastlib-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for nowcastlib-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59f4f1b811450ce1d90b5ca56375a04e2f5b5e40678e508e25d1422d49643cf5
MD5 9ed93be347f839eb02f6c2ce28ea3051
BLAKE2b-256 3da6d26d7c77f0b4830995b3a2bc589f5e71fea5c60546b12f352e1b1d0a1043

See more details on using hashes here.

Provenance

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