🧙🔧 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 dealing with
raw time series data surrounding the ESO Nowcast project. These functions are in
the module rawdata.py
, and can be imported as such
"""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:
-
Changes should be merged into the master branch. Ideally this process is automated via a CI tool.
-
Optionally run
poetry version
with the appropriate argument based on semver guidelines. -
Prepare the package by running
poetry build
-
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/ > poetry config --list repositories.pypi.url = "https://pypi.org/" repositories.testpypi.url = "https://test.pypi.org/legacy/"
-
Publish the repository to TestPyPi, to see that everything works as expected:
poetry publish -r testpypi
-
Publish the repository to PyPi:
poetry publish -r pypi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nowcastlib-1.1.4.tar.gz
.
File metadata
- Download URL: nowcastlib-1.1.4.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.6.9 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63d81139e7955afe4795f70721a760b733f1608b40785c58b8d6a0d6afd723a7 |
|
MD5 | 3174549f6e8d4b2069fa2e2f1db13b5f |
|
BLAKE2b-256 | 0304869f811b174124a9cb65c554825c1533195a499a290d66425d8dabcc2289 |
Provenance
File details
Details for the file nowcastlib-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: nowcastlib-1.1.4-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.6.9 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a486a416a34171cd8cf776931369b13fdd9799f9b26d9929e26b3bc3d71b57 |
|
MD5 | 6d4c93309a70cd0c0f07102b737ef5c2 |
|
BLAKE2b-256 | 45ef883159896d0fbe0f577e7f89182c08f6138902038f68f8a193366adae469 |