fsspec / s3fs

S3 Filesystem
http://s3fs.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
892 stars 274 forks source link

Add devcontainer, update test_requirements.txt #892

Open arogozhnikov opened 3 months ago

arogozhnikov commented 3 months ago

Motivation: makes easier to contribute.

Currently to test things locally I need to delete aws config, and manually change requirements for tests, create virtual env and setup pre-commit

I can confirm that after spinning up the container, I can run pytest s3fs and it works:

========================================== 313 passed, 1 skipped, 3 xfailed, 12 warnings in 150.68s (0:02:30) ==========================================
martindurant commented 3 months ago

How is this executed? Is this docker? I would say that requiring docker is actually more onerous. Simpler would be a pytest fixture that masks any environment variables that were creating trouble for you.

arogozhnikov commented 3 months ago

docker or podman-as-docker if you run it on your machine.

For me that's this button:

Screenshot 2024-08-21 at 11 04 12
arogozhnikov commented 3 months ago

For local development, pycharm and vs code support devcontainers now and start/manage container for you.

arogozhnikov commented 3 months ago

For me that's this button:

you need devcontainer.json first to make button work correctly.

martindurant commented 3 months ago

So you still need docker, and also one of the particular IDEs that supports this mechanism. I am mildly against the idea.

arogozhnikov commented 3 months ago

up to you of course.

I'd spend 10 minutes setting this up rather ~3 hours figuring out why tests didn't work on mac or on linux, but worked in CI