From aa2dba2bfbd8ca8cfed3b6dddb90e3fe79a75a2b Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Tue, 19 Mar 2024 15:26:41 -0700 Subject: [PATCH 1/3] docs-test --- .github/workflows/build-book.yml | 2 +- noxfile.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-book.yml b/.github/workflows/build-book.yml index 740515edf..8a8df52db 100644 --- a/.github/workflows/build-book.yml +++ b/.github/workflows/build-book.yml @@ -42,7 +42,7 @@ jobs: run: python3 -m pip install nox - name: Build book - run: nox -s docs + run: nox -s docs-test # Save html as artifact - name: Save book html as artifact for viewing diff --git a/noxfile.py b/noxfile.py index 62324af68..6af652e91 100644 --- a/noxfile.py +++ b/noxfile.py @@ -16,6 +16,17 @@ def docs(session): cmd.extend(build_command + session.posargs) session.run(*cmd) +@nox.session(name="docs-test") +def docs_test(session): + """ + Same as `docs`, but rebuild everything and fail on warnings for testing + """ + session.install("-r", "requirements.txt") + cmd = ["sphinx-build"] + cmd.extend(['-W', '--keep-going', '-E', '-a']) + cmd.extend(build_command + session.posargs) + session.run(*cmd) + @nox.session(name="docs-live") def docs_live(session): From c0da378eb6803e77165a162ec1bf43291a80d8a7 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Tue, 19 Mar 2024 15:54:46 -0700 Subject: [PATCH 2/3] fix errors --- CONTRIBUTING.md | 3 +++ conf.py | 1 + tutorials/add-license-coc.md | 3 +-- tutorials/installable-code.md | 2 -- tutorials/publish-conda-forge.md | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3817ab98..bf26b027b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,6 @@ +--- +orphan: true +--- # Contributing Guide for the Python open source software packaging book This is a community resource. We welcome contributions in the form of issues and/or pull requests to this guide. diff --git a/conf.py b/conf.py index 5f6a0e76d..f4498c496 100644 --- a/conf.py +++ b/conf.py @@ -61,6 +61,7 @@ "attrs_block", ] myst_heading_anchors = 3 +myst_footnote_transition = False # Sphinx_favicon is used now in favor of built in support # https://pypi.org/project/sphinx-favicon/ diff --git a/tutorials/add-license-coc.md b/tutorials/add-license-coc.md index af1fc9521..bd0177fab 100644 --- a/tutorials/add-license-coc.md +++ b/tutorials/add-license-coc.md @@ -170,13 +170,12 @@ The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, That's it - you've now added a code of conduct to your package directory. :::{admonition} Additional Code of Conduct resources -:class: note - [ Guide: `CODE_OF_CONDUCT.md` files](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) - [pyOpenSci package guide `CODE_OF_CONDUCT.md` overview](https://www.pyopensci.org/python-package-guide/documentation/repository-files/code-of-conduct-file.html) - ::: + ## Wrap up In this lesson and the [last lesson](add-readme), you have added a: diff --git a/tutorials/installable-code.md b/tutorials/installable-code.md index 6c25d42bd..9b1372ba3 100644 --- a/tutorials/installable-code.md +++ b/tutorials/installable-code.md @@ -587,9 +587,7 @@ Type "help", "copyright", "credits" or "license" for more information. 3 ``` - :::{admonition} Installing packages from GitHub - If you wish to share your code without publishing to PyPI you can always install packages directly from GitHub using the syntax: diff --git a/tutorials/publish-conda-forge.md b/tutorials/publish-conda-forge.md index 5eedb4efc..289c0e34d 100644 --- a/tutorials/publish-conda-forge.md +++ b/tutorials/publish-conda-forge.md @@ -44,7 +44,7 @@ Anyone can submit a package to these channels however they must pass a technical [Learn more about conda channels here.](#about-conda) -:::{figure-md} pypi-conda-channels +:::{figure-md} pypi-conda-channels-2 Graphic with the title Python package repositories. Below it says anything hosted on PyPI can be installed using pip install. Packaging hosted on a conda channel can be installed using conda install. Below that there are two rows. The top row says conda channels. Next to it are three boxes one with conda-forge, community maintained; bioconda and then default - managed by the Anaconda team. Below that there is a row that says PyPI servers. PyPI - anyone can publish to PyPI and test PyPI (a testbed server for you to practice). @@ -228,7 +228,7 @@ where it saved the recipe file. Open the meta.yaml file. The finished `meta.yaml` file that grayskull creates should look like the example below: -```yaml +```yaml+jinja {% set name = "pyospackage" %} {% set version = "0.1.8" %} @@ -421,7 +421,7 @@ This is also why we don't suggest you publish to conda-forge as a practice run. Once you create your pull request, a suite of CI actions will run that build and test the build of your package. A conda-forge maintainer will work with you to get your recipe in good shape and merged. -:::{figure-md} pypi-conda-channels +:::{figure-md} conda-forge-pr-build Image showing the 5 CI tasks that will run against your package in the GitHub interface after you'ce created a pull request. From def1779d64f55fe4689cd54f60f0ae7bb338efe2 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Tue, 19 Mar 2024 15:58:17 -0700 Subject: [PATCH 3/3] undo stuff from trying to bughunt footer separators --- tutorials/add-license-coc.md | 2 +- tutorials/installable-code.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/add-license-coc.md b/tutorials/add-license-coc.md index bd0177fab..2e8f6ebcd 100644 --- a/tutorials/add-license-coc.md +++ b/tutorials/add-license-coc.md @@ -170,12 +170,12 @@ The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, That's it - you've now added a code of conduct to your package directory. :::{admonition} Additional Code of Conduct resources +:class: note - [ Guide: `CODE_OF_CONDUCT.md` files](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) - [pyOpenSci package guide `CODE_OF_CONDUCT.md` overview](https://www.pyopensci.org/python-package-guide/documentation/repository-files/code-of-conduct-file.html) ::: - ## Wrap up In this lesson and the [last lesson](add-readme), you have added a: diff --git a/tutorials/installable-code.md b/tutorials/installable-code.md index 9b1372ba3..6c25d42bd 100644 --- a/tutorials/installable-code.md +++ b/tutorials/installable-code.md @@ -587,7 +587,9 @@ Type "help", "copyright", "credits" or "license" for more information. 3 ``` + :::{admonition} Installing packages from GitHub + If you wish to share your code without publishing to PyPI you can always install packages directly from GitHub using the syntax: