-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #727 from NEUBIAS/master
Update the ome-zarr channel
- Loading branch information
Showing
495 changed files
with
29,446 additions
and
6,791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: test-python-scripts | ||
|
||
on: | ||
push: | ||
branches: | ||
- gh-pages | ||
- master | ||
pull_request: [] | ||
|
||
jobs: | ||
test-python-scripts: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install xvfb/deps | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -yy mesa-utils libgl1-mesa-dev xvfb curl | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: false | ||
auto-activate-base: true | ||
activate-environment: "" | ||
channel-priority: strict | ||
miniforge-version: latest | ||
- name: install common conda dependencies | ||
run: conda install -c conda-forge -c euro-bioimaging python=3.10 napari=0.4.17 pytest notebook matplotlib jupytext "scikit-image>=0.20" openijtiff -y | ||
- name: linux test | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash -l {0} | ||
run: xvfb-run --server-args="-screen 0 1024x768x24" pytest -v test_python | ||
- name: osx test | ||
if: matrix.os == 'macos-latest' | ||
shell: bash -l {0} | ||
run: pytest -v test_python | ||
- name: windows test | ||
if: matrix.os == 'windows-latest' | ||
shell: cmd /C CALL {0} | ||
run: pytest -v test_python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ _site* | |
.idea | ||
Thumbs.db | ||
~$* | ||
*.ipynb | ||
.ipynb_checkpoints | ||
**/__pycache__/ | ||
Untitl* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
--- | ||
layout: page | ||
title: Guidelines for Contributing | ||
--- | ||
# Contribute | ||
|
||
Contributions to this project are very welcome. | ||
Changes should be submitted by merge request from a new branch to `master`. | ||
Merge requests should be reviewed by at least one Maintainer before merging. | ||
There are already [numerous contributors](https://github.com/NEUBIAS/training-resources/graphs/contributors) to this project and we are always welcoming more! | ||
|
||
See `README.md` for information on the structure of the repository. | ||
If you are a first time contributor we recommend expressing your interest by [creating an issue](https://github.com/NEUBIAS/training-resources/issues) where you describe how you would like to contribute. | ||
We will then get in touch with you to discuss the details, e.g. by having a zoom with you. | ||
|
||
## Step by step guide | ||
|
||
## Step by step technical contribution guide | ||
|
||
To contribute to this project, please follow those steps: | ||
|
||
|
@@ -23,21 +20,26 @@ To contribute to this project, please follow those steps: | |
1. Thank you for your contribution! | ||
|
||
### Editor | ||
|
||
[Visual Studio Code](https://code.visualstudio.com/) supports code formating and highlighting with the [Liquid](https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid) and [Jekyll Syntax Support](https://marketplace.visualstudio.com/items?itemName=ginfuru.ginfuru-vscode-jekyll-syntax) extensions (available via VSCode marketplace). | ||
|
||
After the extensions are installed the document type can be changed to "Liquid" in the bottom right corner. | ||
![Set document type to liquid.](image_data/contribute/doc_type_liquid.png) | ||
|
||
This should enable syntax highlighting. By pressing `Ctrl + Shift + p` you can search for `Liquid: Enable Formatting` and `Liquid: Format Document`. | ||
|
||
## Adding a new module | ||
### Adding a new module | ||
|
||
Each module page is built from a template (`_layouts/module.html`), | ||
ensuring a consistent structure and style for the whole collection. | ||
To create a new module, you will need to add a few files | ||
in a few different places in this repository. | ||
in a few different places in this repository. | ||
|
||
For convenience there is the [add_new_module.sh](https://github.com/NEUBIAS/training-resources/blob/master/add_new_module.sh) shell script that will automatically create the file and folder skeleton for a new module. Example usage: `./add_new_module.sh distance_transform` | ||
|
||
|
||
#### Module file | ||
|
||
### Module file | ||
Most important is the module file itself. | ||
This module file should be saved with a short, descriptive name (no spaces!) | ||
ending with the `.md` (Markdown) extension. | ||
|
@@ -49,7 +51,7 @@ beneath the closing `---` of this header. | |
Any content written there will appear in the rendered page after | ||
the concept map and/or figure, and before the _Activity_ section. | ||
|
||
#### YAML Header Specification | ||
##### YAML Header Specification | ||
|
||
All fields not marked as optional are required for the page to build. | ||
You can check that your YAML is valid with [this tool](http://www.yamllint.com/). | ||
|
@@ -58,45 +60,42 @@ You can check that your YAML is valid with [this tool](http://www.yamllint.com/) | |
--- | ||
title: Title of the Module | ||
layout: module # don't change this | ||
|
||
prerequisites: | ||
- "a list of things that learners should know" | ||
- "in order to understand this module" | ||
|
||
objectives: | ||
- "a list of learning objectives" | ||
- "see note 1 below for more info" | ||
|
||
motivation: | | ||
A description of *why* you would want to learn this. | ||
Can be written in | ||
(GitHub-flavoured) [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). | ||
Line breaks will be respected, so you can add lists etc using Markdown syntax. | ||
concept_map: > # see note 2 | ||
graph TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car]; | ||
figure: /figures/mymodule.png # store the example image for your module in the `figures` folder and provide the absolute path from the root of the site here. | ||
figure_legend: Some description of the figure. (optional) | ||
activity_preface: | | ||
Some general description of the activity for | ||
that learners will do while studying the module. | ||
It will be followed by platform-specific instructions/example code. | ||
(optional) | ||
activities: # platform-specific activity instruction/example code files (see note 3) (optional) | ||
- ["ImageJ GUI", "mymodule/activities/mymodule_imagejgui.md", "markdown"] | ||
- ["ImageJ Macro": "mymodule/activities/mymodule_imagejmacro.ijm", "java"] | ||
- ["Jython", "mymodule/activities/mymodule_jython.py", "python"] | ||
exercises: # platform-specific exercises (in Markdown files) (see note 4) (optional) | ||
"ImageJ GUI": "mymodule/exercises/mymodule_imagejgui.md" | ||
"ImageJ Macro": "mymodule/exercises/mymodule_imagejmacro.md" | ||
"Jython": "mymodule/exercises/mymodule_jython.md" | ||
"MATLAB": "mymodule/exercises/mymodule_matlab.md" | ||
|
||
multiactivities: # see note 3 | ||
- ["mymodule/mymodule_act1.md", [["ImageJ GUI", "mymodule/mymodule_act1_imagejgui.md"], ["ImageJ Macro", "mymodule/mymodule_act1_imagejmacro.ijm"], ["ImageJ Jython", "mymodule/mymodule_act1_jython.py"], ["skimage napari", "mymodule/mymodule_act1_skimage_napari.py", "python"]]] | ||
- ["mymodule/mymodule_act2.md", [["ImageJ GUI", "mymodule/mymodule_act2_imagejgui.md"], ["ImageJ Macro", "mymodule/mymodule_act2_imagejmacro.ijm"], ["ImageJ Jython", "mymodule/mymodule_act2_jython.py"] | ||
["skimage napari", "mymodule/mymodule_act2_skimage_napari.py"]]] | ||
|
||
assessment: | | ||
Language-agnostic questions to assess learner understanding of the key concept | ||
covered in the module. | ||
(optional) | ||
learn_next: # see note 5 | ||
learn_next: # see note 4 | ||
- "[name_of_one](calibration)" | ||
- "[or_more_modules](object_splitting)" | ||
- "[to link to next](display)" | ||
|
@@ -109,53 +108,36 @@ Notes: | |
|
||
1. Learning objectives should be worded as endings to a sentence beginning "After completing this lesson, learners should be able to...". We recommend starting each learning objective with a verb from [Bloom's Taxonomy](https://cft.vanderbilt.edu/guides-sub-pages/blooms-taxonomy/) | ||
2. Concept maps are drawn with [Mermaid.js](https://mermaidjs.github.io/flowchart.html). The indentation of the chart description is important, so be careful! | ||
3. The `activities` field should be populated with three-entry arrays, where the first value is the name of the platform, the second value is the path to the instructions or script for the activity, and the third is a lower-case language identifier to tell GitHub Pages if and how the content of the file should be highlighted. For files containing activity instructions written in Markdown - as opposed to a script written in some programming language - the value in the third position should be `"markdown"`. | ||
4. The `exercises` field should be populated with key-value pairs, where the key is the name of the platform (e.g. "ImageJ GUI", "Python", etc) and the value is the path (relative to `_includes/`) to the file containing the exercises for that platform. | ||
5. The points in "Learn Next" are Markdown links, which should be formed as `[Module Title](modulefilename)`, where the extension has been removed from the filename. | ||
3. The `multiactivities` fields should be nested arrays: `["header.md", [["analysis_platform1_name", "mymodule/analysis_platform1_impl"],["analysis_platform2_name", "mymodule/analysis_platform2_impl"], ... ]]` | ||
4. The points in "Learn Next" are Markdown links, which should be formed as `[Module Title](modulefilename)`, where the extension has been removed from the filename. | ||
|
||
### Associated files | ||
**THIS HAS NOW CHANGED 2023.04.25 AP. TODO: Review this section** | ||
Below is a list of all the other files that you should provide | ||
##### Associated files | ||
|
||
Below is a list of all the other files that one should provide | ||
to accompany a new module, | ||
as well as the appropriate location for each | ||
(relative to the top level of the repository). | ||
Examples are given for a `/modules/mymodule.md` | ||
|
||
- The `figure` image | ||
- The `figure` image: | ||
- an file containing an example image to illustrate the concept being taught in the module | ||
- location: `/figures/mymodule.md` | ||
- The `activities` files | ||
- Markdown files containing instructions and/or example code for an activity that learners should follow to learn how to apply the concept on a particular platform (ImageJ Macro, MATLAB, etc) | ||
- location: `_includes/mymodule/activities/mymodule_platformnospaces.md` | ||
- The `exercises` files | ||
- Markdown files containing exercises to test the learner's understanding of applying the concept on a particular platform | ||
- location: `_includes/mymodule/exercises/mymodule_platformnospaces.md` | ||
|
||
## Adding exercises/activity instructions for a new platform | ||
|
||
Contributions of instructions and exercises for more platforms are very welcome - please see the "Associated files" subsection above for details of where these contributed files should be added. | ||
|
||
## Customising the material for a course | ||
|
||
This repository is designed to work as a central reference point for all modules and platforms. However, we expect that instructors will want to prepare more specific material to be used in individual workshops/courses. | ||
|
||
To do this, fork or import\* this repository and follow the steps described below. | ||
|
||
\* Each GitHub user can only have a single fork of a repository so importing may be the better choice if you expect to make multiple customised sites from this material. | ||
|
||
### Setting a defualt platform | ||
- location: `/figures/mymodule.png` | ||
- if the figure is hard to make, please consider also adding a corresponding a PPTX file | ||
- location: `/figures/resources/mymodule.pptx` | ||
- The `activities` files: | ||
- There may be multiple activities for each module | ||
- Each activity needs: | ||
- a markdown header file that explains in general terms what the activity is about | ||
- location: `_includes/mymodule/mymodule_myactivity.md` | ||
- files that implement the activity header in a specific platform, e.g. | ||
- location: `_includes/mymodule/mymodule_myactivity_imagejgui.md` | ||
- location: `_includes/mymodule/mymodule_myactivity_skimage.py` | ||
|
||
You can specify a default plaform for your site by adjusting the `default-platform` field in the site `_config.yml`. Beware: your choices will be limited by the availability of platform options for exercises and activities throughout the material! If you want to set a default platform that does not have exercises/activities prepared for every module, you should add the paths to any module files missing exercises/activities for your given platform to the `exclude` list in `_config.yml`. This will prevent any errors being raised due to a missing parameter for those modules. | ||
## Building the website locally | ||
|
||
### Adjusting module set and order | ||
It is important to test locally whether the website builds correctly before submitting changes to the repo. | ||
|
||
Use the `module_order` field in `_config.yml` to specify which modules should appear in your site and in what order. Other modules not mentioned in this list will still be built (unless you add their paths to the `exclude` field) but will not be included in the page navigation i.e. via dropdown menu, next/previous buttons, etc. | ||
|
||
## Questions about the module layout | ||
|
||
If you have questions about the module layout, please contact [email protected]. | ||
|
||
## Building locally OSX | ||
### Building locally OSX | ||
|
||
To test your changes locally, install `jekyll` on your system. Instructions for Mac OSX are here: [https://jekyllrb.com/docs/installation/macos/](https://jekyllrb.com/docs/installation/macos/). | ||
|
||
|
@@ -175,7 +157,7 @@ Now you can navigate around the locally-built version of the pages | |
and check whether you're happy to submit your changes to be merged into `master` :+1: | ||
|
||
|
||
## Building locally Windows (without make) | ||
### Building locally Windows (without make) | ||
|
||
You need to install several tools (`ruby` and then `jekyll`). Please follow the instructions | ||
[https://jekyllrb.com/docs/installation/windows/] follow step 1-4 | ||
|
@@ -227,7 +209,8 @@ and check whether you're happy to submit your changes to be merged into `master` | |
Caveat: Some users must run their ``gem install`` commands as administrator. We do not know exactly why, but it may depend on their respective Windows installation. | ||
## See your new module | ||
### See your new module | ||
To see a module edit the file *_config.yml* and add your module (the file name in _modules with .md) to the | ||
list and the appropriate location | ||
```markdown | ||
|
@@ -252,3 +235,8 @@ module_order: | |
``` | ||
Note that when jekyll is serving your page, changes on existing files are automatically updated. | ||
## Questions | ||
If you have any questions please ask us in [an issue](https://github.com/NEUBIAS/training-resources/issues). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.