redsun 0.1.0__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.
@@ -0,0 +1,114 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+ .ruff_cache/
50
+ .nox/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+
60
+ # Flask stuff:
61
+ instance/
62
+ .webassets-cache
63
+
64
+ # Scrapy stuff:
65
+ .scrapy
66
+
67
+ # Sphinx documentation
68
+ docs/_build/
69
+
70
+ # PyBuilder
71
+ target/
72
+
73
+ # Jupyter Notebook
74
+ .ipynb_checkpoints
75
+
76
+ # Dask worker cache
77
+ dask-worker-space/
78
+
79
+ # pyenv
80
+ .python-version
81
+
82
+ # celery beat schedule file
83
+ celerybeat-schedule
84
+
85
+ # SageMath parsed files
86
+ *.sage.py
87
+
88
+ # dotenv
89
+ .env
90
+
91
+ # virtualenv
92
+ .venv
93
+ venv/
94
+ ENV/
95
+
96
+ # Spyder project settings
97
+ .spyderproject
98
+ .spyproject
99
+
100
+ # Rope project settings
101
+ .ropeproject
102
+
103
+ # mkdocs documentation
104
+ /site
105
+
106
+ # mypy
107
+ .mypy_cache/
108
+
109
+ # IDE settings
110
+ .vscode/
111
+ .idea/
112
+
113
+ # local test configs
114
+ test_configs/*
redsun-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024, Jacopo Abramo
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
redsun-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: redsun
3
+ Version: 0.1.0
4
+ Summary: Event-driven data acquisition software for scientific applications.
5
+ Project-URL: bugs, https://github.com/redsun-acquisition/redsun/issues
6
+ Project-URL: changelog, https://github.com/redsun-acquisition/redsun/blob/master/changelog.md
7
+ Project-URL: homepage, https://github.com/redsun-acquisition/redsun
8
+ Author-email: Jacopo Abramo <jacopo.abramo@gmail.com>
9
+ Maintainer-email: Jacopo Abramo <jacopo.abramo@gmail.com>
10
+ License: Apache-2.0
11
+ License-File: LICENSE
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.9
25
+ Requires-Dist: importlib-metadata; python_version < '3.10'
26
+ Requires-Dist: platformdirs
27
+ Requires-Dist: sunflare>=0.4.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: mypy; extra == 'dev'
30
+ Requires-Dist: pytest; extra == 'dev'
31
+ Requires-Dist: pytest-cov; extra == 'dev'
32
+ Requires-Dist: ruff; extra == 'dev'
33
+ Provides-Extra: docs
34
+ Requires-Dist: myst-parser; extra == 'docs'
35
+ Requires-Dist: pydata-sphinx-theme; extra == 'docs'
36
+ Requires-Dist: sphinx; extra == 'docs'
37
+ Requires-Dist: sphinx-design; extra == 'docs'
38
+ Provides-Extra: pyqt
39
+ Requires-Dist: sunflare[pyqt]; extra == 'pyqt'
40
+ Provides-Extra: pyside
41
+ Requires-Dist: sunflare[pyside]; extra == 'pyside'
42
+ Description-Content-Type: text/markdown
43
+
44
+ [![PyPI](https://img.shields.io/pypi/v/redsun.svg?color=green)](https://pypi.org/project/redsun)
45
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/redsun)](https://pypi.org/project/redsun)
46
+ [![codecov](https://codecov.io/gh/redsun-acquisition/redsun/graph/badge.svg?token=XAL7NBIU9N)](https://codecov.io/gh/redsun-acquisition/redsun)
47
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
48
+ [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
49
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
50
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
51
+
52
+ # Redsun
53
+
54
+ Event-driven, unopinionated data acquisition in Python.
55
+
56
+ > [!WARNING]
57
+ > This project is still in alpha stage and very unstable. Use at your own risk.
58
+
59
+ ## Installation
60
+
61
+ This project is currently not yet on PyPI. You'll have to clone:
62
+
63
+ - this repository;
64
+ - the sunflare repository.
65
+
66
+ It is highly reccomended to install both in a virtual envinroment (mamba/conda/virtualenv).
67
+
68
+ ## Features
69
+
70
+ WiP
redsun-0.1.0/README.md ADDED
@@ -0,0 +1,27 @@
1
+ [![PyPI](https://img.shields.io/pypi/v/redsun.svg?color=green)](https://pypi.org/project/redsun)
2
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/redsun)](https://pypi.org/project/redsun)
3
+ [![codecov](https://codecov.io/gh/redsun-acquisition/redsun/graph/badge.svg?token=XAL7NBIU9N)](https://codecov.io/gh/redsun-acquisition/redsun)
4
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
5
+ [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
6
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
7
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8
+
9
+ # Redsun
10
+
11
+ Event-driven, unopinionated data acquisition in Python.
12
+
13
+ > [!WARNING]
14
+ > This project is still in alpha stage and very unstable. Use at your own risk.
15
+
16
+ ## Installation
17
+
18
+ This project is currently not yet on PyPI. You'll have to clone:
19
+
20
+ - this repository;
21
+ - the sunflare repository.
22
+
23
+ It is highly reccomended to install both in a virtual envinroment (mamba/conda/virtualenv).
24
+
25
+ ## Features
26
+
27
+ WiP
@@ -0,0 +1,121 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "redsun"
7
+ dynamic = ["version"]
8
+ description = "Event-driven data acquisition software for scientific applications."
9
+ readme = "README.md"
10
+ authors = [{ name = "Jacopo Abramo", email = "jacopo.abramo@gmail.com" }]
11
+ maintainers = [{ name = "Jacopo Abramo", email = "jacopo.abramo@gmail.com" }]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "Intended Audience :: Science/Research",
16
+ "Topic :: Scientific/Engineering",
17
+ "Programming Language :: Python :: Implementation :: CPython",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Typing :: Typed",
24
+ "License :: OSI Approved :: Apache Software License",
25
+ ]
26
+ license = { text = "Apache-2.0" }
27
+ dependencies = [
28
+ "sunflare>=0.4.0",
29
+ "platformdirs",
30
+ "importlib_metadata; python_version < '3.10'",
31
+ ]
32
+ requires-python = ">=3.9"
33
+
34
+ [project.optional-dependencies]
35
+ pyqt = ["sunflare[pyqt]"]
36
+ pyside = ["sunflare[pyside]"]
37
+ docs = [
38
+ "sphinx",
39
+ "pydata-sphinx-theme",
40
+ "sphinx-design",
41
+ "myst-parser"
42
+ ]
43
+ dev = [
44
+ "ruff",
45
+ "pytest-cov",
46
+ "pytest",
47
+ "mypy"
48
+ ]
49
+
50
+ [project.urls]
51
+ bugs = "https://github.com/redsun-acquisition/redsun/issues"
52
+ changelog = "https://github.com/redsun-acquisition/redsun/blob/master/changelog.md"
53
+ homepage = "https://github.com/redsun-acquisition/redsun"
54
+
55
+ [project.scripts]
56
+ redsun = "redsun.__main__:main_cli"
57
+
58
+ [tool.hatch.version]
59
+ source = "vcs"
60
+
61
+ [tool.hatch.build.targets.wheel]
62
+ packages = ["src/redsun"]
63
+
64
+ [tool.hatch.build.targets.sdist]
65
+ include = [
66
+ "src/redsun/*.py",
67
+ "src/redsun/docs/**",
68
+ "tests/**",
69
+ ]
70
+
71
+ [tool.mypy]
72
+ files = "."
73
+ exclude = ["docs", "tests"]
74
+ disable_error_code = ["import-untyped"]
75
+ pretty = true
76
+
77
+ # Use strict defaults
78
+ strict = true
79
+ warn_unreachable = true
80
+ warn_no_return = true
81
+
82
+ [[tool.mypy.overrides]]
83
+ # Don't require test functions to include types
84
+ module = "tests.*"
85
+ disable_error_code = "attr-defined"
86
+
87
+ [tool.coverage.run]
88
+ source = ["redsun"]
89
+ omit = [
90
+ "tests/conftest.py",
91
+ ]
92
+
93
+ [tool.ruff]
94
+ target-version = "py39"
95
+ extend-exclude = ["docs", "tests"]
96
+
97
+ [tool.ruff.format]
98
+ docstring-code-format = true
99
+
100
+ [tool.ruff.lint]
101
+ extend-select = [
102
+ "D", # enable docstring checks
103
+ "I", # enable imports checks
104
+ "FA102", # force __future__ imports
105
+ ]
106
+ ignore = ["D100","D104"] # https://docs.astral.sh/ruff/rules/undocumented-public-package/
107
+
108
+ [tool.ruff.lint.pydocstyle]
109
+ convention = "numpy"
110
+
111
+ # https://coverage.readthedocs.io/en/latest/config.html
112
+ [tool.coverage.report]
113
+ exclude_lines = [
114
+ "@abstractmethod",
115
+ "if TYPE_CHECKING:",
116
+ "@overload",
117
+ "class .*Protocol",
118
+ "except ImportError",
119
+ "except PackageNotFoundError",
120
+ "raise NotImplementedError()",
121
+ ]
@@ -0,0 +1,6 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+
3
+ try:
4
+ __version__ = version("redsun")
5
+ except PackageNotFoundError:
6
+ __version__ = "unknown"
@@ -0,0 +1,87 @@
1
+ """Redsun main entry point."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import sys
7
+
8
+ from sunflare.virtual import VirtualBus
9
+
10
+ from redsun.controller import PluginManager, RedsunController
11
+ from redsun.view import build_view_layer, create_app, launch_app
12
+
13
+
14
+ class RedSunArgs(argparse.Namespace):
15
+ """type hints for command line arguments."""
16
+
17
+ config: str
18
+
19
+
20
+ def parse_args() -> RedSunArgs:
21
+ """Parse command line arguments.
22
+
23
+ Returns
24
+ -------
25
+ RedSunArgs
26
+ Parsed command line arguments.
27
+ """
28
+ parser = argparse.ArgumentParser(
29
+ description="Redsun: event-driven data acquisition system"
30
+ )
31
+ parser.add_argument(
32
+ "-c",
33
+ "--config",
34
+ type=str,
35
+ help="Absolute path to the YAML configuration file",
36
+ required=True,
37
+ )
38
+
39
+ if len(sys.argv) == 1:
40
+ parser.print_help()
41
+ sys.exit(1)
42
+
43
+ args: RedSunArgs = parser.parse_args(namespace=RedSunArgs())
44
+ return args
45
+
46
+
47
+ def main(input_config: str) -> None:
48
+ """Redsun application entry point.
49
+
50
+ Parameters
51
+ ----------
52
+ input_config : str
53
+ Path to the configuration file.
54
+ """
55
+ # create the application
56
+ app = create_app()
57
+
58
+ # virtual layer
59
+ virtual_bus = VirtualBus()
60
+
61
+ # get the startup configuration
62
+ config, types_groups = PluginManager.load_configuration(input_config)
63
+
64
+ # build the controller layer
65
+ controller = RedsunController(config, virtual_bus, types_groups)
66
+
67
+ # build the view layer
68
+ view = build_view_layer(config, types_groups["widgets"], virtual_bus)
69
+
70
+ # connect the controller and the view to the virtual layer
71
+ controller.connect_to_virtual()
72
+ view.connect_to_virtual()
73
+
74
+ # launch the application;
75
+ # the app starts here and
76
+ # there is no return until it's closed
77
+ launch_app(app, view)
78
+
79
+
80
+ def main_cli() -> None:
81
+ """Command line entry point for the Redsun application."""
82
+ args = parse_args()
83
+ main(args.config)
84
+
85
+
86
+ if __name__ == "__main__":
87
+ main_cli()