TexteaInc / funix

Building web apps without manually creating widgets
http://funix.io
MIT License
89 stars 10 forks source link

adding ploomber cloud as a deployment option #76

Open edublancas opened 8 months ago

edublancas commented 8 months ago

hi funix team!

I've been discussing with @forrestbao adding ploomber cloud as a deployment option to funix's docs. I went ahead and added it to our documentation: https://docs.cloud.ploomber.io/en/latest/apps/funix.html

also deployed a demo: https://gentle-heart-9135.ploomberapp.io (I tried to deploy the whole examples directory but got some errors)

the last step is to open a PR to the readme.md to link from this repo to ploomber cloud's docs, but I'm unsure where is the best place to put this. the only place that mentions deployment is this:

  • Apps, not demos: Funix comes with the following features so what you build is not just a demo in your company's Intranet but an app accessible to the entire world: history, access control, multipage apps, session management, and cloud deployment (via Funix-Deploy).

Looks like funix-deploy is still work in progress. so I'm unsure if it's best to keep it and add ploomber cloud there, or maybe add a "third party deployment services" section. Let me know what you think it's best!

edublancas commented 8 months ago

Error I'm getting when trying to start the examples/:

(tmp) eduardo@macbookair dev/funix (main) » ls
Funix_vs_them.md  MANIFEST.in       README.zh-CN.md   docs/             frontend/         setup.cfg
LICENSE           README.md         backend/          examples/         pyproject.toml
(tmp) eduardo@macbookair dev/funix (main) » funix -R examples
Traceback (most recent call last):
  File "/Users/eduardo/miniconda3/envs/tmp/bin/funix", line 8, in <module>
    sys.exit(cli_main())
             ^^^^^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/__main__.py", line 113, in cli_main
    plac.call(main, version="Funix 0.5.0")
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/plac_core.py", line 436, in call
    cmd, result = parser.consume(arglist)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/plac_core.py", line 287, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/__main__.py", line 90, in main
    run(
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/__init__.py", line 338, in run
    import_from_config(
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/__init__.py", line 194, in import_from_config
    __prep(
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/__init__.py", line 80, in __prep
    module = import_module_from_file(module_or_file, need_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/util/module.py", line 28, in import_module_from_file
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/eduardo/dev/funix/examples/archive/examples.py", line 9, in <module>
    @funix(
     ^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/funix/decorator/__init__.py", line 1149, in decorator
    get_wrapper_endpoint(decorated_function_param_getter)
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/flask/scaffold.py", line 435, in decorator
    self.add_url_rule(rule, endpoint, f, **options)
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/flask/scaffold.py", line 50, in wrapper_func
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eduardo/miniconda3/envs/tmp/lib/python3.11/site-packages/flask/app.py", line 1059, in add_url_rule
    raise AssertionError(
AssertionError: View function mapping is overwriting an existing endpoint function: cell_test_param_getter
(tmp) eduardo@macbookair dev/funix (main) »
forrestbao commented 8 months ago

Hi @edublancas we are fixing this issue now. We are going over some updates so the old examples may not work. We will let you know once it is done.