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

Add dev container config #7072

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

crazy4pi314
Copy link

Adding config for scikit-image for the open spec, Development Containers, which allows tools like VS Code, Codespaces, JetBrains tools, DevPod, and hopefully more soon (GitPod?)

initially drafted this at SciPy 2023 sprints with @lagru <3

Checklist

✅ A descriptive but concise pull request title
Docstrings for all functions
Unit tests
✅ A gallery example in ./doc/examples for new features
Contribution guide is followed

Release note

Summarize the introduced changes in the code block below in one or a few sentences. The
summary will be included in the next release notes automatically:

Added configuration files for tools that support the [Dev Container spec](https://containers.dev/). Makes it easier for contributors and maintainers to ensure reproducable workspaces.

@jarrodmillman jarrodmillman added the 🔧 type: Maintenance Refactoring and maintenance of internals label Jul 21, 2023
Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good as a first glance. Is there some way to test this configuration out already or do we need to merge this first?

.devcontainer/postBuild Outdated Show resolved Hide resolved
.devcontainer/Dockerfile Outdated Show resolved Hide resolved
@lagru lagru added 🤖 type: Infrastructure CI, packaging, tools and automation and removed 🔧 type: Maintenance Refactoring and maintenance of internals labels Jul 22, 2023
@crazy4pi314
Copy link
Author

I think you can try it out on the PR page here if you go to the top right and click the code dropdown button:
image

@lagru
Copy link
Member

lagru commented Jul 27, 2023

Ah, seems to work. There's actually a complete environment under ~/envs/skimage-dev. Though, it's not activated by default inside the terminal. Can we achieve that somehow?

"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
},
"postCreateCommand": "pre-commit install && bash ./.devcontainer/postBuild",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised that pre-commit worked before the development setup in postBuild. Seems like it is included in the container by default

$ which pre-commit
/usr/local/py-utils/bin/pre-commit

# Test your installation
spin test
# Build docs
spin docs
Copy link
Member

@lagru lagru Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
spin docs
spin docs
source ~/envs/skimage-dev/bin/activate
pre-commit install

"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
},
"postCreateCommand": "pre-commit install && bash ./.devcontainer/postBuild",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"postCreateCommand": "pre-commit install && bash ./.devcontainer/postBuild",
"postCreateCommand": "bash ./.devcontainer/postBuild",

Just to be safe it may be good to use the pre-commit in from the dev environment.

Copy link

Hello scikit-image core devs! There hasn't been any activity on this PR for more than 180 days. I have marked it as "dormant" to make it easy to find.
To our contributors, thank you for your contribution and apologies if this contribution fell through the cracks! Hopefully this ping will help bring some fresh attention to the review. If you need help, you can always reach out on our forum
If you think that this PR is no longer relevant, you may close it, or we may do it at some point (either way, it will be done manually). If you think the PR is valuable but you no longer have the bandwidth to update it, please let us know, so that someone can take it over. 🙏

@github-actions github-actions bot added the 😴 Dormant no recent activity label Jan 24, 2024
@github-actions github-actions bot removed the 😴 Dormant no recent activity label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 type: Infrastructure CI, packaging, tools and automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants