Skip to content

Commit 6708bc7

Browse files
committed
ci: use hatchling for bundling app
1 parent 8124604 commit 6708bc7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+94
-83
lines changed

.github/workflows/finalize-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
VERSION="${{ github.event.inputs.version }}"
3737
else
3838
# Automatic trigger - read from files
39-
VERSION=$(python -c "from quickview import __version__; print(__version__)")
39+
VERSION=$(python -c "from e3sm_quickview import __version__; print(__version__)")
4040
fi
4141
echo "VERSION=$VERSION" >> $GITHUB_ENV
4242
echo "APP_TAG=v$VERSION" >> $GITHUB_ENV

.github/workflows/package-and-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
- name: Verify LFS files
2727
run: |
2828
echo "Checking LFS files..."
29-
ls -la quickview/data/
30-
file quickview/data/globe.vtk
31-
file quickview/data/connectivity.nc
29+
ls -la src/e3sm_quickview/data/
30+
file src/e3sm_quickview/data/globe.vtk
31+
file src/e3sm_quickview/data/connectivity.nc
3232
echo "LFS file check complete"
3333
3434
- name: Get version for tagging
@@ -51,14 +51,14 @@ jobs:
5151
python -m pip install --upgrade pip
5252
pip install . # Assumes installable via setup.py or pyproject.toml
5353
# Now we can read the version
54-
VERSION=$(python -c "from quickview import __version__; print(__version__)")
54+
VERSION=$(python -c "from e3sm_quickview import __version__; print(__version__)")
5555
echo "VERSION=$VERSION" >> $GITHUB_ENV
5656
echo "Found version: $VERSION"
5757
shell: bash -l {0}
5858
- name: Package using PyInstaller
5959
run: |
60-
chmod +x scripts/setup_tauri.sh
61-
./scripts/setup_tauri.sh
60+
chmod +x scripts/setup_tauri2.sh
61+
./scripts/setup_tauri2.sh
6262
shell: bash -l {0}
6363
- name: setup node
6464
uses: actions/setup-node@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ __pycache__
33
build
44
server.spec
55
CLAUDE.md
6-
quickview.egg-info/
6+
*.egg-info

