Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jobs:
call_workflow:
uses: ./.github/workflows/Testbase.yml
with:
python: '3.10'
python: '3.11'
qt5: 'pyqt5'
8 changes: 4 additions & 4 deletions .github/workflows/Testbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
QT_DEBUG_PLUGINS: 1
steps:
- name: Set up Python ${{ inputs.python }}
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2
- name: Install dependencies
uses: actions/setup-python@v4
uses: actions/setup-python@v5.4.0
with:
python-version: ${{ inputs.python }}
- name: Install package
Expand All @@ -29,7 +29,7 @@ jobs:
python -m pip install --upgrade pip
export QT_DEBUG_PLUGINS=1
pip install flake8 pytest pytest-cov pytest-qt pytest-xdist pytest-xvfb setuptools wheel numpy h5py ${{ inputs.qt5 }} toml
pip install pymodaq
pip install pymodaq pyqt5
pip install -e .
- name: create local pymodaq folder and setting permissions
run: |
Expand All @@ -41,4 +41,4 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=src/pymodaq/resources/QtDesigner_Ressources,docs
- name: Test with pytest
run: |
pytest -n auto
pytest -n auto -k "not test_compatibility"
78 changes: 78 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Compatibility with pymodaq (latest release)

on:
workflow_call:

pull_request:

push:
branches:
- '*'

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
tests:
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
qt-backend: ["pyqt5", "pyqt6", "pyside6"]
runs-on: ${{ matrix.os }}
env:
DISPLAY: ':99'
QT_DEBUG_PLUGINS: 1

steps:
- name: Set project name environment variable
run: |
echo "plugin_name=$(echo '${{ github.repository }}' | cut -d'/' -f2)" >> $GITHUB_ENV

- name: Checkout the repo
uses: actions/checkout@v4.2.2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov pytest-qt pytest-xvfb pytest-xdist setuptools wheel numpy h5py pymodaq ${{ matrix.qt-backend }}
pip install -e .

# Create folder and set permissions on Ubuntu
- name: Create local pymodaq folder setup env (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-cursor0 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils libgl1 libegl1
export QT_DEBUG_PLUGINS=1
sudo mkdir -p /etc/.pymodaq
sudo chmod uo+rw /etc/.pymodaq
- name: Exporting debug variables (Windows)
if: runner.os == 'Windows'
run: |
set QT_DEBUG_PLUGINS=1

- name: Compatibility tests with ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.qt-backend}}
run: |
pytest -vv -n 1 -k "test_compatibility"

- name: Upload compatibility report
if: failure()
uses: actions/upload-artifact@v4.6.1
with:
name:
path: 'import_report_tests_${{ env.plugin_name }}_None.txt'
if-no-files-found: error


31 changes: 17 additions & 14 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.4.0
with:
python-version: '3.11'
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine toml "pymodaq>=4.1.0" pyqt5

- name: create local pymodaq folder and setting permissions
pip install hatch hatchling toml twine
- name: Get history and tags for SCM versioning to work
run: |
sudo mkdir /etc/.pymodaq
sudo chmod uo+rw /etc/.pymodaq

- name: Build and publish
git branch
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
hatch version
- name: Build
run: hatch build
- name: Check the build
run: twine check dist/*
- name: publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
hatch publish
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

10 changes: 10 additions & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from pathlib import Path
from hatchling.metadata.plugin.interface import MetadataHookInterface
from pymodaq_utils.resources.hatch_build_plugins import update_metadata_from_toml

here = Path(__file__).absolute().parent


class PluginInfoTomlHook(MetadataHookInterface):
def update(self, metadata: dict) -> None:
update_metadata_from_toml(metadata, here)
24 changes: 0 additions & 24 deletions plugin_info.toml

This file was deleted.

65 changes: 65 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

[features] # defines the plugin features contained into this plugin
instruments = true # true if plugin contains instrument classes (else false, notice the lowercase for toml files)
extensions = true # true if plugins contains dashboard extensions
models = false # true if plugins contains pid models
h5exporters = false # true if plugin contains custom h5 file exporters
scanners = false # true if plugin contains custom scan layout (daq_scan extensions)

[urls]
package-url = 'https://github.com/PyMoDAQ/pymodaq_plugins_arduino'

[project]
name = "pymodaq_plugins_arduino" #todo modify template by your plugin short name
description = 'Set of instrument plugins implemented using an Arduino Board.'
dependencies = [
"pymodaq>=4.3.0", 'telemetrix', 'pyvisa', 'pyvisa-py'
#todo: list here all dependencies your package may have
]

authors = [
{name = "Sebastien J. Weber", email = "sebastien.weber@cemes.fr"},
{name = "Jérémie Margueritat", email = "jeremie.margueritat@univ-lyon1.fr"},
#todo: list here all authors of your plugin
]
maintainers = [
{name = "Sebastien J. Weber", email = "sebastien.weber@cemes.fr"},
{name = "Jérémie Margueritat", email = "jeremie.margueritat@univ-lyon1.fr"},
#todo: list here all maintainers of your plugin
]

# nottodo: leave everything below as is!

dynamic = ["version", "urls", "entry-points"]
readme = "README.rst"
license = { file="LICENSE" }
requires-python = ">=3.8"

classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
]

[build-system]
requires = [
"hatchling>=1.9.0",
"hatch-vcs", "toml",
"pymodaq_utils>=0.0.6",
]
build-backend = "hatchling.build"

[tool.hatch.metadata.hooks.custom]

[tool.hatch.version]
source = "vcs"
4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

Loading
Loading