Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Jan 12, 2025
2 parents 9eed90e + 90c605a commit 324c8f0
Show file tree
Hide file tree
Showing 17 changed files with 317 additions and 84 deletions.
19 changes: 19 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,25 @@
"contributions": [
"question"
]
},
{
"login": "santisoler",
"name": "Santiago Soler",
"avatar_url": "https://avatars.githubusercontent.com/u/11541317?v=4",
"profile": "https://www.santisoler.com",
"contributions": [
"code",
"review"
]
},
{
"login": "webknjaz",
"name": "🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)",
"avatar_url": "https://avatars.githubusercontent.com/u/578543?v=4",
"profile": "https://webknjaz.me",
"contributions": [
"review"
]
}
],
"contributorsPerLine": 7,
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ repos:
)$
- repo: https://github.com/errata-ai/vale
rev: v3.8.0
rev: v3.9.3
hooks:
- id: vale

- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
rev: v3.4.2
hooks:
- id: prettier
types_or: [yaml, html, css, scss, javascript, json, toml]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,31 +151,33 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Revathyvenugopal162"><img src="https://avatars.githubusercontent.com/u/104772255?v=4?s=100" width="100px;" alt="Revathy Venugopal"/><br /><sub><b>Revathy Venugopal</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Revathyvenugopal162" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3ARevathyvenugopal162" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Revathyvenugopal162" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://robpasmue.github.io"><img src="https://avatars.githubusercontent.com/u/37798125?v=4?s=100" width="100px;" alt="Roberto Pastor Muela"/><br /><sub><b>Roberto Pastor Muela</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=RobPasMue" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3ARobPasMue" title="Reviewed Pull Requests">👀</a> <a href="#translation-RobPasMue" title="Translation">🌍</a> <a href="#ideas-RobPasMue" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ryanskeith"><img src="https://avatars.githubusercontent.com/u/657220?v=4?s=100" width="100px;" alt="Ryan"/><br /><sub><b>Ryan</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=ryanskeith" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Aryanskeith" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.santisoler.com"><img src="https://avatars.githubusercontent.com/u/11541317?v=4?s=100" width="100px;" alt="Santiago Soler"/><br /><sub><b>Santiago Soler</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=santisoler" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Asantisoler" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://ml-gis-service.com"><img src="https://avatars.githubusercontent.com/u/31246246?v=4?s=100" width="100px;" alt="Simon"/><br /><sub><b>Simon</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=SimonMolinsky" title="Documentation">📖</a> <a href="#design-SimonMolinsky" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sn3hay"><img src="https://avatars.githubusercontent.com/u/156010030?v=4?s=100" width="100px;" alt="Sneha Yadav"/><br /><sub><b>Sneha Yadav</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=sn3hay" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Asn3hay" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mentat.za.net"><img src="https://avatars.githubusercontent.com/u/45071?v=4?s=100" width="100px;" alt="Stefan van der Walt"/><br /><sub><b>Stefan van der Walt</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=stefanv" title="Code">💻</a> <a href="#design-stefanv" title="Design">🎨</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Astefanv" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://stefaniemolin.com"><img src="https://avatars.githubusercontent.com/u/24376333?v=4?s=100" width="100px;" alt="Stefanie Molin"/><br /><sub><b>Stefanie Molin</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=stefmolin" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Astefmolin" title="Reviewed Pull Requests">👀</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://stefaniemolin.com"><img src="https://avatars.githubusercontent.com/u/24376333?v=4?s=100" width="100px;" alt="Stefanie Molin"/><br /><sub><b>Stefanie Molin</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=stefmolin" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Astefmolin" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://stefanorivera.com/"><img src="https://avatars.githubusercontent.com/u/442117?v=4?s=100" width="100px;" alt="Stefano Rivera"/><br /><sub><b>Stefano Rivera</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Astefanor" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tkoyama010"><img src="https://avatars.githubusercontent.com/u/7513610?v=4?s=100" width="100px;" alt="Tetsuo Koyama"/><br /><sub><b>Tetsuo Koyama</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=tkoyama010" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Atkoyama010" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/pyOpenSci/python-package-guide/commits?author=tkoyama010" title="Documentation">📖</a> <a href="#translation-tkoyama010" title="Translation">🌍</a> <a href="#ideas-tkoyama010" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tomalrussell"><img src="https://avatars.githubusercontent.com/u/2762769?v=4?s=100" width="100px;" alt="Tom Russell"/><br /><sub><b>Tom Russell</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=tomalrussell" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Atomalrussell" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-tomalrussell" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Zeitsperre"><img src="https://avatars.githubusercontent.com/u/10819524?v=4?s=100" width="100px;" alt="Trevor James Smith"/><br /><sub><b>Trevor James Smith</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Zeitsperre" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3AZeitsperre" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/tylerjbonnell/"><img src="https://avatars.githubusercontent.com/u/89505514?v=4?s=100" width="100px;" alt="Tyler Bonnell"/><br /><sub><b>Tyler Bonnell</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Tyler-Bonnell" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3ATyler-Bonnell" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vaunty"><img src="https://avatars.githubusercontent.com/u/68826427?v=4?s=100" width="100px;" alt="Vaunty"/><br /><sub><b>Vaunty</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Vaunty" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3AVaunty" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://orcid.org/0000-0002-8999-9003"><img src="https://avatars.githubusercontent.com/u/6338509?v=4?s=100" width="100px;" alt="William F. Broderick"/><br /><sub><b>William F. Broderick</b></sub></a><br /><a href="#tutorial-billbrod" title="Tutorials">✅</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://orcid.org/0000-0002-8999-9003"><img src="https://avatars.githubusercontent.com/u/6338509?v=4?s=100" width="100px;" alt="William F. Broderick"/><br /><sub><b>William F. Broderick</b></sub></a><br /><a href="#tutorial-billbrod" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.owlfolio.org/"><img src="https://avatars.githubusercontent.com/u/325899?v=4?s=100" width="100px;" alt="Zack Weinberg"/><br /><sub><b>Zack Weinberg</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Azackw" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/h-vetinari"><img src="https://avatars.githubusercontent.com/u/33685575?v=4?s=100" width="100px;" alt="h-vetinari"/><br /><sub><b>h-vetinari</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=h-vetinari" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ah-vetinari" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-h-vetinari" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hpodzorski-USGS"><img src="https://avatars.githubusercontent.com/u/159824971?v=4?s=100" width="100px;" alt="hpodzorski-USGS"/><br /><sub><b>hpodzorski-USGS</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=hpodzorski-USGS" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ahpodzorski-USGS" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jaimergp"><img src="https://avatars.githubusercontent.com/u/2559438?v=4?s=100" width="100px;" alt="jaimergp"/><br /><sub><b>jaimergp</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=jaimergp" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ajaimergp" title="Reviewed Pull Requests">👀</a> <a href="#tutorial-jaimergp" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/miguelalizo"><img src="https://avatars.githubusercontent.com/u/108839050?v=4?s=100" width="100px;" alt="miguelalizo"/><br /><sub><b>miguelalizo</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=miguelalizo" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Amiguelalizo" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/pyOpenSci/python-package-guide/commits?author=miguelalizo" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nyeshlur"><img src="https://avatars.githubusercontent.com/u/72169901?v=4?s=100" width="100px;" alt="nyeshlur"/><br /><sub><b>nyeshlur</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=nyeshlur" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Anyeshlur" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yang-ruoxi"><img src="https://avatars.githubusercontent.com/u/13646711?v=4?s=100" width="100px;" alt="ruoxi"/><br /><sub><b>ruoxi</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=yang-ruoxi" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ayang-ruoxi" title="Reviewed Pull Requests">👀</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yang-ruoxi"><img src="https://avatars.githubusercontent.com/u/13646711?v=4?s=100" width="100px;" alt="ruoxi"/><br /><sub><b>ruoxi</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=yang-ruoxi" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Ayang-ruoxi" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/merwok"><img src="https://avatars.githubusercontent.com/u/635179?v=4?s=100" width="100px;" alt="Éric"/><br /><sub><b>Éric</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=merwok" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Amerwok" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://webknjaz.me"><img src="https://avatars.githubusercontent.com/u/578543?v=4?s=100" width="100px;" alt="🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)"/><br /><sub><b>🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Awebknjaz" title="Reviewed Pull Requests">👀</a></td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions codespell-ignore.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
aways
Soler
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"sphinx_sitemap",
"sphinxext.opengraph",
"sphinx_favicon",
"sphinxcontrib.bibtex"
"sphinxcontrib.bibtex",
]

