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

Devcontainer support #484

Merged
merged 3 commits into from
May 30, 2023
Merged

Devcontainer support #484

merged 3 commits into from
May 30, 2023

Conversation

jorisroovers
Copy link

@jorisroovers jorisroovers commented May 8, 2023

Allows contributors to get up and running quickly
using github codespaces.

Checklist before requesting a review

  • Performed a self-review of my code
  • Formatted my code with pkgmt format -> NA
  • Added tests (when necessary) -> NA
  • Added docstring documentation and update the changelog (when needed) -> Can add more docs if needed but wanted to gauge first whether this is something you're interested in merging.

📚 Documentation preview 📚: https://jupysql--484.org.readthedocs.build/en/484/

Copy link

@idomic idomic left a comment

Choose a reason for hiding this comment

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

Can you please also add a changelog entry (with your handle), and some documentation on how to use it here?

.devcontainer/postCreate.sh Show resolved Hide resolved
@jorisroovers jorisroovers requested a review from idomic May 15, 2023 15:05
@idomic
Copy link

idomic commented May 16, 2023

Am I testing it the wrong way?
I opened the code spaces and tried running a few python commands in the conda container, but it doesn't seem to recognize JupySQL.
Screen Shot 2023-05-16 at 8 53 22 AM

@jorisroovers
Copy link
Author

jorisroovers commented May 21, 2023

Am I testing it the wrong way? I opened the code spaces and tried running a few python commands in the conda container, but it doesn't seem to recognize JupySQL.

@idomic These work without problems for me (runs, exit code 0, no output, no errors):

❯ conda activate jupysql
❯ python examples/plot_boxplot.py
❯ python /workspaces/jupysql/examples/plot_boxplot.py                                                                                        
❯ python -c "from sql.connection import Connection"

Note that you shouldn’t use /opt/conda/bin/python but just python which will point to the correct conda python environment after you’ve activated it. The jupysql environment has jupysql installed (base does not).

❯ which python
/opt/conda/envs/jupysql/bin/python
# Note that python does NOT point to /opt/conda/bin/python

Both the last 2 python -c statements in your screenshot contain syntax errors which is why they’re not working.

.devcontainer/postCreate.sh Outdated Show resolved Hide resolved
![JupySQL github codespace](../static/github-codespace.png)
You can launch a new github codespace from the green "Code" button on [the JupySQL github repository](https://github.com/ploomber/jupysql).

After the codespace has finished setting up, you can run `conda activate jupysql` to activate the JupySQL Conda environment.

Choose a reason for hiding this comment

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

I've never used codespaces so I'm unfamiliar with the details but let's add some basic tips.

I looked at the pricing and github gives 60 hours monthly for free, but it looks like we have to manually stop it to prevent from going over - so let's add a note on this

is there anything else that's important for people to know?

Copy link

@edublancas edublancas May 23, 2023

Choose a reason for hiding this comment

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

relevant link: https://github.com/codespaces - allows managing codespaces

Copy link
Author

Choose a reason for hiding this comment

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

Codespaces by default will shut down after 30 min of idle time. I will add a note on this and link to the codespace docs and pricing.

.devcontainer/postCreate.sh Show resolved Hide resolved
Allows contributors to get up and running quickly
using github codespaces.
@jorisroovers
Copy link
Author

@edublancas updated the docs based on your comments, but running into an issue with pkgmt setup --doc, see inline reply.

@edublancas edublancas merged commit 3b3f89e into ploomber:master May 30, 2023
21 checks passed
@jorisroovers
Copy link
Author

Great, thanks!

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.

None yet

3 participants