Skip to content

Commit

Permalink
Merge branch 'main' into dimitrios-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
erinmgraham authored Jan 10, 2025
2 parents 9df1f45 + 7dbc3e3 commit a6e9550
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 121 deletions.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by following our [reporting guidelines][coc-reporting].


[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html
[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html
[coc-reporting]: https://docs.carpentries.org/policies/coc/incident-reporting.html
[coc]: https://docs.carpentries.org/policies/coc/
11 changes: 4 additions & 7 deletions episodes/04-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ You should be in the `recipes` directory.
$ cd ~/Desktop/recipes
```

Let's create a file called `guacamole.md` that contains the basic structure to
have a recipe.
Let's create a file called `guacamole.md` that contains the basic structure of a recipe.
We'll use `nano` to edit the file;
you can use whatever editor you like.
In particular, this does not have to be the `core.editor` you set globally earlier. But remember, the steps to create create or edit a new file will depend on the editor you choose (it might not be nano). For a refresher on text editors, check out ["Which Editor?"](https://swcarpentry.github.io/shell-novice/03-create.html#which-editor) in [The Unix Shell](https://swcarpentry.github.io/shell-novice/) lesson.
In particular, this does not have to be the `core.editor` you set globally earlier. But remember, the steps to create or edit a new file will depend on the editor you choose (it might not be nano). For a refresher on text editors, check out ["Which Editor?"](https://swcarpentry.github.io/shell-novice/03-create.html#which-editor) in [The Unix Shell](https://swcarpentry.github.io/shell-novice/) lesson.

```bash
$ nano guacamole.md
Expand Down Expand Up @@ -577,9 +576,7 @@ Two important facts you should know about directories in Git.
Note, our newly created empty directory `cakes` does not appear in
the list of untracked files even if we explicitly add it (*via* `git add`) to our
repository. This is the reason why you will sometimes see `.gitkeep` files
in otherwise empty directories. Unlike `.gitignore`, these files are not special
and their sole purpose is to populate a directory so that Git adds it to
the repository. In fact, you can name such files anything you like.
in otherwise empty directories. The sole purpose of `.gitkeep` files is to populate a directory so that Git adds it to the repository. The name `.gitkeep` is just a convention, and in fact, you can name these files anything you like.

2. If you create a directory in your Git repository and populate it with files,
you can add all files in the directory at once by:
Expand Down Expand Up @@ -817,4 +814,4 @@ $ git diff me.txt
- `git commit` saves the staged content as a new commit in the local repository.
- Write a commit message that accurately describes your changes.

::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
9 changes: 2 additions & 7 deletions episodes/05-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ index b36abfd..0848c8d 100644
+An ill-considered change
```

which is the same as what you would get if you leave out `HEAD` (try it). The
real goodness in all this is when you can refer to previous commits. We do
that by adding `~1`
(where "~" is "tilde", pronounced [**til**\-d*uh*])
to refer to the commit one before `HEAD`.
Note that `HEAD` is the default option for `git diff`, so omitting it will not change the command's output at all (give it a try). However, the real power of `git diff` lies in its ability to compare with previous commits. For example, by adding `~1` (where "~" is "tilde", pronounced [**til**\-d*uh*]), we can look at the commit before `HEAD`.

```bash
$ git diff HEAD~1 guacamole.md
Expand Down Expand Up @@ -433,8 +429,7 @@ So, when `git commit -m "My opinions about the red sauce"` is executed,
the version of `ketchup.md` committed to the repository is the one from the staging area and
has only one line.

At this time, the working copy still has the second line (and
`git status` will show that the file is modified). However, `git restore ketchup.md`
At this time, the working copy still has the second line (and `git status` will show that the file is modified). However, `git restore ketchup.md`
replaces the working copy with the most recently committed version of `ketchup.md`.
So, `cat ketchup.md` will output

Expand Down
204 changes: 99 additions & 105 deletions episodes/11-licensing.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,99 @@
---
title: Licensing
teaching: 5
exercises: 0
---

::::::::::::::::::::::::::::::::::::::: objectives

- Explain why adding licensing information to a repository is important.
- Choose a proper license.
- Explain differences in licensing and social expectations.

::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::: questions

- What licensing information should I include with my work?

::::::::::::::::::::::::::::::::::::::::::::::::::

When a repository with source code, a manuscript or other creative
works becomes public, it should include a file `LICENSE` or
`LICENSE.txt` in the base directory of the repository that clearly
states under which license the content is being made available. This
is because creative works are automatically eligible for intellectual
property (and thus copyright) protection. Reusing creative works
without a license is dangerous, because the copyright holders could
sue you for copyright infringement.

A license solves this problem by granting rights to others (the
licensees) that they would otherwise not have. What rights are being
granted under which conditions differs, often only slightly, from one
license to another. In practice, a few licenses are by far the most
popular, and [choosealicense.com](https://choosealicense.com/) will
help you find a common license that suits your needs. Important
considerations include:

- Whether you want to address patent rights.
- Whether you require people distributing derivative works to also
distribute their source code.
- Whether the content you are licensing is source code.
- Whether you want to license the code at all.

Choosing a license that is in common use makes life easier for
contributors and users, because they are more likely to already be
familiar with the license and don't have to wade through a bunch of
jargon to decide if they're ok with it. The [Open Source
Initiative](https://opensource.org/licenses) and [Free Software
Foundation](https://www.gnu.org/licenses/license-list.html) both
maintain lists of licenses which are good choices.

[This article][software-licensing] provides an excellent overview of
licensing and licensing options from the perspective of scientists who
also write code.

At the end of the day what matters is that there is a clear statement
as to what the license is. Also, the license is best chosen from the
get-go, even if for a repository that is not public. Pushing off the
decision only makes it more complicated later, because each time a new
collaborator starts contributing, they, too, hold copyright and will
thus need to be asked for approval once a license is chosen.

::::::::::::::::::::::::::::::::::::::: challenge

## Can I Use Open License?

Find out whether you are allowed to apply an open license to your software.
Can you do this unilaterally,
or do you need permission from someone in your institution?
If so, who?


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## What licenses have I already accepted?

Many of the software tools we use on a daily basis (including in this workshop) are
released as open-source software. Pick a project on GitHub from the list below, or
one of your own choosing. Find its license (usually in a file called `LICENSE` or
`COPYING`) and talk about how it restricts your use of the software. Is it one of
the licenses discussed in this session? How is it different?

- [Git](https://github.com/git/git), the source-code management tool
- [CPython](https://github.com/python/cpython), the standard implementation of the Python language
- [Jupyter](https://github.com/jupyter), the project behind the web-based Python notebooks we'll be using
- [EtherPad](https://github.com/ether/etherpad-lite), a real-time collaborative editor


::::::::::::::::::::::::::::::::::::::::::::::::::

[software-licensing]: https://doi.org/10.1371/journal.pcbi.1002598


:::::::::::::::::::::::::::::::::::::::: keypoints

- The `LICENSE`, `LICENSE.md`, or `LICENSE.txt` file is often used in a repository to indicate how the contents of the repo may be used by others.
- People who incorporate General Public License (GPL'd) software into their own software must make the derived software also open under the GPL license if they decide to share it; most other open licenses do not require this.
- The Creative Commons family of licenses allow people to mix and match requirements and restrictions on attribution, creation of derivative works, further sharing, and commercialization.
- People who are not lawyers should not try to write licenses from scratch.

::::::::::::::::::::::::::::::::::::::::::::::::::


---
title: Licensing
teaching: 5
exercises: 0
---

::::::::::::::::::::::::::::::::::::::: objectives

- Explain why adding licensing information to a repository is important.
- Choose a proper license.
- Explain differences in licensing and social expectations.

::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::: questions

- What licensing information should I include with my work?

::::::::::::::::::::::::::::::::::::::::::::::::::

As an open source project, Software Carpentry relies on volunteers to create our lessons and includes a file named `LICENSE` or `LICENSE.txt` file in all public lesson repositories. This file is used to specify that all materials are freely available under the Creative Commons Attribution license. Without a file that clearly states under which license any public source code, manuscript or other creative works is being made available, the default copyright laws apply. To learn more about licensing and open source, you can read more about [Github's description of licenses] and the [legal grounds for open source licensing].

A license solves this problem by granting rights to others (the
licensees) that they would otherwise not have. What rights are being
granted under which conditions differs, often only slightly, from one
license to another. In practice, a few licenses are by far the most
popular, and [choosealicense.com](https://choosealicense.com/) will
help you find a common license that suits your needs. Important
considerations include:

- Whether you want to address patent rights.
- Whether you require people distributing derivative works to also
distribute their source code.
- Whether the content you are licensing is source code.
- Whether you want to license the code at all.

Choosing a license that is in common use makes life easier for
contributors and users, because they are more likely to already be
familiar with the license and don't have to wade through a bunch of
jargon to decide if they're ok with it. The [Open Source
Initiative](https://opensource.org/licenses) and [Free Software
Foundation](https://www.gnu.org/licenses/license-list.html) both
maintain lists of licenses which are good choices.

[This article][software-licensing] provides an excellent overview of
licensing and licensing options from the perspective of scientists who
also write code.

At the end of the day what matters is that there is a clear statement
as to what the license is. Also, the license is best chosen from the
get-go, even if for a repository that is not public. Pushing off the
decision only makes it more complicated later, because each time a new
collaborator starts contributing, they, too, hold copyright and will
thus need to be asked for approval once a license is chosen.

::::::::::::::::::::::::::::::::::::::: challenge

## Can I Use Open License?

Find out whether you are allowed to apply an open license to your software.
Can you do this unilaterally,
or do you need permission from someone in your institution?
If so, who?


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## What licenses have I already accepted?

Many of the software tools we use on a daily basis (including in this workshop) are
released as open-source software. Pick a project on GitHub from the list below, or
one of your own choosing. Find its license (usually in a file called `LICENSE` or
`COPYING`) and talk about how it restricts your use of the software. Is it one of
the licenses discussed in this session? How is it different?

- [Git](https://github.com/git/git), the source-code management tool
- [CPython](https://github.com/python/cpython), the standard implementation of the Python language
- [Jupyter](https://github.com/jupyter), the project behind the web-based Python notebooks we'll be using
- [EtherPad](https://github.com/ether/etherpad-lite), a real-time collaborative editor


::::::::::::::::::::::::::::::::::::::::::::::::::

[software-licensing]: https://doi.org/10.1371/journal.pcbi.1002598
[Github's description of licenses]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository
[legal grounds for open source licensing]: https://opensource.guide/legal/#are-public-github-projects-open-source

:::::::::::::::::::::::::::::::::::::::: keypoints

- The `LICENSE`, `LICENSE.md`, or `LICENSE.txt` file is often used in a repository to indicate how the contents of the repo may be used by others.
- People who incorporate General Public License (GPL'd) software into their own software must make the derived software also open under the GPL license if they decide to share it; most other open licenses do not require this.
- The Creative Commons family of licenses allow people to mix and match requirements and restrictions on attribution, creation of derivative works, further sharing, and commercialization.
- People who are not lawyers should not try to write licenses from scratch.

::::::::::::::::::::::::::::::::::::::::::::::::::


0 comments on commit a6e9550

Please sign in to comment.