All Projects → strboul → Supreme

strboul / Supreme

Licence: other
Generate UML diagrams of Shiny modules

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Supreme

Uml Synchronously Store To Db
UML建模,实时存储到数据库,Java实现
Stars: ✭ 14 (-73.08%)
Mutual labels:  uml
Html Sass Babel Webpack Boilerplate
Webpack 4 + Babel + ES6 + SASS + HTML Modules + Livereload
Stars: ✭ 35 (-32.69%)
Mutual labels:  modules
Reactor
unit testing for shiny reactivity
Stars: ✭ 44 (-15.38%)
Mutual labels:  shiny
Gmq
基于事件机制的多模块框架,支持动态库,grpc,websocket,mqtt等多种与后端通信组合方式. 模块动态替换,部分加载或者升级.
Stars: ✭ 31 (-40.38%)
Mutual labels:  modules
Sig Bio Shiny
A standalone interactive application for detecting biological significance on a set of genes
Stars: ✭ 34 (-34.62%)
Mutual labels:  shiny
Dnnextensions
One solution. Multiple extensions. No pain. A collection of DNN modules and other extensions.
Stars: ✭ 37 (-28.85%)
Mutual labels:  modules
Oak
A pure Go game engine
Stars: ✭ 847 (+1528.85%)
Mutual labels:  shiny
Postcss Import
PostCSS plugin to inline @import rules content
Stars: ✭ 1,048 (+1915.38%)
Mutual labels:  modules
Plantuml Styler
Online tool to make your PlantUML diagrams look great.
Stars: ✭ 35 (-32.69%)
Mutual labels:  uml
Lein Plantuml
A Leiningen plugin for generating UML diagrams using PlantUML
Stars: ✭ 43 (-17.31%)
Mutual labels:  uml
Graphql Modules
Enterprise Grade Tooling For Your GraphQL Server
Stars: ✭ 962 (+1750%)
Mutual labels:  modules
Jcnavigator
A decoupled navigator framework of jumping between modules or apps for iOS development.
Stars: ✭ 33 (-36.54%)
Mutual labels:  modules
Phaser Node Kit
Rapid Game Development with PhaserJS and Node for Modern Browsers
Stars: ✭ 39 (-25%)
Mutual labels:  modules
Shiny Gem
A data analysis web-app written in R Shiny.
Stars: ✭ 15 (-71.15%)
Mutual labels:  shiny
Html Modules Toolkit
Transforming HTML standards of the future into JavaScript standards of the past
Stars: ✭ 45 (-13.46%)
Mutual labels:  modules
Redux Dynamic Modules
Modularize Redux by dynamically loading reducers and middlewares.
Stars: ✭ 874 (+1580.77%)
Mutual labels:  modules
Gomodctl
Search, Check, and Update Go modules.
Stars: ✭ 37 (-28.85%)
Mutual labels:  modules
Shinypanels
Collapsible panels layout for r shiny apps
Stars: ✭ 50 (-3.85%)
Mutual labels:  shiny
Kshobjcuml
KSHObjcUML can show oriented graph of dependencies between Objective-C and Swift classes in your project
Stars: ✭ 1,039 (+1898.08%)
Mutual labels:  uml
Uml Diagram For Python Design Pattern Examples
UML diagram list of GoF design pattern examples written in Python.
Stars: ✭ 40 (-23.08%)
Mutual labels:  uml

supreme

Travis build status AppVeyor build status CRAN status badge CRAN mirror downloads Coverage status

As a ‘Shiny application’, developed with ‘Shiny modules’, gets bigger, it becomes more difficult to track the relationships and to have a clear overview of the module hierarchy. supreme is a tool to help developers visualize the structure of their ‘Shiny applications’ developed with modules.

Therefore, you are able to:

  1. Visualize relationship of modules in existing applications

  2. Design new applications from scratch

Usage

0. The model language

A graph consists of five main fields:

  1. Module name (always required)

  2. Module inputs (except the defaults: input, output, session)

  3. Module outputs

  4. Module returns

  5. Calling modules, which are modules called a the module

1. Model graph for existing applications

library(supreme)
path <- example_app_path()
obj <- supreme(src_file(path))
graph(obj)

2. Model new applications

- name: server
  calling_modules:
    - items_tab_module_server: ItemsTab
    - customers_tab_module_server: CustomersTab
    - transactions_tab_module_server: TransactionsTab
  src: app.R

- name: customers_tab_module_server
  input: customers_list
  output:
    - paid_customers_table
    - free_customers_table
  src: module-customers.R

- name: items_tab_module_server
  input:
    - items_list
    - is_fired
  calling_modules:
    - module_modal_dialog: ~
  src: module-items.R

- name: transactions_tab_module_server
  input:
    - table
    - button_clicked
  output: transactions_table
  return: transactions_keys
  src: module-transactions.R

- name: module_modal_dialog
  input:
    - text
  src: module-utils.R

There are some special rules when creating model objects with YAML:

  • Each entity in the model must have a name field.

  • The entities can have optional fields, which are defined in the getOption("SUPREME_MODEL_OPTIONAL_FIELDS")

  • The fields defined in the getOption("SUPREME_MODEL_MULTI_VAR_FIELDS") can have multiple elements. It means that these fields can be expressed as an array.

model_yaml <- src_yaml(text = model)
obj <- supreme(model_yaml)

Known limitations

  • supreme will not properly parse the source code of your application if server side component is created with shinyServer(), which is soft-deprecated after a very early Shiny version of 0.10.

  • Similarly, although it’s possible to create a Shiny application by only providing input and output arguments in the server side, supreme will not read any Shiny server side component missing a session argument. That’s reasonable decision because modules cannot work without a session argument.

  • For the module returns, all return values in a module should explicitly be wrapped in return() calls.

  • All the possible limitations comes from the fact that supreme is designed to perform static analysis on your code. Thus, some idiosyncratic Shiny application code may not be parsed as intended. For such cases, it would be great if you open an issue describing the situation with a reproducible example.

Installation

You can install the released version from CRAN:

install.packages("supreme")

Or get the development version from GitHub:

# install.packages("devtools")
devtools::install_github("strboul/supreme")

Acknowledgment

  • R Core Team: supreme package is brought to life thanks to R allowing abstract syntax trees (AST) that is used to practice static analysis on the code.

  • datamodelr: Inspiring work for creating modeling language

  • shinypod: Interesting thoughts regarding the implementation of Shiny modules

License

MIT © Metin Yazici

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].