Skip to content

Update setup instructions #342

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Update setup instructions #342

wants to merge 4 commits into from

Conversation

tobyhodges
Copy link
Member

This updates the setup instructions for Python workshops. A recent blog post provides more context for this change. Specifically, this PR updates the instructions to reflect that we recommend Miniforge instead of Anaconda Python.

One of the most important changes here is to include an environment.yml for learners to use to create an environment that they can work in during the workshop/while following the lesson. When this PR is ready to merge, I will release a new version of the example data on FigShare that contains the environment file. Since I guess it will be helpful for testing purposes -- and because it is probably a good idea to keep a copy in the lesson repo too -- you can find my proposed version of that file in this PR.

Copy link

github-actions bot commented Apr 1, 2025

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/datacarpentry/image-processing/compare/md-outputs..md-outputs-PR-342

The following changes were observed in the rendered markdown documents:

 files/environment.yml (new) | 11 +++++++++++
 md5sum.txt                  |  2 +-
 setup.md                    | 37 ++++++++++++++-----------------------
 3 files changed, 26 insertions(+), 24 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2025-04-06 09:10:41 +0000

github-actions bot pushed a commit that referenced this pull request Apr 1, 2025
Copy link
Contributor

@K-Meech K-Meech left a comment

Choose a reason for hiding this comment

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

Thanks @tobyhodges - looks good! I tried this out on my Windows laptop, and all worked well 😄 I left a few comments below.

@datacarpentry/image-processing-curriculum-maintainers - it would be great if you could try this out too, especially if you're on mac/linux

tobyhodges and others added 2 commits April 6, 2025 11:08
Co-authored-by: Kimberly Meechan <24316371+K-Meech@users.noreply.github.com>
Co-authored-by: Kimberly Meechan <24316371+K-Meech@users.noreply.github.com>
@tobyhodges tobyhodges requested a review from K-Meech April 6, 2025 09:09
github-actions bot pushed a commit that referenced this pull request Apr 6, 2025
Copy link
Contributor

@K-Meech K-Meech left a comment

Choose a reason for hiding this comment

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

Looks good to me - thanks @tobyhodges ! I'll leave this open for a while longer, in case the other maintainers have any input

@K-Meech
Copy link
Contributor

K-Meech commented Apr 29, 2025

@datacarpentry/image-processing-curriculum-maintainers - do feel free to add any further comments / suggestions, otherwise I'll merge this PR at the end of this week

@@ -7,7 +7,7 @@ Before joining the workshop or following the lesson, please complete the data an

## Data

The example images used in this lesson are available on [FigShare](https://figshare.com/).
The example images and a description of the Python environment used in this lesson are available on [FigShare](https://figshare.com/).
To download the data, please visit [the dataset page for this workshop][figshare-data]
and click the "Download all" button.
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,

1. Download and install the latest [MiniForge distribution of Python](https://conda-forge.org/download/) for your operating system.
If you already have a Python 3 setup that you are happy with, you can continue to use that (we recommend that you make sure your Python version is current).
The next step assumes that `conda` is available to manage your Python environment.
2. Setup an environment to work in during the lesson.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Setup an environment to work in during the lesson.
2. Set up an environment to work in during the lesson.

opposed to the one with Python 2). If you wish to use an existing
installation, be sure to upgrade your scikit-image to at least 0.19.
You can upgrade to the latest scikit-image using the shell command that follows.
1. Download and install the latest [MiniForge distribution of Python](https://conda-forge.org/download/) for your operating system.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure it's obvious that, on Unix-like platforms, you need to run

bash Miniforge3-$(uname)-$(uname -m).sh

from the terminal to install Miniforge... I would add a line about this. Is it obvious on Windows? I guess so, if you need to double-click what you just downloaded.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes - on Windows it's an .exe file, so you just double-click the downloaded file.

@@ -83,9 +74,9 @@ e.g. your Desktop or a folder you have created for using in this workshop.

## Instructions for Windows

Launch the Anaconda Prompt program and type `jupyter lab`.
Launch the MiniForge Prompt program and type `jupyter lab`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Launch the MiniForge Prompt program and type `jupyter lab`.
Launch the Miniforge Prompt program and type `jupyter lab`.

cf. README at https://github.com/conda-forge/miniforge

opposed to the one with Python 2). If you wish to use an existing
installation, be sure to upgrade your scikit-image to at least 0.19.
You can upgrade to the latest scikit-image using the shell command that follows.
1. Download and install the latest [MiniForge distribution of Python](https://conda-forge.org/download/) for your operating system.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Download and install the latest [MiniForge distribution of Python](https://conda-forge.org/download/) for your operating system.
1. Download and install the latest [Miniforge distribution of Python](https://conda-forge.org/download/) for your operating system.

@mkcor
Copy link
Contributor

mkcor commented May 3, 2025

I just tried on Linux x86_64, I downloaded the environment.yml from this PR, but somehow...

$ mv ~/Downloads/environment.yml .
$ conda env create -f environment.yml
Solving environment: failed

CondaValueError: Malformed version string '~': invalid character(s).

$ cat environment.yml 
name: dc-image
channels:
  - conda-forge
dependencies:
  - python>=3.11
  - jupyterlab
  - numpy
  - matplotlib
  - scikit-image
  - ipympl
  - imageio

I tried editing the file by removing the Python version, but got the same error. 🤔

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.

3 participants