Skip to content

Commit 6a51cbb

Browse files
authored
Merge pull request #41 from LeanderCS/37
Get rid of requirements.txt and setup.py
2 parents 2cf64ce + 2ab5e72 commit 6a51cbb

File tree

14 files changed

+76
-80
lines changed

14 files changed

+76
-80
lines changed

.github/workflows/test-lib-building.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
python test_script.py
3434
3535
- name: Verify library usage - Part II
36-
run: pytest test/
36+
run: pytest tests/

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
set -e # Exit immediately if a command exits with a non-zero status.
4242
set -u # Exit immediately if a variable is not defined.
4343
44-
docker run --rm -e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} flask-inputfilter sh -c "coverage run --source=flask_inputfilter -m pytest test/ && coveralls"
44+
docker run --rm -e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} flask-inputfilter sh -c "coverage run --source=flask_inputfilter -m pytest tests/ && coveralls"
4545
4646
- name: Run code style checks
4747
run: |

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ WORKDIR /app
44

55
RUN apt-get update && apt-get install -y gcc python3-dev git
66

7-
RUN pip install --upgrade pip
7+
COPY pyproject.toml /app
88

9-
COPY requirements.txt /app
10-
11-
RUN pip install --no-cache-dir -r requirements.txt
9+
RUN python -m pip install .[dev]
1210

1311
COPY . /app
1412

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
include docs/index.rst
22
include LICENSE
33
include docs/changelog.rst
4+
prune tests

env_configs/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ RUN /root/.pyenv/bin/pyenv install 3.14-dev
4242

4343
RUN /root/.pyenv/bin/pyenv global 3.7.12 3.8.12 3.9.7 3.10.2 3.11.0 3.12.0 3.13.0 3.14-dev
4444

45-
RUN pip install --upgrade pip
45+
COPY pyproject.toml /app
4646

47-
COPY ../requirements.txt /app
48-
49-
RUN pip install --no-cache-dir -r requirements.txt && pip install tox
47+
RUN python -m pip install .[dev] && python -m pip install tox
5048

5149
COPY .. /app

pyproject.toml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,63 @@
22
requires = ["setuptools", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "flask_inputfilter"
7+
version = "0.3.0"
8+
description = "A library to easily filter and validate input data in Flask applications"
9+
readme = "README.rst"
10+
requires-python = ">=3.7"
11+
license = {text = "MIT"}
12+
authors = [
13+
{name = "Leander Cain Slotosch", email = "[email protected]"}
14+
]
15+
dependencies = [
16+
"flask>=2.1",
17+
"typing_extensions>=3.6.2",
18+
]
19+
classifiers = [
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python :: 3.14",
22+
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.7",
29+
]
30+
31+
[project.optional-dependencies]
32+
dev = [
33+
"autoflake",
34+
"black",
35+
"coverage",
36+
"coveralls",
37+
#"docformatter",
38+
"flake8==5.0.4",
39+
"flake8-pyproject==1.2.3",
40+
"isort",
41+
"pillow>=8.0.0",
42+
"pytest",
43+
"requests>=2.22.0",
44+
"sphinx",
45+
"sphinx-autobuild",
46+
"sphinx_rtd_theme"
47+
]
48+
optional = [
49+
"pillow>=8.0.0",
50+
"requests>=2.22.0",
51+
]
52+
53+
[project.urls]
54+
Homepage = "https://github.com/LeanderCS/flask-inputfilter"
55+
Documentation = "https://leandercs.github.io/flask-inputfilter"
56+
Source = "https://github.com/LeanderCS/flask-inputfilter"
57+
Issues = "https://github.com/LeanderCS/flask-inputfilter/issues"
58+
59+
[tool.setuptools.packages.find]
60+
include = ["flask_inputfilter"]
61+
562
[tool.pytest.ini_options]
663
filterwarnings = [
764
"ignore::DeprecationWarning"
@@ -24,7 +81,7 @@ commands =
2481
source = ["flask_inputfilter"]
2582

2683
[tool.coverage.report]
27-
omit = ["__init__.py", "setup.py", "*/test/*"]
84+
omit = ["__init__.py", "setup.py", "*/tests/*"]
2885

2986
[tool.flake8]
3087
exclude = ["__init__.py", "venv", "*.md", ".*"]

requirements.txt

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

setup.py

Lines changed: 0 additions & 43 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)