diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 4114410..fe34c0a 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -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 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e6bc459..a3fa036 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -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 diff --git a/pylintrc b/pylintrc index ec6cfe2..32e134a 100644 --- a/pylintrc +++ b/pylintrc @@ -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, diff --git a/pyproject.toml b/pyproject.toml index 85146fd..47210f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 24ad9bb..9f28659 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,3 +16,5 @@ Flask websockets pandas PyOTP +hatchling +hatch-vcs diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 49b1511..0000000 --- a/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = c8y_api -url = https://github.com/SoftwareAG/cumulocity-python-api -license_files = LICENSE -author = Christoph Souris -author_email = christoph.souris@softwareag.com -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 -description = Python microservice and application client for the Cumulocity REST API -long_description = file: README.md -long_description_content_type = text/markdown - -[options] -python_requires = >=3.10 -install_requires = - requests - python-dateutil - PyYAML - Deprecated - cachetools - -packages = find: - -[options.packages.find] -exclude = - integration_tests - tests - build - util diff --git a/tasks.py b/tasks.py index dcbea69..b1aaeef 100644 --- a/tasks.py +++ b/tasks.py @@ -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