From d2c41f4639736f3e59aafd2b2da774a3dcdf427e Mon Sep 17 00:00:00 2001 From: Muhammad Labeeb <72980976+mlabeeb03@users.noreply.github.com> Date: Fri, 28 Mar 2025 19:51:39 +0500 Subject: [PATCH] chore: change repo name * automatically add issues to project board * chore: rename app --- .github/workflows/auto-add-to-project.yml | 20 ++++++++++++++++++ .gitlab-ci.yml | 8 +++++++ .hatch_build.py | 2 +- Makefile | 6 +++--- README.rst | 6 +++--- package-lock.json | 2 +- pyproject.toml | 14 ++++++------ {tutordash => tutordeck}/__about__.py | 0 {tutordash => tutordeck}/__init__.py | 0 {tutordash => tutordeck}/plugin.py | 12 +++++------ {tutordash => tutordeck}/server/__init__.py | 0 {tutordash => tutordeck}/server/app.py | 2 +- {tutordash => tutordeck}/server/constants.py | 0 .../server/static/css/.gitignore | 0 .../server/static/img/Button.svg | 0 .../server/static/img/CheckCircle.svg | 0 .../server/static/img/Edly Red Icon.svg | 0 .../server/static/img/Fading_balls.gif | Bin .../server/static/img/Featured icon.svg | 0 .../server/static/img/Icon.svg | 0 .../server/static/img/Vector.svg | 0 .../server/static/img/X.svg | 0 .../server/static/img/advanced-mode.svg | 0 .../server/static/img/arrow-left.svg | 0 .../server/static/img/arrow-right.svg | 0 .../server/static/img/download.svg | 0 .../server/static/img/favicon.png | Bin .../server/static/img/local-launch.svg | 0 .../server/static/img/search.svg | 0 .../server/static/img/shopping-bag.svg | 0 .../server/static/img/stack.svg | 0 .../server/static/js/deck.js | 0 .../server/static/js/htmx.min.js | 0 .../server/static/js/logs.js | 0 .../server/static/js/sse.js | 0 .../server/static/scss/deck.scss | 0 .../server/templates/_base_header.html | 0 .../server/templates/_config.html | 0 .../server/templates/_plugin_header.html | 0 .../templates/_plugin_installed_list.html | 2 +- .../server/templates/_plugin_store_list.html | 0 .../server/templates/_switch.html | 0 .../server/templates/advanced.html | 0 .../server/templates/index.html | 8 +++---- .../server/templates/local_launch.html | 0 .../server/templates/plugin.html | 0 .../server/templates/plugin_installed.html | 0 .../server/templates/plugin_store.html | 0 .../server/tutorclient.py | 2 +- {tutordash => tutordeck}/server/utils.py | 2 +- 50 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/auto-add-to-project.yml create mode 100644 .gitlab-ci.yml rename {tutordash => tutordeck}/__about__.py (100%) rename {tutordash => tutordeck}/__init__.py (100%) rename {tutordash => tutordeck}/plugin.py (76%) rename {tutordash => tutordeck}/server/__init__.py (100%) rename {tutordash => tutordeck}/server/app.py (99%) rename {tutordash => tutordeck}/server/constants.py (100%) rename {tutordash => tutordeck}/server/static/css/.gitignore (100%) rename {tutordash => tutordeck}/server/static/img/Button.svg (100%) rename {tutordash => tutordeck}/server/static/img/CheckCircle.svg (100%) rename {tutordash => tutordeck}/server/static/img/Edly Red Icon.svg (100%) rename {tutordash => tutordeck}/server/static/img/Fading_balls.gif (100%) rename {tutordash => tutordeck}/server/static/img/Featured icon.svg (100%) rename {tutordash => tutordeck}/server/static/img/Icon.svg (100%) rename {tutordash => tutordeck}/server/static/img/Vector.svg (100%) rename {tutordash => tutordeck}/server/static/img/X.svg (100%) rename {tutordash => tutordeck}/server/static/img/advanced-mode.svg (100%) rename {tutordash => tutordeck}/server/static/img/arrow-left.svg (100%) rename {tutordash => tutordeck}/server/static/img/arrow-right.svg (100%) rename {tutordash => tutordeck}/server/static/img/download.svg (100%) rename {tutordash => tutordeck}/server/static/img/favicon.png (100%) rename {tutordash => tutordeck}/server/static/img/local-launch.svg (100%) rename {tutordash => tutordeck}/server/static/img/search.svg (100%) rename {tutordash => tutordeck}/server/static/img/shopping-bag.svg (100%) rename {tutordash => tutordeck}/server/static/img/stack.svg (100%) rename tutordash/server/static/js/dash.js => tutordeck/server/static/js/deck.js (100%) rename {tutordash => tutordeck}/server/static/js/htmx.min.js (100%) rename {tutordash => tutordeck}/server/static/js/logs.js (100%) rename {tutordash => tutordeck}/server/static/js/sse.js (100%) rename tutordash/server/static/scss/dash.scss => tutordeck/server/static/scss/deck.scss (100%) rename {tutordash => tutordeck}/server/templates/_base_header.html (100%) rename {tutordash => tutordeck}/server/templates/_config.html (100%) rename {tutordash => tutordeck}/server/templates/_plugin_header.html (100%) rename {tutordash => tutordeck}/server/templates/_plugin_installed_list.html (89%) rename {tutordash => tutordeck}/server/templates/_plugin_store_list.html (100%) rename {tutordash => tutordeck}/server/templates/_switch.html (100%) rename {tutordash => tutordeck}/server/templates/advanced.html (100%) rename {tutordash => tutordeck}/server/templates/index.html (95%) rename {tutordash => tutordeck}/server/templates/local_launch.html (100%) rename {tutordash => tutordeck}/server/templates/plugin.html (100%) rename {tutordash => tutordeck}/server/templates/plugin_installed.html (100%) rename {tutordash => tutordeck}/server/templates/plugin_store.html (100%) rename {tutordash => tutordeck}/server/tutorclient.py (99%) rename {tutordash => tutordeck}/server/utils.py (95%) diff --git a/.github/workflows/auto-add-to-project.yml b/.github/workflows/auto-add-to-project.yml new file mode 100644 index 0000000..cd8ff34 --- /dev/null +++ b/.github/workflows/auto-add-to-project.yml @@ -0,0 +1,20 @@ +name: Auto Add Issues and Pull Requests to Project + +on: + issues: + types: + - opened + pull_request_target: + types: + - opened + +jobs: + # https://github.com/actions/add-to-project + add-to-project: + name: Add issue and bugs to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/overhangio/projects/4 + github-token: ${{ secrets.GH_PROJECT_PERSONAL_ACCESS_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4597c8f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,8 @@ +variables: + TUTOR_PLUGIN: deck + TUTOR_PYPI_PACKAGE: tutor-deck + GITHUB_REPO: overhangio/tutor-deck + +include: + - project: "community/tutor-ci" + file: "plugin-gitlab-ci.yml" diff --git a/.hatch_build.py b/.hatch_build.py index 19a1f0b..9af73ce 100644 --- a/.hatch_build.py +++ b/.hatch_build.py @@ -16,7 +16,7 @@ class MetaDataHook(MetadataHookInterface): def load_about() -> dict[str, str]: about: dict[str, str] = {} with open( - os.path.join(HERE, "tutordash", "__about__.py"), "rt", encoding="utf-8" + os.path.join(HERE, "tutordeck", "__about__.py"), "rt", encoding="utf-8" ) as f: exec(f.read(), about) # pylint: disable=exec-used return about diff --git a/Makefile b/Makefile index 2e196c8..d484e38 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ .DEFAULT_GOAL := help .PHONY: docs -SRC_DIRS = ./tutordash +SRC_DIRS = ./tutordeck BLACK_OPTS = --exclude templates ${SRC_DIRS} runserver: ## Run a development server - tutor dash run --dev + tutor deck run --dev scss: ## Compile SCSS files to CSS - sass ${SASS_OPTS} tutordash/server/static/scss/:tutordash/server/static/css/ + sass ${SASS_OPTS} tutordeck/server/static/scss/:tutordeck/server/static/css/ scss-watch: ## Compile SCSS files to CSS and watch for changes $(MAKE) scss SASS_OPTS="--watch" diff --git a/README.rst b/README.rst index e025e36..3e12a3a 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -dash plugin for `Tutor `__ +deck plugin for `Tutor `__ ###################################################### Awesome administration dashboard and plugin marketplace for Tutor @@ -9,7 +9,7 @@ Installation .. code-block:: bash - pip install git+https://github.com/overhangio/tutor-dash + pip install git+https://github.com/overhangio/tutor-deck .. TODO how to package css files? @@ -18,7 +18,7 @@ Usage .. code-block:: bash - tutor plugins enable dash + tutor plugins enable deck Development *********** diff --git a/package-lock.json b/package-lock.json index 032a94e..e8378b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "tutor-dash", + "name": "tutor-deck", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/pyproject.toml b/pyproject.toml index 5bbdbb6..e8f6596 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # https://hatch.pypa.io/latest/config/build/ [project] -name = "tutor-dash" +name = "tutor-deck" license = { text = "AGPL-3.0-only" } authors = [ {name = "Edly"}, @@ -47,13 +47,13 @@ dev = [ ] [project.entry-points."tutor.plugin.v1"] -dash = "tutordash.plugin" +deck = "tutordeck.plugin" # https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels [project.urls] -Homepage = "https://github.com/overhangio/tutor-dash" -Code = "https://github.com/overhangio/tutor-dash" -Issues = "https://github.com/overhangio/tutor-dash/issues" +Homepage = "https://github.com/overhangio/tutor-deck" +Code = "https://github.com/overhangio/tutor-deck" +Issues = "https://github.com/overhangio/tutor-deck/issues" # hatch-specific configuration [tool.hatch.metadata.hooks.custom] @@ -66,8 +66,8 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.sdist] # Disable strict naming, otherwise twine is not able to detect name/version strict-naming = false -include = [ "/tutordash"] +include = [ "/tutordeck"] exclude = ["tests*"] [tool.hatch.build.targets.wheel] -packages = ["tutordash"] +packages = ["tutordeck"] diff --git a/tutordash/__about__.py b/tutordeck/__about__.py similarity index 100% rename from tutordash/__about__.py rename to tutordeck/__about__.py diff --git a/tutordash/__init__.py b/tutordeck/__init__.py similarity index 100% rename from tutordash/__init__.py rename to tutordeck/__init__.py diff --git a/tutordash/plugin.py b/tutordeck/plugin.py similarity index 76% rename from tutordash/plugin.py rename to tutordeck/plugin.py index eeb87d9..d21ab1d 100644 --- a/tutordash/plugin.py +++ b/tutordeck/plugin.py @@ -13,17 +13,17 @@ from .server import app hooks.Filters.CONFIG_DEFAULTS.add_items( [ - ("DASH_VERSION", __version__), + ("DECK_VERSION", __version__), ] ) @click.group() -def dash() -> None: +def deck() -> None: pass -@dash.command(name="run") +@deck.command(name="run") @click.option("--host", default="127.0.0.1", show_default=True) @click.option("-p", "--port", default=3274, type=int, show_default=True) @click.option( @@ -31,11 +31,11 @@ def dash() -> None: help="Enable development mode, with auto-reload and debug templates.", ) @click.pass_obj -def dash_run(obj: Context, host: str, port: int, dev: bool) -> None: +def deck_run(obj: Context, host: str, port: int, dev: bool) -> None: """ - Run the dash server. + Run the deck server. """ app.run(obj.root, host=host, port=port, debug=dev, use_reloader=dev) -hooks.Filters.CLI_COMMANDS.add_item(dash) +hooks.Filters.CLI_COMMANDS.add_item(deck) diff --git a/tutordash/server/__init__.py b/tutordeck/server/__init__.py similarity index 100% rename from tutordash/server/__init__.py rename to tutordeck/server/__init__.py diff --git a/tutordash/server/app.py b/tutordeck/server/app.py similarity index 99% rename from tutordash/server/app.py rename to tutordeck/server/app.py index 1a2d3cd..d5151ba 100644 --- a/tutordash/server/app.py +++ b/tutordeck/server/app.py @@ -22,7 +22,7 @@ from quart.helpers import WerkzeugResponse from quart.typing import ResponseTypes from tutor.plugins.v1 import discover_package -from tutordash.server.utils import current_page_plugins, pagination_context +from tutordeck.server.utils import current_page_plugins, pagination_context from . import constants, tutorclient diff --git a/tutordash/server/constants.py b/tutordeck/server/constants.py similarity index 100% rename from tutordash/server/constants.py rename to tutordeck/server/constants.py diff --git a/tutordash/server/static/css/.gitignore b/tutordeck/server/static/css/.gitignore similarity index 100% rename from tutordash/server/static/css/.gitignore rename to tutordeck/server/static/css/.gitignore diff --git a/tutordash/server/static/img/Button.svg b/tutordeck/server/static/img/Button.svg similarity index 100% rename from tutordash/server/static/img/Button.svg rename to tutordeck/server/static/img/Button.svg diff --git a/tutordash/server/static/img/CheckCircle.svg b/tutordeck/server/static/img/CheckCircle.svg similarity index 100% rename from tutordash/server/static/img/CheckCircle.svg rename to tutordeck/server/static/img/CheckCircle.svg diff --git a/tutordash/server/static/img/Edly Red Icon.svg b/tutordeck/server/static/img/Edly Red Icon.svg similarity index 100% rename from tutordash/server/static/img/Edly Red Icon.svg rename to tutordeck/server/static/img/Edly Red Icon.svg diff --git a/tutordash/server/static/img/Fading_balls.gif b/tutordeck/server/static/img/Fading_balls.gif similarity index 100% rename from tutordash/server/static/img/Fading_balls.gif rename to tutordeck/server/static/img/Fading_balls.gif diff --git a/tutordash/server/static/img/Featured icon.svg b/tutordeck/server/static/img/Featured icon.svg similarity index 100% rename from tutordash/server/static/img/Featured icon.svg rename to tutordeck/server/static/img/Featured icon.svg diff --git a/tutordash/server/static/img/Icon.svg b/tutordeck/server/static/img/Icon.svg similarity index 100% rename from tutordash/server/static/img/Icon.svg rename to tutordeck/server/static/img/Icon.svg diff --git a/tutordash/server/static/img/Vector.svg b/tutordeck/server/static/img/Vector.svg similarity index 100% rename from tutordash/server/static/img/Vector.svg rename to tutordeck/server/static/img/Vector.svg diff --git a/tutordash/server/static/img/X.svg b/tutordeck/server/static/img/X.svg similarity index 100% rename from tutordash/server/static/img/X.svg rename to tutordeck/server/static/img/X.svg diff --git a/tutordash/server/static/img/advanced-mode.svg b/tutordeck/server/static/img/advanced-mode.svg similarity index 100% rename from tutordash/server/static/img/advanced-mode.svg rename to tutordeck/server/static/img/advanced-mode.svg diff --git a/tutordash/server/static/img/arrow-left.svg b/tutordeck/server/static/img/arrow-left.svg similarity index 100% rename from tutordash/server/static/img/arrow-left.svg rename to tutordeck/server/static/img/arrow-left.svg diff --git a/tutordash/server/static/img/arrow-right.svg b/tutordeck/server/static/img/arrow-right.svg similarity index 100% rename from tutordash/server/static/img/arrow-right.svg rename to tutordeck/server/static/img/arrow-right.svg diff --git a/tutordash/server/static/img/download.svg b/tutordeck/server/static/img/download.svg similarity index 100% rename from tutordash/server/static/img/download.svg rename to tutordeck/server/static/img/download.svg diff --git a/tutordash/server/static/img/favicon.png b/tutordeck/server/static/img/favicon.png similarity index 100% rename from tutordash/server/static/img/favicon.png rename to tutordeck/server/static/img/favicon.png diff --git a/tutordash/server/static/img/local-launch.svg b/tutordeck/server/static/img/local-launch.svg similarity index 100% rename from tutordash/server/static/img/local-launch.svg rename to tutordeck/server/static/img/local-launch.svg diff --git a/tutordash/server/static/img/search.svg b/tutordeck/server/static/img/search.svg similarity index 100% rename from tutordash/server/static/img/search.svg rename to tutordeck/server/static/img/search.svg diff --git a/tutordash/server/static/img/shopping-bag.svg b/tutordeck/server/static/img/shopping-bag.svg similarity index 100% rename from tutordash/server/static/img/shopping-bag.svg rename to tutordeck/server/static/img/shopping-bag.svg diff --git a/tutordash/server/static/img/stack.svg b/tutordeck/server/static/img/stack.svg similarity index 100% rename from tutordash/server/static/img/stack.svg rename to tutordeck/server/static/img/stack.svg diff --git a/tutordash/server/static/js/dash.js b/tutordeck/server/static/js/deck.js similarity index 100% rename from tutordash/server/static/js/dash.js rename to tutordeck/server/static/js/deck.js diff --git a/tutordash/server/static/js/htmx.min.js b/tutordeck/server/static/js/htmx.min.js similarity index 100% rename from tutordash/server/static/js/htmx.min.js rename to tutordeck/server/static/js/htmx.min.js diff --git a/tutordash/server/static/js/logs.js b/tutordeck/server/static/js/logs.js similarity index 100% rename from tutordash/server/static/js/logs.js rename to tutordeck/server/static/js/logs.js diff --git a/tutordash/server/static/js/sse.js b/tutordeck/server/static/js/sse.js similarity index 100% rename from tutordash/server/static/js/sse.js rename to tutordeck/server/static/js/sse.js diff --git a/tutordash/server/static/scss/dash.scss b/tutordeck/server/static/scss/deck.scss similarity index 100% rename from tutordash/server/static/scss/dash.scss rename to tutordeck/server/static/scss/deck.scss diff --git a/tutordash/server/templates/_base_header.html b/tutordeck/server/templates/_base_header.html similarity index 100% rename from tutordash/server/templates/_base_header.html rename to tutordeck/server/templates/_base_header.html diff --git a/tutordash/server/templates/_config.html b/tutordeck/server/templates/_config.html similarity index 100% rename from tutordash/server/templates/_config.html rename to tutordeck/server/templates/_config.html diff --git a/tutordash/server/templates/_plugin_header.html b/tutordeck/server/templates/_plugin_header.html similarity index 100% rename from tutordash/server/templates/_plugin_header.html rename to tutordeck/server/templates/_plugin_header.html diff --git a/tutordash/server/templates/_plugin_installed_list.html b/tutordeck/server/templates/_plugin_installed_list.html similarity index 89% rename from tutordash/server/templates/_plugin_installed_list.html rename to tutordeck/server/templates/_plugin_installed_list.html index c1d3166..8a42c07 100644 --- a/tutordash/server/templates/_plugin_installed_list.html +++ b/tutordeck/server/templates/_plugin_installed_list.html @@ -7,7 +7,7 @@
By {{ plugin.author }}
{{ plugin.description|safe }}
- - + {% if sidebar_active_tab %}