actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.88k stars 1.74k forks source link

package not checked out? #410

Closed jGaboardi closed 3 years ago

jGaboardi commented 3 years ago

We are using actions/checkout@v2 for many of the submodules in PySAL with varying success. For example, in spaghetti using actions/checkout@v2 in unittests.yml runs smoothly without issue. However, in tobler using actions/checkout@v2 in unittests.yml we are getting a ModuleNotFoundError: No module named 'tobler'. I am wondering if I can get any insight as to why this is happening in tobler but not spaghetti, or if there is something we are doing obviously wrong. I tried the GitHub Community Forum's Actions Board first, but got a "missing page" there.

jGaboardi commented 3 years ago

pysal/tobler#116

knaaptime commented 3 years ago

it needs the line run: pip install -e . --no-deps --force-reinstall otherwise the package doesnt get installed

jGaboardi commented 3 years ago

it needs the line run: pip install -e . --no-deps --force-reinstall otherwise the package doesnt get installed

But doing this negates the purpose of using actions/checkout@v2. From the docs:

This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.

As far as I know, tobler is the only package where this is necessary so I think we may doing something wrong there. Do we know why simply using actions/checkout@v2 doesn't install tobler as it should?

knaaptime commented 3 years ago

But doing this negates the purpose of using actions/checkout@v2. From the docs:

This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.

i dont follow... the purpose of the action is to check out, but checking out just means cloning the repo so that the source code is available, it doesnt actually install the package unless you explicitly ask it to (and the action can be used by lots of other repos that arent python packages, so it's definitely not supposed to install)

i have no idea why the other packages work without that step, but i think the action itself is working as intended

jGaboardi commented 3 years ago

@ericsciple I am wondering if it would be possible to get some clarification on the need for run: pip install -e . --no-deps --force-reinstall in some repos (e.g. pysal/tobler), while others are fine without it (e.g. pysal/spaghetti). It seems that something is happening differently in these two cases (though I am quite possibly incorrect), but I can't pin down what exactly it is. It may not even be happening in actions/checkout, but I haven't been able to determine that for sure.