Skip to content

Commit 3c2a82b

Browse files
authored
Merge pull request #26 from KiraPC/update-deps
Updated python version; use only pyproject.toml
2 parents 4d10554 + 3b53abf commit 3c2a82b

7 files changed

Lines changed: 68 additions & 73 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ on: [ pull_request ]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-version: ["3.11", "3.12", "3.13", "3.14"]
812
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.8
11-
uses: actions/setup-python@v1
13+
- uses: actions/checkout@v4
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v5
1216
with:
13-
python-version: 3.8
17+
python-version: ${{ matrix.python-version }}
18+
allow-prereleases: true
1419
- name: Install dependencies
1520
run: |
1621
python -m pip install --upgrade pip

.github/workflows/lint.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@ on: [ pull_request ]
33

44
jobs:
55
lint:
6-
strategy:
7-
fail-fast: false
8-
matrix:
9-
python-version: [ 3.9 ]
10-
os: [ ubuntu-18.04 ]
11-
runs-on: ${{ matrix.os }}
6+
runs-on: ubuntu-latest
127
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-python@v5
1510
with:
16-
python-version: ${{ matrix.python-version }}
11+
python-version: "3.11"
1712
- name: flake8 install
1813
run: pip3 install flake8
1914
- name: lint
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Publish Release
42

5-
# Controls when the action will run.
63
on:
74
push:
8-
# Pattern matched against refs/tags
9-
tags:
5+
tags:
106
- '*'
117

12-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
138
jobs:
14-
# This workflow contains a single job called "build"
159
pypi-release:
16-
# The type of runner that the job will run on
1710
runs-on: ubuntu-latest
18-
19-
# Steps represent a sequence of tasks that will be executed as part of the job
2011
steps:
21-
- uses: actions/checkout@master
22-
- uses: actions/setup-python@v2
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
2314
with:
24-
python-version: '3.8'
15+
python-version: '3.11'
2516
- name: Get Tag Version
2617
id: vars
27-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
28-
- name: Create Distribution Package
18+
run: echo "tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT"
19+
- name: Set version in pyproject.toml
2920
env:
3021
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
31-
run: sed -i -e "s/__VERSION__/$RELEASE_VERSION/g" setup.py && python setup.py sdist
22+
run: sed -i "s/^version = .*/version = \"$RELEASE_VERSION\"/" pyproject.toml
23+
- name: Build distribution package
24+
run: |
25+
pip install build
26+
python -m build
3227
- name: Publish package
3328
uses: pypa/gh-action-pypi-publish@release/v1
3429
with:
35-
user: __token__
3630
password: ${{ secrets.PYPI_API_TOKEN }}

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
[build-system]
2+
requires = ["setuptools>=61"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "fastapi-router-controller"
7+
version = "0.0.0"
8+
description = "A FastAPI utility to allow Controller Class usage"
9+
readme = "README.md"
10+
license = "MIT"
11+
authors = [
12+
{ name = "Pasquale Carmine Carbone", email = "pasqualecarmine.carbone@gmail.com" }
13+
]
14+
requires-python = ">=3.11"
15+
dependencies = [
16+
"fastapi>=0.63.0",
17+
]
18+
classifiers = [
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.14",
24+
"Operating System :: OS Independent",
25+
"Topic :: Software Development :: Libraries :: Python Modules",
26+
"Topic :: Software Development :: Libraries",
27+
"Topic :: Software Development",
28+
"Typing :: Typed",
29+
]
30+
31+
[project.urls]
32+
Homepage = "https://github.com/KiraPC/fastapi-router-controller"
33+
34+
[project.optional-dependencies]
35+
tests = ["pytest", "pytest-cov", "requests", "httpx"]
36+
37+
[tool.setuptools.packages.find]
38+
exclude = ["venv", "*.egg-info", "build"]
39+
140
[tool.black]
241
line-length = 88
3-
target-version = ['py36', 'py37', 'py38']
42+
target-version = ['py311', 'py312', 'py313', 'py314']
43+
44+
[tool.pytest.ini_options]
45+
testpaths = ["tests"]
46+
addopts = "--cov fastapi_router_controller --cov-report term --cov-report html"

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

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

0 commit comments

Comments
 (0)