codeforboston / home-energy-analysis-tool

https://www.codeforboston.org/projects/
MIT License
8 stars 25 forks source link

Try Rules Engine on TestPyPi (was: Actionstest) #146

Closed thatoldplatitude closed 4 weeks ago

thatoldplatitude commented 5 months ago

Currently publishing to test.pypi.org Which I believe we could change to not depend on external python repositories. Also values are hardcoded and are pointing to a package which I control, So builds would fail on the codeforboston repo, as I have it set to only accept pushed builds from my fork.

Just a draft PR of some CI & CD tweaks. This PR introduces building&pushing a wheel to github atrifact, which can only be passed between jobs in a workflow. Then pushing the wheel to pypi registry(in this case the test.pypi.org, whos value is hardcoded fyi.)

Then there are changes to the Dockerfile, to pull down the most current rules-engine wheel from pypi (again, using a hardcoded test.pypi.org value)

This PR shouldn't be merged and is just for transparency. There are other ideas on this build process that would eliminate the need for depending on an external python registry.

N.B. I did not implement any wheel version incrementing in this PR. So if we went with this format we'd need to add automated wheel version incrementing, and reflect those in the pyodide-lock.json file as well.

Peripherally related to #116

thadk commented 4 months ago

Note that this pushes to https://test.pypi.org/project/rules-engine/ whereas there are already quite a number of "rules-engine"'s on the real PyPi : https://pypi.org/search/?q=rules+engine

thatoldplatitude commented 4 months ago

The Dockerfile seemed to work without errors on "production", the push to test PyPi on the Github action did give some errors. detailed output from deploying

I did just allow permissions for pushes to test.pypi from codeforboston actions to come thru. It wasn't the fix needed(I don't think. I just added the permissions on the pypi side, then re-triggered the pipeline) I can check it out tomorrow or sunday tho.

N.B. I would still expect the push to test.pypi to fail due to no version changes on the wheel. But expect the permissions error to be resolved

thadk commented 1 month ago

I believe we have integrated all the pieces of this PR indirectly into other branches as of #176 . We've credited you as co-author where possible too :) thanks again. Do you think we've got it all and can close this @thatoldplatitude ?

Oh at least the .dockerignore we haven't brought through.