ose-app 0.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. ose_app-0.2.5/PKG-INFO +27 -0
  2. ose_app-0.2.5/README.md +42 -0
  3. ose_app-0.2.5/pyproject.toml +56 -0
  4. ose_app-0.2.5/setup.cfg +4 -0
  5. ose_app-0.2.5/src/ose_app/AppModule.py +98 -0
  6. ose_app-0.2.5/src/ose_app/OntologyDataStore.py +464 -0
  7. ose_app-0.2.5/src/ose_app/PermissionManager.py +78 -0
  8. ose_app-0.2.5/src/ose_app/SpreadsheetSearcher.py +197 -0
  9. ose_app-0.2.5/src/ose_app/__init__.py +130 -0
  10. ose_app-0.2.5/src/ose_app/app.py +10 -0
  11. ose_app-0.2.5/src/ose_app/constants.py +1 -0
  12. ose_app-0.2.5/src/ose_app/custom_json.py +23 -0
  13. ose_app-0.2.5/src/ose_app/default_config.py +39 -0
  14. ose_app-0.2.5/src/ose_app/gh.py +60 -0
  15. ose_app-0.2.5/src/ose_app/guards/__init__.py +0 -0
  16. ose_app-0.2.5/src/ose_app/guards/verify_login.py +20 -0
  17. ose_app-0.2.5/src/ose_app/guards/with_permission.py +54 -0
  18. ose_app-0.2.5/src/ose_app/jinja_extensions/__init__.py +42 -0
  19. ose_app-0.2.5/src/ose_app/routes/__init__.py +24 -0
  20. ose_app-0.2.5/src/ose_app/routes/admin.py +108 -0
  21. ose_app-0.2.5/src/ose_app/routes/api/__init__.py +23 -0
  22. ose_app-0.2.5/src/ose_app/routes/api/edit.py +162 -0
  23. ose_app-0.2.5/src/ose_app/routes/api/external.py +198 -0
  24. ose_app-0.2.5/src/ose_app/routes/api/plugins.py +22 -0
  25. ose_app-0.2.5/src/ose_app/routes/api/release.py +380 -0
  26. ose_app-0.2.5/src/ose_app/routes/api/repos.py +55 -0
  27. ose_app-0.2.5/src/ose_app/routes/api/scripts.py +49 -0
  28. ose_app-0.2.5/src/ose_app/routes/api/search.py +19 -0
  29. ose_app-0.2.5/src/ose_app/routes/api/settings.py +115 -0
  30. ose_app-0.2.5/src/ose_app/routes/api/validate.py +264 -0
  31. ose_app-0.2.5/src/ose_app/routes/api/visualise.py +228 -0
  32. ose_app-0.2.5/src/ose_app/routes/auth.py +44 -0
  33. ose_app-0.2.5/src/ose_app/routes/edit.py +690 -0
  34. ose_app-0.2.5/src/ose_app/routes/main.py +100 -0
  35. ose_app-0.2.5/src/ose_app/routes/search.py +42 -0
  36. ose_app-0.2.5/src/ose_app/routes/status.py +10 -0
  37. ose_app-0.2.5/src/ose_app/routes/visualize.py +108 -0
  38. ose_app-0.2.5/src/ose_app/static/addicto.release.json +129 -0
  39. ose_app-0.2.5/src/ose_app/static/bcio.release.json +321 -0
  40. ose_app-0.2.5/src/ose_app/static/example.json +134 -0
  41. ose_app-0.2.5/src/ose_app/static/excel-bootstrap-table-filter-bundle.js +326 -0
  42. ose_app-0.2.5/src/ose_app/static/excel-bootstrap-table-filter-bundle.js.map +1 -0
  43. ose_app-0.2.5/src/ose_app/static/excel-bootstrap-table-filter-bundle.min.js +2 -0
  44. ose_app-0.2.5/src/ose_app/static/excel-bootstrap-table-filter-bundle.min.js.map +1 -0
  45. ose_app-0.2.5/src/ose_app/static/excel-bootstrap-table-filter-style.css +78 -0
  46. ose_app-0.2.5/src/ose_app/static/gmho.release.json +139 -0
  47. ose_app-0.2.5/src/ose_app/static/js/admin.js +2 -0
  48. ose_app-0.2.5/src/ose_app/static/js/admin.js.map +1 -0
  49. ose_app-0.2.5/src/ose_app/static/js/assets/CollapsibleCard.css +1 -0
  50. ose_app-0.2.5/src/ose_app/static/js/assets/editor.css +1 -0
  51. ose_app-0.2.5/src/ose_app/static/js/assets/release.css +1 -0
  52. ose_app-0.2.5/src/ose_app/static/js/assets/settings.css +1 -0
  53. ose_app-0.2.5/src/ose_app/static/js/assets/visualise.css +1 -0
  54. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-CgGO-ddH-BDr_frBe.js +2 -0
  55. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-CgGO-ddH-BDr_frBe.js.map +1 -0
  56. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-CgGO-ddH-MonxH8xj.js +2 -0
  57. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-CgGO-ddH-MonxH8xj.js.map +1 -0
  58. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-DKAZyKKr-DTksKjtf.js +2 -0
  59. ose_app-0.2.5/src/ose_app/static/js/chunks/BToastOrchestrator.vue_vue_type_style_index_0_lang-DKAZyKKr-DTksKjtf.js.map +1 -0
  60. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-BQR8R54V.js +2 -0
  61. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-BQR8R54V.js.map +1 -0
  62. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-DgwkQKDg.js +2 -0
  63. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-DgwkQKDg.js.map +1 -0
  64. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-DoX0kPCZ.js +2 -0
  65. ose_app-0.2.5/src/ose_app/static/js/chunks/CollapsibleCard-DoX0kPCZ.js.map +1 -0
  66. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-CBzsmnqW.js +43 -0
  67. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-CBzsmnqW.js.map +1 -0
  68. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-EcINi797.js +43 -0
  69. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-EcINi797.js.map +1 -0
  70. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-bumDOBqD.js +43 -0
  71. ose_app-0.2.5/src/ose_app/static/js/chunks/Diagnostic.vue_vue_type_script_setup_true_lang-bumDOBqD.js.map +1 -0
  72. ose_app-0.2.5/src/ose_app/static/js/chunks/_plugin-vue_export-helper-DlAUqK2U.js +2 -0
  73. ose_app-0.2.5/src/ose_app/static/js/chunks/_plugin-vue_export-helper-DlAUqK2U.js.map +1 -0
  74. ose_app-0.2.5/src/ose_app/static/js/chunks/bootbox-D3SJ_Fwv.js +2 -0
  75. ose_app-0.2.5/src/ose_app/static/js/chunks/bootbox-D3SJ_Fwv.js.map +1 -0
  76. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-CzBHF1EN.js +2 -0
  77. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-CzBHF1EN.js.map +1 -0
  78. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-DL6Hx3V0.js +2 -0
  79. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-DL6Hx3V0.js.map +1 -0
  80. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-DPgwRV4l.js +2 -0
  81. ose_app-0.2.5/src/ose_app/static/js/chunks/constants-DPgwRV4l.js.map +1 -0
  82. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-Bx-PU1OL.js +18 -0
  83. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-Bx-PU1OL.js.map +1 -0
  84. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-CdAXK93b.js +18 -0
  85. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-CdAXK93b.js.map +1 -0
  86. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-CiYqP1_r.js +2 -0
  87. ose_app-0.2.5/src/ose_app/static/js/chunks/filter-CiYqP1_r.js.map +1 -0
  88. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-B5BYNF2N.js +2 -0
  89. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-B5BYNF2N.js.map +1 -0
  90. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-Cb9lQq-c.js +9 -0
  91. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-Cb9lQq-c.js.map +1 -0
  92. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-umQeu_-w.js +3 -0
  93. ose_app-0.2.5/src/ose_app/static/js/chunks/index-sLCKmIWG-umQeu_-w.js.map +1 -0
  94. ose_app-0.2.5/src/ose_app/static/js/editor.js +36 -0
  95. ose_app-0.2.5/src/ose_app/static/js/editor.js.map +1 -0
  96. ose_app-0.2.5/src/ose_app/static/js/release.js +6 -0
  97. ose_app-0.2.5/src/ose_app/static/js/release.js.map +1 -0
  98. ose_app-0.2.5/src/ose_app/static/js/settings.js +2 -0
  99. ose_app-0.2.5/src/ose_app/static/js/settings.js.map +1 -0
  100. ose_app-0.2.5/src/ose_app/static/js/visualise.js +3 -0
  101. ose_app-0.2.5/src/ose_app/static/js/visualise.js.map +1 -0
  102. ose_app-0.2.5/src/ose_app/static/main.css +1 -0
  103. ose_app-0.2.5/src/ose_app/static/main.css.map +7 -0
  104. ose_app-0.2.5/src/ose_app/static/main.scss +147 -0
  105. ose_app-0.2.5/src/ose_app/static/mindmup-editabletable.js +131 -0
  106. ose_app-0.2.5/src/ose_app/static/schema/release_script.json +215 -0
  107. ose_app-0.2.5/src/ose_app/static/schema/req_body_edit.json +35 -0
  108. ose_app-0.2.5/src/ose_app/static/schema/req_body_guess_parent.json +38 -0
  109. ose_app-0.2.5/src/ose_app/static/schema/req_body_import.json +47 -0
  110. ose_app-0.2.5/src/ose_app/static/schema/req_body_release_start.json +9 -0
  111. ose_app-0.2.5/src/ose_app/static/schema/req_body_visualise.json +18 -0
  112. ose_app-0.2.5/src/ose_app/static/test.dot +190 -0
  113. ose_app-0.2.5/src/ose_app/static/workflows/externals.yaml.jinja2 +44 -0
  114. ose_app-0.2.5/src/ose_app/templates/access_show_visualisation_for_ids.html +120 -0
  115. ose_app-0.2.5/src/ose_app/templates/admin/dashboard.html +18 -0
  116. ose_app-0.2.5/src/ose_app/templates/admin/rebuild_index.html +85 -0
  117. ose_app-0.2.5/src/ose_app/templates/admin/release.html +46 -0
  118. ose_app-0.2.5/src/ose_app/templates/admin/settings.html +23 -0
  119. ose_app-0.2.5/src/ose_app/templates/base.html +151 -0
  120. ose_app-0.2.5/src/ose_app/templates/edit.html +21 -0
  121. ose_app-0.2.5/src/ose_app/templates/edit_external.html +491 -0
  122. ose_app-0.2.5/src/ose_app/templates/forbidden.html +9 -0
  123. ose_app-0.2.5/src/ose_app/templates/index.html +33 -0
  124. ose_app-0.2.5/src/ose_app/templates/loggedout.html +21 -0
  125. ose_app-0.2.5/src/ose_app/templates/repo.html +294 -0
  126. ose_app-0.2.5/src/ose_app/templates/testgeneratedbyapi.html +294 -0
  127. ose_app-0.2.5/src/ose_app/templates/visualise.html +17 -0
  128. ose_app-0.2.5/src/ose_app.egg-info/PKG-INFO +27 -0
  129. ose_app-0.2.5/src/ose_app.egg-info/SOURCES.txt +130 -0
  130. ose_app-0.2.5/src/ose_app.egg-info/dependency_links.txt +1 -0
  131. ose_app-0.2.5/src/ose_app.egg-info/requires.txt +26 -0
  132. ose_app-0.2.5/src/ose_app.egg-info/top_level.txt +1 -0
