Skip to content

Commit

Permalink
Switching to hatchling build; Alignment withc GitHub Acting linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
chsou committed Oct 9, 2024
1 parent 42c5df0 commit 305039f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ disable=
too-many-instance-attributes,
too-many-arguments,
too-few-public-methods,
too-many-positional-arguments,
useless-object-inheritance,
redefined-builtin,
missing-module-docstring,
Expand Down
32 changes: 27 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
[build-system]
requires = [
"setuptools",
"wheel",
"setuptools_scm"
"hatchling",
"hatch-vcs",
]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"

[tool.setuptools_scm]
[project]
name = "c8y_api"
dynamic = ["version"]
authors = [{name="Christoph Souris", email="christoph.souris@gmail.com"}]
description = "Python microservice and application client for the Cumulocity REST API"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.urls]
Homepage = "https://github.com/SoftwareAG/cumulocity-python-api"
Source = "https://github.com/SoftwareAG/cumulocity-python-api"
Issues = "https://github.com/SoftwareAG/cumulocity-python-api/issues"
Documentation = "https://cumulocity-python-api.readthedocs.io/en/latest/"

[tool.hatch.version]
source = "vcs"
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ Flask
websockets
pandas
PyOTP
hatchling
hatch-vcs
33 changes: 0 additions & 33 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def lint(c, scope='all'):
"""Run PyLint."""
if scope == 'all':
scope = 'c8y_api c8y_tk tests integration_tests samples'
c.run(f'pylint {scope}')
c.run(f'pylint --rcfile pylintrc --fail-under=9 {scope}')


@task
Expand Down

0 comments on commit 305039f

Please sign in to comment.