Skip to content

Commit

Permalink
Merge pull request #35 from VigneshVSV/test-multiple-python-versions
Browse files Browse the repository at this point in the history
use multiple versions of python for tests
  • Loading branch information
VigneshVSV authored Sep 10, 2024
2 parents c6c4d89 + 4a5cb77 commit a72ff1a
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 10 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,29 @@ on:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Define specific Python versions for each OS
- os: ubuntu-latest
python-version: 3.11
# - os: windows-latest
# python-version: 3.11
# - os: macos-latest
# python-version: 3.11
- os: ubuntu-latest
python-version: 3.12

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install -r tests/requirements.txt
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,30 @@ on:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
include:
# Define specific Python versions for each OS
- os: ubuntu-latest
python-version: 3.11
- os: windows-latest
python-version: 3.11
- os: macos-latest
python-version: 3.11
- os: ubuntu-latest
python-version: 3.12

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- image event handlers (develop branch) for streaming live video as JPEG and PNG ✓
- pydantic support for property models (develop branch) ✓

## [v0.2.4] - 2024-09-09

- added multiple versions of python for testing
- unlike claimed in previous versions, this package runs only on python 3.11 or higher

## [v0.2.3] - 2024-08-11

- HTTP SSE minor bug-fix/optimization - no difference to the user
Expand Down
5 changes: 5 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage:
status:
patch:
default:
enabled: false
2 changes: 1 addition & 1 deletion hololinked/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.3"
__version__ = "0.2.4"
4 changes: 3 additions & 1 deletion hololinked/server/eventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ async def execute_once(cls, instance_name : str, instance : Thing, instruction_s
if action == "write":
if resource.state is None or (hasattr(instance, 'state_machine') and
instance.state_machine.current_state in resource.state):
return prop.__set__(owner_inst, arguments["value"])
if isinstance(arguments, dict) and len(arguments) == 1 and "value" in arguments:
return prop.__set__(owner_inst, arguments["value"])
return prop.__set__(owner_inst, arguments)
else:
raise StateMachineError("Thing {} is in `{}` state, however attribute can be written only in `{}` state".format(
instance_name, instance.state_machine.current_state, resource.state))
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="hololinked",
version="0.2.3",
version="0.2.4",
author="Vignesh Vaidyanathan",
author_email="[email protected]",
description="A ZMQ-based Object Oriented RPC tool-kit for instrument control/data acquisition or controlling generic python objects.",
Expand Down Expand Up @@ -38,7 +38,7 @@
"Topic :: System :: Hardware",
"Development Status :: 4 - Beta"
],
python_requires='>=3.7',
python_requires='>=3.11',
install_requires=[
"argon2-cffi>=23.0.0",
"ifaddr>=0.2.0",
Expand Down

0 comments on commit a72ff1a

Please sign in to comment.