Skip to content

Add support for gitpod #34829

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

jrderuiter
Copy link

This PR proposes to add support for Gitpod, which can provide (new) contributors with one-click environment to use for working on the pandas code base.

The PR includes two main additions:

  • .gitpod.yml - Config file for gitpod that specifies which image/Dockerfile to use for gitpod and which init command(s) to run when booting the pod.
  • .gitpod.Dockerfile - Dockerfile used to build a base image for the pod. Partially adapted from the existing Dockerfile in the repo.

Some things maybe still to consider:

  • Gitpod has some options for providing pre-built workspaces (https://www.gitpod.io/docs/prebuilds/). This may be interesting to enable.

  • There is some duplication between the two dockerfiles, but unfortunately the VS Code Dockerfile is not entirely compatible with the gitpod one. As such, the duplication may not be a bad thing.

  • closes #xxxx (N/A)

  • tests added / passed (N/A)

  • passes black pandas (N/A)

  • passes git diff upstream/master -u -- "*.py" | flake8 --diff (N/A)

  • whatsnew entry (N/A)

image:
file: .gitpod.Dockerfile
tasks:
- init: pip install -r requirements-dev.txt && make develop
Copy link
Member

Choose a reason for hiding this comment

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

Can you use conda here instead of pip?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, any reason to prefer conda over pip? Is that the preferred development environment for pandas?

# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git iproute2 procps iproute2 lsb-release \
#
# Install C compilers (gcc not enough, so just went with build-essential which admittedly might be overkill),
Copy link
Member

Choose a reason for hiding this comment

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

If you can get conda to work then can just install the compiler from conda-forge

https://anaconda.org/conda-forge/c-compiler

Copy link
Author

Choose a reason for hiding this comment

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

This is copied from the existing Dockerfile, so I thought it would be ok?

@gfyoung gfyoung added Build Library building on various platforms Enhancement labels Jun 18, 2020
@WillAyd
Copy link
Member

WillAyd commented Jun 24, 2020

Didn't realize this was copied from an existing Dockerfile. With that being the case, any reason to not just leverage the existing file? Looks like you can do that in a config

https://www.gitpod.io/docs/config-docker/

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Jul 5, 2020

Thanks @jrderuiter - I wasn't aware of gitpod, but this looks really cool!

However, when I clicked on "gitpod - ready to code" from your branch, I get an environment that doesn't look quite set up correctly:

gitpod /workspace/pandas $ python -c "import pandas"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/workspace/pandas/pandas/__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy: No module named 'numpy'
pytz: No module named 'pytz'

Is there any extra configuration required? And as Will suggested, does it work if you use the existing Dockerfile in

image:
  file: .gitpod.Dockerfile

?

@MarcoGorelli
Copy link
Member

closing as stale, but please ping if you'd like to keep working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants