Skip to content

Commit

Permalink
Merge pull request #19 from neuroinformatics-unit/biig-hackday-2024
Browse files Browse the repository at this point in the history
changes for BIIG hackday 2024
  • Loading branch information
alessandrofelder authored Jul 14, 2024
2 parents 0a344bd + 96952e0 commit fa36e67
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 23 deletions.
Binary file added img/alessandro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/fancy_cookiecutter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/simplified-pull-request-process.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 43 additions & 16 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ format:
revealjs:
theme: [default, niu-dark.scss]
logo: img/logo_niu_dark.png
footer: "Collaborative coding and software engineering good practice | 2023-10-23"
footer: "Collaborative coding and software engineering good practice (BIIG hackday) | 2024-07-15"
slide-number: c
menu:
numbers: true
Expand All @@ -31,7 +31,7 @@ format:
html:
theme: [default, niu-dark.scss]
logo: img/logo_niu_dark.png
date: "2023-07-05"
date: "2024-07-15"
toc: true
code-overflow: scroll
highlight-style: atom-one
Expand All @@ -44,25 +44,41 @@ format:
page-layout: full
default-image-extension: png
exercises:
org-repo: "rse-best-practices-course-2023/rse-best-practices-playground"
org-repo: "UCL-bioimage-analysis/rse-best-practices-playground"
---

## [Neuroinformatics unit](https://neuroinformatics.dev/people.html){preview-link="true"}
## Alessandro Felder

:::: {.columns}

