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

Murphyqm swd3 2024 #36

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add in mermaid diagrams for git
  • Loading branch information
murphyqm committed Jul 8, 2024
commit 4792ba8d288afc93f43c52599809e00f0d5b5a19
15 changes: 8 additions & 7 deletions swd3_2024.qmd
Original file line number Diff line number Diff line change
@@ -5,20 +5,21 @@ format:
navigation-mode: linear
controls-layout: bottom-right
controls: false
footer: "[Research IT Website]({{< var rc.website >}}) | [Research IT Query]({{< var rc.servicedesk >}}) | [Courses Material]({{< var rc.material >}})"
footer: "[Research IT Website]({{< var rc.website >}}) | [Research IT Query]({{< var rc.servicedesk >}}) | [Courses Material]({{< var rc.material >}}) | [Useful Links](#useful-links)"
mermaid:
theme: neutral
name: Software development practices for Research
code: SWD3_2024
---

{{< include _title.qmd >}}
{{< include _team.qmd >}}


{{< include swd3_2024/new-content.qmd >}}


## Useful Links

- [GitHub Project Demo](https://github.com/ARCTraining/swd3-demo)
- [Alan Turing Institute - Research Software Engineering Course Material](https://alan-turing-institute.github.io/rse-course/html/index.html)

{{< include swd3_2024/sdlc.qmd >}}
{{< include swd3_2024/structure.qmd >}}
{{< include swd3_2024/good-practices.qmd >}}
{{< include swd3_2024/project.qmd >}}
- [Alan Turing Institute - Research Software Engineering Course Material](https://alan-turing-institute.github.io/rse-course/html/index.html)
177 changes: 177 additions & 0 deletions swd3_2024/new-content.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
## Presentation content

Note: [Useful Links](#useful-links) are compiled at the end of this presentation.

## Why apply software dev principles to your coding?

```{mermaid}
flowchart LR
subgraph lab[1. Lab analysis of samples]
direction TB
A[Primary Standards: known comp. - P1] -->
B(Samples: unknown comp.) -->
C[Primary Standards again: known comp. - P2]
end
subgraph inst[2. Instrument validation after data collection]
direction LR
D[/Do P1 and P2<br>match each other<br>within error?/]-->|Yes| F
D -->|No| E
E(Instrument drift)
F[/Do P1 and P2 match<br>published values<br> within error?/]
F -->|No| G
G(Calibration issue)
end
lab ---> inst
F -->|Yes| pos
E --> neg
G --> neg
neg(fa:fa-ban Results not valid)
pos(Results may be valid)
pos --> posnext[Test scientific<br>validity of results]
neg -.-> negnext[Check instrument settings<br>Rerun analyses]
```

- Without the above documented steps, my results would not be publishable or considered in any way robust
- How do we implement a similar workflow for computational research?
- We treat code as a laboratory instrument!

# Anything worth doing, is worth doing well


# Anything worth doing well, is worth doing poorly at first


# Using git

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
commit
commit
checkout main
merge first-feature id: "Tests pass"
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
commit
commit
checkout main
merge first-feature id: "Tests pass"
branch new-feature
checkout new-feature
commit
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
commit
commit
checkout main
merge first-feature id: "Tests pass"
branch new-feature
checkout new-feature
commit
commit id: "Tests fail!" type:REVERSE
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
commit
commit
checkout main
merge first-feature id: "Tests pass"
branch new-feature
checkout new-feature
commit
commit id: "Tests fail!" type:REVERSE
checkout main
branch new-feature-02
commit
commit
```

##

### git workflow

```{mermaid}
gitGraph
commit id: "First commit"
commit id: "Add README.md"
branch first-feature
checkout first-feature
commit id: "Adding code"
commit
commit
checkout main
merge first-feature id: "Tests pass"
branch new-feature
checkout new-feature
commit
commit id: "Tests fail!" type:REVERSE
checkout main
branch new-feature-02
commit
commit
checkout main
merge new-feature-02 id: "Tests pass still"
```