Skip to content

Commit

Permalink
Merge pull request #93 from pradal/app
Browse files Browse the repository at this point in the history
Launch web application
  • Loading branch information
pradal authored Feb 12, 2024
2 parents 4291cfe + 7b4a55c commit c0230e6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 94 deletions.
52 changes: 0 additions & 52 deletions .appveyor.yml

This file was deleted.

1 change: 0 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source:
path: ..

build:
noarch: python
preserve_egg_dir: True
number: 0
script: {{PYTHON}} setup.py install
Expand Down
2 changes: 1 addition & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ dependencies:
- sphinx_rtd_theme
- openalea.strawberry
- nbsphinx
- nbsphinx-link
- nbsphinx-link
19 changes: 0 additions & 19 deletions doc/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Marc Labadie, Christophe Pradal, Gaetan Heidsieck'

# The full version, including alpha/beta/rc tags
release = '1.1.1'
release = '1.2.0'


# -- General configuration ---------------------------------------------------
Expand Down
18 changes: 0 additions & 18 deletions metainfo.ini

This file was deleted.

9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from setuptools import setup, find_namespace_packages

name = 'OpenAlea.Strawberry'
version = '1.1.1'
version = '1.2.0'

description = "Strawberry is a package for architecture analysis and 2D/3D reconstruction."
long_description = open('README.md').read()
Expand Down Expand Up @@ -57,5 +57,10 @@
package_data={'': ['*.csv', '*.mtg', '*.R*', '*.ipynb']},

# Declare scripts and wralea as entry_points (extensions) of your package
entry_points={'wralea': ['strawberry = openalea.strawberry_wralea']},
entry_points={
'wralea': ['strawberry = openalea.strawberry_wralea'],
'console_scripts': [
'strawberry = openalea.strawberry.application.run:main' # Define a console script to run your Voilà app
]
},
)
26 changes: 26 additions & 0 deletions src/openalea/strawberry/application/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from pathlib import Path
from voila.app import Voila
from voila.configuration import VoilaConfiguration

def main():
config = VoilaConfiguration()



config.template = 'vuetify-default'
config.enable_nbextensions = True
config.file_whitelist = [r".*\.(png|jpg|gif|svg|mp4|avi|ogg|html|py|js)"]

app = Voila()
app.voila_configuration = config

nb_file = Path(__file__)/'..'/r"Strawberry Application.ipynb"
nb_file = str(nb_file.resolve())
app.notebook_path=nb_file
app.setup_template_dirs()
# Launch your Voilà app here

app.start()

if __name__ == "__main__":
main()

0 comments on commit c0230e6

Please sign in to comment.