Package: shiny-semantic
Semantic UI in Shiny-for-PythonCreate rich web applications in PyShiny using styles and components from Semantic UI.Demo applications and examplesSemantic Components ShowcaseLive DemoSource CodeT-Test Simulation CloneLive DemoSource CodeAbout the projectThis is an earlyShiny-for-Pythonimplementation ofthe official community fork of Semantic UI.The repository contains a python packageshiny_semanticand a PyShiny application (found inexamplefolder) that serves as a simple demo of the implemented components.The application is deployed on RSConnect and can be found athttps://connect.appsilon.com/py_shiny_semantic/.About Fomantic UIFomantic UIis a well-maintained community fork of a more widely known and matureSemantic UI. This project uses JS, CSS and icons from Fomantic UI while referring to the name of the original library.The structure ofshiny_semanticfollows the one of Fomantic UI -- this way users may easily refer to corresponding sections in the original documentation to learn about possible classes, styles and behaviors of the components.How to installshiny_semanticis available from the officialPyPI distribution, and can be installed using pip. Please remember, that it is considered to be best practice to install packages in isolated virtual environments (see the next section).pip install shiny_semanticThis will install bothshinyandshiny_semantic- it is enough to start creating a Shiny application in Python.DevelopmentIn this project we used only those python tools that already come with a standard python distribution and should be immediately available to the developers. For package management we usedpip, for virtual environment we usedvenv, and for unit tests we usedunittest.Please note, that some systems (e.g. macOS) have Python installed by default, and it may be accessible withpython3rather than justpython. As soon as you init and source a venv, you will be able to call python with justpython.To start development, run the following command:python-mvenv.venv# creates virtual environmentsource.venv/bin/activate# activates virtual environmentpipinstall-e".[dev]This project usespre-committo ensure the quality of code style. Once the dependencies are restored, run the following command once:pre-commitinstallTo run the app in the hot-reload mode (the app automatically reloads every time it detects changes in the python source code), run the following command:shiny run --reload exampleHow to update the packageThis project leveragesbumpverto handle package versioning. To make sure thatbumpverworks, run the following commands:pipinstallbumpver
bumpverupdate--patch--dry--no-fetchThis should provide the developer with a preview of changed lines across multiple files - where package version is mentioned. When local updates are fininshed, the developer might run:bumpverupdate--patch# or --minor or --major, depending on the PR goalThis command will change the abovementioned string versions, create a commit with "bump version" message, create a git tag and will push changes to the remote. Developers will find a new version under "Releases" section on the Github page.How to build and publish the packagepipinstallbuildtwine# It is best to remove local dist folder, so that `twine` is not confused on which version to userm-rfdist

python-mbuild
twinecheckdist/*# Currently, the package is published by pavel.demin@appsilon.comtwineuploaddist/*How to update the Fomantic componentsThe easiest way to replace the Fomantic assets with the new ones, is as follows:Navigate tohttps://www.jsdelivr.com/package/npm/fomantic-ui. This resource is recommended by the Fomantic team - it contains the latest version of the library filesDownload the entire folder as a.tgzarchiveUnpack the archiveFinddistfolder, grab the minimized versions of CSS and JS files and move them intoshiny_semantic/www/semantic/In the samedistfolder, locate thethemessubfolder - open itMove thedefaultfolder intoshiny_semantic/www/semantic/themes- this way Fomantic JS and CSS will be able to seamlessly pick up fonts and icons.