Skip to content

Commit a5b6226

Browse files
committed
move tagging to 4.3
1 parent b2021ec commit a5b6226

2 files changed

Lines changed: 131 additions & 130 deletions

File tree

episodes/42-software-reuse.md

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -344,136 +344,6 @@ Ensure you prioritise and work on the most pressing issues first!
344344

345345
::::::::::::::::::::::::::::::::::::::::::::::::::
346346

347-
## Tagging a Release in GitHub
348-
349-
There are many ways in which Git and GitHub can help us make a software release from our code.
350-
One of these is via **tagging**,
351-
where we attach a human-readable label to a specific commit.
352-
Let us see what tags we currently have in our repository:
353-
354-
```bash
355-
$ git tag
356-
```
357-
358-
Since we have not tagged any commits yet, there is unsurprisingly no output.
359-
We can create a new tag on the last commit in our `main` branch by doing:
360-
361-
```bash
362-
$ git tag -a v1.0.0 -m "Version 1.0.0"
363-
```
364-
365-
So we can now do:
366-
367-
```bash
368-
$ git tag
369-
```
370-
371-
```output
372-
v.1.0.0
373-
```
374-
375-
And also, for more information:
376-
377-
```bash
378-
$ git show v1.0.0
379-
```
380-
381-
You should see something like this:
382-
383-
```output
384-
tag v1.0.0
385-
Tagger: <Name> <email>
386-
Date: Fri Dec 10 10:22:36 2021 +0000
387-
388-
Version 1.0.0
389-
390-
commit 2df4bfcbfc1429c12f92cecba751fb2d7c1a4e28 (HEAD -> main, tag: v1.0.0, origin/main, origin/develop, origin/HEAD, develop)
391-
Author: <Name> <email>
392-
Date: Fri Dec 10 10:21:24 2021 +0000
393-
394-
Finalising README.
395-
396-
diff --git a/README.md b/README.md
397-
index 4818abb..5b8e7fd 100644
398-
--- a/README.md
399-
+++ b/README.md
400-
@@ -22,4 +22,33 @@ Flimflam requires the following Python packages:
401-
The following optional packages are required to run Flimflam's unit tests:
402-
403-
- [pytest](https://docs.pytest.org/en/stable/) - Flimflam's unit tests are written using pytest
404-
-- [pytest-cov](https://pypi.org/project/pytest-cov/) - Adds test coverage stats to unit testing
405-
\ No newline at end of file
406-
+- [pytest-cov](https://pypi.org/project/pytest-cov/) - Adds test coverage stats to unit testing
407-
+
408-
+## Installation
409-
+- Clone the repo ``git clone repo``
410-
+- Check everything runs by running ``python -m pytest`` in the root directory
411-
+- Hurray
412-
+
413-
+## Contributing
414-
+- Create an issue [here](https://github.com/Onoddil/python-intermediate-inflammation/issues)
415-
+ - What works, what does not? You tell me
416-
+- Randomly edit some code and see if it improves things, then submit a [pull request](https://github.com/Onoddil/python-intermediate-inflammation/pulls)
417-
+- Just yell at me while I edit the code, pair programmer style!
418-
+
419-
+## Getting Help
420-
+- Nice try
421-
+
422-
+## Credits
423-
+- Directed by Michael Bay
424-
+
425-
+## Citation
426-
+Please cite [J. F. W. Herschel, 1829, MmRAS, 3, 177](https://ui.adsabs.harvard.edu/abs/1829MmRAS...3..177H/abstract) if you used this work in your day-to-day life.
427-
+Please cite [C. Herschel, 1787, RSPT, 77, 1](https://ui.adsabs.harvard.edu/abs/1787RSPT...77....1H/abstract) if you actually use this for scientific work.
428-
+
429-
+## License
430-
+This source code is protected under international copyright law. All rights
431-
+reserved and protected by the copyright holders.
432-
+This file is confidential and only available to authorized individuals with the
433-
+permission of the copyright holders. If you encounter this file and do not have
434-
+permission, please contact the copyright holders and delete this file.
435-
\ No newline at end of file
436-
```
437-
438-
So now we have added a tag, we need this reflected in our Github repository.
439-
You can push this tag to your remote by doing:
440-
441-
```bash
442-
$ git push origin v1.0.0
443-
```
444-
445-
::::::::::::::::::::::::::::::::::::::::: callout
446-
447-
## What is a Version Number Anyway?
448-
449-
Software version numbers are everywhere,
450-
and there are many different ways to do it.
451-
A popular one to consider is [**Semantic Versioning**](https://semver.org/),
452-
where a given version number uses the format MAJOR.MINOR.PATCH.
453-
You increment the:
454-
455-
- MAJOR version when you make incompatible API changes
456-
- MINOR version when you add functionality in a backwards compatible manner
457-
- PATCH version when you make backwards compatible bug fixes
458-
459-
You can also add a hyphen followed by characters to denote a pre-release version,
460-
e.g. 1.0.0-alpha1 (first alpha release) or 1.2.3-beta4 (fourth beta release)
461-
462-
463-
::::::::::::::::::::::::::::::::::::::::::::::::::
464-
465-
We can now use the more memorable tag to refer to this specific commit.
466-
Plus, once we have pushed this back up to GitHub,
467-
it appears as a specific release within our code repository
468-
which can be downloaded in compressed `.zip` or `.tar.gz` formats.
469-
Note that these downloads just contain the state of the repository at that commit,
470-
and not its entire history.
471-
472-
Using features like tagging allows us to highlight commits that are particularly important,
473-
which is very useful for *reproducibility* purposes.
474-
We can (and should) refer to specific commits for software in
475-
academic papers that make use of results from software,
476-
but tagging with a specific version number makes that just a little bit easier for humans.
477347

478348
## Conforming to Data Policy and Regulation
479349

episodes/43-software-release.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,137 @@ exercises: 20
1919

2020
::::::::::::::::::::::::::::::::::::::::::::::::::
2121

22+
## Tagging a Release in GitHub
23+
24+
There are many ways in which Git and GitHub can help us make a software release from our code.
25+
One of these is via **tagging**,
26+
where we attach a human-readable label to a specific commit.
27+
Let us see what tags we currently have in our repository:
28+
29+
```bash
30+
$ git tag
31+
```
32+
33+
Since we have not tagged any commits yet, there is unsurprisingly no output.
34+
We can create a new tag on the last commit in our `main` branch by doing:
35+
36+
```bash
37+
$ git tag -a v1.0.0 -m "Version 1.0.0"
38+
```
39+
40+
So we can now do:
41+
42+
```bash
43+
$ git tag
44+
```
45+
46+
```output
47+
v.1.0.0
48+
```
49+
50+
And also, for more information:
51+
52+
```bash
53+
$ git show v1.0.0
54+
```
55+
56+
You should see something like this:
57+
58+
```output
59+
tag v1.0.0
60+
Tagger: <Name> <email>
61+
Date: Fri Dec 10 10:22:36 2021 +0000
62+
63+
Version 1.0.0
64+
65+
commit 2df4bfcbfc1429c12f92cecba751fb2d7c1a4e28 (HEAD -> main, tag: v1.0.0, origin/main, origin/develop, origin/HEAD, develop)
66+
Author: <Name> <email>
67+
Date: Fri Dec 10 10:21:24 2021 +0000
68+
69+
Finalising README.
70+
71+
diff --git a/README.md b/README.md
72+
index 4818abb..5b8e7fd 100644
73+
--- a/README.md
74+
+++ b/README.md
75+
@@ -22,4 +22,33 @@ Flimflam requires the following Python packages:
76+
The following optional packages are required to run Flimflam's unit tests:
77+
78+
- [pytest](https://docs.pytest.org/en/stable/) - Flimflam's unit tests are written using pytest
79+
-- [pytest-cov](https://pypi.org/project/pytest-cov/) - Adds test coverage stats to unit testing
80+
\ No newline at end of file
81+
+- [pytest-cov](https://pypi.org/project/pytest-cov/) - Adds test coverage stats to unit testing
82+
+
83+
+## Installation
84+
+- Clone the repo ``git clone repo``
85+
+- Check everything runs by running ``python -m pytest`` in the root directory
86+
+- Hurray
87+
+
88+
+## Contributing
89+
+- Create an issue [here](https://github.com/Onoddil/python-intermediate-inflammation/issues)
90+
+ - What works, what does not? You tell me
91+
+- Randomly edit some code and see if it improves things, then submit a [pull request](https://github.com/Onoddil/python-intermediate-inflammation/pulls)
92+
+- Just yell at me while I edit the code, pair programmer style!
93+
+
94+
+## Getting Help
95+
+- Nice try
96+
+
97+
+## Credits
98+
+- Directed by Michael Bay
99+
+
100+
+## Citation
101+
+Please cite [J. F. W. Herschel, 1829, MmRAS, 3, 177](https://ui.adsabs.harvard.edu/abs/1829MmRAS...3..177H/abstract) if you used this work in your day-to-day life.
102+
+Please cite [C. Herschel, 1787, RSPT, 77, 1](https://ui.adsabs.harvard.edu/abs/1787RSPT...77....1H/abstract) if you actually use this for scientific work.
103+
+
104+
+## License
105+
+This source code is protected under international copyright law. All rights
106+
+reserved and protected by the copyright holders.
107+
+This file is confidential and only available to authorized individuals with the
108+
+permission of the copyright holders. If you encounter this file and do not have
109+
+permission, please contact the copyright holders and delete this file.
110+
\ No newline at end of file
111+
```
112+
113+
So now we have added a tag, we need this reflected in our Github repository.
114+
You can push this tag to your remote by doing:
115+
116+
```bash
117+
$ git push origin v1.0.0
118+
```
119+
120+
::::::::::::::::::::::::::::::::::::::::: callout
121+
122+
## What is a Version Number Anyway?
123+
124+
Software version numbers are everywhere,
125+
and there are many different ways to do it.
126+
A popular one to consider is [**Semantic Versioning**](https://semver.org/),
127+
where a given version number uses the format MAJOR.MINOR.PATCH.
128+
You increment the:
129+
130+
- MAJOR version when you make incompatible API changes
131+
- MINOR version when you add functionality in a backwards compatible manner
132+
- PATCH version when you make backwards compatible bug fixes
133+
134+
You can also add a hyphen followed by characters to denote a pre-release version,
135+
e.g. 1.0.0-alpha1 (first alpha release) or 1.2.3-beta4 (fourth beta release)
136+
137+
138+
::::::::::::::::::::::::::::::::::::::::::::::::::
139+
140+
We can now use the more memorable tag to refer to this specific commit.
141+
Plus, once we have pushed this back up to GitHub,
142+
it appears as a specific release within our code repository
143+
which can be downloaded in compressed `.zip` or `.tar.gz` formats.
144+
Note that these downloads just contain the state of the repository at that commit,
145+
and not its entire history.
146+
147+
Using features like tagging allows us to highlight commits that are particularly important,
148+
which is very useful for *reproducibility* purposes.
149+
We can (and should) refer to specific commits for software in
150+
academic papers that make use of results from software,
151+
but tagging with a specific version number makes that just a little bit easier for humans.
152+
22153
## Why Package our Software?
23154

24155
We have now got our software ready to release -

0 commit comments

Comments
 (0)