forked from pyvisa/pyvisa-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pyvisa:main' into master
- Loading branch information
Showing
40 changed files
with
2,051 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[run] | ||
branch = True | ||
include = | ||
*/pyvisa_sim/* | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise NotImplementedError() | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[flake8] | ||
exclude = | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py, | ||
old, | ||
build, | ||
dist, | ||
ignore = E203, E266, E501, W503, E731 | ||
# line length is intentionally set to 80 here because pyvisa uses Bugbear | ||
# See https://github.com/psf/black/blob/master/README.md#line-length for more details | ||
max-line-length = 80 | ||
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Build and upload wheels | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 3' | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get history and tags for SCM versioning to work | ||
run: | | ||
git fetch --prune --unshallow | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Build sdist | ||
run: | | ||
pip install --upgrade pip | ||
pip install wheel build | ||
python -m build . -s | ||
- name: Test sdist | ||
run: | | ||
pip install pytest | ||
pip install dist/*.tar.gz | ||
python -X dev -m pytest --pyargs pyvisa_sim | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist/* | ||
|
||
build_wheel: | ||
name: Build wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get history and tags for SCM versioning to work | ||
run: | | ||
git fetch --prune --unshallow | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Build wheels | ||
run: | | ||
pip install --upgrade pip | ||
pip install wheel build | ||
python -m build . -w | ||
- name: Test wheel | ||
run: | | ||
pip install pytest | ||
pip install dist/*.whl | ||
python -X dev -m pytest --pyargs pyvisa_sim | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist/*.whl | ||
|
||
release_upload: | ||
name: Create Release and Upload Release Asset | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
needs: [build_wheel, build_sdist] | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'a') || contains(github.ref, 'b')}} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: shogo82148/actions-upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/* | ||
|
||
upload_pypi: | ||
if: github.event_name == 'push' | ||
needs: [build_wheel, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
# To test: | ||
# repository_url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.991 # Use the sha / tag you want to point at | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [pyvisa, types-PyYAML, stringparser, pytest] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.10" | ||
|
||
# Build documentation in the docs/source directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Enable epub output | ||
formats: | ||
- epub | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
pyvisa-sim is written and maintained by Hernan E. Grecco | ||
pyvisa-sim was created by Hernan E. Grecco | ||
[email protected]. | ||
|
||
It is currently maintained by: | ||
- Matthieu Dartiailh [email protected] | ||
|
||
|
||
Other contributors, listed alphabetically, are: | ||
|
||
- Adam Vaughn [email protected] | ||
- Colin Marquardt [email protected] | ||
- Huan Nguyen [email protected] | ||
- Matthieu Dartiailh [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pyvisa | ||
black | ||
flake8 | ||
mypy | ||
types-PyYAML | ||
isort | ||
pytest | ||
sphinx | ||
sphinx-rtd-theme |
Oops, something went wrong.