Skip to main content

common functions for muiscaenergy projects

Project description

muiscaenergy-comun

Common functions for Muisca energy projects

Time Series

Example usage: from datetime import datetime from muiscaenergy_common.src.timeseries.base import get_timeseries

ts_from = datetime(2023, 9, 30, 12, 0, 0)
ts_to = datetime(2023, 10, 1, 11, 0, 0)
freq = 'H'
lat = 52.5200
lon = 13.4050
tz = 'America/Los_Angeles'

# Get a TimeSeriesMessage object without notion of location
ts1 = get_timeseries(ts_from=ts_from,
                 ts_to=ts_to,
                 freq=freq)
print(ts1.df)

# Get a TimeSeriesMessage object with notion of location via lat and lon
ts2 = get_timeseries(ts_from=ts_from,
                 ts_to=ts_to,
                 freq=freq,
                 lat=lat,
                 lon=lon)
print(ts2.df)

# Get a TimeSeriesMessage object with notion of location via tz (timezone)
ts3 = get_timeseries(ts_from=ts_from,
                 ts_to=ts_to,
                 freq=freq,
                 tz=tz)
print(ts3.df)

Learning Material

Espanol

English

Pasos

  1. Crear un nuevo repositorio en github
  2. Clonar el repositorio en local
  3. Crear un nuevo proyecto en Pycharm
  4. Crear un nuevo entorno virtual en Pycharm

Gitiignore

  1. abra el archivo .gitignore
  2. comente la linea con (*.egg-info/)... en mi version es liena 24

Pasos para crear un paquete

  1. agregar nuevo folder con src (python directory) y otro ocn test (python directory)
  2. crear los archivos de folder

Pasos para subir el paquete a pypi

  1. crear el archivo setup.py
  2. python setup.py sdist bdist_wheel --> creates egg, build, dist
  3. commit and push to github
  4. 'pip install twine' if not installed
  5. twine check dist/* --> check if the package is ok
  6. twine upload dist/* --> upload to pypi
  7. (alternativa) twine upload dist/muiscaenergy-comun-0.0.2.tar.gz*

API Documentation

pip install pdoc pdoc --math ./src -o ./api_docs

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

muiscaenergy_comun-0.0.5.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file muiscaenergy_comun-0.0.5.tar.gz.

File metadata

  • Download URL: muiscaenergy_comun-0.0.5.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for muiscaenergy_comun-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2cfc384426285de64478b8d398ae4ad0ecf0a5aa12963e566da583ad33f5e08d
MD5 5c5dc341347adb5648e1a84c84ccfd0e
BLAKE2b-256 00c4f2701b51a16e3d94eeda7d52919b7a14e92a7016543b97ffc67fea14fafa

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