epcpower / sunspec-demo

MIT License
1 stars 0 forks source link

SC-402 Initial Poetry & Versioning, Publishing #21

Closed epcAnker closed 2 years ago

epcAnker commented 2 years ago

Validation poetry versioning works:


Validation Poetry publishing works (only on new tag) https://github.com/epcpower/sunspec-demo/actions/runs/1730970110 https://pypi.org/project/sunspecdemo/#history note the 0.1.3 version (this will need to be deleted...)


To use:

first install poetry
for powershell: (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -

linux: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

poetry install should install dependencies

poetry run .... (or activate the .venv with 'poetry env' or run directly from .venv/...)  


(will put a poetry guide on confluence)

If you want the .venv to install in your directory:

poetry config virtualenvs.in-project = true
poetry config virtualenvs.path = "."

poetry config --list shows all config.  mine looks like:

cache-dir = "C:\\Users\\Alex\\AppData\\Local\\pypoetry\\Cache"
experimental.new-installer = true
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.path = "."

epcAnker commented 2 years ago

individual story is SC-402, will put a comment in jira about this