olivancu / electricity-cost-calculator

This project aims to provide a tool for calculating the electricity bill based on a specific tariff. An example is given for various Californian Utilities tariff, retrieved from the OpenEI API
8 stars 2 forks source link

Packaging electricity-cost-calculator and preparing for Python 3 #7

Closed gtfierro closed 5 years ago

gtfierro commented 5 years ago

This uses poetry to package the code together and publish it on PyPi so it is easier to work with and update.

I'm also starting the conversion to Python 3 so that this can be used after 2020 :)

The "example" file seems to work okay, but I'm not quite sure how to test the rest of this functionality. To this end, I've published a test package version of this for testing. You can test it with "pip install electricitycostcalculator-gabetest"

Example:

from electricitycostcalculator_gabetest.cost_calculator.cost_calculator import CostCalculator
# and so on
gtfierro commented 5 years ago

According to @jleyden, the package seems to be working OK.

@olivancu do you want me to handle the publishing of the PyPi package (under a non _gabetest name?), or do you want to do it? You will need to create a PyPi account and adjust the pyproject.toml file appropriately.

olivancu commented 5 years ago

@gtfierro I have published the package: https://pypi.org/project/electricitycostcalculator/

Could you double-check if this works? Thanks a lot for your help

gtfierro commented 5 years ago

@jleyden can you give it a try?

jleyden commented 5 years ago

@gtfierro all working!