Skip to content

Commit 470a4e7

Browse files
committed
Use hatch-vcs to figure out what version this thing has. We still update the version file on deploy but now we can do pip install @Branch and it will update correctly
Signed-off-by: Steven K <[email protected]>
1 parent 28588ce commit 470a4e7

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This is used for DatatableView
2-
31
name: Django Datatable View Tests
42

53
on:
@@ -54,6 +52,25 @@ jobs:
5452
- name: Black
5553
run: black --check .
5654

55+
ruff:
56+
name: Ruff
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: actions/setup-python@v5
61+
with:
62+
python-version: "3.12"
63+
cache: 'pip'
64+
65+
- name: Install dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
pip install .
69+
pip install .[test]
70+
71+
- name: Ruff
72+
run: ruff check
73+
5774
pre-commit:
5875
name: Pre-Commit
5976
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

55
[project]
66
name = "django-datatable-view"
77
dynamic = ["version"]
88
description = "This package is used in conjunction with the jQuery plugin (http://http://datatables.net/), and supports state-saving detection with (http://datatables.net/plug-ins/api). The package consists of a class-based view, and a small collection of utilities for rendering table data from models."
99
readme = "README.md"
10-
requires-python = ">=3.9"
10+
requires-python = ">=3.11"
1111
authors = [
1212
{ name = "Pivotal Energy Solutions", email = "[email protected]" },
1313
]
@@ -24,9 +24,6 @@ classifiers = [
2424
"License :: OSI Approved :: Apache Software License",
2525
"Operating System :: OS Independent",
2626
"Programming Language :: Python",
27-
"Programming Language :: Python :: 3",
28-
"Programming Language :: Python :: 3.9",
29-
"Programming Language :: Python :: 3.10",
3027
"Programming Language :: Python :: 3.11",
3128
"Programming Language :: Python :: 3.12",
3229
"Topic :: Utilities",
@@ -58,7 +55,7 @@ Thanks = "https://saythanks.io/to/rh0dium"
5855
Source = "https://github.com/pivotal-energy-solutions/django-datatable-view/"
5956

6057
[tool.hatch.version]
61-
path = "datatableview/__init__.py"
58+
source = "vcs"
6259

6360
[tool.hatch.build.targets.sdist]
6461
include = [
@@ -78,17 +75,11 @@ include = [
7875
line-length = 100
7976
target-version = ['py311']
8077
include = '\.pyi?$'
81-
exclude = '''
82-
/(
83-
\.git
84-
| \.mypy_cache
85-
| \.tox
86-
| \.venv
87-
| _build
88-
| build
89-
| dist
90-
)/
91-
'''
78+
exclude = '(\.git|.venv|_build|build|dist|.*\/__pycache__\/)'
79+
80+
[tool.ruff]
81+
line-length = 100
82+
lint.ignore = ["F401"]
9283

9384
[tool.bandit]
9485
targets = ['datatableview', "demo_app"]

0 commit comments

Comments
 (0)