# colon fence for card support in md
Expand Down Expand Up @@ -103,7 +103,7 @@
"image_light": "logo-light-mode.png",
"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",
},
"header_links_before_dropdown": 4,
"header_links_before_dropdown": 5,
"use_edit_page_button": True,
"show_nav_level": 2,
"navigation_depth": 3,
Expand Down Expand Up @@ -164,6 +164,6 @@
}

# Bibliographies
bibtex_bibfiles = ['bibliography.bib']
bibtex_bibfiles = ["bibliography.bib"]
# myst complains about bibtex footnotes because of render order
suppress_warnings = ["myst.footnote"]
84 changes: 84 additions & 0 deletions continuous-integration/ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
(ci-cd)=
# Continuous Integration and Continuous Deployment (CI/CD) For Python Packages

When you develop, work on, and contribute to software, there is more to consider than
just writing code. Having tests and checks ensures that your code
runs reliably and follows a consistent format is also important. You can use
**Continuous Integration (CI)** and **Continuous
Deployment (CD)** to run tests and checks on your code every time someone suggests a change online
in a platform like GitHub or GitLab.

- **Continuous Integration (CI):** Automates the process of running tests,
code checks, and other workflows each time code is updated.
- **Continuous Deployment (CD):** Extends CI by allowing you to automate publishing your package to PyPI, publishing your documentation, and more.

