carpentries-incubator / carpentries-incubator/collaborative-git-and-github-lesson

add example to collaborative github chapter

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
R
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The example is about implementing a temperature conversion library in Python. I think this example was by Barbara in the code refinery lesson.

Create a git[hub|lab] repository with a README and a LICENSE explaining shortly what those files are about. Add the opponent as a collaborator on the project.

Start by Googling the correct conversion. Write a Python code that works but is obviously faulty.

```python
# file: temperature.py
def convert(t):
return (t - 32) * 5/9
```

Have the opponent write an issue. There are several things that could be raised:

- No docstring
- Not clear which direction we're converting

Solve the issue by creating a branch and editing the `temperature.py` file. However, leave some obvious flaw, as to create some dialogue in the PR.

Create a feature request for the inverse conversion (Celcius to Fahrenheit), assign the opponent. Meanwhile, add a function for converting between celcius and kelvin in the main branch. This will create a merge conflict that we can resolve before merging.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.