Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ we pledge to follow the [University of Sheffield Research Software Engineering C

Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by following our [reporting guidelines][coc-reporting].
Please contact the [course organiser](mailto:liam.pattinson@york.ac.uk)
with any complaints.

[coc-reporting]: https://rse.shef.ac.uk/community/code_of_conduct#enforcement-guidelines
[coc]: https://rse.shef.ac.uk/community/code_of_conduct
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ use [GitHub flow][github-flow] to manage changes:

NB: The published copy of the lesson is usually in the `main` branch.

[repo]: https://github.com/Romain-Thomas-Shef/FAIR_Management_plan
[repo-issues]: https://github.com/Romain-Thomas-Shef/FAIR_Management_plan/issues
[contact]: mailto:romain.thomas@sheffield.ac.uk
[repo]: https://github.com/researchcodingclub/python-testing-for-research
[repo-issues]: https://github.com/researchcodingclub/python-testing-for-research/issues
[contact]: mailto:liam.pattinson@york.ac.uk
[github]: https://github.com
[github-flow]: https://guides.github.com/introduction/flow/
[github-join]: https://github.com/join
Expand Down
7 changes: 4 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Attribution](https://creativecommons.org/licenses/by/4.0/) licence.
[Changes have been
made](https://github.com/RSE-Sheffield/fair4rs-lesson-setup) to adapt the
template to the specific context of the University of Sheffield's FAIR
for Research Software training programme.
for Research Software training programme, and altered further by
the University of York [Research Coding Club](https://researchcodingclub.github.io/).

Unless otherwise noted, the instructional material in this lesson is
made available under the [Creative Commons Attribution
Expand All @@ -35,7 +36,7 @@ Under the following terms:

- **Attribution**---You must give appropriate credit (mentioning that
your work is derived from work that is Copyright (c) The University
of Sheffield and, where practical, provide a [link to the
of York and, where practical, provide a [link to the
license][cc-by-human], and indicate if changes were made. You may do
so in any reasonable manner, but not in any way that suggests the
licensor endorses you or your use.
Expand All @@ -59,7 +60,7 @@ Except where otherwise noted, the example programs and other software
provided in this work are made available under the [OSI][osi]-approved
[MIT license][mit-license].

Copyright (c) The University of Sheffield
Copyright (c) The University of York

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ A short course on the basics of software testing in Python using the `pytest` li

This lesson uses [The Carpentries Workbench][workbench] template.

It is derived from the [FAIR2 for Research Software](https://fair2-for-research-software.github.io/)
training course [python-testing-for-research](https://github.com/FAIR2-for-research-software/python-testing-for-research)
by the University of Sheffield.

## Course Description

Whether you are a seasoned developer or just write the occasional script, it's important to know that your code does what you intend, and will continue to do so as you make changes.
Expand All @@ -18,7 +22,7 @@ This course seeks to provide you with conceptual understanding and the tools you
- Running a test suite & understanding outputs
- Best practices
- Testing for errors
- Testing data structures
- Testing floating point data
- Fixtures
- Parametrisation
- Testing file outputs
Expand All @@ -30,18 +34,27 @@ Contributions are welcome, please refer to the [contribution guidelines](CONTRIB

### Build the lesson locally

To render the lesson locally, you will need to have [R][r] installed. Instructions for using R with the Carpentries template is [available](https://carpentries.github.io/workbench/#installation) but some additional setps have been taken to make sure the enivronment is reproducible using the [`{renv}`](https://rstudio.github.io/renv/articles/renv.html) package and an `renv.lockfile` is included which allows the environment to be re-created along with dependencies.
To render the lesson locally, you will need to have [R][r] installed.
Instructions for using R with the Carpentries template is available on the
[Carpentries website](https://carpentries.github.io/workbench/#installation).
We recommend using the
[`{renv}`](https://rstudio.github.io/renv/articles/renv.html) package.

After cloning the repository, you can set up `renv` and install all packages with:

After cloning the repository, you can set up the `renv` and install all packages with:
``` r
renv::restore()
renv::init()
# Optionally update packages
renv::update()
```
Once you have installed the dependencies, you can render the pages locally by starting R in the project root and running:

``` r
sandpaper::serve()
```

When building the site subsequently, you may need to run `renv::activate()` first.

This will build the pages and start a local web-server in R and open it in your browser. These pages are "live" and will respond to local file changes if you save them.

[git]: https://git-scm.com
Expand Down
Loading