Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions .github/workflows/test_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: "3.9"

Expand Down Expand Up @@ -49,10 +49,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -74,10 +74,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 14

Expand All @@ -91,15 +91,21 @@ jobs:
needs: [pre-commit, pytest, test-npm-build]
runs-on: ubuntu-latest
if: github.event_name == 'push'
environment:
name: pypi
url: https://pypi.org/p/trame-deckgl
permissions:
id-token: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set Up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 14

Expand All @@ -110,8 +116,11 @@ jobs:
npm run build

- name: Python Semantic Release
uses: relekang/python-semantic-release@v7.34.6
id: release
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more token needed with latest semantic release. But we need to register workflow on pypi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think... Check other repo to compare

repository_username: __token__
repository_password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish package distributions to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ipython_config.py
# pyenv
.python-version

# uv
uv.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand Down
23 changes: 19 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"

exclude: ^.cruft.json|.copier-answers.yml$

repos:
- repo: https://github.com/psf/black
rev: 22.3.0
Expand All @@ -6,11 +12,20 @@ repos:
entry: black --check

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.3.0
hooks:
- id: codespell

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.20.0
hooks:
- id: flake8
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[project]
name = "trame-deckgl"
version = "2.0.3"
description = "Deck.gl widget for trame"
authors = [
{name = "Kitware Inc."},
]
dependencies = [
"trame-client",
]
requires-python = ">=3.9"
readme = "README.rst"
license = {text = "MIT"}
keywords = [
"Python",
"Interactive",
"Web",
"Application",
"Framework",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: JavaScript",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.optional-dependencies]
dev = [
"pre-commit",
"ruff",
"pytest",
"pytest-asyncio",
"trame-client[test]",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = [
"/trame/**/*.py",
"/trame_deckgl/**/*.py",
"/trame_deckgl/module/serve/**/*.js",
"/trame_deckgl/module/serve/**/*.css",
"/trame_deckgl/LICENSE",
]

[tool.hatch.build.targets.wheel]
packages = [
"trame",
"trame_deckgl",
]

[tool.semantic_release]
version_toml = [
"pyproject.toml:project.version",
]
build_command = """
python -m venv .venv
source .venv/bin/activate
pip install -U pip build
python -m build --sdist --wheel .
"""

[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true
33 changes: 0 additions & 33 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

8 changes: 7 additions & 1 deletion trame/modules/deckgl.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from trame_deckgl.module import *
from trame_deckgl.module import scripts, serve, vue_use

__all__ = [
"scripts",
"serve",
"vue_use",
]
8 changes: 7 additions & 1 deletion trame/widgets/deckgl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from trame_deckgl.widgets.deckgl import *
from trame_deckgl.widgets.deckgl import Deck


def initialize(server):
from trame_deckgl import module

server.enable_module(module)


__all__ = [
"Deck",
"initialize",
]