pyproject.toml

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
[project]
2-
name = "quickview"
2+
name = "e3sm-quickview"
33
version = "1.0.2"
44
description = "An application to explore/analyze data for atmosphere component for E3SM"
55
authors = [
66
{name = "Kitware Inc."},
77
]
8-
dependencies = [
9-
"trame>=3.6",
10-
"trame-vtk>=2.6",
11-
"trame-vuetify>=2.4",
12-
"trame-components>=2.3.2",
13-
"trame-grid-layout>=1.0.3",
14-
"trame-tauri>=0.6.2",
15-
"pyproj>=3.6.1",
16-
"netCDF4>=1.6.5",
17-
"pyinstaller",
18-
"trame-dataclass",
19-
]
20-
requires-python = ">=3.13"
218
readme = "README.md"
229
license = {text = "Apache Software License"}
2310
keywords = ["Python", "Interactive", "Web", "Application", "Framework"]
2411
classifiers = [
25-
"Development Status :: 4 - Beta",
12+
"Development Status :: 5 - Production/Stable",
2613
"Environment :: Web Environment",
2714
"License :: OSI Approved :: Apache Software License",
2815
"Natural Language :: English",
@@ -32,20 +19,50 @@ classifiers = [
3219
"Topic :: Software Development :: Libraries :: Python Modules",
3320
]
3421

35-
[tool.setuptools.packages.find]
36-
where = ["."]
22+
requires-python = ">=3.10"
23+
24+
dependencies = [
25+
"trame>=3.12",
26+
"trame-vtk>=2.10",
27+
"trame-vuetify>=3.1",
28+
"pyproj>=3.6.1",
29+
"netCDF4>=1.6.5",
30+
"trame-dataclass>=1.2",
31+
]
32+
33+
[project.optional-dependencies]
34+
tauri = [
35+
"pyinstaller",
36+
]
37+
vue2 = [
38+
"trame-grid-layout>=1.0.3",
39+
"trame-tauri>=0.6.2",
40+
]
41+
42+
43+
[build-system]
44+
requires = ["hatchling"]
45+
build-backend = "hatchling.build"
46+
47+
[tool.hatch.build]
48+
include = [
49+
"/src/e3sm_quickview/**/*.py",
50+
"/src/e3sm_quickview/presets/**",
51+
"/src/e3sm_quickview/data/**",
52+
"/src/e3sm_quickview/assets/**",
53+
"/src/e3sm_quickview/module/**",
54+
]
3755

38-
[tool.setuptools.package-data]
39-
quickview = [
40-
"presets/**",
41-
"data/**"
56+
[tool.hatch.build.targets.wheel]
57+
packages = [
58+
"src/e3sm_quickview",
4259
]
4360

4461
[project.scripts]
45-
quickview = "quickview.app:main"
46-
quickview2 = "quickview.app2:main"
62+
quickview-vue2 = "e3sm_quickview.app:main"
63+
quickview = "e3sm_quickview.app2:main"
4764

4865
[tool.ruff.lint.per-file-ignores]
4966
# Ignore star import issues in ParaView plugins
50-
"quickview/plugins/*.py" = ["F403", "F405"]
51-
"quickview/pipeline.py" = ["F821"] # Plugin classes loaded dynamically
67+
"e3sm_quickview/plugins/*.py" = ["F403", "F405"]
68+
"e3sm_quickview/pipeline.py" = ["F821"] # Plugin classes loaded dynamically

quickview/data/connectivity.nc

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

quickview/data/globe.vtk

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

scripts/setup_tauri2.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ python -m PyInstaller --clean --noconfirm \
1717
--collect-all pyproj \
1818
--collect-all netCDF4 \
1919
--collect-all paraview \
20-
--collect-all quickview \
20+
--collect-all e3sm_quickview \
2121
--hidden-import pkgutil \
2222
--add-binary="$(which pvpython):." \
23-
quickview/app2.py
23+
src/e3sm_quickview/app2.py
2424

2525
# Generate trame www + quickview
2626
python -m trame.tools.www --output ./src-tauri/www
27-
python -m trame.tools.www --output ./src-tauri/www quickview.module
27+
python -m trame.tools.www --output ./src-tauri/www e3sm_quickview.module
2828

2929
# Precompile install to speedup start (maybe?)
3030
./src-tauri/server/server --timeout 1 --server
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from pathlib import Path
66

77

8-
from quickview.pipeline import EAMVisSource
9-
from quickview.interface import EAMApp
8+
from e3sm_quickview.pipeline import EAMVisSource
9+
from e3sm_quickview.interface import EAMApp
1010

1111

1212
def main():
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
from trame.widgets import vuetify3 as v3, client, html, dataclass
1111
from trame.decorators import controller, change, trigger, life_cycle
1212

13-
from quickview import module as qv_module
14-
from quickview.assets import ASSETS
15-
from quickview.components import doc, file_browser, css, toolbars, dialogs, drawers
16-
from quickview.pipeline import EAMVisSource
17-
from quickview.utils import compute, js, constants, cli
18-
from quickview.view_manager2 import ViewManager
13+
from e3sm_quickview import module as qv_module
14+
from e3sm_quickview.assets import ASSETS
15+
from e3sm_quickview.components import doc, file_browser, css, toolbars, dialogs, drawers
16+
from e3sm_quickview.pipeline import EAMVisSource
17+
from e3sm_quickview.utils import compute, js, constants, cli
18+
from e3sm_quickview.view_manager2 import ViewManager
1919

2020

2121
v3.enable_lab()

0 commit comments

Comments
 (0)