Skip to content

Commit

Permalink
Replace setup.py with pyproject.toml (#73)
Browse files Browse the repository at this point in the history
* Replace setup.py with pyproject.toml

Also changes flake8 config to stop ignoring line length (E501).

* Remove support for Python 3.7

In the debug logging, I use f-strings with "self-documenting expressions"
which was added in Python 3.8.

* Remove options from lint_and_format.yml

Black and Flake8 will grab their configurations from pyproject.toml and tox.ini.

* Fix source url
  • Loading branch information
araglu authored Feb 11, 2025
1 parent acaffad commit 0d82509
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 42 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/lint_and_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ jobs:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
ignore: "E203"
max-line-length: "120"
format:
needs: lint
runs-on: ubuntu-latest
Expand All @@ -32,4 +29,4 @@ jobs:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --line-length 120"
options: "--check"
61 changes: 61 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[build-system]
requires = ["setuptools >= 64"]
build-backend = "setuptools.build_meta"

[project]
name = "pyuit"
version = "0.7.0"
description = "Python wrapper for DoD HPCMP UIT+ REST interface."

authors = [
{name = "Scott Christensen", email="scott.d.christensen@erdc.dren.mil"},
]

requires-python = ">= 3.8"
keywords = ["uit"]
dependencies = [
"aiohttp",
"flask",
"PyYAML",
"requests",
"dodcerts",
]
readme = "README.md"

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Visualization",
]

[project.optional-dependencies]
guitools = ['panel', 'param', 'holoviews', 'pandas']
examples = ['panel', 'param', 'holoviews', 'pandas', 'jupyterlab', 'nodejs']
tests = ['pytest', 'flake8']

[project.scripts]
uit = "uit.cli:cli"

[project.urls]
source = "https://github.com/erdc/pyuit"

[tool.setuptools.packages.find]
include = ["uit*"]

[tool.setuptools.package-data]
uit = ["*.csv"]

[tool.black]
line-length = 120
37 changes: 0 additions & 37 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore = E501
max-line-length = 120
exclude = .git,build,dist,__pycache__,.eggs,*.egg-info,venv
ignore = E203

0 comments on commit 0d82509

Please sign in to comment.