Skip to content
Merged
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'
4 changes: 2 additions & 2 deletions .github/workflows/Testbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
QT_DEBUG_PLUGINS: 1
steps:
- name: Set up Python ${{ inputs.python }}
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
uses: actions/setup-python@v4
with:
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 Down
28 changes: 15 additions & 13 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
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 check dist/*
twine upload dist/*
hatch publish
23 changes: 23 additions & 0 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: GitHub Actions Version Updater

# Controls when the action will run.
on:
schedule:
# Automatically run at 00:00 on day-of-month 5.
- cron: '0 0 5 * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}

- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
3 changes: 0 additions & 3 deletions __init__.py

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)
25 changes: 0 additions & 25 deletions plugin_info.toml

This file was deleted.

63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[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 = false # 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_basler'

[project]
name = "pymodaq_plugins_basler"
description = 'PyMoDAQ plugins for cameras of Basler'
dependencies = [
'pymodaq>=4.4.7',
'numpy', # for Basler camera
'pypylon',
]

authors = [
{name = 'Benedikt Burger', email = "Benedikt.Burger@physik.tu-darmstadt.de"},
{name = 'Romain GeneauX', email = "romain.geneaux@cea.fr"},
]
maintainers = [
{name = 'Romain GeneauX', email = "romain.geneaux@cea.fr"},
]

# nottodo: leave everything below as is!

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

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.

11 changes: 9 additions & 2 deletions src/pymodaq_plugins_basler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from pathlib import Path
from pymodaq.utils.logger import set_logger # to be imported by other modules.


from importlib import metadata
from importlib.metadata import PackageNotFoundError


from .utils import Config
config = Config()

with open(str(Path(__file__).parent.joinpath('resources/VERSION')), 'r') as fvers:
__version__ = fvers.read().strip()
try:
__version__ = metadata.version(__package__)
except PackageNotFoundError:
__version__ = '0.0.0dev'
1 change: 0 additions & 1 deletion src/pymodaq_plugins_basler/resources/VERSION

This file was deleted.