NYCPlanning / db-equitable-development-tool

Data Repo for the equitable development tool (EDDT)
MIT License
0 stars 0 forks source link

poetry install update #302

Closed td928 closed 2 years ago

td928 commented 2 years ago

301

Poetry installation failed in one of the recent GitHub Actions test runs. It them comes to light according to poetry documentation, the installation procedure we being relying on is now deprecated. Along with the new url, the path where poetry gets installed also changed so new path also needs to be added.

I did an export with this feature branch to prove that the new installation worked but feel free to run more extensive tests on this with Actions.

SashaWeinstein commented 2 years ago

Will try devcontainer locally now. Does it make sense to run export category action from this feature branch to check that it works that way too?

SashaWeinstein commented 2 years ago

Ran into an issue where poetry wasn't installed on the dev container but it all worked when I pip installed. Adding RUN /usr/local/bin/python3 -m pip install -U poetry to the bottom of the dockerfile, hopefully this fixes

td928 commented 2 years ago

Ran into an issue where poetry wasn't installed on the dev container but it all worked when I pip installed. Adding RUN /usr/local/bin/python3 -m pip install -U poetry to the bottom of the dockerfile, hopefully this fixes

I think the issue is this pip installation seems to be deprecated and now moving to pipx. I can try out pipx installation as well. As to testing exporting category, I did a test in my openning comment for the PR. Let me know if you meant something else @SashaWeinstein

SashaWeinstein commented 2 years ago

Sorry I did miss the action you linked to in the original PR description. All looks good to me there And yea pipx does seem like the best installation option as it's simpler than the "official" route linked on the website

td928 commented 2 years ago

Sorry I did miss the action you linked to in the original PR description. All looks good to me there And yea pipx does seem like the best installation option as it's simpler than the "official" route linked on the website

But i guess that raises the question whether we want to have two different poetry installation approaches local vs. github actions. Seems not ideal. What exactly is the error you are experiencing with the poetry installer?

SashaWeinstein commented 2 years ago

Can we just change both? In my view having pipx poetry is more readable thancurl -sSL https://install.python-poetry.org | python3 -

td928 commented 2 years ago

Can we just change both? In my view having pipx poetry is more readable thancurl -sSL https://install.python-poetry.org | python3 -

but it seems like the other way is more dependencies to manage no? My understanding of how pipx is going to work is it first needs to be installed by pip then install pipx like this

python3 -m pip install --user pipx
python3 -m pipx ensurepath
SashaWeinstein commented 2 years ago

Lol sorry I can't reproduce the error. So between missing the working github action linked in the original description and messing up the run on my local I held this up for no reason. Think it should be good to go as is, open to switching over to pipx for simplicity but this can be merged if we want to move on

SashaWeinstein commented 2 years ago

Can we just change both? In my view having pipx poetry is more readable thancurl -sSL https://install.python-poetry.org | python3 -

but it seems like the other way is more dependencies to manage no? My understanding of how pipx is going to work is it first needs to be installed by pip then install pipx like this

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Right that makes sense, no need to install pipx for just poetry