diff --git a/README.md b/README.md index a340ffd..80980fd 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@

- Harp logo + Harp logo

# harp This project includes four main packages: - - **harp-protocol**: Provides the core protocol definitions and utilities for the Harp protocol. See [Protocol API Documentation](https://harp-tech.org/pyharp/api/protocol) for details. + - **harp-protocol**: Provides the core protocol definitions and utilities for the Harp protocol. See [Protocol API Documentation](https://harp-tech.org/python/api/protocol) for details. - - **harp-serial**: Implements serial communication functionalities for generic Harp devices. See [Serial API Documentation](https://harp-tech.org/pyharp/api/serial) for more information. + - **harp-serial**: Implements serial communication functionalities for generic Harp devices. See [Serial API Documentation](https://harp-tech.org/python/api/serial) for more information. - - **harp-device**: Implements the transport-agnostic `Device` interface, the common register map, and the shared registers and enums. See [Device API Documentation](https://harp-tech.org/pyharp/api/device) for details. + - **harp-device**: Implements the transport-agnostic `Device` interface, the common register map, and the shared registers and enums. See [Device API Documentation](https://harp-tech.org/python/api/device) for details. - - **harp-data**: Parses register binary dumps into pandas DataFrames. See [Data API Documentation](https://harp-tech.org/pyharp/api/data) for more information. + - **harp-data**: Parses register binary dumps into pandas DataFrames. See [Data API Documentation](https://harp-tech.org/python/api/data) for more information. ## Installation @@ -100,7 +100,7 @@ AnalogData = behavior.AnalogData # registers are reached by name assert behavior.REGISTER_MAP[44] is AnalogData # or by address ``` -See the [Examples](https://harp-tech.org/pyharp/examples/) for the full walkthroughs, including subscribing to device events and working with custom interface-type converters. +See the [Examples](https://harp-tech.org/python/examples/) for the full walkthroughs, including subscribing to device events and working with custom interface-type converters. ## Contributing diff --git a/mkdocs.yml b/mkdocs.yml index 3a89b65..357ca93 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,7 @@ site_name: harp -repo_url: https://github.com/harp-tech/pyharp -repo_name: "harp-tech/pyharp" +site_url: https://harp-tech.org/python/ +repo_url: https://github.com/harp-tech/python +repo_name: "harp-tech/python" copyright: Copyright (c) harp-tech and Contributors exclude_docs: | @@ -87,7 +88,7 @@ nav: extra: social: - icon: fontawesome/brands/github - link: https://github.com/harp-tech/pyharp + link: https://github.com/harp-tech/python extra_css: - stylesheets/extra.css diff --git a/pyproject.toml b/pyproject.toml index 53677af..fb697f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,10 +38,10 @@ dependencies = [ [project.urls] Homepage = "https://harp-tech.org/" -Repository = "https://github.com/harp-tech/pyharp/" -Documentation = "https://harp-tech.org/pyharp/" -"Bug Tracker" = "https://github.com/harp-tech/pyharp/issues" -Changelog = "https://github.com/harp-tech/pyharp/releases" +Repository = "https://github.com/harp-tech/python/" +Documentation = "https://harp-tech.org/python/" +"Bug Tracker" = "https://github.com/harp-tech/python/issues" +Changelog = "https://github.com/harp-tech/python/releases" [build-system] requires = ["setuptools>=77", "setuptools-scm>=8"] diff --git a/src/packages/harp-data/LICENSE b/src/packages/harp-data/LICENSE new file mode 100644 index 0000000..2ac2366 --- /dev/null +++ b/src/packages/harp-data/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2020 OEPS & Filipe Carvalho +Copyright (c) 2025 Hardware and Software Platform, Champalimaud Foundation +Copyright (c) harp-tech and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/packages/harp-data/README.md b/src/packages/harp-data/README.md index 7e1db9c..2d4f9dc 100644 --- a/src/packages/harp-data/README.md +++ b/src/packages/harp-data/README.md @@ -1,6 +1,6 @@ # harp-data -Load Harp register data into pandas DataFrames. This is the package that pulls in `pandas`. [`harp-protocol`](../harp-protocol) stays numpy-only and exposes a pandas-free `ColumnData` view that this package assembles into a DataFrame. +Load Harp register data into pandas DataFrames. This is the package that pulls in `pandas`. [`harp-protocol`](https://github.com/harp-tech/python/tree/main/src/packages/harp-protocol) stays numpy-only and exposes a pandas-free `ColumnData` view that this package assembles into a DataFrame. There are two ways in, depending on what is on disk: @@ -19,7 +19,7 @@ A Harp acquisition is usually saved as a de-multiplexed folder, one binary file ┗ 📜 device.yml ``` -Reading is based on a [device module](../harp-device) that describes how to decode each register. `open_dataset` supplies one automatically. It finds the `device.yml` in the folder, builds the module, and returns a ready-to-use reader: +Reading is based on a [device module](https://github.com/harp-tech/python/tree/main/src/packages/harp-device) that describes how to decode each register. `open_dataset` supplies one automatically. It finds the `device.yml` in the folder, builds the module, and returns a ready-to-use reader: ```python from harp import data diff --git a/src/packages/harp-data/pyproject.toml b/src/packages/harp-data/pyproject.toml index 118792e..8d690c4 100644 --- a/src/packages/harp-data/pyproject.toml +++ b/src/packages/harp-data/pyproject.toml @@ -2,7 +2,25 @@ name = "harp-data" dynamic = ["version"] description = "Load Harp device data into pandas DataFrames" +authors = [{ name = "harp-tech", email = "contact@harp-tech.org" }] +license = "MIT" +license-files = ["LICENSE"] +readme = 'README.md' requires-python = ">=3.11" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", + "Topic :: System :: Hardware :: Hardware Drivers", +] dependencies = [ "harp-protocol", "harp-device", @@ -10,6 +28,13 @@ dependencies = [ "pandas>=2.0", ] +[project.urls] +Homepage = "https://harp-tech.org/" +Repository = "https://github.com/harp-tech/python/" +Documentation = "https://harp-tech.org/python/" +"Bug Tracker" = "https://github.com/harp-tech/python/issues" +Changelog = "https://github.com/harp-tech/python/releases" + [build-system] requires = ["setuptools>=77", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" diff --git a/src/packages/harp-device/LICENSE b/src/packages/harp-device/LICENSE new file mode 100644 index 0000000..2ac2366 --- /dev/null +++ b/src/packages/harp-device/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2020 OEPS & Filipe Carvalho +Copyright (c) 2025 Hardware and Software Platform, Champalimaud Foundation +Copyright (c) harp-tech and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/packages/harp-device/README.md b/src/packages/harp-device/README.md index 713ed0a..1da8d6b 100644 --- a/src/packages/harp-device/README.md +++ b/src/packages/harp-device/README.md @@ -1,6 +1,6 @@ # harp-device -The transport-agnostic device layer for the Harp protocol: the common Harp registers and a `Device` base that handles framing, request/reply and register access. It depends only on [`harp-protocol`](../harp-protocol), with no transport dependencies. Pair it with a transport such as [`harp-serial`](../harp-serial). +The transport-agnostic device layer for the Harp protocol: the common Harp registers and a `Device` base that handles framing, request/reply and register access. It depends only on [`harp-protocol`](https://github.com/harp-tech/python/tree/main/src/packages/harp-protocol), with no transport dependencies. Pair it with a transport such as [`harp-serial`](https://github.com/harp-tech/python/tree/main/src/packages/harp-serial). ## Read/write registers diff --git a/src/packages/harp-device/pyproject.toml b/src/packages/harp-device/pyproject.toml index 8efea01..06c5b1e 100644 --- a/src/packages/harp-device/pyproject.toml +++ b/src/packages/harp-device/pyproject.toml @@ -2,13 +2,38 @@ name = "harp-device" dynamic = ["version"] description = "Transport-agnostic Harp device protocol layer" +authors = [{ name = "harp-tech", email = "contact@harp-tech.org" }] +license = "MIT" +license-files = ["LICENSE"] +readme = 'README.md' requires-python = ">=3.11" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", + "Topic :: System :: Hardware :: Hardware Drivers", +] dependencies = [ "harp-protocol", "pydantic>=2", "pydantic-yaml>=1", ] +[project.urls] +Homepage = "https://harp-tech.org/" +Repository = "https://github.com/harp-tech/python/" +Documentation = "https://harp-tech.org/python/" +"Bug Tracker" = "https://github.com/harp-tech/python/issues" +Changelog = "https://github.com/harp-tech/python/releases" + [build-system] requires = ["setuptools>=77", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" diff --git a/src/packages/harp-protocol/LICENSE b/src/packages/harp-protocol/LICENSE new file mode 100644 index 0000000..2ac2366 --- /dev/null +++ b/src/packages/harp-protocol/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2020 OEPS & Filipe Carvalho +Copyright (c) 2025 Hardware and Software Platform, Champalimaud Foundation +Copyright (c) harp-tech and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/packages/harp-protocol/README.md b/src/packages/harp-protocol/README.md index 395955e..ea24445 100644 --- a/src/packages/harp-protocol/README.md +++ b/src/packages/harp-protocol/README.md @@ -30,4 +30,4 @@ np.uint16(65535) + 1 # RuntimeWarning: overflow encountered in scalar add Numpy scalars behave like plain Python numbers in arithmetic, comparison and formatting. Use `int()` or `float()` where a built-in type is required. -It carries no transport or device logic. See [`harp-device`](../harp-device) for the device layer. +It carries no transport or device logic. See [`harp-device`](https://github.com/harp-tech/python/tree/main/src/packages/harp-device) for the device layer. diff --git a/src/packages/harp-protocol/pyproject.toml b/src/packages/harp-protocol/pyproject.toml index c6fb392..91dc170 100644 --- a/src/packages/harp-protocol/pyproject.toml +++ b/src/packages/harp-protocol/pyproject.toml @@ -5,12 +5,35 @@ description = "Library with the base types for Harp protocol usage." authors = [{ name = "harp-tech", email = "contact@harp-tech.org" }] license = "MIT" keywords = ['python', 'harp'] +license-files = ["LICENSE"] +readme = 'README.md' requires-python = ">=3.11" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", + "Topic :: System :: Hardware :: Hardware Drivers", +] dependencies = [ "numpy>=1.24", "typing-extensions>=4.14", ] +[project.urls] +Homepage = "https://harp-tech.org/" +Repository = "https://github.com/harp-tech/python/" +Documentation = "https://harp-tech.org/python/" +"Bug Tracker" = "https://github.com/harp-tech/python/issues" +Changelog = "https://github.com/harp-tech/python/releases" + [build-system] requires = ["setuptools>=77", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" diff --git a/src/packages/harp-serial/LICENSE b/src/packages/harp-serial/LICENSE new file mode 100644 index 0000000..2ac2366 --- /dev/null +++ b/src/packages/harp-serial/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2020 OEPS & Filipe Carvalho +Copyright (c) 2025 Hardware and Software Platform, Champalimaud Foundation +Copyright (c) harp-tech and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/packages/harp-serial/README.md b/src/packages/harp-serial/README.md index d748ce2..0b55f19 100644 --- a/src/packages/harp-serial/README.md +++ b/src/packages/harp-serial/README.md @@ -1,6 +1,6 @@ # harp-serial -Serial transport for [`harp-device`](../harp-device). Provides `SerialTransport` and the `open_device` factory, which pairs a device module or a `Device` class with a serial port. This is the package that pulls in `pyserial`. +Serial transport for [`harp-device`](https://github.com/harp-tech/python/tree/main/src/packages/harp-device). Provides `SerialTransport` and the `open_device` factory, which pairs a device module or a `Device` class with a serial port. This is the package that pulls in `pyserial`. ## Usage diff --git a/src/packages/harp-serial/pyproject.toml b/src/packages/harp-serial/pyproject.toml index 9799e3d..3d39d1c 100644 --- a/src/packages/harp-serial/pyproject.toml +++ b/src/packages/harp-serial/pyproject.toml @@ -2,13 +2,38 @@ name = "harp-serial" dynamic = ["version"] description = "Serial transport for Harp devices" +authors = [{ name = "harp-tech", email = "contact@harp-tech.org" }] +license = "MIT" +license-files = ["LICENSE"] +readme = 'README.md' requires-python = ">=3.11" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", + "Topic :: System :: Hardware :: Hardware Drivers", +] dependencies = [ "harp-protocol", "harp-device", "pyserial>=3.5", ] +[project.urls] +Homepage = "https://harp-tech.org/" +Repository = "https://github.com/harp-tech/python/" +Documentation = "https://harp-tech.org/python/" +"Bug Tracker" = "https://github.com/harp-tech/python/issues" +Changelog = "https://github.com/harp-tech/python/releases" + [build-system] requires = ["setuptools>=77", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" diff --git a/tests/data/test_dataset.py b/tests/data/test_dataset.py index fb44e2b..1eec0ca 100644 --- a/tests/data/test_dataset.py +++ b/tests/data/test_dataset.py @@ -468,7 +468,7 @@ def test_schema_without_whoami_skips_check(dataset, device_yml): def test_unmodellable_schema_skips_check(dataset, device_yml): - # Well-formed YAML that pyharp cannot describe, such as a newer or older revision, + # Well-formed YAML that this library cannot describe, such as a newer or older revision, # must not stop a module that works from decoding the binaries beside it. _mod, _name, root, specs = dataset (root / "device.yml").write_text("registers: [this is not a register map]\n")