Skip to content

Commit

Permalink
Transition to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 21, 2025
1 parent dd50d15 commit 2839a16
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 81 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ jobs:
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install .
pip install -r dev-requirements.txt
pip install ".[test]"
pip freeze
- name: Install helm
Expand Down Expand Up @@ -102,7 +101,7 @@ jobs:
- name: Run tests
run: |
pytest --verbose --color=yes --cov chartpress
pytest
env:
HELM2: ${{ matrix.helm2 }}

Expand Down
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,12 @@ repos:
rev: 24.10.0
hooks:
- id: black
args:
- --target-version=py37
- --target-version=py38
- --target-version=py39
- --target-version=py310
- --target-version=py311

# Autoformat: Python code
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args:
- --profile=black

# Autoformat: markdown, yaml
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,10 @@ testing, see [tests/README.md](tests/README.md).

```bash
# install chartpress locally
pip install -e .
# install dev dependencies
pip install -r dev-requirements.txt
pip install -e ".[test]"
# format and lint code
pip install pre-commit
pre-commit run -a
# run tests
Expand Down
6 changes: 0 additions & 6 deletions dev-requirements.txt

This file was deleted.

85 changes: 85 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# build-system
# - ref: https://peps.python.org/pep-0517/
#
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"


# project
# - ref 1: https://peps.python.org/pep-0621/
# - ref 2: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
#
[project]
name = "chartpress"
version = "2.3.1.dev"
authors = [
{name = "Jupyter Development Team", email = "[email protected]"},
]
description = "ChartPress: render and publish helm charts and images"
keywords = ["helm", "kubernetes"]
readme = {file = "README.md"}
license = {file = "LICENSE"}
requires-python = ">=3.7"
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
"ruamel.yaml>=0.15.44",
# Bug in 5.0.0: https://github.com/docker/docker-py/pull/2844
"docker>=3.2.0,!=5.0.0",
]

[project.optional-dependencies]
test = [
"gitpython",
"pytest",
"pytest-cov",
"tbump",
]

[project.urls]
Documentation = "https://github.com/jupyterhub/chartpress#readme"
Source = "https://github.com/jupyterhub/chartpress"
Issues = "https://github.com/jupyterhub/chartpress/issues"

[project.scripts]
chartpress = "chartpress:main"


# setuptools
# - ref: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration
#
[tool.setuptools]
py-modules = ["chartpress"]


# black is used for autoformatting Python code
#
# ref: https://black.readthedocs.io/en/stable/
#
[tool.black]
skip-string-normalization = false


# isort is used for autoformatting Python code
#
# ref: https://pycqa.github.io/isort/
#
[tool.isort]
profile = "black"


# pytest is used for running Python based tests
#
# ref: https://docs.pytest.org/en/stable/
#
[tool.pytest.ini_options]
addopts = "--verbose --color=yes --durations=10 --cov=chartpress"
testpaths = ["tests"]
60 changes: 0 additions & 60 deletions setup.py

This file was deleted.

0 comments on commit 2839a16

Please sign in to comment.