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
12 changes: 12 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
branches:
- master
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
build_and_deploy:
uses: sensirion/.github/.github/workflows/python_package.pypi_publish.yml@main
secrets: inherit

14 changes: 14 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Documentation
on:
push:
branches:
- master
tags:
- "^[0-9]+.[0-9]+.[0-9]+"

jobs:
documentation:
uses: sensirion/.github/.github/workflows/driver.python.documentation.yml@main
with:
run-environment: "ubuntu-20.04"
build-python-version: 3.6
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Validate and Test Python Package
on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test:
uses: sensirion/.github/.github/workflows/driver.python.test.yml@main
with:
hw-test-flag: "needs_hardware"
73 changes: 0 additions & 73 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ CHANGELOG
Unreleased
::::::::::

2.4.0
:::::
- Update project structure

2.3.1
:::::
- Support ignore-errors for SHDLC commands; The interface remains the same.
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sensirion-driver-adapters.

## Usage

See package description in [README.rst](README.rst) and user manual at
See package description in [README.rst](https://github.com/Sensirion/python-driver-adapters/blob/master/README.rst) and user manual at
https://sensirion.github.io/python-driver-adapters/.

## Development
Expand Down Expand Up @@ -54,4 +54,4 @@ sphinx-versioning build docs docs/_build/html # Build documentation

## License

See [LICENSE](LICENSE).
See [LICENSE](https://github.com/Sensirion/python-driver-adapters/blob/master/LICENSE).
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Welcome to sensirion-i2c-adapter's documentation!
Welcome to sensirion-driver-adapters documentation!
====================================================

This is the documentation for sensirion-i2c-adapter.
This is the documentation for the package sensirion-driver-adapters.

Contents
--------
Expand Down
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = ["hatchling >= 1.26", "wheel >= 0.45.0"]
build-backend = "hatchling.build"

[project]
name = "sensirion-driver-adapters"
description = "Adapter classes to use sensirion_i2c_driver package"
version = "2.4.0"

readme = "README.md"

requires-python = ">=3.8,<4.0"

authors = [
{ name = "Sensirion", email = "info@sensirion.com" },
]

license = "BSD-3-Clause"
license-files = ["LICENSE"]

keywords = ["sensirion", "driver", "driver-generator"]

classifiers = [
'Intended Audience :: Developers',
'License :: Other/Proprietary License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development :: Libraries :: Python Modules'
]

dependencies = [
"sensirion-i2c-driver~=1.0.2",
"sensirion-shdlc-driver~=1.0.1",
"sensirion-shdlc-sensorbridge~=1.0.0"
]

[project.optional-dependencies]

docs = [

"sphinx-rtd-theme==3.0.2",
"sphinx==8.2.3",
"lazy-object-proxy ~=1.7.1",
"docutils~=0.18.0",
"sphinx_rtd_theme~=1.3.0",
"sphinx-autoapi~=3.0.0"
]

test = [
"flake8>=7.1.0",
"mock~=5.2.0",
"pytest>=8.3.5",
"pytest-cov>=5.0.0",
"setuptools>=73.2.0"
]

[project.urls]
Changelog = "https://github.com/Sensirion/python-driver-adapters/blob/master/CHANGELOG.rst"
Repository = "https://github.com/Sensirion/python-driver-adapters"
Documentation = "https://sensirion.github.io/python-driver-adapters"

5 changes: 4 additions & 1 deletion sensirion_driver_adapters/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

from __future__ import absolute_import, division, print_function

version = "2.3.1"
import importlib.metadata as metadata
from typing import Final

version: Final[str] = metadata.version("sensirion_driver_adapters")
93 changes: 4 additions & 89 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,93 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) Copyright 2019 Sensirion AG, Switzerland

import os
import re
from __future__ import absolute_import, division, print_function

from setuptools import setup, find_packages
from setuptools import setup

################################
# Required developer input start
################################

# Python versions this package is compatible with
python_requires = '>=3.6, <4'

# Packages that this package imports. List everything apart from standard lib packages.
install_requires = [
'sensirion-i2c-driver',
'sensirion-shdlc-driver',
'sensirion-shdlc-sensorbridge'
]

# Packages required for tests and docs
extras_require = {
'test': [
'flake8~=6.0.0',
'pytest~=8.1.1',
'pytest-cov~=5.0.0',
],
'docs': [
'lazy-object-proxy ~=1.7.1',
'sphinx~=7.1.0',
'docutils~=0.18.0',
'sphinx_rtd_theme~=1.3.0',
'sphinx-autoapi~=3.0.0'
]
}

package_name = "sensirion-driver-adapters"
author = 'Rolf Laich'
author_email = 'rolf.laich@sensirion.com'
description = 'Adapter classes to use sensirion_i2c_driver package'
keywords = 'driver driver-generator'

################################
# Required developer input end
################################

assert (package_name != "<sensirion-package-name>")
assert (author != "<full name author>")
assert (author_email != '<firstname.familyname>@sensirion.com')
assert (description != '<short description of the package>')
assert (keywords != '<keywords meaningful>')

# Note: Remove this check only for old packages which do not (yet) have the
# "sensirion-" prefix for compatibility reasons.
assert (package_name.startswith("sensirion-"))

# It is important to NOT import anything, not even the version, from the package which is being built.
# Otherwise weird behavior is guaranteed.
version_line = open(os.path.join(package_name.replace("-", "_"), "version.py"), "rt").read()
result = re.search(r"^version = ['\"]([^'\"]*)['\"]", version_line, re.M)
if result:
version_string = result.group(1)
else:
raise RuntimeError("Unable to find version string")

long_description = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read().strip() + "\n\n" + \
open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')).read().strip() + "\n"
setup(
name=package_name,
version=version_string,
author=author,
author_email=author_email,
description=description,
license='BSD 3-Clause License',
keywords=keywords,
url='http://developers.sensirion.com',
packages=find_packages(exclude=['tests', 'tests.*']),
long_description=long_description,
python_requires=python_requires,
install_requires=install_requires,
extras_require=extras_require,
classifiers=[
'Intended Audience :: Developers',
'License :: Other/Proprietary License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
setup()
Loading