uphy 0.1.0.dev2895__tar.gz → 0.1.0.dev3125__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.
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/LICENSE.txt +5 -5
- {uphy-0.1.0.dev2895/src/uphy.egg-info → uphy-0.1.0.dev3125}/PKG-INFO +25 -24
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/README.md +5 -5
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/pyproject.toml +22 -21
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/setup.cfg +4 -4
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy/__init__.py +2 -2
- uphy-0.1.0.dev3125/src/uphy/cli/__init__.py +30 -0
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy/cli/__main__.py +47 -28
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125/src/uphy.egg-info}/PKG-INFO +25 -24
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy.egg-info/requires.txt +1 -0
- uphy-0.1.0.dev2895/src/uphy/cli/__init__.py +0 -0
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy.egg-info/SOURCES.txt +0 -0
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy.egg-info/dependency_links.txt +0 -0
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy.egg-info/entry_points.txt +0 -0
- {uphy-0.1.0.dev2895 → uphy-0.1.0.dev3125}/src/uphy.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Copyright rt-labs AB, Sweden.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
You may not use this software in a commercial product without
|
|
5
|
-
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
1
|
+
Copyright rt-labs AB, Sweden.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
You may not use this software in a commercial product without
|
|
5
|
+
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
Metadata-Version: 2.2
|
|
2
|
-
Name: uphy
|
|
3
|
-
Version: 0.1.0.
|
|
4
|
-
Author-email: RT-Labs <support@rt-labs.com>
|
|
5
|
-
License: Copyright rt-labs AB, Sweden.
|
|
6
|
-
All rights reserved.
|
|
7
|
-
|
|
8
|
-
You may not use this software in a commercial product without
|
|
9
|
-
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
10
|
-
|
|
11
|
-
Project-URL: RT-Labs, https://rt-labs.com
|
|
12
|
-
Project-URL: U-Phy, https://rt-labs.com/u-phy
|
|
13
|
-
Project-URL: Documentation, https://docs.rt-labs.com/u-phy
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE.txt
|
|
16
|
-
Requires-Dist: typer>=0.12.5
|
|
17
|
-
Requires-Dist: uphy-device>=0.1.0.dev0
|
|
18
|
-
Requires-Dist: uphy-controller>=0.1.0.dev0
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: uphy
|
|
3
|
+
Version: 0.1.0.dev3125
|
|
4
|
+
Author-email: RT-Labs <support@rt-labs.com>
|
|
5
|
+
License: Copyright rt-labs AB, Sweden.
|
|
6
|
+
All rights reserved.
|
|
7
|
+
|
|
8
|
+
You may not use this software in a commercial product without
|
|
9
|
+
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
10
|
+
|
|
11
|
+
Project-URL: RT-Labs, https://rt-labs.com
|
|
12
|
+
Project-URL: U-Phy, https://rt-labs.com/u-phy
|
|
13
|
+
Project-URL: Documentation, https://docs.rt-labs.com/u-phy
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE.txt
|
|
16
|
+
Requires-Dist: typer>=0.12.5
|
|
17
|
+
Requires-Dist: uphy-device>=0.1.0.dev0
|
|
18
|
+
Requires-Dist: uphy-controller>=0.1.0.dev0
|
|
19
|
+
Requires-Dist: rich>=13.9.4
|
|
20
|
+
|
|
21
|
+
# U-Phy
|
|
22
|
+
|
|
23
|
+
One software, All protocols.
|
|
24
|
+
|
|
25
|
+
Command line tooling for working with U-Phy based devices.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# U-Phy
|
|
2
|
-
|
|
3
|
-
One software, All protocols.
|
|
4
|
-
|
|
5
|
-
Command line tooling for working with U-Phy based devices.
|
|
1
|
+
# U-Phy
|
|
2
|
+
|
|
3
|
+
One software, All protocols.
|
|
4
|
+
|
|
5
|
+
Command line tooling for working with U-Phy based devices.
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name="uphy"
|
|
3
|
-
version="0.1.0.
|
|
4
|
-
authors = [
|
|
5
|
-
{name="RT-Labs", email="support@rt-labs.com"}
|
|
6
|
-
]
|
|
7
|
-
readme = "README.md"
|
|
8
|
-
license = { file = "LICENSE.txt" }
|
|
9
|
-
dependencies = [
|
|
10
|
-
"typer>=0.12.5",
|
|
11
|
-
"uphy-device>=0.1.0.dev0",
|
|
12
|
-
"uphy-controller>=0.1.0.dev0"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name="uphy"
|
|
3
|
+
version="0.1.0.dev3125"
|
|
4
|
+
authors = [
|
|
5
|
+
{name="RT-Labs", email="support@rt-labs.com"}
|
|
6
|
+
]
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
license = { file = "LICENSE.txt" }
|
|
9
|
+
dependencies = [
|
|
10
|
+
"typer>=0.12.5",
|
|
11
|
+
"uphy-device>=0.1.0.dev0",
|
|
12
|
+
"uphy-controller>=0.1.0.dev0",
|
|
13
|
+
"rich>=13.9.4",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.scripts]
|
|
17
|
+
uphy = "uphy.cli.__main__:app"
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
RT-Labs = "https://rt-labs.com"
|
|
21
|
+
U-Phy = "https://rt-labs.com/u-phy"
|
|
22
|
+
Documentation = "https://docs.rt-labs.com/u-phy"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# This is a namespace package to hold on to uphy namespace
|
|
2
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
1
|
+
# This is a namespace package to hold on to uphy namespace
|
|
2
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from rich.logging import RichHandler
|
|
3
|
+
from typer import Option, Typer
|
|
4
|
+
|
|
5
|
+
LOG = logging.getLogger(__name__)
|
|
6
|
+
|
|
7
|
+
app = Typer(
|
|
8
|
+
pretty_exceptions_enable=False,
|
|
9
|
+
no_args_is_help=True,
|
|
10
|
+
name="controller",
|
|
11
|
+
help="Run a demo modbus controller based on a model",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def configure_logging(level, force=False):
|
|
16
|
+
logging.basicConfig(
|
|
17
|
+
level=level,
|
|
18
|
+
format="%(message)s",
|
|
19
|
+
datefmt="[%X]",
|
|
20
|
+
handlers=[RichHandler(markup=True)],
|
|
21
|
+
force=force,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _verbose_callback(value: bool):
|
|
26
|
+
if value:
|
|
27
|
+
configure_logging(level=logging.DEBUG, force=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
VERBOSE_OPTION = Option(callback=_verbose_callback, help="Enable verbose output.")
|
|
@@ -1,28 +1,47 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
import logging
|
|
3
|
-
from importlib.metadata import entry_points
|
|
4
|
-
from importlib import import_module
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import typer
|
|
2
|
+
import logging
|
|
3
|
+
from importlib.metadata import entry_points
|
|
4
|
+
from importlib import import_module, metadata
|
|
5
|
+
from typing import Annotated, Optional
|
|
6
|
+
|
|
7
|
+
app = typer.Typer(pretty_exceptions_enable=False, no_args_is_help=True, name="uphy", help="U-Phy command line tools")
|
|
8
|
+
LOG = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
for entry_point in entry_points(group='uphy.cli'):
|
|
11
|
+
try:
|
|
12
|
+
module_name, _, attribute = entry_point.value.partition(":")
|
|
13
|
+
module = import_module(module_name)
|
|
14
|
+
command = getattr(module, attribute)
|
|
15
|
+
app.add_typer(command, name=entry_point.name)
|
|
16
|
+
except Exception as exception:
|
|
17
|
+
LOG.warning("Ignoring entry point '%s' due to error: %r", entry_point.name, exception)
|
|
18
|
+
|
|
19
|
+
def _version_callback(value: bool):
|
|
20
|
+
if value:
|
|
21
|
+
dist = metadata.distribution("uphy")
|
|
22
|
+
print(f"{dist.name} version: {dist.version}")
|
|
23
|
+
|
|
24
|
+
for entry_point in entry_points(group='uphy.cli'):
|
|
25
|
+
print(f"{entry_point.dist.name} version: {entry_point.dist.version}")
|
|
26
|
+
|
|
27
|
+
raise typer.Exit()
|
|
28
|
+
|
|
29
|
+
VERSION_OPTION = typer.Option(callback=_version_callback, is_eager=True, help="Print version and exit")
|
|
30
|
+
|
|
31
|
+
@app.callback()
|
|
32
|
+
def main(
|
|
33
|
+
version: Annotated[Optional[bool], VERSION_OPTION] = None,
|
|
34
|
+
):
|
|
35
|
+
return
|
|
36
|
+
|
|
37
|
+
@app.command()
|
|
38
|
+
def build():
|
|
39
|
+
"""Start device builder to generate configuration files."""
|
|
40
|
+
typer.launch("https://devicebuilder.rt-labs.com/")
|
|
41
|
+
|
|
42
|
+
@app.command(name="help")
|
|
43
|
+
def help(ctx: typer.Context):
|
|
44
|
+
typer.echo(ctx.get_help())
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
app()
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
Metadata-Version: 2.2
|
|
2
|
-
Name: uphy
|
|
3
|
-
Version: 0.1.0.
|
|
4
|
-
Author-email: RT-Labs <support@rt-labs.com>
|
|
5
|
-
License: Copyright rt-labs AB, Sweden.
|
|
6
|
-
All rights reserved.
|
|
7
|
-
|
|
8
|
-
You may not use this software in a commercial product without
|
|
9
|
-
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
10
|
-
|
|
11
|
-
Project-URL: RT-Labs, https://rt-labs.com
|
|
12
|
-
Project-URL: U-Phy, https://rt-labs.com/u-phy
|
|
13
|
-
Project-URL: Documentation, https://docs.rt-labs.com/u-phy
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE.txt
|
|
16
|
-
Requires-Dist: typer>=0.12.5
|
|
17
|
-
Requires-Dist: uphy-device>=0.1.0.dev0
|
|
18
|
-
Requires-Dist: uphy-controller>=0.1.0.dev0
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: uphy
|
|
3
|
+
Version: 0.1.0.dev3125
|
|
4
|
+
Author-email: RT-Labs <support@rt-labs.com>
|
|
5
|
+
License: Copyright rt-labs AB, Sweden.
|
|
6
|
+
All rights reserved.
|
|
7
|
+
|
|
8
|
+
You may not use this software in a commercial product without
|
|
9
|
+
purchasing a license. Contact sales@rt-labs.com for more information.
|
|
10
|
+
|
|
11
|
+
Project-URL: RT-Labs, https://rt-labs.com
|
|
12
|
+
Project-URL: U-Phy, https://rt-labs.com/u-phy
|
|
13
|
+
Project-URL: Documentation, https://docs.rt-labs.com/u-phy
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE.txt
|
|
16
|
+
Requires-Dist: typer>=0.12.5
|
|
17
|
+
Requires-Dist: uphy-device>=0.1.0.dev0
|
|
18
|
+
Requires-Dist: uphy-controller>=0.1.0.dev0
|
|
19
|
+
Requires-Dist: rich>=13.9.4
|
|
20
|
+
|
|
21
|
+
# U-Phy
|
|
22
|
+
|
|
23
|
+
One software, All protocols.
|
|
24
|
+
|
|
25
|
+
Command line tooling for working with U-Phy based devices.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|