CI and CD streamline software development by automating repetitive
tasks and ensuring code quality and consistency. Having CI setup also makes it easier for new contributors
to contribute to your code base without setting up all your test suites and
other local checks.

## What is continuous integration?

When you’re ready to publish your code online, you can set up Continuous Integration (CI). CI is a platform that allows you to specify and run jobs or workflows you define.
These workflows include:

- Running your test suite
- Running code checkers / linters / spellcheck
- Building your documentation

CI allows you to automate running workflows across a suite of environments, including:

- environments containing different Python versions and
- different operating systems (Mac, Linux, Windows).

## What is Continuous Deployment (CD)?

Continuous deployment (CD) extends the CI process by automating the deployment of code changes to production or staging environments. In the case of your open source tool, CD can be used to:

- Automate publishing to PyPI
- Automate publishing your documentation to GitHub Pages or Read the Docs.

It is also used once your conda-forge recipe is set up to keep your package up to date on conda-forge.

### Why use CI

CI can be configured to run a workflow on every commit pushed to GitHub and every pull request opened. This ensures that any changes made to your package are tested across environments before merging into the main branch of your code.

These checks are particularly useful if someone new is contributing to your code. Every contributor's change will be tested when pushed to your code repository.

Together, CI and CD streamline the process of building, testing, and deploying code. They aim to improve software development and publication efficiency, quality, and reliability.

```{note}
All pyOpenSci packages must use some form of continuous integration. Even if you are not planning to go through peer review, we strongly recommend that you use continuous integration, too!
```

In the case of GitHub actions (which we will focus on here), CI workflows are running on online servers that support GitHub.

## CI / CD platforms

There are numerous platforms available for CI/CD. Here, we will focus on GitHub Actions (GHA), built into GitHub. GitHub is the most commonly used platform to store scientific open-source software.

:::{note}
If you use [GitLab](https://about.gitlab.com/) CI/CD, many of the principles described here will apply. However, the workflow files may look different.
:::

### If you aren't sure, use GitHub Actions

While you are welcome to use the continuous integration platform of your choice,
we recommend GitHub Actions because it is free-to-use and integrated tightly
into the GitHub user interface. There is also an entire store of GitHub action
templates that you can easily use and adapt to your own needs.

:::{admonition} Other platforms that you may run into
:class: info

- [Appveyor:](https://www.appveyor.com/): Supports running tests on Windows operating systems and predated the release of GitHub Actions. Today, AppVeyor supports operating systems beyond Windows.
- [Travis CI:](https://www.travis-ci.com/) had been a common CI platform choice in our ecosystem. Usage dropped after Travis CI ended free support for open-source projects.
- [CircleCI:](https://circleci.com/) CircleCI can be useful for automated builds of websites and documentation since it offers a preview of the PR changes.
:::

## Embrace automation

By embracing CI/CD, you can ensure that your code runs as you expect it to across the diverse landscapes of user environments. Further, you can
automate certain checks (and, in some cases, code fixes), including linting and code style. You can even automate spell-checking your documentation
and docstrings!
Loading

0 comments on commit 324c8f0

Please sign in to comment.