<!-- make size of font smaller -->
::: {.column width="50%" style="font-size: 0.5em;"}
![Photo by <a href="https://unsplash.com/@momentance?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">SwapnIl Dwivedi</a> on <a href="https://unsplash.com/photos/w46tRF64qNc?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>](img/swapnil-dwivedi-w46tRF64qNc-unsplash.jpg){height=300 fig-align=center}
![Photo by Ivo D.](img/alessandro.png){height=500 fig-align=center}
:::

::: {.column width="50%" .smaller}
Research Software Engineer at

* Sainsbury Wellcome Center [Neuroinformatics Unit](https://neuroinformatics.dev/people.html)
* UCL [Advanced Research Computing](https://www.ucl.ac.uk/advanced-research-computing/research-software-engineers-0)
:::
::::

## Alessandro Felder

:::: {.columns}

<!-- make size of font smaller -->
::: {.column width="50%" style="font-size: 0.5em;"}
![Photo by Ivo D.](img/alessandro.png){height=500 fig-align=center}
:::

::: {.column width="50%"}
We are passionate about writing research software well. Please talk to us about software, we like to help (office 439).
I am passionate about making "good" research software, biological image analysis and about open, collaborative science.
:::
::::

::: {.notes}
Tell the students to find us on 4th floor or in Brasserie.
Remark about RSE movement and its importance to research.
:::

Expand All @@ -73,9 +89,6 @@ Remark about RSE movement and its importance to research.

## Prerequisites {.smaller}

[https://neuroinformatics-unit.github.io/software-good-practice-course/](
[https://neuroinformatics-unit.github.io/software-good-practice-course/])

:::: {.columns}

::: {.column width="50%" style="font-size: 0.5em;"}
Expand All @@ -84,8 +97,7 @@ Remark about RSE movement and its importance to research.

::: {.column width="50%"}
* a GitHub account
* followed setup instructions
* open these slides on your laptop: [https://neuroinformatics.dev/software-good-practice-course/](https://neuroinformatics.dev/software-good-practice-course/)
* open these slides on your laptop: [https://neuroinformatics.dev/course-software-good-practice/](https://neuroinformatics.dev/course-software-good-practice/)
:::

::::
Expand Down Expand Up @@ -159,6 +171,22 @@ pip install my_awesome_package

::::

## We are in a playground today

:::: {.columns}

::: {.column width="50%" style="font-size: 0.5em;"}
![Photo by <a href="https://unsplash.com/@tlemaitre?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Thierry Lemaitre</a> on <a href="https://unsplash.com/photos/DCTz78QCY24?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>](img/thierry-lemaitre-DCTz78QCY24-unsplash.jpg){height=500}
:::

::: {.column width="50%"}
* some things will come easy to you...
* ...others not
* if you find something easy, there are optional exercises...
* ... or you can help others.
:::

::::
## Set up your playground

:::: {.columns}
Expand All @@ -168,20 +196,19 @@ pip install my_awesome_package
:::

::: {.column width="50%"}
* fork and clone the repo locally [as described in Exercise 1](https://github.com/rse-best-practices-course-2023/rse-best-practices-playground/issues/1)
* fork and clone the repo locally [as described in Exercise 1](https://github.com/{{< meta exercises.org-repo >}}/issues/1)
* set up a conda environment for today:

```{.bash}
conda create -n "software-good-practice-course" python=3.11
```
```{.bash}
conda activate software-good-practice-course
```

:::

::::

[https://neuroinformatics.dev/course-software-good-practice/](https://neuroinformatics.dev/course-software-good-practice/)


{{< include slides/collaborate.qmd >}}
Expand All @@ -207,6 +234,6 @@ conda activate software-good-practice-course
## Retrospective

* Anonymously tell us what you thought [on this ideaboardz](https://ideaboardz.com/for/Collaborative%20coding%20retrospective/5104750)...
* ... and talk to us anytime!
* ... and get in touch anytime!

{{< include slides/resources.qmd >}}
5 changes: 3 additions & 2 deletions slides/collaborate.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
:::

::: {.column width="50%"}
* benefits from different perspective and division of labour
* benefits from different perspectives and division of labour
* avoids re-inventing the wheel
* needs async communication and coordination of tasks
:::
::::
Expand All @@ -32,7 +33,7 @@
:::: {.columns}

::: {.column width="50%" style="font-size: 0.5em;"}
![Photo by <a href="https://unsplash.com/@mparzuchowski?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Michał Parzuchowski</a> on <a href="https://unsplash.com/photos/yqD-v4fidt0?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>](img/michal-parzuchowski-yqD-v4fidt0-unsplash.jpg){height=400}
![Graphic by <a href="https://blog.tuleap.org/tuleap-pull-request-open-source-code-review-tool">Tuleap</a>](img/simplified-pull-request-process.jpeg)
:::

::: {.column width="50%"}
Expand Down
11 changes: 10 additions & 1 deletion slides/documentation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,13 @@ def calculate_fastest_time(time_list):

::: {style="text-align: center; margin-top: 1em"}
[Exercise: write a docstring for a function in `times.py`](https://github.com/{{< meta exercises.org-repo >}}/issues/2)
:::
:::

## Building and deploying docs

``` {.bash}
pip install -r ./docs/requirements.txt
sphinx-build docs/source docs/build -b html
```

You can automate docs [building](https://github.com/neuroinformatics-unit/actions/blob/main/build_sphinx_docs/action.yml) and [deploying](https://github.com/neuroinformatics-unit/actions/blob/main/deploy_sphinx_docs/action.yml). See for example the `movement` [docs action](https://github.com/neuroinformatics-unit/movement/blob/main/.github/workflows/docs_build_and_deploy.yml) and [its API reference](https://movement.neuroinformatics.dev/api_index.html).
30 changes: 30 additions & 0 deletions slides/packaging.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,34 @@ cookiecutter https://github.com/neuroinformatics-unit/python-cookiecutter
:::
::::

## Automating package creation

:::: {.columns}
::: {.column width="50%" style="font-size: 0.5em;"}
![Photo by <a href=https://flic.kr/p/c1otMu">Luke Loughead</a> on flickr](img/fancy_cookiecutter.jpg){height=400}
:::

::: {.column width="50%"}
Use [the ARC cookiecutter template](https://github.com/UCL-ARC/python-tooling?tab=readme-ov-file#using-this-template).

```{.bash code-line-numbers="false"}
conda create -n "fancy-package-playground"
conda activate fancy-package-playground
pip install cookiecutter
cookiecutter gh:ucl-arc/python-tooling
```
:::
::::

Also comes with [recommendations](https://github-pages.arc.ucl.ac.uk/python-tooling/).

## `pip` knows what to do

If you have this structure, `pip` will know where to put your Python code in your conda environment, so you can re-use it from anywhere.

```
pip install .
```

## The Python Package Index (PyPi)

Expand All @@ -80,6 +108,8 @@ cookiecutter https://github.com/neuroinformatics-unit/python-cookiecutter
:::
::::

This structure will also come in handy when you want to distribute your package widely.

## Summary

:::: {.columns}
Expand Down
7 changes: 4 additions & 3 deletions slides/resources.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
## Packaging resources

* [NIU cookiecutter](https://github.com/neuroinformatics-unit/python-cookiecutter)
* [ARC cookiecutter](https://github.com/UCL-ARC/python-tooling)
* [Python packaging tutorial](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
* [Python wheels walkthrough](https://youtu.be/FpIJ7T1Gpjo?feature=shared&t=1638)
* [`pyproject.toml` file explained](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/)

## RSE Community

* join the community!
* Talk to the NIU members about code!
* [SWC slack `#software-skills`](swc-neuro.slack.com)
* [UCL Research Programming Hub](https://www.ucl.ac.uk/advanced-research-computing/community/ucl-research-programming-hub)
* [Research Software London](https://rslondon.ac.uk/)
* [Research Software Engineering societies](https://society-rse.org/international-rse-organisations/)
Expand All @@ -45,4 +45,5 @@

* [The four pillars of RSE](https://ieeexplore.ieee.org/document/8994167)
* [The Software Sustainability Institute](https://www.software.ac.uk/)
* [The hidden REF – Celebrating all research outputs](https://hidden-ref.org/)
* [The hidden REF – Celebrating all research outputs](https://hidden-ref.org/)
* [Article about RSE careers](https://zenodo.org/records/10073233)
5 changes: 4 additions & 1 deletion slides/testing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

* to find (current and future) bugs earlier and more quickly (before you publish your results, ideally!)
* to have confidence in your current and future code
* important for research[^closed-retractions]
* (to document how you expect your code to behave)

[^closed-retractions]: [https://doi.org/10.1162/qss_a_00275](https://direct.mit.edu/qss/article/4/4/820/118074/Retracted-articles-use-less-free-and-open-source)

## Why should you test your research code?

> "Second, a 15-year-old bug was found ... (the bug was fixed ... during preparation of this manuscript). The bug essentially reduced the size of the image searched for clusters, underestimating the severity of the multiplicity correction and overestimating significance ."
> "Second, a 15-year-old bug was found ... (the bug was fixed ... during preparation of this manuscript). The bug essentially reduced the size of the image searched for clusters, underestimating the severity of the multiplicity correction and overestimating significance."
[^cluster-failure]

[^cluster-failure]: [https://www.pnas.org/doi/full/10.1073/pnas.1602413113](https://www.pnas.org/doi/full/10.1073/pnas.1602413113)
Expand Down

0 comments on commit fa36e67

Please sign in to comment.