Skip to content

Commit 9751931

Browse files
committed
fix(release): update build tech
1 parent d44e138 commit 9751931

File tree

10 files changed

+106
-52
lines changed

10 files changed

+106
-52
lines changed

.github/workflows/test_and_release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ jobs:
9090
cd vue3-components
9191
npm i
9292
npm run build
93-
pip install black trame PyYAML
93+
pip install ruff trame PyYAML
9494
python -m trame.tools.widgets --config ./api.yaml --output ..
95-
black ../trame ../trame_leaflet
95+
cd ..
96+
ruff format
9697
9798
release:
9899
needs: [

.pre-commit-config.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 22.3.0
4-
hooks:
5-
- id: black
6-
entry: black --check
7-
82
- repo: https://github.com/codespell-project/codespell
93
rev: v2.1.0
104
hooks:
115
- id: codespell
126

13-
- repo: https://github.com/PyCQA/flake8
14-
rev: 4.0.1
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.8.4
159
hooks:
16-
- id: flake8
10+
- id: ruff
11+
- id: ruff-format

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
graft trame_leaflet/module/leaflet2/serve
22
graft trame_leaflet/module/leaflet3/vue3
33
include trame_leaflet/LICENSE
4+
prune examples
5+
prune tests
6+
prune visual_baseline
7+
prune vue2-components
8+
prune vue3-components

pyproject.toml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
[project]
2+
name = "trame-leaflet"
3+
version = "1.2.0"
4+
description = "Leaflet widget for trame"
5+
authors = [
6+
{name = "Kitware Inc."},
7+
]
8+
dependencies = [
9+
]
10+
requires-python = ">=3.9"
11+
readme = "README.rst"
12+
license = {text = "MIT"}
13+
keywords = ["Python", "Interactive", "Web", "Application", "Framework"]
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Environment :: Web Environment",
17+
"License :: OSI Approved :: MIT License",
18+
"Natural Language :: English",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3 :: Only",
21+
"Topic :: Software Development :: Libraries :: Application Frameworks",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
]
24+
25+
[project.optional-dependencies]
26+
test = [
27+
"pytest",
28+
]
29+
dev = [
30+
"pre-commit",
31+
"ruff",
32+
]
33+
34+
[build-system]
35+
requires = ['setuptools', 'wheel']
36+
build-backend = 'setuptools.build_meta'
37+
38+
[tool.setuptools.packages.find]
39+
where = ["."]
40+
41+
[tool.setuptools.package-data]
42+
43+
44+
[tool.semantic_release]
45+
version_toml = [
46+
"pyproject.toml:project.version",
47+
]
48+
build_command = """
49+
python -m venv .venv
50+
source .venv/bin/activate
51+
pip install -U pip build
52+
python -m build .
53+
"""
54+
55+
[semantic_release.publish]
56+
dist_glob_patterns = ["dist/*"]
57+
upload_to_vcs_release = true
58+
59+
[tool.ruff]
60+
line-length = 88
61+
indent-width = 4
62+
target-version = "py39"
63+
64+
[tool.ruff.lint]
65+
select = ["E", "W", "F"]
66+
ignore = []
67+
fixable = ["ALL"]
68+
unfixable = []
69+
70+
71+
[tool.ruff.format]
72+
quote-style = "double"
73+
indent-style = "space"
74+
skip-magic-trailing-comma = false
75+
line-ending = "auto"
76+
docstring-code-format = true
77+
78+
# This only has an effect when the `docstring-code-format` setting is
79+
# enabled.
80+
docstring-code-line-length = "dynamic"
81+
82+
[tool.ruff.lint.pycodestyle]
83+
max-line-length = 120
84+
85+
[lint.pydocstyle]
86+
convention = "google"

setup.cfg

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

setup.py

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

trame/modules/leaflet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from trame_leaflet.module.leaflet2 import *
1+
from trame_leaflet.module.leaflet2 import * # noqa F401

trame/modules/leaflet2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from trame_leaflet.module.leaflet2 import *
1+
from trame_leaflet.module.leaflet2 import * # noqa F401

trame/widgets/leaflet.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
from trame_leaflet.widgets.leaflet import *
1+
from trame_leaflet.widgets.leaflet import * # noqa F401
22

33

44
def initialize(server):
55
from trame_leaflet.module import leaflet2
6+
7+
server.enable_module(leaflet2)

trame/widgets/leaflet2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
from trame_leaflet.widgets.leaflet import *
1+
from trame_leaflet.widgets.leaflet import * # noqa F401
22

33

44
def initialize(server):
55
from trame_leaflet.module import leaflet2
6+
7+
server.enable_module(leaflet2)

0 commit comments

Comments
 (0)