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
- https://www.youtube.com/watch?v=AczMuVzUrkE&ab_channel=SebastianBelmonte
- https://www.youtube.com/watch?v=xQGT9RZrBjg&ab_channel=AnartzMugikaLedo-Desarrollo%26Formaci%C3%B3n
English
- https://www.youtube.com/watch?v=5KEObONUkik&ab_channel=ArjanCodes
- https://www.youtube.com/watch?v=WhRKSf6I0F0&ab_channel=SpencerPao
- https://www.youtube.com/watch?v=v4bkJef4W94&ab_channel=DevOpsJourney
- https://www.youtube.com/watch?v=GIF3LaRqgXo&ab_channel=CodingTech
- https://www.youtube.com/watch?v=90PWQEc--6k&ab_channel=CloudQuickLabs
Pasos
- Crear un nuevo repositorio en github
- Clonar el repositorio en local
- Crear un nuevo proyecto en Pycharm
- Crear un nuevo entorno virtual en Pycharm
Gitiignore
- abra el archivo .gitignore
- comente la linea con (*.egg-info/)... en mi version es liena 24
Pasos para crear un paquete
- agregar nuevo folder con src (python directory) y otro ocn test (python directory)
- crear los archivos de folder
Pasos para subir el paquete a pypi
- crear el archivo setup.py
- python setup.py sdist bdist_wheel --> creates egg, build, dist
- commit and push to github
- 'pip install twine' if not installed
- twine check dist/* --> check if the package is ok
- twine upload dist/* --> upload to pypi
- (alternativa) twine upload dist/muiscaenergy-comun-0.0.2.tar.gz*
- pip install --upgrade muiscaenergy_comun
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
File details
Details for the file muiscaenergy_comun-0.0.7.tar.gz
.
File metadata
- Download URL: muiscaenergy_comun-0.0.7.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08435502454b101edd2fc4c0ab6ea2c531bec198b5848141b2395b33aca7e6bc |
|
MD5 | ad9528aad76c9c9a74ce31e5b6002fc3 |
|
BLAKE2b-256 | ba9056386c9d93547477c54ee4cc0a1c42c58142dc9a2d20e3f45c1286efb5b0 |