Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/artifact_redirect.yml

This file was deleted.

11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Once you submit a pull request, a series of checks will be run to ensure that yo

- **Code formatting and styles**: checks that your code is formatted correctly, by `pre-commit.ci - pr check`.
- **docs build**: checks that the documentation builds correctly, using `circleci`.

- **docs build / preview**: builds the guide and publishes a Netlify deploy preview (see [Pull request previews](#pull-request-previews) below).
You will see the status of these checks in your pull request.

```{figure} images/contributing/pull-requests-checks.png
Expand All @@ -280,6 +280,15 @@ An image showing the status of the checks in a pull request in GitHub. The check

To get more information about the errors, you can click on the "Details" link next to the failed check.

### Pull request previews

This guide uses [Netlify](https://www.netlify.com/) deploy previews. After
the Netlify check finishes on a pull request, click **Details** next to the
deploy-preview status to open a live build with your changes.

The guide is still deployed live using GitHub Pages:
<https://www.pyopensci.org/python-package-guide/>.

### What to expect from the review process

Once you submit a pull request, a maintainer of the repository will review your changes and provide feedback. The review process may involve:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

[![DOI](https://zenodo.org/badge/556814582.svg)](https://zenodo.org/badge/latestdoi/556814582)

[![CircleCI](https://circleci.com/gh/pyOpenSci/python-package-guide.svg?style=svg)](https://circleci.com/gh/pyOpenSci/python-package-guide)

[![Mentioned in Awesome Scientific Python](https://awesome.re/mentioned-badge.svg)](https://github.com/rossant/awesome-scientific-python)

## What is pyOpenSci?
Expand Down
6 changes: 5 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@

# languages that will be included in the language dropdown
# (ie. all that are being built in this nox build session)
if sphinx_env == "production":
# Netlify sets NETLIFY=true. Those builds publish the same languages as
# production. Link prefixes stay at "/" because SPHINX_ENV is development
# there (see netlify.toml). Local builds are unchanged.
on_netlify = os.environ.get("NETLIFY", "").lower() == "true"
if sphinx_env == "production" or on_netlify:
build_languages = ["en"] + release_languages
else:
build_languages = ["en"] + languages
Expand Down
15 changes: 15 additions & 0 deletions netlify.toml
Comment thread
InessaPawson marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Netlify deploy previews for the pyOpenSci Python package guide (Sphinx).
# Production remains GitHub Pages:
# https://www.pyopensci.org/python-package-guide/

[build]
command = "bash scripts/netlify-build.sh"
publish = "_build/html"

[build.environment]
PYTHON_VERSION = "3.13"
MPLBACKEND = "Agg"
# Previews are served from the preview URL root, so language-selector
# links use "/" (conf.py does that whenever SPHINX_ENV is not production).
# Netlify also sets NETLIFY=true, which limits the menu to release languages.
SPHINX_ENV = "development"
11 changes: 11 additions & 0 deletions scripts/netlify-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Build the Sphinx Python package guide on Netlify (deploy previews).
set -euo pipefail

# hatch-vcs reads the package version from git tags. Netlify's checkout
# often has no tags. The docs do not display this version.
export SETUPTOOLS_SCM_PRETEND_VERSION="${SETUPTOOLS_SCM_PRETEND_VERSION:-0.0.0}"

python -m pip install --upgrade pip
python -m pip install nox
python -m nox -s docs
Loading