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
42 changes: 25 additions & 17 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 All @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.9"]
config:
- {
name: "Linux",
Expand All @@ -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: 18

Expand All @@ -91,8 +91,8 @@ jobs:
run: |
mkdir -p trame_vuetify/module/vue3-serve/{fonts,css}
cd trame_vuetify/module/vue3-serve
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.1/dist/vuetify.min.css -Lo vuetify3.css
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.1/dist/vuetify.min.js -Lo vuetify3.js
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.6/dist/vuetify.min.css -Lo vuetify3.css
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.6/dist/vuetify.min.js -Lo vuetify3.js
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/css/materialdesignicons.min.css -Lo css/mdi.css
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/fonts/materialdesignicons-webfont.woff2 -Lo fonts/materialdesignicons-webfont.woff2

Expand All @@ -109,15 +109,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-vuetify
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
contents: write # IMPORTANT: mandatory for making GitHub Releases

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: 18

Expand All @@ -131,8 +137,8 @@ jobs:
run: |
mkdir -p trame_vuetify/module/vue3-serve/{fonts,css}
cd trame_vuetify/module/vue3-serve
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.1/dist/vuetify.min.css -Lo vuetify3.css
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.1/dist/vuetify.min.js -Lo vuetify3.js
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.6/dist/vuetify.min.css -Lo vuetify3.css
curl https://cdn.jsdelivr.net/npm/vuetify@3.7.6/dist/vuetify.min.js -Lo vuetify3.js
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/css/materialdesignicons.min.css -Lo css/mdi.css
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/fonts/materialdesignicons-webfont.woff2 -Lo fonts/materialdesignicons-webfont.woff2

Expand All @@ -146,10 +152,12 @@ jobs:
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/css/materialdesignicons.min.css -Lo vue3-lab-serve/css/mdi.css
curl https://cdn.jsdelivr.net/npm/@mdi/font@7.x/fonts/materialdesignicons-webfont.woff2 -Lo vue3-lab-serve/fonts/materialdesignicons-webfont.woff2


- name: Python Semantic Release
uses: relekang/python-semantic-release@v7.34.6
id: release
uses: python-semantic-release/python-semantic-release@v9.15.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
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
13 changes: 4 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
entry: black --check

- repo: https://github.com/codespell-project/codespell
rev: v2.1.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.8.4
hooks:
- id: flake8
- id: ruff
- id: ruff-format
3 changes: 1 addition & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Tips
####

#. When first creating a new project, it is helpful to run ``pre-commit run --all-files`` to ensure all files pass the pre-commit checks.
#. A quick way to fix ``black`` issues is by installing black (``pip install black``) and running the ``black`` command at the root of your repository.
#. Sometimes, ``black`` and ``flake8`` do not agree. Add options to your ``.flake8`` file to fix these things. See the `flake8 configuration docs <https://flake8.pycqa.org/en/latest/user/configuration.html>`_ for more details.
#. A quick way to fix ``ruff`` issues is by installing ruff (``pip install ruff``) and running the ``ruff check --fix .`` or ``ruff format`` command at the root of your repository.
#. A quick way to fix ``codespell`` issues is by installing codespell (``pip install codespell``) and running the ``codespell -w`` command at the root of your directory.
#. The `.codespellrc file <https://github.com/codespell-project/codespell#using-a-config-file>`_ can be used fix any other codespell issues, such as ignoring certain files, directories, words, or regular expressions.
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ graft trame_vuetify/module/vue3-serve
graft trame_vuetify/module/vue3-lab-serve
recursive-include trame_vuetify/module/vue2-serve *.min.js *.css
include trame_vuetify/LICENSE
prune vue2
prune vue3
prune vue3-lab
prune tests
prune examples
prune docs
92 changes: 92 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[project]
name = "trame-vuetify"
version = "2.7.2"
description = "Vuetify widgets for trame"
authors = [
{name = "Kitware Inc."},
]
dependencies = [
"trame-client>=3.4,<4",
]
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",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.optional-dependencies]
dev = [
"pre-commit",
"ruff",
"pytest",
]

[build-system]
requires = ['setuptools', 'wheel']
build-backend = 'setuptools.build_meta'

[tool.setuptools.packages.find]
where = ["."]

[tool.setuptools.package-data]
trame_vuetify = [
"module/**/*.js",
"module/**/*.css",
"module/**/*.woff",
"module/**/*.woff2",
"module/**/*.ttf",
"module/**/*.eot",
]

[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 .
"""

[semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true

[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py39"

[tool.ruff.lint]
select = ["E", "W", "F"]
ignore = []
fixable = ["ALL"]
unfixable = []


[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true

# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"

[tool.ruff.lint.pycodestyle]
max-line-length = 120

[lint.pydocstyle]
convention = "google"
33 changes: 0 additions & 33 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion trame/modules/vuetify.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.module.vue2 import *
from trame_vuetify.module.vue2 import * # noqa F403
2 changes: 1 addition & 1 deletion trame/modules/vuetify2.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.module.vue2 import *
from trame_vuetify.module.vue2 import * # noqa F403
2 changes: 1 addition & 1 deletion trame/modules/vuetify3.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.module.vue3 import *
from trame_vuetify.module.vue3 import * # noqa F403
2 changes: 1 addition & 1 deletion trame/ui/vuetify.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.ui.vuetify import *
from trame_vuetify.ui.vuetify import * # noqa F403
2 changes: 1 addition & 1 deletion trame/ui/vuetify2.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.ui.vuetify import *
from trame_vuetify.ui.vuetify import * # noqa F403
2 changes: 1 addition & 1 deletion trame/ui/vuetify3.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from trame_vuetify.ui.vuetify3 import *
from trame_vuetify.ui.vuetify3 import * # noqa F403
2 changes: 1 addition & 1 deletion trame/widgets/vuetify.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from trame_vuetify.widgets.vuetify import *
from trame_vuetify.widgets.vuetify import * # noqa F403


def initialize(server):
Expand Down
2 changes: 1 addition & 1 deletion trame/widgets/vuetify2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from trame_vuetify.widgets.vuetify import *
from trame_vuetify.widgets.vuetify import * # noqa F403


def initialize(server):
Expand Down
2 changes: 1 addition & 1 deletion trame/widgets/vuetify3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from trame_vuetify.widgets.vuetify3 import *
from trame_vuetify.widgets.vuetify3 import * # noqa F403


def initialize(server):
Expand Down
12 changes: 9 additions & 3 deletions trame_vuetify/ui/vuetify.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, _server, template_name="main", **kwargs):
self.content = vuetify.VMain()
with vuetify.VFooter(app=True, classes="my-0 py-0") as footer:
self.footer = footer

vuetify.VProgressCircular(
indeterminate=("!!trame__busy",),
background_opacity=1,
Expand All @@ -83,9 +84,12 @@ def __init__(self, _server, template_name="main", **kwargs):
size=16,
width=3,
classes="ml-n3 mr-1",
),
)

footer.add_child(
'<a href="https://kitware.github.io/trame/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">Powered by trame</a>'
'<a href="https://kitware.github.io/trame/" '
'class="grey--text lighten-1--text text-caption text-decoration-none" '
'target="_blank">Powered by trame</a>'
)
vuetify.VSpacer()
reload = self.server.controller.on_server_reload
Expand All @@ -111,7 +115,9 @@ def __init__(self, _server, template_name="main", **kwargs):
html.Pre(get_trame_versions())

footer.add_child(
'<a href="https://www.kitware.com/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">© 2021 Kitware Inc.</a>'
'<a href="https://www.kitware.com/" '
'class="grey--text lighten-1--text text-caption text-decoration-none" '
'target="_blank">© 2021 Kitware Inc.</a>'
)

def on_server_reload(self):
Expand Down
10 changes: 7 additions & 3 deletions trame_vuetify/ui/vuetify3.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ def __init__(self, _server, template_name="main", **kwargs):
size=16,
width=3,
classes="ml-n3 mr-1",
),
)
footer.add_child(
'<a href="https://kitware.github.io/trame/" class="text-grey-lighten-1 text-caption text-decoration-none" target="_blank">Powered by trame</a>'
'<a href="https://kitware.github.io/trame/" '
'class="text-grey-lighten-1 text-caption text-decoration-none" '
'target="_blank">Powered by trame</a>'
)
vuetify3.VSpacer()
reload = self.server.controller.on_server_reload
Expand All @@ -122,7 +124,9 @@ def __init__(self, _server, template_name="main", **kwargs):
html.Pre(get_trame_versions())

footer.add_child(
'<a href="https://www.kitware.com/" class="text-grey-lighten-1 text-caption text-decoration-none" target="_blank">© 2021 Kitware Inc.</a>'
'<a href="https://www.kitware.com/" '
'class="text-grey-lighten-1 text-caption text-decoration-none" '
'target="_blank">© 2021 Kitware Inc.</a>'
)

def on_server_reload(self):
Expand Down
Loading
Loading