Skip to content

Commit

Permalink
hatch use!
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Feb 25, 2025
1 parent 2e7f620 commit 2b5b0a3
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 47 deletions.
12 changes: 2 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,8 @@ Below is the list of instruments included in this plugin
Viewer0D
++++++++

* **LockinSR830Legacy**: LockIn Amplifier SR830 using direct VISA SPI commands (no more maintained)
* **LockinSR830**: LockIn Amplifier SR830 using the pymeasure SR830 driver (preferred)


Viewer1D
++++++++

* **LockinSR830**: LockIn Amplifier SR830 using the pymeasure SR830 driver and using the internal buffer memory. Get the
two channels outputs. Should be fast but is in fact quite slow...
* * **LockinSR830Legacy**: LockIn Amplifier SR830 (legacy implementation)
* * **LockinSR830**: LockIn Amplifier SR830 (uses the pymeasure driver and is recommended)



Expand All @@ -55,5 +48,4 @@ Installation instructions

* PyMoDAQ version > 4.0.8
* VISA backend if connected using GPIB
* pymeasure version >= 0.14.0 needed (if not yet available install from its github repository)

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.

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

[project]
name = "pymodaq_plugins_stanford_research_systems"
description = 'Set of plugins for the Stanford Research Systems (SRS) Instruments'
dependencies = [
"pymodaq>=4.0.0",
"pyvisa",
"pymodaq_utils",
]

authors = [
{name = "Sebastien J. Weber", email = "sebastien.weber@cemes.fr"},
#todo: list here all authors of your plugin
]
maintainers = [
{name = "Sebastien J. Weber", email = "sebastien.weber@cemes.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.

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

from .utils import Config
config = Config()
from pymodaq_utils.utils import get_version, PackageNotFoundError
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()

config = Config()
try:
__version__ = get_version(__package__)
except PackageNotFoundError:
__version__ = '0.0.0dev'

This file was deleted.

3 changes: 0 additions & 3 deletions tox.ini

This file was deleted.

0 comments on commit 2b5b0a3

Please sign in to comment.