From 82460949c9ae48a96c69d60006cd2bbd08c72e59 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 19 Jul 2024 11:59:09 -0400 Subject: [PATCH 1/3] chore: make shinyswatch a submodule --- .gitmodules | 3 +++ Makefile | 18 ++++++++++++++++++ packages/py-shinyswatch | 1 + shinylive_lock.json | 10 +++++----- shinylive_requirements.json | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) create mode 160000 packages/py-shinyswatch diff --git a/.gitmodules b/.gitmodules index 2f0f79e1..6d43c0cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "packages/plotnine"] path = packages/plotnine url = https://github.com/wch/plotnine.git +[submodule "packages/py-shinyswatch"] + path = packages/py-shinyswatch + url = https://github.com/posit-dev/py-shinyswatch.git diff --git a/Makefile b/Makefile index 080506bf..a85a3e63 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,13 @@ SHINYLIVE_DIR = ./_shinylive HTMLTOOLS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-htmltools/htmltools/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINY_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shiny/shiny/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINYWIDGETS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinywidgets/shinywidgets/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') +SHINYSWATCH_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinyswatch/shinyswatch/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') FAICONS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-faicons/faicons/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') HTMLTOOLS_WHEEL = htmltools-$(HTMLTOOLS_VERSION)-py3-none-any.whl SHINY_WHEEL = shiny-$(SHINY_VERSION)-py3-none-any.whl SHINYWIDGETS_WHEEL = shinywidgets-$(SHINYWIDGETS_VERSION)-py3-none-any.whl +SHINYSWATCH_WHEEL = shinyswatch-$(SHINYSWATCH_VERSION)-py3-none-any.whl FAICONS_WHEEL = faicons-$(FAICONS_VERSION)-py3-none-any.whl # Hard code these versions for now @@ -163,6 +165,7 @@ pyodide_js: pyodide_packages_local: $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \ + $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL) @@ -184,6 +187,12 @@ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL): $(PACKAGE_DIR)/$(SHINYWIDG rm -f $(BUILD_DIR)/shinylive/pyodide/shinywidgets*.whl cp $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) +$(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL): $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) + mkdir -p $(BUILD_DIR)/shinylive/pyodide + # Remove any old copies of shinyswatch + rm -f $(BUILD_DIR)/shinylive/pyodide/shinyswatch*.whl + cp $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) + $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL): $(PACKAGE_DIR)/$(FAICONS_WHEEL) mkdir -p $(BUILD_DIR)/shinylive/pyodide # Remove any old copies of faicons @@ -255,6 +264,7 @@ packages: clean-packages \ package-htmltools \ package-shiny \ package-shinywidgets \ + package-shinyswatch \ package-faicons \ package-plotnine @@ -265,6 +275,8 @@ package-shiny: $(PACKAGE_DIR)/$(SHINY_WHEEL) package-shinywidgets: $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) +package-shinyswatch: $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) + package-faicons: $(PACKAGE_DIR)/$(FAICONS_WHEEL) package-plotnine: $(PACKAGE_DIR)/$(PLOTNINE_WHEEL) @@ -286,6 +298,11 @@ $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinywidgets rm -f $(PACKAGE_DIR)/shinywidgets*.whl . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinywidgets && make install && mv dist/*.whl ../ +$(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinyswatch + # Remove any old copies of the package + rm -f $(PACKAGE_DIR)/shinyswatch*.whl + . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinyswatch && make install && mv dist/*.whl ../ + $(PACKAGE_DIR)/$(FAICONS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-faicons # Remove any old copies of the package rm -f $(PACKAGE_DIR)/faicons*.whl @@ -311,6 +328,7 @@ retrieve_packages: $(PYBIN) $(BUILD_DIR)/shinylive/pyodide \ $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \ + $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) $(PYBIN)/pip install -r requirements-dev.txt mkdir -p $(BUILD_DIR)/shinylive/pyodide diff --git a/packages/py-shinyswatch b/packages/py-shinyswatch new file mode 160000 index 00000000..04820b92 --- /dev/null +++ b/packages/py-shinyswatch @@ -0,0 +1 @@ +Subproject commit 04820b92295fc54accb174bbff3556271eaa25e4 diff --git a/shinylive_lock.json b/shinylive_lock.json index a6e11640..cef18bc2 100644 --- a/shinylive_lock.json +++ b/shinylive_lock.json @@ -53,15 +53,15 @@ }, "shinyswatch": { "name": "shinyswatch", - "version": "0.6.0", - "filename": "shinyswatch-0.6.0-py3-none-any.whl", - "sha256": "8de7153f84d533bc8252bf47674c622351a8cb0ae6b2afaf81f167b7af1b417f", - "url": "https://files.pythonhosted.org/packages/f0/22/ee61c29ae02dd6f9cb5bd80804ade3d85b9b0c9782c930d8c061fcc863a8/shinyswatch-0.6.0-py3-none-any.whl", + "version": "0.7.0", + "filename": "shinyswatch-0.7.0-py3-none-any.whl", + "sha256": null, + "url": null, "depends": [ {"name": "typing-extensions", "specs": [[">=", "3.10.0.0"]]}, {"name": "packaging", "specs": [[">=", "20.9"]]}, {"name": "htmltools", "specs": [[">=", "0.2.0"]]}, - {"name": "shiny", "specs": [[">=", "0.8.1"]]} + {"name": "shiny", "specs": [[">=", "1.0.0"]]} ], "imports": [ "shinyswatch" diff --git a/shinylive_requirements.json b/shinylive_requirements.json index 265ab60e..f9883682 100644 --- a/shinylive_requirements.json +++ b/shinylive_requirements.json @@ -2,7 +2,7 @@ { "name": "htmltools", "source": "local", "version": "latest" }, { "name": "shiny", "source": "local", "version": "latest" }, { "name": "shinywidgets", "source": "local", "version": "latest" }, - { "name": "shinyswatch", "source": "pypi", "version": "latest" }, + { "name": "shinyswatch", "source": "local", "version": "latest" }, { "name": "faicons", "source": "local", "version": "latest" }, { "name": "mdit-py-plugins", From 458ded53a20c1334b7c97e512192c03fa1df03eb Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 19 Jul 2024 14:17:46 -0400 Subject: [PATCH 2/3] Revert "chore: make shinyswatch a submodule" This reverts commit 82460949c9ae48a96c69d60006cd2bbd08c72e59. --- .gitmodules | 3 --- Makefile | 18 ------------------ packages/py-shinyswatch | 1 - shinylive_lock.json | 10 +++++----- shinylive_requirements.json | 2 +- 5 files changed, 6 insertions(+), 28 deletions(-) delete mode 160000 packages/py-shinyswatch diff --git a/.gitmodules b/.gitmodules index 6d43c0cd..2f0f79e1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,6 +16,3 @@ [submodule "packages/plotnine"] path = packages/plotnine url = https://github.com/wch/plotnine.git -[submodule "packages/py-shinyswatch"] - path = packages/py-shinyswatch - url = https://github.com/posit-dev/py-shinyswatch.git diff --git a/Makefile b/Makefile index a85a3e63..080506bf 100644 --- a/Makefile +++ b/Makefile @@ -34,13 +34,11 @@ SHINYLIVE_DIR = ./_shinylive HTMLTOOLS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-htmltools/htmltools/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINY_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shiny/shiny/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINYWIDGETS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinywidgets/shinywidgets/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') -SHINYSWATCH_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinyswatch/shinyswatch/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') FAICONS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-faicons/faicons/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') HTMLTOOLS_WHEEL = htmltools-$(HTMLTOOLS_VERSION)-py3-none-any.whl SHINY_WHEEL = shiny-$(SHINY_VERSION)-py3-none-any.whl SHINYWIDGETS_WHEEL = shinywidgets-$(SHINYWIDGETS_VERSION)-py3-none-any.whl -SHINYSWATCH_WHEEL = shinyswatch-$(SHINYSWATCH_VERSION)-py3-none-any.whl FAICONS_WHEEL = faicons-$(FAICONS_VERSION)-py3-none-any.whl # Hard code these versions for now @@ -165,7 +163,6 @@ pyodide_js: pyodide_packages_local: $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \ - $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL) @@ -187,12 +184,6 @@ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL): $(PACKAGE_DIR)/$(SHINYWIDG rm -f $(BUILD_DIR)/shinylive/pyodide/shinywidgets*.whl cp $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) -$(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL): $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) - mkdir -p $(BUILD_DIR)/shinylive/pyodide - # Remove any old copies of shinyswatch - rm -f $(BUILD_DIR)/shinylive/pyodide/shinyswatch*.whl - cp $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) - $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL): $(PACKAGE_DIR)/$(FAICONS_WHEEL) mkdir -p $(BUILD_DIR)/shinylive/pyodide # Remove any old copies of faicons @@ -264,7 +255,6 @@ packages: clean-packages \ package-htmltools \ package-shiny \ package-shinywidgets \ - package-shinyswatch \ package-faicons \ package-plotnine @@ -275,8 +265,6 @@ package-shiny: $(PACKAGE_DIR)/$(SHINY_WHEEL) package-shinywidgets: $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) -package-shinyswatch: $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) - package-faicons: $(PACKAGE_DIR)/$(FAICONS_WHEEL) package-plotnine: $(PACKAGE_DIR)/$(PLOTNINE_WHEEL) @@ -298,11 +286,6 @@ $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinywidgets rm -f $(PACKAGE_DIR)/shinywidgets*.whl . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinywidgets && make install && mv dist/*.whl ../ -$(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinyswatch - # Remove any old copies of the package - rm -f $(PACKAGE_DIR)/shinyswatch*.whl - . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinyswatch && make install && mv dist/*.whl ../ - $(PACKAGE_DIR)/$(FAICONS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-faicons # Remove any old copies of the package rm -f $(PACKAGE_DIR)/faicons*.whl @@ -328,7 +311,6 @@ retrieve_packages: $(PYBIN) $(BUILD_DIR)/shinylive/pyodide \ $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \ - $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) $(PYBIN)/pip install -r requirements-dev.txt mkdir -p $(BUILD_DIR)/shinylive/pyodide diff --git a/packages/py-shinyswatch b/packages/py-shinyswatch deleted file mode 160000 index 04820b92..00000000 --- a/packages/py-shinyswatch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04820b92295fc54accb174bbff3556271eaa25e4 diff --git a/shinylive_lock.json b/shinylive_lock.json index cef18bc2..a6e11640 100644 --- a/shinylive_lock.json +++ b/shinylive_lock.json @@ -53,15 +53,15 @@ }, "shinyswatch": { "name": "shinyswatch", - "version": "0.7.0", - "filename": "shinyswatch-0.7.0-py3-none-any.whl", - "sha256": null, - "url": null, + "version": "0.6.0", + "filename": "shinyswatch-0.6.0-py3-none-any.whl", + "sha256": "8de7153f84d533bc8252bf47674c622351a8cb0ae6b2afaf81f167b7af1b417f", + "url": "https://files.pythonhosted.org/packages/f0/22/ee61c29ae02dd6f9cb5bd80804ade3d85b9b0c9782c930d8c061fcc863a8/shinyswatch-0.6.0-py3-none-any.whl", "depends": [ {"name": "typing-extensions", "specs": [[">=", "3.10.0.0"]]}, {"name": "packaging", "specs": [[">=", "20.9"]]}, {"name": "htmltools", "specs": [[">=", "0.2.0"]]}, - {"name": "shiny", "specs": [[">=", "1.0.0"]]} + {"name": "shiny", "specs": [[">=", "0.8.1"]]} ], "imports": [ "shinyswatch" diff --git a/shinylive_requirements.json b/shinylive_requirements.json index f9883682..265ab60e 100644 --- a/shinylive_requirements.json +++ b/shinylive_requirements.json @@ -2,7 +2,7 @@ { "name": "htmltools", "source": "local", "version": "latest" }, { "name": "shiny", "source": "local", "version": "latest" }, { "name": "shinywidgets", "source": "local", "version": "latest" }, - { "name": "shinyswatch", "source": "local", "version": "latest" }, + { "name": "shinyswatch", "source": "pypi", "version": "latest" }, { "name": "faicons", "source": "local", "version": "latest" }, { "name": "mdit-py-plugins", From fc9a9789ade39f7eba863cd44e8f847ec24c4fe8 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 19 Jul 2024 14:19:25 -0400 Subject: [PATCH 3/3] Update shinyswatch in `shinylive_lock.json` --- shinylive_lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shinylive_lock.json b/shinylive_lock.json index a6e11640..75241c1c 100644 --- a/shinylive_lock.json +++ b/shinylive_lock.json @@ -53,15 +53,15 @@ }, "shinyswatch": { "name": "shinyswatch", - "version": "0.6.0", - "filename": "shinyswatch-0.6.0-py3-none-any.whl", - "sha256": "8de7153f84d533bc8252bf47674c622351a8cb0ae6b2afaf81f167b7af1b417f", - "url": "https://files.pythonhosted.org/packages/f0/22/ee61c29ae02dd6f9cb5bd80804ade3d85b9b0c9782c930d8c061fcc863a8/shinyswatch-0.6.0-py3-none-any.whl", + "version": "0.7.0", + "filename": "shinyswatch-0.7.0-py3-none-any.whl", + "sha256": "c1f8409206abf0d4cd6bf46d7daa481b9ddf1e98a7ca4cf439bb674c371810ae", + "url": "https://files.pythonhosted.org/packages/ac/51/f6e337ebd72694fdc925828ad3b6b7a7a57164699493d6f87a547f870069/shinyswatch-0.7.0-py3-none-any.whl", "depends": [ {"name": "typing-extensions", "specs": [[">=", "3.10.0.0"]]}, {"name": "packaging", "specs": [[">=", "20.9"]]}, {"name": "htmltools", "specs": [[">=", "0.2.0"]]}, - {"name": "shiny", "specs": [[">=", "0.8.1"]]} + {"name": "shiny", "specs": [[">=", "1.0.0"]]} ], "imports": [ "shinyswatch"