Energy Data Library to get data from public sources. The energy includes the following:
Using toml file, bumpver and twine
Step | Description | Commands/Detailed Description | Reference |
---|---|---|---|
1 | Create python project with directory structure | Follow pep8 guidelines | https://www.freecodecamp.org/news/build-your-first-python-package/ |
2 | Package compliance | Ensure all directories are package modules using init.py | https://www.freecodecamp.org/news/build-your-first-python-package/ |
3 | Add .toml file and setup.py to build wheels | pip install bumpver bumpver update --patch pip install build python -m build |
https://realpython.com/pypi-publish-python-package/ |
4 | Create account on pypi and upload using twine package | These commands will push the .whl and .tar.gz file into the pypi repository conda install twine twine upload dist/* |
https://realpython.com/pypi-publish-python-package/ |
To see instructions using setup.py & twine, without Version Bump, see using setup.py
More CI/CD streamlining for python packages:
set up travis CI for auto deployment of package to pypi
https://github.com/audreyfeldroy/cookiecutter-pypackage https://cookiecutter-pypackage.readthedocs.io/en/latest/tutorial.html https://pypi.org/project/cookiecutter/
https://github.com/boromir674/cookiecutter-python-package https://github.com/boromir674/cookiecutter-python-package/tox.ini
https://youtu.be/ugGu8fHWFog (A data science project example folder)
Helps cover testing, test coverage, etc. https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python https://hynek.me/articles/python-github-actions/
https://github.com/ksator/continuous-integration-with-python
https://medium.com/swlh/automate-python-testing-with-github-actions-7926b5d8a865
Using .toml file (Working)
A package can be imported locally from another code and thoroughly tested as well if required. Editable install is the best way to achieve this. The steps to do so are:
Using conda-build (Did not work)
Building A Package Locally
https://www.freecodecamp.org/news/build-your-first-python-package/
https://python-packaging-tutorial.readthedocs.io/en/latest/setup_py.html
Guidelines to contribute to libraries: https://pandas.pydata.org/docs/development/contributing.html#contributing