Skip to content

ENH: Bring devcontainer closer to GitHub CI environment, improve vscode setup #54845

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

Closed

Conversation

DavidToneian
Copy link
Contributor

  • All code checks passed.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

This PR serves two purposes:

  1. Harmonizing devcontainer with the CI environment in GitHub Actions
    GitHub Actions use micromamba for Python environment management, while the old devcontainer setup used to use pip (with a list of dependencies fetched from requirements-dev.txt once at container image creation).
    As I was trying to reproduce an unrelated issue locally, I was unsure whether deviations from the CI reults may have been caused by different Python environments. This change should reduce uncertainties in this regard.
  2. Modernizing the Visual Studio Code setup
    This PR attempts to produce a devcontainer that has high utility out of the box (e.g., installation and configuration of extensions for mypy, flake8, black, etc.)
    Furthermore, it replaces deprecated configuration options with the preferred ones.

If you like this PR, please let me know which whatsnew file this should be mentioned in (v2.1.0.rst I presume?)

Also, do you need me to open an issue for this?

@DavidToneian DavidToneian requested a review from noatamir as a code owner August 29, 2023 12:47
@DavidToneian
Copy link
Contributor Author

DavidToneian commented Aug 29, 2023

I see the check docker run --rm pandas-dev-env python -c "import pandas as pd; print(pd.show_versions())" is failing.

It did not previously because the old Dockerfile installed whatever pandas it pulled in via pip. I'm not sure what value this has, as I suppose the users of the docker image would be building and using their development versions anyway.

So I see two approaches here:

  1. Remove the docker run check above, if you agree it serves little value; or
  2. Have a separate CI process build and publish a complete docker image with the respective HEAD installed; this image could then be checked.

The second approach would be quite a bit more involved I think, as I don't think there is an established Docker publication infrastructure in pandas, is there?

@mroeschke
Copy link
Member

Also, do you need me to open an issue for this?

I would recommend you open an issue about this first before moving further with this PR, the Dockerfile for example used to be closer to what you had but it was deemed to large/slow to build and it was slimmed down. It would be good to discuss in an issue since it might also break people's workflows

@mroeschke
Copy link
Member

Thanks for opening up #54862. Closing to ensure the discussion happens in #54862 first before proceeding here

@mroeschke mroeschke closed this Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants