Skip to content

Commit c8e7ff3

Browse files
committed
add: new content to edit file lesson
docs: update README.md [skip ci] docs: update .all-contributorsrc [skip ci] add: edit lesson fix: pr page plus screencasts fix: rename and reorg add: metadata to core pages rewrite: social cues added throughout fix: metadata fix: add social elements fix: cleanup and add social context fix: edits from group review fix: new landing page - intro Fix: final edits to lessons fix: links
1 parent ae6bdb1 commit c8e7ff3

32 files changed

+839
-168
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@
4545
"code",
4646
"review"
4747
]
48+
},
49+
{
50+
"login": "jsdodge",
51+
"name": "J. Steven Dodge",
52+
"avatar_url": "https://avatars.githubusercontent.com/u/4602669?v=4",
53+
"profile": "https://www.sfu.ca/lux/author/j.-steven-dodge/",
54+
"contributions": [
55+
"review"
56+
]
4857
}
4958
],
5059
"contributorsPerLine": 7,

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
5858
<td align="center" valign="top" width="14.28%"><a href="http://blog.ucodery.com"><img src="https://avatars.githubusercontent.com/u/28751151?v=4?s=100" width="100px;" alt="Jeremy Paige"/><br /><sub><b>Jeremy Paige</b></sub></a><br /><a href="https://github.com/pyOpenSci/lessons/pulls?q=is%3Apr+reviewed-by%3Aucodery" title="Reviewed Pull Requests">👀</a></td>
5959
<td align="center" valign="top" width="14.28%"><a href="https://hachyderm.io/web/@willingc"><img src="https://avatars.githubusercontent.com/u/2680980?v=4?s=100" width="100px;" alt="Carol Willing"/><br /><sub><b>Carol Willing</b></sub></a><br /><a href="https://github.com/pyOpenSci/lessons/pulls?q=is%3Apr+reviewed-by%3Awillingc" title="Reviewed Pull Requests">👀</a></td>
6060
<td align="center" valign="top" width="14.28%"><a href="https://jon-e.net"><img src="https://avatars.githubusercontent.com/u/12961499?v=4?s=100" width="100px;" alt="Jonny Saunders"/><br /><sub><b>Jonny Saunders</b></sub></a><br /><a href="https://github.com/pyOpenSci/lessons/commits?author=sneakers-the-rat" title="Code">💻</a> <a href="https://github.com/pyOpenSci/lessons/pulls?q=is%3Apr+reviewed-by%3Asneakers-the-rat" title="Reviewed Pull Requests">👀</a></td>
61+
<td align="center" valign="top" width="14.28%"><a href="https://www.sfu.ca/lux/author/j.-steven-dodge/"><img src="https://avatars.githubusercontent.com/u/4602669?v=4?s=100" width="100px;" alt="J. Steven Dodge"/><br /><sub><b>J. Steven Dodge</b></sub></a><br /><a href="https://github.com/pyOpenSci/lessons/pulls?q=is%3Apr+reviewed-by%3Ajsdodge" title="Reviewed Pull Requests">👀</a></td>
6162
</tr>
6263
</tbody>
6364
</table>

conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# -- Project information -----------------------------------------------------
2424

25-
project = "pyOpenSci Python Package Guide"
25+
project = "pyOpenSci Open Source Lessons"
2626
copyright = f"{current_year}, {organization_name}"
2727
author = "pyOpenSci Community"
2828
# Version is needed to avoid "cant describe anything fatal error"
@@ -105,11 +105,11 @@
105105
# "text": "Python Packaging",
106106
"image_dark": "logo-dark-mode.png",
107107
"image_light": "logo-light-mode.png",
108-
"alt_text": "pyOpenSci Python Package Guide. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower",
108+
"alt_text": "pyOpenSci Open Source Lessons. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower",
109109
},
110110
# Increase this as lessons are added -
111111
# set low to hide links to other pyos sites and allow nav between lessons
112-
"header_links_before_dropdown": 3,
112+
"header_links_before_dropdown": 5,
113113
"use_edit_page_button": True,
114114
"show_nav_level": 2,
115115
"navigation_depth": 3,

github-git/4-edit-commit-files.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

github-git/5-pull-request.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

github-git/6-clone-repo.md renamed to github-git/clone-repo.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
1111
name: python3
12+
myst_html_meta:
13+
"title": "How to Clone a GitHub Repository to Work Locally: Collaborative GitHub for beginners"
14+
"description lang=en": "Learn how to clone or make a copy of a GitHub repository online on your computer so you can work locally."
15+
"keywords": "GitHub, OpenSource"
16+
"property=og:locale": "en_US"
1217
---
1318

14-
(clone-repo)=
19+
(clone-repository)=
1520
# Clone a GitHub Repository to Work Locally
1621
How to clone a repo.
1722

