Testing GitHub actions, Cirrus CI, documentation, and publishing releases of Python packages.
Project description
workflow-sandbox
Testing GitHub actions, Cirrus CI, documentation, and publishing releases of Python packages.
This will be a Python package on test PyPI in its own right, with package name workflow-sandbox and module name workflow_sandbox (yes, the mixing of hyphenation and underscores is inelegant but deliberate).
Inception
This repository was created on GitHub using the following settings.
Development environment
To develop this package, I first cloned the repository (others would fork on GitHub then clone their fork):
$ git clone https://github.com/<origin>/workflow-sandbox.git
$ cd workflow-sandbox
where <origin> is the GitHub account of the fork.
For now, I'm going to use <origin>=rpanderson and not work on a fork.
If you are developing on a fork, set the upstream remote:
$ git remote add upstream https://github.com/<upstream>/workflow-sandbox.git
where <upstream> is the base repository used for pull requests and publishing releases and documentation. If you forked your development repository from https://github.com/rpanderson/workflow-sandbox for example, you'd use <upstream>=rpanderson.
Create a virtual environment:
$ python -m venv .venv
$ .venv\Scripts\activate
$ python -m pip install --upgrade pip setuptools wheel
Roadmap
The first port of call will be to test:
CirrusCI
- Formatting using
black. - Linting using
flake8. - Hosting documentation using GitHub pages (on an orphaned
gh-pagesbranch).
GitHub actions
- Create release using
actions/create_release: :
jobs:
release:
name: Release
env:
VERSION: ${${{ github.ref }}//v}
...
steps:
...
# Only publish tagged merges elsewhere
- name: Create GitHub Release
if: startsWith(github.event.ref, 'refs/tags') && startsWith(github.ref, 'v')
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.VERSION }}
draft: true
prerelease: ${{ contains(github.ref, 'rc') }}
-
Publish release on GitHub using
actions/upload-release-assetwith thebodyabove extracted from the appropriate release notes based on git tags, similar to napari/napari#1138. -
Using
pypa/gh-action-pypi-publish:- Publish releases (and release candidates) on PyPI.
- Publish merges into
masterbranch (including untagged development versions) to TestPyPI with an appropriatedevversion suffix.
Acknowledgements
Much of this is guided by the practices of other development communities—especially napari (and, increasingly, labscript-suite)—and many helpful conversations with @chrisjbillington and @philipstarkey.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file workflow-sandbox-0.3.3rc1.tar.gz.
File metadata
- Download URL: workflow-sandbox-0.3.3rc1.tar.gz
- Upload date:
- Size: 55.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb231576bf7d1b912d0052c6700235315e1b95982785f1993dab89b4e769328a
|
|
| MD5 |
9ac3639113e8725733c9ca8b199722b5
|
|
| BLAKE2b-256 |
dd824c1b0b0369cd54df8e2ccd36586d7ccc2ee3db9b297adea5d23986320a8c
|
File details
Details for the file workflow_sandbox-0.3.3rc1-py3-none-any.whl.
File metadata
- Download URL: workflow_sandbox-0.3.3rc1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab9faea4bdcf9f24bd201103a58acbc910e2f5635846816496e9ee64a45c69ae
|
|
| MD5 |
8135baf7e9d2b38d2366eb54ada9d95f
|
|
| BLAKE2b-256 |
a3dedef6c4e35299bab3b3c08be4fb33af033f3bd5155fa87b9b314d5c04ef65
|