Skip to content

Markdown notebook infrastructure. - #13

Merged
tillahoffmann merged 12 commits into
mainfrom
tillahoffmann/infra
Feb 22, 2024
Merged

Markdown notebook infrastructure.#13
tillahoffmann merged 12 commits into
mainfrom
tillahoffmann/infra

Conversation

@tillahoffmann

@tillahoffmanntillahoffmann commented Feb 13, 2024

Copy link
Copy Markdown
Collaborator

This PR extracts some of the infrastructure code from #9. I've added an example document with instructions we can develop into a guide for contributions.

@github-actions

github-actionsBot commented Feb 13, 2024

Copy link
Copy Markdown

No broken urls! 🎉
Comment updated at 2024-02-22 with changes from 8e354d6

@github-actions

github-actionsBot commented Feb 13, 2024

Copy link
Copy Markdown

No spelling errors! 🎉
Comment updated at 2024-02-22 with changes from 8e354d6

@github-actions

github-actionsBot commented Feb 13, 2024

Copy link
Copy Markdown

Re-rendered previews from the latest commit:

Updated at 2024-02-22 with changes from 8e354d6

@tillahoffmann
tillahoffmann marked this pull request as ready for review February 13, 2024 20:03
Comment thread00-demo.md Outdated
Comment threadrequirements.in
Comment thread00-demo.md Outdated
@howardbaikhowardbaik mentioned this pull request Feb 13, 2024
9 tasks
Comment thread00-demo.md Outdated
Co-authored-by: Howard Baek <50791792+howardbaek@users.noreply.github.com>
@howardbaik

howardbaik commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

@tillahoffmann I have a very naive question that has to do with virtual environments and committing to GitHub.

If I follow the below workflow:

  1. Create a virtual environment within the python folder called .venv
  2. Activate the virtual environment and start up Jupyter Lab.
  3. Make changes to a .md file and render it to html with make [your markdown document].ipynb.html

Does this mean that the changes I make (while I'm working on a Jupyter Lab server in a virtual environment) can be committed and pushed to this repo? Basically, I'm not sure how to commit and push changes to GitHub when you are working in a virtual environment.

UPDATE: It looks like the requirements.txt file will have all the necessary dependencies so I don't need to worry about not having the right dependencies for future iterations.

@tillahoffmann

Copy link
Copy Markdown
CollaboratorAuthor

Does this mean that the changes I make (while I'm working on a Jupyter Lab server in a virtual environment) can be committed and pushed to this repo? Basically, I'm not sure how to commit and push changes to GitHub when you are working in a virtual environment.

Yes, you can commit any changes you make from the virtual environment. The virtual environment is independent of any git commands and only affects Python. So you can use git as you usually would.

Regarding your point 3., you can run make [name].ipynb.html if you want to make sure that the notebook executes correctly in the GitHub Action and to inspect the html output. But you don't need to run that step before committing the .md changes to GitHub. All the important content is in the .md, and the .ipynb.html are never added to the git repository. Does that make sense?

@cansavvycansavvy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is really excellent! Thanks for putting together this infrastructure. I am going to go through the steps to test it!

@cansavvycansavvy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is great! can't tell you how excited I am to have this set up. We're going to definitely have to use this (with attribution to your work) in future python courses we make with OTTR!

Comment thread00-demo.md Outdated
Comment thread00-demo.md
### The Bare-Bones Approach

1. Use a text editor of your choice to modify the markdown. Any fenced code block starting with the `python` language identifier will be executed when you convert the markdown to html.
2. Run `make [your markdown document].ipynb.html` from the command line to execute the notebook and convert it to html.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This worked beautifully!

Co-authored-by: Candace Savonen <cansav09@gmail.com>
@tillahoffmann
tillahoffmann merged commit 2c3d2d1 into mainFeb 22, 2024
@tillahoffmann
tillahoffmann deleted the tillahoffmann/infra branch February 22, 2024 15:53
Sign up for freeto 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.

Note: Format for this course for running python and rendering images Note: Putting Images in this course -- different than other OTTR courses

3 participants

@tillahoffmann@howardbaik@cansavvy