Skip to content

Commit

Permalink
Merge branch 'release/1.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
RazerM committed Jul 30, 2023
2 parents bcae0a5 + 18d97a4 commit 2cd4675
Show file tree
Hide file tree
Showing 107 changed files with 3,226 additions and 3,274 deletions.
6 changes: 0 additions & 6 deletions .appveyor/after_test.bat

This file was deleted.

21 changes: 0 additions & 21 deletions .appveyor/build.cmd

This file was deleted.

24 changes: 0 additions & 24 deletions .appveyor/prepare.bat

This file was deleted.

107 changes: 107 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: CI

on:
push:
branches: ["develop", "master"]
pull_request:
branches: ["develop", "master"]
workflow_dispatch:

jobs:
linux:
name: "Linux (${{ matrix.python-version }})"
runs-on: "ubuntu-latest"

services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox -- -r aR"

windows:
name: "Windows (${{ matrix.python-version }}, ${{ matrix.arch }})"
runs-on: "windows-latest"

strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
arch: ["x86", "x64"]

env:
ENABLE_LOGBOOK_NTEVENTLOG_TESTS: "1"

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
architecture: "${{ matrix.arch }}"

- run: python -VV
- run: python -m site
- run: python -m pip install --upgrade pip setuptools wheel
- run: python -m pip install --upgrade tox tox-gh-actions

- name: "Run tox targets for ${{ matrix.python-version }} on ${{ matrix.arch }}"
run: "python -m tox -- -r aR -k 'not redis'"

macos:
name: "macOS (${{ matrix.python-version }})"
runs-on: "macos-latest"

strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
architecture: "${{ matrix.arch }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox -- -r aR -k 'not redis'"

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
55 changes: 55 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is based on pyca/cryptography but we use cibuildwheel
# https://github.com/pyca/cryptography/blob/50ae9623df9181e5d08bbca0791ae69af4d3d446/.github/workflows/pypi-publish.yml
name: Publish to PyPI

on:
workflow_dispatch:
inputs:
run_id:
description: The run of wheel-builder to use for finding artifacts.
required: true
environment:
description: Which PyPI environment to upload to
required: true
type: choice
options: [testpypi, pypi]
workflow_run:
workflows: ["Wheel Builder"]
types: [completed]

jobs:
publish:
runs-on: ubuntu-latest
# We're not actually verifying that the triggering push event was for a
# tag, because github doesn't expose enough information to do so.
# wheel-builder.yml currently only has push events for tags.
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success')
environment: publish
permissions:
id-token: write
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
with:
path: artifacts/
run_id: ${{ github.event.inputs.run_id || github.event.workflow_run.id }}

- name: Move artifacts to dist/
run: |
ls -lR artifacts/
mkdir dist
mv artifacts/sdist/*.tar.gz dist/
mv artifacts/wheels/*.whl dist/
- name: Publish to pypi.org
uses: pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8 # v1.8.8
if: github.event_name == 'workflow_run' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi')
with:
packages-dir: dist/

- name: Publish to test.pypi.org
uses: pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8 # v1.8.8
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist/
65 changes: 65 additions & 0 deletions .github/workflows/wheel-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is based on pyca/cryptography but we use cibuildwheel
# https://github.com/pyca/cryptography/blob/50ae9623df9181e5d08bbca0791ae69af4d3d446/.github/workflows/wheel-builder.yml
name: Wheel Builder

permissions:
contents: read
on:
workflow_dispatch:
inputs:
version:
description: The Git ref to build
# Do not add any non-tag push events without updating pypi-publish.yml. If
# you do, it'll upload wheels to PyPI.
push:
tags:
- "*"
pull_request:
paths:
- .github/workflows/wheel-builder.yml
- setup.py
- pyproject.toml

jobs:
sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# The tag to build or the tag received by the tag event
ref: ${{ github.event.inputs.version || github.ref }}
persist-credentials: false

- run: python -m venv .venv
- name: Install Python dependencies
run: .venv/bin/pip install -U pip build
- name: Make sdist
run: .venv/bin/python -m build --sdist
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: sdist
path: dist/*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# The tag to build or the tag received by the tag event
ref: ${{ github.event.inputs.version || github.ref }}
persist-credentials: false

- name: Build wheels
uses: pypa/cibuildwheel@f21bb8376a051ffb6cb5604b28ccaef7b90e8ab7 # v2.14.1

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: wheels
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ target/

# Logbook specific / custom ignores
.ropeproject
logbook/_speedups.c
src/cython/speedups.c
env*
.vagrant
flycheck-*
Expand Down
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
exclude: docs/sheet/.*\.html$
- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.11"

python:
install:
- method: pip
path: .
extra_requirements:
- docs
Loading

0 comments on commit 2cd4675

Please sign in to comment.