@@ -38,13 +43,13 @@ On the main **GitHub.com** page of the repository, you can click on the green bu
3843

3944
`https://github.com/your-username/repo-name`
4045

41-
46+
::::{todo}
4247
:::{figure} /images/github/image-coming-soon.png
4348
:alt: alt text here
4449

4550
You can make a local copy of your forked repository on your computer with the git clone command.
4651
:::
47-
52+
::::
4853

4954
:::{tip}
5055
You can copy the URL directly from your web browser, or in some cases, you might already know the URL. However, in many cases, you will come across a new **GitHub.com** repository on your own and will need to follow these instructions to copy the URL for future use.

github-git/edit-commit-files.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
jupytext:
3+
text_representation:
4+
extension: .md
5+
format_name: myst
6+
format_version: 0.13
7+
jupytext_version: 1.16.4
8+
kernelspec:
9+
display_name: Python 3 (ipykernel)
10+
language: python
11+
name: python3
12+
myst_html_meta:
13+
"title": "How to edit and commit changes to a file on GitHub: Intro to Collaborative GitHub"
14+
"description lang=en": "Learn how to edit a file and then commit changes to that file to version control. All in the GitHub interface."
15+
"keywords": "GitHub, OpenSource, beginner-friendly"
16+
"property=og:locale": "en_US"
17+
og:image: /images/github/steps-to-contribute.png
18+
og:image:alt: An image that shows the steps for contributing to open source on GitHub.
19+
---
20+
21+
# Your First Edits to a File in Your Fork: Edit & Commit
22+
23+
Now that you've [identified and comment on an issue](identify-issue), [forked the repository](fork-repo) and received approval to work on an issue, it's time to make your changes.
24+
25+
> **💡 Reminder:** Your fix should be **small and text-based**, like updating documentation or fixing a typo.
26+
27+
:::{admonition} What you'll learn
28+
:class: tip
29+
You’ll edit a file directly in your **fork** using GitHub’s interface and commit the changes using only the native GitHub interface.
30+
31+
NOTE: If you want to work on the files locally on your laptop, you will need to [clone or make a copy of your repo locally](clone-repo).
32+
33+
:::
34+
35+
## How to edit a file in your fork
36+
37+
GitHub lets you edit files right in your browser. Here’s how:
38+
39+
1. Navigate to **your fork** of the repository.
40+
2. Find the file you want to edit.
41+
3. Click the <kbd><i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> Edit</kbd> button.
42+
4. Make your changes and **commit** them.
43+
44+
:::{figure} /images/github/edit-commit-file.gif
45+
:alt: "GIF showing how to edit and commit a file on GitHub."
46+
47+
Editing a file directly in the GitHub interface is a straight forward process.
48+
:::
49+
50+
> **⚡ Quick tip:** You can edit as many files as you want, but GitHub only lets you commit them **one at a time** in the browser.
51+
52+
53+
## Ways to edit a file: GitHub vs. GitHub Codespaces
54+
55+
GitHub now offers **two ways** to edit files directly in the interface or using the [cloud-based GitHub Codespaces](about-codespace). If you’re making a small change, use GitHub’s interface. If you need to edit multiple files, try Codespaces.
56+
57+
| | Option | When to Use | Pros | Limitations |
58+
|-|---------|------------|------|-------------|
59+
| | **GitHub Interface** <i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> | Quick edits (typos, small fixes) | No setup needed, edit in browser | Can only commit one file at a time |
60+
| | **GitHub Codespaces** <i class="fa-solid fa-laptop-code" style="color: #81c0aa;"></i> | Editing multiple files | Full VS Code environment in browser | Requires configuration but once configured, you can reuse it |
61+
62+
> **💡 Need to edit multiple files using a coding editor like VsCode or Jupyter?** Learn more about using [GitHub Codespaces](github-codespaces).
63+
64+
## What is a commit?
65+
66+
A commit is like taking a snapshot of your changes so you can always "undo" the changes if needed. You can think of a **commit** as a save (or restore) point in git's history. Each commit captures changes you make to one or more files in the repository at a specific time; each commit includes a note explaining what you did.
67+
68+
:::{tip}
69+
A **commit** is a feature of [git version control](what-is-git), the version control system that GitHub runs in the background.
70+
71+
:::
72+
73+
### How commits work
74+
75+
:::{figure} /images/github/git-commits-files.png
76+
:alt: A visual example demonstrating how Git tracks changes to a document through commits. The image shows an “Original File” with its initial text, followed by two commits. The first commit adds a new paragraph of text, with the changes highlighted in green and the commit message, “Fix: added a new paragraph to clarify text.” The second commit fixes typos in the text, with the edits highlighted in green and the commit message, “Fix: copy edits.” At the bottom, a comparison shows the document after each commit, illustrating how the file evolves with changes.
77+
78+
Each commit represents **a set of changes** at a specific time.
79+
:::
80+
81+
> **🛠 Do you need to undo changes that you made?** Git lets you revert to an earlier commit, so you don’t have to worry about breaking anything.
82+
83+
84+
:::{figure} /images/github/git-what-are-commits.png
85+
:alt: A diagram explaining Git commits and their role in version control. The top section shows a timeline of circular commits, each paired with a file icon to represent file changes, with the text: “Each commit represents one or more file changes made at a specific point in time.” The middle section highlights the “Latest Commit” on the timeline, showing it as the current state of the repository. The bottom section demonstrates the concept of reverting, with an arrow pointing from a later commit back to a previous one, illustrating that Git allows reverting or going back to earlier commits. The text reads: “You can also always revert or return to a previous commit. This is what makes Git powerful.”
86+
87+
You can always **undo or revert** changes using Git.
88+
:::
89+
90+
:::{admonition} What's next?
91+
:class: seealso
92+
93+
<i class="fa-brands fa-github-alt"></i> Once you've committed your changes, you can open a **pull request (PR)** to suggest your edits to the main project.
94+
95+
*****
96+
97+
[Learn how to create a pull request →](pull-request)
98+
:::
99+
100+
101+
:::{todo}
102+
103+
It might be cool to show first contributions like my first on to nbconvert could be interesting? Other people might have examples from the community that we could share some stories about.
104+
:::

github-git/3-fork-repo.md renamed to github-git/fork-repo.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ myst_html_meta:
2424
---
2525

2626
(fork-repository)=
27-
# A Guide to Forks on GitHub Forks
2827

28+
# A Guide to Forks on GitHub Forks
2929

3030
:::{admonition} What You Will Learn
3131
:class: tip
@@ -39,7 +39,7 @@ Forking a repository **creates a copy** in your GitHub account while keeping a l
3939

4040
- <i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> **Edit without concern**: Work on your fork without affecting the original project.
4141
- <i class="fa-solid fa-arrows-rotate" style="color: #81c0aa;"></i> **Stay up to date**: Sync your fork with the latest changes from the original repo.
42-
- <i class="fa-solid fa-paper-plane" style="color: #81c0aa;"></i> **Propose changes**: Suggest edits by submitting a **pull request** to the original repository.
42+
- <i class="fa-solid fa-paper-plane" style="color: #81c0aa;"></i> **Propose changes**: Suggest edits by submitting a **pull request** to the original repository.
4343

4444
> **<i class="fa-solid fa-lightbulb" style="color: #81c0aa;"></i> Example**: You want to fix a typo in a project’s documentation. Instead of requesting permission, you fork the repo, make the fix, and submit a pull request with your update.
4545
@@ -64,20 +64,17 @@ The URL of your fork will be:
6464

6565
`https://github.com/your-username/pyos-demo-package-contribute`
6666

67-
6867
:::{tip}
69-
The number next to the <kbd><i class="fa-solid fa-code-fork"></i> button tells you how many times other users have forked the repository.
68+
The number next to the <kbd><i class="fa-solid fa-code-fork"></i> button tells you how many times other users have forked the repository.
7069
:::
7170

72-
7371
:::{figure} /images/github/fork-repo-animated.gif
74-
:alt: GIF showing how to fork a repository on GitHub
72+
:alt: GIF showing how to fork a repository on GitHub
7573

7674
To fork a repo, navigate to it on GitHub and click the **Fork** button. Your copy will appear under your account.
7775
:::
7876

79-
80-
:::{admonition} Who owns the repo?
77+
:::{admonition} Who owns the repo?
8178

8279
Every GitHub repository has an **owner**, which can be:
8380

@@ -87,16 +84,16 @@ Every GitHub repository has an **owner**, which can be:
8784
The **owner’s username appears first in the URL**, showing who controls the repository.
8885

8986
**Example**:
90-
- A personal repo: `https://github.com/your-gh-username/my-project`
91-
- An organization-owned repo: `https://github.com/pyOpenSci/repo-name`
87+
88+
- A personal repo: `https://github.com/your-gh-username/my-project`
89+
- An organization-owned repo: `https://github.com/pyOpenSci/repo-name`
9290

9391
If you **fork a repo**, your GitHub username becomes the owner of the fork:
9492

9593
> **Forked URL:** `https://github.com/your-username/repository-name`
9694
9795
:::
9896

99-
10097
## What happens after you fork a repo?
10198

10299
Your fork **is a separate copy**, but it remains linked to the original repository.
@@ -105,27 +102,28 @@ Your fork **is a separate copy**, but it remains linked to the original reposito
105102
- **The original repo stays at:** `https://github.com/original-owner/repository-name`
106103

107104
> **<i class="fa-solid fa-lightbulb" style="color: #81c0aa;"></i> You can now:**
105+
>
108106
> - Make changes without affecting the original repository.
109107
> - Keep your fork updated as the original repo evolves.
110108
> - Submit changes back using a **pull request**.
111-
109+
112110
::::{todo}
113111
/images/github/fork-structure.png
114112
:alt: "Diagram showing how forking creates a personal copy linked to the original."
115113
Graphic: A simple diagram showing "Original Repo → Fork → Your Account".
116114
::::
117115

118-
119116
## Keep your fork in sync
120117

121118
Your fork doesn't automatically get updated when the **original repository is updated**. Periodically, you will need to **sync your fork** to keep it current.
122119

123120
To sync a GitHub fork:
121+
124122
1. **Go to your fork** on GitHub.
125123
2. **Click the** <i class="fa-solid fa-arrows-rotate" style="color: #81c0aa;"></i> **Sync fork** **button** (available on GitHub’s UI).
126124
3. Your fork's main branch will now match the latest version of the original repository. This means that it has the most recent commits that have been made to the parent repository.
127125

128-
:::{todo}
126+
:::{todo}
129127
/images/github/sync-fork.png
130128
:alt: "GitHub interface showing how to sync a fork with the original repo."
131129
Graphi: Screenshot of GitHub’s "Sync Fork" button

github-git/1-get-to-know-repo.md renamed to github-git/get-to-know-repo.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Before contributing, it's important to **familiarize yourself with the repositor
3131
### 1. Check the README and CONTRIBUTING guide
3232

3333
The **README** provides an overview of the project, its purpose, and how it is used. Often, it also links to the project's contributing and development guides.
34+
3435
- **Review the README file**: The [**README.md** file](https://github.com/pyOpenSci/pyos-demo-package-contribute/blob/main/README.md) will help you understand the project's goals.
3536
- **Read the CONTRIBUTING guide**: The [**CONTRIBUTING.md** file](https://github.com/pyOpenSci/pyos-demo-package-contribute/blob/main/CONTRIBUTING.md) explains what types of contributions are accepted and the expected workflow.
3637

@@ -43,6 +44,7 @@ Above is a screenshot of the pyOpenSci practice repo that you will use. Notice t
4344
:::
4445

4546
(labels-responsive)=
47+
4648
### 2. Look at project activity and maintainer responsiveness
4749

4850
- Scan the **issues and pull requests** sections on GitHub to see how long it generally takes for maintainers to respond.
@@ -54,17 +56,19 @@ Above is a screenshot of the pyOpenSci practice repo that you will use. Notice t
5456
### 3. Understand the project’s infrastructure
5557

5658
Some repositories have specific **code and text format and workflow requirements**. Make sure to check if the project uses:
59+
5760
- **Code formatters and linters**: Does the project use [code formatters or linters](https://www.pyopensci.org/python-package-guide/package-structure-code/code-style-linting-format.html#python-package-code-style-format-and-linters)?
5861
- **Continuous Integration (CI)**: Are there automated tests and checks that run when a new PR is submitted?
5962
- **Licensing**: The [project’s license](https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html) dictates how you can use, modify, and distribute the code.
6063
- The **MIT and BSD-3 licenses** permit broad use with attribution; these licenses are common in the scientific open source ecosystem.
61-
- A **GPL license** requires derivative works to follow the same open source terms. This is what's known as a [copy-left license](https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html#use-open-permissive-licenses-when-possible).
64+
- A **GPL license** requires derivative works to follow the same open source terms. This is what's known as a [copy-left license](https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html#use-open-permissive-licenses-when-possible).
6265

6366
> **<i class="fa-solid fa-circle-check" style="color: #81c0aa;"></i> Social cue:** If the project follows **consistent coding standards and has CI in place**, it likely has an **organized review process**, that is setup to accept contributions. Further, if the project uses tools such as the [pre-commit ci bot](https://www.pyopensci.org/python-package-guide/package-structure-code/code-style-linting-format.html#pre-commit-ci), code formatting and linting might be possible on GitHub within the pull request it self using CI. This means you won't need to setup a development environment to "clean up" any changes that you make in a PR.
6467
6568
### 4. Check for a Code of Conduct
6669

6770
A **Code of Conduct** helps ensure a **welcoming and respectful** community.
71+
6872
- If one exists, read it to understand community expectations.
6973
- If missing, check discussions in issues and pull requests to gauge how maintainers interact with contributors.
7074

@@ -81,6 +85,6 @@ A **Code of Conduct** helps ensure a **welcoming and respectful** community.
8185

8286
The above steps will help you determine whether a project is **welcoming, responsive, and well-maintained**, making it a great place to contribute! 🚀
8387

84-
8588
## Next steps
89+
8690
Once you have explored and gotten to know the repository and decided that it's a good project to contribute to, it's time to [find an issue to work](identify-issue). You will learn more about that next.

0 commit comments

Comments
 (0)