Skip to content

Commit

Permalink
adapt to labone 22.08 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasah committed Aug 31, 2022
1 parent 784ad9c commit 2120922
Show file tree
Hide file tree
Showing 70 changed files with 2,192 additions and 761 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/ci.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build docs

on:
push:
branches: ["main"]
tags:
- "v*.*.*"
pull_request:
branches: ["main"]

jobs:
generate-docs:
name: "Build package documentation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout tag/branch"
uses: "actions/checkout@v3"
with: { fetch-depth: 0, submodules: "true" }
- name: "Setup Python"
uses: "actions/setup-python@v3"
with:
python-version: "3.9"

- name: "Install build dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r docs/requirements.txt
pip install .
- name: "Build docs"
run: |
wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb
sudo dpkg -i pandoc-2.18-1-amd64.deb
cd docs && make html EXAMPLE_SRC=remote
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/build/html

- name: "Test spelling docs"
run: |
cd docs && sphinx-build -b spelling -W --keep-going source build/spelling
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint check

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tool: [black, lint, typing]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: pip install -U tox
- name: Run Tox
run: tox -e ${{ matrix.tool }}
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
tests:
name: "Python ${{ matrix.python }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
include:
- name: py37
python: 3.7
tox: py37
- name: py38
python: 3.8
tox: py38
- name: py39
python: 3.9
coverage: true
tox: py39
- name: py310
python: "3.10"
tox: py310

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: "${{ matrix.python }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
- name: "Run tests"
run: |
pip install tox
tox -e ${{ matrix.tox }}
- name: "Run coverage"
if: matrix.coverage
run: |
python -m pip install --upgrade codecov
codecov
77 changes: 66 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,69 @@
*.ipynb_checkpoints
*.pyc
*.egg-info/
.eggs/
#project files
.idea
.vscode
dist/
pytest.ini

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
*/build/
*/_build/
*/*/_build/
_build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Jupyter Notebook
examples/*.ipynb
*.ipynb_checkpoints
.ipynb_*

# pyenv
.python-version
_version.py
*.ipynb
venv*/
_autosummary/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

#db, web
.DS_Store

# documentation
_autosummary
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/source/_static/zhinst-sphinx-theme"]
path = docs/source/_static/zhinst-sphinx-theme
url = https://github.com/zhinst/zhinst-sphinx-theme
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
13 changes: 13 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is the list of zhinst-toolkit's significant contributors.
#
# This does not necessarily list everyone who has contributed code,
# especially since many employees of one corporation may be contributing.
# To see the full list of contributors, see the revision history in
# source control.

Zurich Instruments
Tobias Ahrens
Markus Heikkinen

Andrea Corna
Bahadir Dönmez
Loading

0 comments on commit 2120922

Please sign in to comment.