ose_app-0.2.5/PKG-INFO ADDED
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: ose-app
3
+ Version: 0.2.5
4
+ Summary: Flask web application for OntoSpreadEd - Ontology spreadsheet editor
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: ose-core==0.2.5
7
+ Requires-Dist: Flask==2.3.3
8
+ Requires-Dist: Flask-SQLAlchemy==3.1.1
9
+ Requires-Dist: Flask-Injector
10
+ Requires-Dist: GitHub-Flask
11
+ Requires-Dist: flask-cors==3.0.10
12
+ Requires-Dist: flask-executor
13
+ Requires-Dist: Flask-Migrate
14
+ Provides-Extra: cli
15
+ Requires-Dist: ose-cli; extra == "cli"
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest; extra == "dev"
18
+ Requires-Dist: ruff; extra == "dev"
19
+ Provides-Extra: all
20
+ Requires-Dist: ose-cli; extra == "all"
21
+ Requires-Dist: ose-plugin-addicto; extra == "all"
22
+ Requires-Dist: ose-plugin-bcio; extra == "all"
23
+ Requires-Dist: ose-plugin-hierarchical-spreadsheets; extra == "all"
24
+ Provides-Extra: plugins
25
+ Requires-Dist: ose-plugin-addicto; extra == "plugins"
26
+ Requires-Dist: ose-plugin-bcio; extra == "plugins"
27
+ Requires-Dist: ose-plugin-hierarchical-spreadsheets; extra == "plugins"
@@ -0,0 +1,42 @@
1
+ # OSE App
2
+
3
+ Flask web application for OntoSpreadEd - Ontology Spreadsheet Editor.
4
+
5
+ ## Description
6
+
7
+ This package provides the web interface and REST API for the OntoSpreadEd ontology spreadsheet editor. It includes:
8
+
9
+ - Flask application factory and configuration
10
+ - REST API endpoints for ontology operations
11
+ - GitHub OAuth authentication
12
+ - User and permission management
13
+ - Ontology data store and caching
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install ose-app
19
+ ```
20
+
21
+ For development with CLI tools:
22
+ ```bash
23
+ pip install ose-app[cli]
24
+ ```
25
+
26
+ ## Requirements
27
+
28
+ - Python 3.12+
29
+
30
+ ## Configuration
31
+
32
+ The application is configured via `config.yaml` or environment variables. See the main project [README](https://github.com/ontology-tools/onto-spread-ed/blob/main/README.md) for configuration options.
33
+
34
+ ## Usage
35
+
36
+ ```bash
37
+ flask --app ose_app:create_app run
38
+ ```
39
+
40
+ ## License
41
+
42
+ LGPL-3.0-or-later
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools >= 61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ose-app"
7
+ description = "Flask web application for OntoSpreadEd - Ontology spreadsheet editor"
8
+ requires-python = ">= 3.12"
9
+ version = "0.2.5"
10
+
11
+ dependencies = [
12
+ "ose-core==0.2.5",
13
+ "Flask==2.3.3",
14
+ "Flask-SQLAlchemy==3.1.1",
15
+ "Flask-Injector",
16
+ "GitHub-Flask",
17
+ "flask-cors==3.0.10",
18
+ "flask-executor",
19
+ "Flask-Migrate",
20
+ ]
21
+
22
+ [project.optional-dependencies]
23
+ cli = [
24
+ "ose-cli",
25
+ ]
26
+ dev = [
27
+ "pytest",
28
+ "ruff",
29
+ ]
30
+ all = [
31
+ "ose-cli",
32
+ "ose-plugin-addicto",
33
+ "ose-plugin-bcio",
34
+ "ose-plugin-hierarchical-spreadsheets",
35
+ ]
36
+ plugins = [
37
+ "ose-plugin-addicto",
38
+ "ose-plugin-bcio",
39
+ "ose-plugin-hierarchical-spreadsheets",
40
+ ]
41
+
42
+ [tool.uv.sources]
43
+ ose-cli = { workspace = true }
44
+ ose-core = { workspace = true }
45
+ ose-plugin-addicto = { workspace = true }
46
+ ose-plugin-bcio = { workspace = true }
47
+ ose-plugin-hierarchical-spreadsheets = { workspace = true }
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["src"]
51
+
52
+ [tool.setuptools.package-data]
53
+ ose_app = [
54
+ "templates/**/*",
55
+ "static/**/*",
56
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,98 @@
1
+ import typing
2
+
3
+ from flask import Flask
4
+ from flask_executor import Executor
5
+ from flask_github import GitHub
6
+ from flask_injector import request
7
+ from flask_sqlalchemy import SQLAlchemy
8
+ from injector import Injector, Module, provider, singleton
9
+
10
+ from ose.services.PluginService import PluginService
11
+
12
+ import ose.database as database
13
+
14
+ from . import gh
15
+ from .OntologyDataStore import OntologyDataStore
16
+ from .PermissionManager import PermissionManager
17
+ from .SpreadsheetSearcher import SpreadsheetSearcher
18
+ from ose.services.ConfigurationService import ConfigurationService
19
+ from ose.services.FileCache import FileCache
20
+ from ose.services.LocalConfigurationService import LocalConfigurationService
21
+ from ose.services.OntoloyBuildService import OntologyBuildService
22
+ from ose.services.RepositoryConfigurationService import RepositoryConfigurationService
23
+ from ose.services.RobotOntologyBuildService import RobotOntologyBuildService
24
+
25
+
26
+ class AppModule(Module):
27
+ """Configure the application."""
28
+
29
+ def init_app(self, app: Flask):
30
+ database.init_app(app)
31
+ gh.init_app(app)
32
+
33
+ @provider
34
+ @request
35
+ def db(self) -> SQLAlchemy:
36
+ # We configure the DB here, explicitly, as Flask-SQLAlchemy requires
37
+ # the DB to be configured before request handlers are called.
38
+ return database.db
39
+
40
+ @provider
41
+ @request
42
+ def github(self) -> GitHub:
43
+ return gh.github
44
+
45
+ @provider
46
+ @singleton
47
+ def ontodb(self, config: ConfigurationService) -> OntologyDataStore:
48
+ return OntologyDataStore(config)
49
+
50
+ @provider
51
+ @singleton
52
+ def searcher(self, github: GitHub, config: ConfigurationService) -> SpreadsheetSearcher:
53
+ return SpreadsheetSearcher(config, github)
54
+
55
+ @provider
56
+ @singleton
57
+ def configuration_service(self, app: Flask, github: GitHub) -> ConfigurationService:
58
+ configuration_service = app.config.get("REPOSITORIES_SOURCE", "local")
59
+
60
+ service = {
61
+ "local": LocalConfigurationService,
62
+ "repository": RepositoryConfigurationService
63
+ }.get(configuration_service, LocalConfigurationService)
64
+
65
+ return service(app.config, github)
66
+
67
+ @provider
68
+ @singleton
69
+ def executor(self, app: Flask) -> Executor:
70
+ return Executor(app)
71
+
72
+ @provider
73
+ @singleton
74
+ def ontology_builder(self) -> OntologyBuildService:
75
+ return RobotOntologyBuildService()
76
+
77
+ @provider
78
+ @singleton
79
+ def permission_manager(self, app: Flask) -> PermissionManager:
80
+ return PermissionManager(app.config)
81
+
82
+ @provider
83
+ @singleton
84
+ def file_cache(self, config: ConfigurationService) -> FileCache:
85
+ life_time: typing.Union[int, None] = config.app_config.get("CACHE_LIFETIME", None)
86
+ cache_dir = config.app_config.get("CACHE_DIR")
87
+
88
+ if life_time is not None:
89
+ return FileCache(cache_dir, life_time)
90
+ else:
91
+ return FileCache(cache_dir)
92
+
93
+ @provider
94
+ @singleton
95
+ def plugin_service(self, config: ConfigurationService, injector: Injector) -> PluginService:
96
+ plugin_service = PluginService(config, injector)
97
+ plugin_service.load_plugins()
98
+ return plugin_service