Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development Setup Instructions Not Working on Windows #858

Closed
ebolch opened this issue Oct 29, 2024 · 4 comments
Closed

Development Setup Instructions Not Working on Windows #858

ebolch opened this issue Oct 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ebolch
Copy link

ebolch commented Oct 29, 2024

When setting up my development environment in Windows using the instructions. The main issue was that the conda/mamba installation would not complete. @jhkennedy seems to think it's the docs portion of the pip installs.

I was able to get the environment created using the following, but I did have some errors when trying to run the tests with nox:

mamba create -n earthaccess python=3.12 pip
python -m pip install -e ".[dev]"

When running the tests with nox, the session was susccessful, but one test did fail:

nox -s tests

image

On a separate note, it was somewhat difficult to get pipx and nox installed because I had to manually add them to the PATH.

Maybe some separate Windows instructions are needed. I'm more than happy to help create the documentation if I can get everything up and running.

@chuckwondo
Copy link
Collaborator

Your editable install should be this (taken from the instructions page you linked):

python -m pip install --editable ".[dev,test,docs]"

Since you didn't include test, that's likely why not all tests were successful.

Try the above command and rerun tests to see if they all pass.

@jhkennedy
Copy link
Collaborator

jhkennedy commented Oct 29, 2024

Since you didn't include test, that's likely why not all tests were successful.

@chuckwondo the tests in the example above were run with nox which sets up an isolated environment for tests, so the test dependencies were installed.

Your editable install should be this (taken from the instructions page you linked):

python -m pip install --editable ".[dev,test,docs]"

That did not work on Windows; pip hung trying to resolve the environment. We did confirm on Windows that installing dev,test does work, so it's likely something in docs that was the problem for Windows.

Notably, only dev is required to get nox installed in the conda environment, and as long as you're using nox and not calling pytest directly, you don't need to install the test dependency group.

@mfisher87 mfisher87 added the bug Something isn't working label Oct 30, 2024
@ebolch
Copy link
Author

ebolch commented Oct 31, 2024

I went back and ran the mamba setup again. It worked, but took a VERY long time (~10 mins). Before I was under the impression that it just froze, but I guess that was not the case.

Unsure this is associated with Windows, but my nox run of the tests is still failing on tests\unit\test_store.py.

@jhkennedy
Copy link
Collaborator

Okay, it looks like everything is working fine on Windows, it's just slow.

Similarly, the pytest failure is marked as "expected" (xfailed) and if pytest is invoked with the -r option, we'd see:

XFAIL tests/unit/test_store.py::test_earthaccess_file_getattr - This test reproduces a bug (#610) which has not yet been fixed.

I'm going to close this issue, but I'll open a PR to make sure we're passing the -rx (or maybe -rxXs ) so we propagate known failure reasons up to the pytest summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

4 participants