Skip to content

Commit

Permalink
Merge branch 'main' into BF_open_usb
Browse files Browse the repository at this point in the history
  • Loading branch information
trappitsch committed Jan 20, 2022
2 parents 0107d34 + f4021f8 commit ebd523a
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ exclude_lines =
if not self._testing:
raise NotImplementedError
raise AssertionError

[run]
relative_files = True
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip virtualenv
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Testing

on:
push:
branches: [ $default-branch ]
pull_request:

jobs:
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools virtualenv tox
- name: Test with tox
run: tox -e pylint
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 3.6
TOXENV: "py36"
- python-version: 3.7
TOXENV: "py37"
- python-version: 3.8
TOXENV: "py38"
- python-version: 3.9
TOXENV: "py39"
- python-version: 3.9
TOXENV: "py39-numpy"

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel virtualenv tox
- name: Test with tox
env:
TOXENV: ${{ matrix.TOXENV }}
run: tox
- name: Submit to coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion instruments/newport/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(self, errcode=None, timestamp=None):
self._timestamp)
super(NewportError, self).__init__(error)
else:
error_message = self.get_message('x{0}'.format(self._errcode))
error_message = self.get_message('x{0:02d}'.format(self._errcode))
error = "Newport Error: {0}. Axis: {1}. " \
"Error Message: {2}. " \
"At time : {3}".format(str(self._errcode),
Expand Down

0 comments on commit ebd523a

Please sign in to comment.