Skip to content

Commit

Permalink
Merge pull request #11 from CQCL/release/1.9.0
Browse files Browse the repository at this point in the history
Release/1.9.0
  • Loading branch information
cqc-melf authored Nov 25, 2022
2 parents a9f57d5 + 3fa78c5 commit c6cd02b
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @yao-cqc
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/workflows/build-test
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ cd ${GITHUB_WORKSPACE}/tests

python -m pip install --pre -r test-requirements.txt

# update the pytket version to the lastest (pre) release
python -m pip install --upgrade --pre pytket~=1.0

pytest --doctest-modules

cd ..
Expand Down
79 changes: 43 additions & 36 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,58 @@ on:
branches:
- develop
- 'wheel/**'
- 'runci/**'
release:
types:
- created
- edited
schedule:
# 04:00 every Tuesday morning
- cron: '0 4 * * 2'

jobs:
pyzx-checks:
name: pyZX - Build and test module
strategy:
matrix:
os: ['ubuntu-20.04', 'macos-11', 'windows-2019']
os: ['ubuntu-22.04', 'macos-12', 'windows-2022']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*
- name: Set up Python 3.8
if: github.event_name == 'push'
uses: actions/setup-python@v3
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build and test (3.8)
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event_name == 'schedule'
shell: bash
run: |
./.github/workflows/build-test nomypy
- name: Set up Python 3.9
if: github.event_name == 'pull_request' || github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel')
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Build and test including remote checks (3.9) mypy
if: (matrix.os == 'macos-11') && ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel'))
if: (matrix.os == 'macos-12') && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'release' || github.event_name == 'schedule' )
shell: bash
run: |
./.github/workflows/build-test mypy
- name: Build and test including remote checks (3.9) nomypy
if: (matrix.os != 'macos-11') && ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel'))
if: (matrix.os != 'macos-12') && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'release' || github.event_name == 'schedule')
shell: bash
run: |
./.github/workflows/build-test nomypy
- name: Set up Python 3.10
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/setup-python@v3
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build and test (3.10)
if: github.event_name == 'push' || github.event_name == 'pull_request'
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
shell: bash
run: |
./.github/workflows/build-test nomypy
Expand All @@ -67,11 +70,11 @@ jobs:
name: artefacts
path: wheelhouse/
- name: Install docs dependencies
if: (matrix.os == 'ubuntu-20.04') && (github.event_name == 'pull_request')
if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' )
run: |
pip install -r .github/workflows/docs/requirements.txt
- name: Build docs
if: (matrix.os == 'ubuntu-20.04') && (github.event_name == 'pull_request')
if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' )
timeout-minutes: 20
run: |
./.github/workflows/docs/check-build-docs
Expand All @@ -81,7 +84,7 @@ jobs:
name: Publish to pypi
if: github.event_name == 'release'
needs: pyzx-checks
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Download all wheels
uses: actions/download-artifact@v3
Expand All @@ -98,17 +101,17 @@ jobs:
password: ${{ secrets.PYPI_PYTKET_PYZX_API_TOKEN }}
verbose: true

docs:
name: Build and publish docs
build_docs:
name: Build docs
if: github.event_name == 'release'
needs: publish_to_pypi
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up Python 3.9
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Download all wheels
Expand All @@ -117,7 +120,7 @@ jobs:
path: wheelhouse
- name: Install pip, wheel
run: pip install -U pip wheel
- name: Install extensions
- name: Install extension
run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do pip install $w ; done
- name: Install docs dependencies
run: |
Expand All @@ -127,20 +130,24 @@ jobs:
run: |
cd .github/workflows/docs
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "«$GITHUB_WORKFLOW» github action"
- name: Check out gh-pages branch
run: git checkout gh-pages
- name: Remove old docs
run: git rm -r --ignore-unmatch docs/api
- name: Add generated docs to repository
run: |
mkdir -p docs
mv .github/workflows/docs/extensions docs/api
git add -f docs/api
git commit --allow-empty -m "Add generated documentation."
- name: Publish docs
run: git push origin gh-pages:gh-pages
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions/api
- name: Upload docs as artefact
uses: actions/upload-pages-artifact@v1
with:
path: .github/workflows/docs/extensions

publish_docs:
name: Publish docs
if: github.event_name == 'release'
needs: build_docs
runs-on: ubuntu-22.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
9 changes: 4 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ on:
branches:
- 'docs/**'
schedule:
# 04:00 every weekday morning
- cron: '0 4 * * 1-5'

# 04:00 every Tuesday morning
- cron: '0 4 * * 2'
jobs:
docs:
name: build docs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Upgrade pip and install wheel
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ on:
jobs:
jira_task:
name: Create Jira issue
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Login
uses: atlassian/gajira-login@v2.0.0
uses: atlassian/gajira-login@v3.0.0
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Create Bug
uses: atlassian/gajira-create@v2.0.1
uses: atlassian/gajira-create@v3.0.0
if: contains(github.event.issue.labels.*.name, 'bug')
with:
project: TKET
issuetype: Bug
summary: «${{ github.event.issue.title }}»
summary: « [pytket-pyzx] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
- name: Create Task
uses: atlassian/gajira-create@v2.0.1
uses: atlassian/gajira-create@v3.0.0
if: "! contains(github.event.issue.labels.*.name, 'bug')"
with:
project: TKET
issuetype: Task
summary: «${{ github.event.issue.title }}»
summary: « [pytket-pyzx] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
jobs:
lint:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update pip
Expand Down
2 changes: 1 addition & 1 deletion _metadata.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__extension_version__ = "0.25.0"
__extension_version__ = "0.26.0"
__extension_name__ = "pytket-pyzx"
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
~~~~~~~~~

0.26.0 (November 2022)
----------------------

* Updated pytket version requirement to 1.9.

0.25.0 (October 2022)
---------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
license="Apache 2",
packages=find_namespace_packages(include=["pytket.*"]),
include_package_data=True,
install_requires=["pytket ~= 1.7", "pyzx ~= 0.7.0"],
install_requires=["pytket ~= 1.9", "pyzx ~= 0.7.0"],
classifiers=[
"Environment :: Console",
"Programming Language :: Python :: 3.8",
Expand Down

0 comments on commit c6cd02b

Please sign in to comment.