Skip to content

Commit 0db9490

Browse files
committed
Created pyproject.toml and removed setup.py
1 parent 9414b99 commit 0db9490

File tree

6 files changed

+805
-102
lines changed

6 files changed

+805
-102
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ ENV/
110110
env.bak/
111111
venv.bak/
112112

113+
# Mac
114+
.DS_Store
115+
113116
# IDEs
114117
# Spyder project settings
115118
.spyderproject

.pre-commit-config.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.2.0
4-
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-yaml
8-
- id: check-added-large-files
9-
- repo: https://github.com/psf/black
10-
rev: 22.3.0
11-
hooks:
12-
- id: black
13-
language_version: python3
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.12.12
5+
hooks:
6+
# Run the linter.
7+
- id: ruff-check
8+
types_or: [python, pyi]
9+
args: [--fix]
10+
# Run the formatter.
11+
- id: ruff-format
12+
types_or: [python, pyi]

Makefile

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,18 @@ clean-test: ## remove test and coverage artifacts
5454
rm -fr allure_report
5555

5656
lint: ## check style with flake8
57-
# stop the build if there are Python syntax errors or undefined names \
58-
exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
59-
flake8 $(PACKAGE_NAME) tests --count --select=E9,F63,F7,F82 --show-source --statistics
60-
flake8 $(PACKAGE_NAME) --exit-zero --max-complexity=10 --max-line-length=127 --statistics
57+
uv tool run ruff check
6158

6259
behave: clean-test ## run the behave tests, generate and serve report
63-
- behave -f allure_behave.formatter:AllureFormatter -o allure_report
60+
- uv run behave -f allure_behave.formatter:AllureFormatter -o allure_report
6461
allure serve allure_report
6562

6663
pytest: clean-test ## run tests quickly with the default Python
67-
PYTHONPATH=. pytest
64+
uv run pytest
6865

6966
test: clean-test ## run all(BDD and unit) tests
70-
PYTHONPATH=. pytest
71-
behave
67+
uv run pytest
68+
uv run behave
7269

7370
coverage: ## check code coverage quickly with the default Python
7471
coverage run --source my_project_template -m pytest
@@ -77,8 +74,7 @@ coverage: ## check code coverage quickly with the default Python
7774
$(BROWSER) htmlcov/index.html
7875

7976
dist: clean ## builds source and wheel package
80-
python setup.py sdist
81-
python setup.py bdist_wheel
77+
uv build
8278
ls -l dist
8379

8480
docker-build: ## build a docker image for the service
@@ -88,19 +84,11 @@ docker: docker-build ## build a docker image and run the service
8884
docker run --name my-project-template -p 8080:8080 my-project-template-service:0.0.1
8985

9086
install: clean ## install the package to the active Python's site-packages
91-
pip install --upgrade pip setuptools
92-
python setup.py install
93-
pip install -r requirements.txt
94-
pip install -r requirements-tests.txt
95-
pip install -r requirements-dev.txt
96-
pip install -r requirements-deploy.txt
87+
uv sync --all-groups
9788
pre-commit install
9889

9990
venv: ## creates a Python3 virtualenv environment in venv
100-
python3 -m venv venv --prompt $(PROJECT_NAME)-venv
101-
@echo "====================================================================="
102-
@echo "To activate the new virtual environment, execute the following from your shell"
103-
@echo "source venv/bin/activate"
91+
uv venv --prompt $(PROJECT_NAME)-venv
10492

10593
activate: ## activate a virtual environment. Run `make venv` before activating.
10694
@echo "====================================================================="

pyproject.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
[project]
2+
name = "nmdp-python-project-template"
3+
version = "0.0.1"
4+
description="Python Project Template. Standardized Python project structure for NMDP projects"
5+
requires-python = ">=3.13"
6+
dependencies = []
7+
authors = [
8+
{name = "Pradeep Bashyal", email = "[email protected]"},
9+
{name = "Another person"},
10+
{email = "[email protected]"},
11+
]
12+
maintainers = [
13+
{name = "Pradeep Bashyal", email = "[email protected]"},
14+
]
15+
readme = "README.md"
16+
license = "LGPL-3.0-only"
17+
keywords = ["HLA", "matching"]
18+
classifiers = [
19+
# Prevent a package from being uploaded to PyPI
20+
# "Private :: Do Not Upload"
21+
22+
# How mature is this project? Common values are
23+
# 3 - Alpha
24+
# 4 - Beta
25+
# 5 - Production/Stable
26+
"Development Status :: 2 - Pre-Alpha",
27+
28+
# Indicate who your project is intended for
29+
"Intended Audience :: Developers",
30+
"Topic :: Software Development :: Build Tools",
31+
32+
# Specify the Python versions you support here.
33+
"Programming Language :: Python :: 3.13",
34+
"Programming Language :: Python :: 3.14",
35+
]
36+
37+
[project.urls]
38+
Homepage = "https://nmdp-bioinformatics.org/"
39+
Documentation = "https://github.com/nmdp-bioinformatics/nmdp-python-project-template/README.md"
40+
Repository = "https://github.com/nmdp-bioinformatics/nmdp-python-project-template"
41+
Issues = "https://github.com/nmdp-bioinformatics/nmdp-python-project-template/issues"
42+
Changelog = "https://github.com/nmdp-bioinformatics/nmdp-python-project-template/blob/master/CHANGELOG.md"
43+
44+
[dependency-groups]
45+
dev = [
46+
"pre-commit>=4.2.0",
47+
"ruff>=0.11.11",
48+
"allure-behave==2.13.2",
49+
"flake8==7.0.0",
50+
"bump2version==1.0.1",
51+
"coverage==7.4.1",
52+
]
53+
54+
test = [
55+
"pytest==8.0.0",
56+
"behave==1.2.6",
57+
"PyHamcrest==2.1.0",
58+
]
59+
60+
deploy=[
61+
"connexion[swagger-ui]==2.14.2",
62+
"gunicorn==21.2.0"
63+
]
64+
65+
[tool.pytest.ini_options]
66+
minversion = "6.0"
67+
addopts = "-ra -q"
68+
testpaths = [
69+
"tests",
70+
"integration",
71+
]
72+
73+
[tool.ruff]
74+
exclude = [".git", ".venv", "tests",]

setup.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)