Skip to content

Commit

Permalink
chore: merge configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Jun 22, 2023
1 parent b0d55d5 commit 32363c2
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 46 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
extend-ignore =
E501
extend-exclude =
docs
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ repos:
rev: 5.12.0
hooks:
- id: isort
args: [--profile=black]

- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

lint: ## check code with pre-commit
tox -e pre-commit
$(VENV)/bin/tox -e pre-commit

test: ## run tests quickly with the default Python
py.test
$(VENV)/bin/pytest

test-all: ## run tests on every Python version with tox
tox
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[tool.isort]
profile = "black"
combine_as_imports = true

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
1 change: 0 additions & 1 deletion requirements/base.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements/test.txt

This file was deleted.

19 changes: 0 additions & 19 deletions setup.cfg

This file was deleted.

46 changes: 28 additions & 18 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/usr/bin/env python

"""The setup script."""

from setuptools import find_packages, setup

with open("README.rst") as readme_file:
Expand All @@ -10,17 +6,26 @@
with open("CHANGELOG.rst") as changelog_file:
changelog = changelog_file.read()

requirements = ["python-dateutil>=2.7.5", "requests>=2.20"]

extras_require = {"docs": ["Sphinx==1.8.1", "sphinx-rtd-theme==0.4.2"]}

version = {}
with open("hcloud/__version__.py") as fp:
exec(fp.read(), version)

setup(
name="hcloud",
version=version["VERSION"],
keywords="hcloud hetzner cloud",
description="Official Hetzner Cloud python library",
long_description=readme + "\n\n" + changelog,
author="Hetzner Cloud GmbH",
author_email="[email protected]",
url="https://github.com/hetznercloud/hcloud-python",
project_urls={
"Bug Tracker": "https://github.com/hetznercloud/hcloud-python/issues",
"Documentation": "https://hcloud-python.readthedocs.io/en/stable/",
"Changelog": "https://github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md",
"Source Code": "https://github.com/hetznercloud/hcloud-python",
},
license="MIT license",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -34,17 +39,22 @@
"Programming Language :: Python :: 3.11",
],
python_requires=">=3.7",
description="Official Hetzner Cloud python library",
install_requires=requirements,
extras_require=extras_require,
license="MIT license",
long_description=readme + "\n\n" + changelog,
install_requires=[
"python-dateutil>=2.7.5",
"requests>=2.20",
],
extras_require={
"docs": [
"sphinx==1.8.1",
"sphinx-rtd-theme==0.4.2",
],
"test": [
"coverage>=7.2.7,<7.3",
"pytest>=7.3.2,<7.4",
"tox>=4.6.3,<4.7",
],
},
include_package_data=True,
keywords="hcloud hetzner cloud",
name="hcloud",
packages=find_packages(exclude=["examples", "tests*", "docs"]),
test_suite="tests",
url="https://github.com/hetznercloud/hcloud-python",
version=version["VERSION"],
zip_safe=False,
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands = pre-commit run --verbose --all-files --show-diff-on-failure
[testenv]
passenv = FAKE_API_ENDPOINT
deps =
-r{toxinidir}/requirements/test.txt
-e.[test]
commands =
pytest tests/unit {posargs}

Expand Down

0 comments on commit 32363c2

Please sign in to comment.