-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from PyMoDAQ/5.0.x
v5 proper imports
- Loading branch information
Showing
19 changed files
with
222 additions
and
143 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,10 @@ | ||
name: 'Tests' | ||
|
||
on: [push] | ||
|
||
jobs: | ||
call_workflow: | ||
uses: ./.github/workflows/Testbase.yml | ||
with: | ||
python: '3.11' | ||
qt5: 'pyqt5' |
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,44 @@ | ||
name: Base | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python: | ||
required: true | ||
type: string | ||
qt5: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
DISPLAY: ':99.0' | ||
QT_DEBUG_PLUGINS: 1 | ||
steps: | ||
- name: Set up Python ${{ inputs.python }} | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
- name: Install package | ||
run: | | ||
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils | ||
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 pyqt5 | ||
pip install -e . | ||
- name: create local pymodaq folder and setting permissions | ||
run: | | ||
sudo mkdir /etc/.pymodaq | ||
sudo chmod uo+rw /etc/.pymodaq | ||
- name: Linting with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
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 |
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,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/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.WORKFLOW_SECRET }} |
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,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) |
This file was deleted.
Oops, something went wrong.
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,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_andor' | ||
|
||
[project] | ||
name = "pymodaq_plugins_andor" | ||
description = 'Set of PyMoDAQ plugins for Andor Camera (CCD camera using SDK2, SCMOS cameras using SDK3...)' | ||
dependencies = [ | ||
"pymodaq>=5.0.0", | ||
#todo: list here all dependencies your package may have | ||
] | ||
|
||
authors = [ | ||
{name = "Weber Sébastien", email = '[email protected]'}, | ||
#todo: list here all authors of your plugin | ||
] | ||
maintainers = [ | ||
{name = "Weber Sébastien", email = '[email protected]'}, | ||
#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" | ||
|
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,6 +1,13 @@ | ||
from pathlib import Path | ||
|
||
from pymodaq.utils.logger import set_logger, get_module_name | ||
from pymodaq_utils.logger import set_logger, get_module_name | ||
|
||
with open(str(Path(__file__).parent.joinpath('resources/VERSION')), 'r') as fvers: | ||
__version__ = fvers.read().strip() | ||
from pathlib import Path | ||
from .utils import Config | ||
from pymodaq_utils.utils import get_version, PackageNotFoundError | ||
|
||
config = Config() | ||
try: | ||
__version__ = get_version(__package__) | ||
except PackageNotFoundError: | ||
__version__ = '0.0.0dev' |
2 changes: 1 addition & 1 deletion
2
src/pymodaq_plugins_andor/daq_move_plugins/daq_move_Shamrock.py
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
13 changes: 8 additions & 5 deletions
13
src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCD.py
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
12 changes: 7 additions & 5 deletions
12
...ymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCDComposition.py
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
15 changes: 9 additions & 6 deletions
15
src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockSCMOS.py
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
Oops, something went wrong.