phylogenetic 0.1.0__py3-none-any.whl
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.
- phylogenetic/__init__.py +47 -0
- phylogenetic/__main__.py +8 -0
- phylogenetic/cli.py +41 -0
- phylogenetic/py.typed +1 -0
- phylogenetic/runtime_alias.py +101 -0
- phylogenetic-0.1.0.dist-info/METADATA +131 -0
- phylogenetic-0.1.0.dist-info/RECORD +9 -0
- phylogenetic-0.1.0.dist-info/WHEEL +4 -0
- phylogenetic-0.1.0.dist-info/entry_points.txt +2 -0
phylogenetic/__init__.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Compatibility alias module for bijux-phylogenetics."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from importlib import import_module, metadata
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from bijux_phylogenetics.comparative.common import (
|
|
9
|
+
ComparativeDataset as ComparativeDataset,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from .runtime_alias import install_runtime_aliases
|
|
13
|
+
|
|
14
|
+
_ALIAS_PACKAGE = "phylogenetic"
|
|
15
|
+
_RUNTIME_PACKAGE = "bijux_phylogenetics"
|
|
16
|
+
_LOCAL_SUBMODULES = frozenset({"__main__", "cli", "runtime_alias"})
|
|
17
|
+
_runtime_module = import_module(_RUNTIME_PACKAGE)
|
|
18
|
+
|
|
19
|
+
install_runtime_aliases(
|
|
20
|
+
alias_package=_ALIAS_PACKAGE,
|
|
21
|
+
runtime_package=_RUNTIME_PACKAGE,
|
|
22
|
+
local_submodules=_LOCAL_SUBMODULES,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
for _name in getattr(_runtime_module, "__all__", ()):
|
|
26
|
+
if _name == "__version__":
|
|
27
|
+
continue
|
|
28
|
+
globals()[_name] = getattr(_runtime_module, _name)
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
__version__ = metadata.version(_ALIAS_PACKAGE)
|
|
32
|
+
except metadata.PackageNotFoundError:
|
|
33
|
+
__version__ = "0.1.0"
|
|
34
|
+
|
|
35
|
+
__all__ = list(getattr(_runtime_module, "__all__", ()))
|
|
36
|
+
if "ComparativeDataset" not in __all__:
|
|
37
|
+
__all__.append("ComparativeDataset")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def __getattr__(name: str) -> Any:
|
|
41
|
+
"""Forward top-level compatibility lookups to the canonical runtime package."""
|
|
42
|
+
return getattr(_runtime_module, name)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __dir__() -> list[str]:
|
|
46
|
+
"""Expose the canonical runtime attributes in interactive discovery."""
|
|
47
|
+
return sorted(set(globals()) | set(dir(_runtime_module)))
|
phylogenetic/__main__.py
ADDED
phylogenetic/cli.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Compatibility CLI entrypoint for the `phylogenetic` distribution."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
from collections.abc import Sequence
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from bijux_phylogenetics.cli import build_parser as build_runtime_parser
|
|
10
|
+
from bijux_phylogenetics.cli import run_command as dispatch_runtime_command
|
|
11
|
+
|
|
12
|
+
__all__ = ["build_parser", "main", "run_command"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
16
|
+
"""Build the canonical command-line parser for the alias package."""
|
|
17
|
+
parser = build_runtime_parser()
|
|
18
|
+
parser.prog = "phylogenetic"
|
|
19
|
+
return parser
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def run_command(
|
|
23
|
+
args: Any,
|
|
24
|
+
*,
|
|
25
|
+
parser: argparse.ArgumentParser | None = None,
|
|
26
|
+
) -> int:
|
|
27
|
+
"""Dispatch parsed command-line arguments through runtime handlers."""
|
|
28
|
+
if parser is None:
|
|
29
|
+
parser = build_parser()
|
|
30
|
+
return dispatch_runtime_command(args, parser=parser)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
34
|
+
"""CLI entry point."""
|
|
35
|
+
parser = build_parser()
|
|
36
|
+
args = parser.parse_args(argv)
|
|
37
|
+
return run_command(args, parser=parser)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
if __name__ == "__main__":
|
|
41
|
+
raise SystemExit(main())
|
phylogenetic/py.typed
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"""Route compatibility-package submodules to the canonical runtime package."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Collection
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
from importlib.abc import Loader, MetaPathFinder
|
|
8
|
+
from importlib.machinery import ModuleSpec
|
|
9
|
+
from importlib.util import find_spec
|
|
10
|
+
import sys
|
|
11
|
+
from types import ModuleType
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class _RuntimeAliasLoader(Loader):
|
|
15
|
+
"""Load the canonical runtime module for an alias-package submodule."""
|
|
16
|
+
|
|
17
|
+
def __init__(self, alias_name: str, runtime_name: str) -> None:
|
|
18
|
+
"""Remember the alias and runtime module names for one import."""
|
|
19
|
+
self._alias_name = alias_name
|
|
20
|
+
self._runtime_name = runtime_name
|
|
21
|
+
|
|
22
|
+
def create_module(self, spec: ModuleSpec) -> ModuleType:
|
|
23
|
+
"""Import the canonical runtime module and register the alias name."""
|
|
24
|
+
module = import_module(self._runtime_name)
|
|
25
|
+
sys.modules[self._alias_name] = module
|
|
26
|
+
return module
|
|
27
|
+
|
|
28
|
+
def exec_module(self, module: ModuleType) -> None:
|
|
29
|
+
"""Keep the alias name bound to the already imported runtime module."""
|
|
30
|
+
sys.modules.setdefault(self._alias_name, module)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class _RuntimeAliasFinder(MetaPathFinder):
|
|
34
|
+
"""Resolve alias-package submodules through the canonical runtime package."""
|
|
35
|
+
|
|
36
|
+
def __init__(
|
|
37
|
+
self,
|
|
38
|
+
*,
|
|
39
|
+
alias_package: str,
|
|
40
|
+
runtime_package: str,
|
|
41
|
+
local_submodules: Collection[str],
|
|
42
|
+
) -> None:
|
|
43
|
+
"""Configure one alias-package namespace bridge."""
|
|
44
|
+
self.alias_package = alias_package
|
|
45
|
+
self.runtime_package = runtime_package
|
|
46
|
+
self.local_submodules = frozenset(local_submodules)
|
|
47
|
+
self._alias_prefix = f"{alias_package}."
|
|
48
|
+
|
|
49
|
+
def find_spec(
|
|
50
|
+
self,
|
|
51
|
+
fullname: str,
|
|
52
|
+
path: object | None = None,
|
|
53
|
+
target: ModuleType | None = None,
|
|
54
|
+
) -> ModuleSpec | None:
|
|
55
|
+
"""Return an alias-module spec when the runtime module exists."""
|
|
56
|
+
del path, target
|
|
57
|
+
if not fullname.startswith(self._alias_prefix):
|
|
58
|
+
return None
|
|
59
|
+
module_suffix = fullname.removeprefix(self._alias_prefix)
|
|
60
|
+
if module_suffix.partition(".")[0] in self.local_submodules:
|
|
61
|
+
return None
|
|
62
|
+
runtime_name = f"{self.runtime_package}.{module_suffix}"
|
|
63
|
+
runtime_spec = find_spec(runtime_name)
|
|
64
|
+
if runtime_spec is None:
|
|
65
|
+
return None
|
|
66
|
+
alias_spec = ModuleSpec(
|
|
67
|
+
name=fullname,
|
|
68
|
+
loader=_RuntimeAliasLoader(fullname, runtime_name),
|
|
69
|
+
origin=runtime_spec.origin,
|
|
70
|
+
is_package=runtime_spec.submodule_search_locations is not None,
|
|
71
|
+
)
|
|
72
|
+
if runtime_spec.submodule_search_locations is not None:
|
|
73
|
+
alias_spec.submodule_search_locations = list(
|
|
74
|
+
runtime_spec.submodule_search_locations
|
|
75
|
+
)
|
|
76
|
+
return alias_spec
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def install_runtime_aliases(
|
|
80
|
+
*,
|
|
81
|
+
alias_package: str,
|
|
82
|
+
runtime_package: str,
|
|
83
|
+
local_submodules: Collection[str],
|
|
84
|
+
) -> None:
|
|
85
|
+
"""Install a finder that maps alias-package submodules onto runtime modules."""
|
|
86
|
+
for finder in sys.meta_path:
|
|
87
|
+
if not isinstance(finder, _RuntimeAliasFinder):
|
|
88
|
+
continue
|
|
89
|
+
if (
|
|
90
|
+
finder.alias_package == alias_package
|
|
91
|
+
and finder.runtime_package == runtime_package
|
|
92
|
+
):
|
|
93
|
+
return
|
|
94
|
+
sys.meta_path.insert(
|
|
95
|
+
0,
|
|
96
|
+
_RuntimeAliasFinder(
|
|
97
|
+
alias_package=alias_package,
|
|
98
|
+
runtime_package=runtime_package,
|
|
99
|
+
local_submodules=local_submodules,
|
|
100
|
+
),
|
|
101
|
+
)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phylogenetic
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Compatibility alias package for the canonical native phylogenetics runtime.
|
|
5
|
+
Project-URL: Documentation, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/
|
|
6
|
+
Project-URL: Native Workflows, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/operations/
|
|
7
|
+
Project-URL: Evidence Book, https://bijux.io/bijux-phylogenetics/02-bijux-phylogenetics-evidence-book/
|
|
8
|
+
Project-URL: Benchmarks, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/operations/native-benchmark-review/
|
|
9
|
+
Project-URL: Interface Guide, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/interfaces/surface-selection/
|
|
10
|
+
Project-URL: Artifact Guide, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/interfaces/artifact-consumption-guide/
|
|
11
|
+
Project-URL: Release Guide, https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/quality/release-review-workflow/
|
|
12
|
+
Project-URL: Repository, https://github.com/bijux/bijux-phylogenetics
|
|
13
|
+
Project-URL: Issues, https://github.com/bijux/bijux-phylogenetics/issues
|
|
14
|
+
Project-URL: Changelog, https://github.com/bijux/bijux-phylogenetics/blob/main/packages/phylogenetic/CHANGELOG.md
|
|
15
|
+
Project-URL: Security, https://github.com/bijux/bijux-phylogenetics/blob/main/SECURITY.md
|
|
16
|
+
Author-email: Bijan Mousavi <bijan@bijux.io>
|
|
17
|
+
License: Apache-2.0
|
|
18
|
+
Keywords: bayesian-inference,bioinformatics,comparative-biology,evolution,maximum-likelihood,phylogenetics
|
|
19
|
+
Classifier: Development Status :: 4 - Beta
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: bijux-phylogenetics<1.0,>=0.1.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: bandit<2.0,>=1.8.6; extra == 'dev'
|
|
29
|
+
Requires-Dist: build<2.0,>=1.3.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: codespell<3.0,>=2.4.1; extra == 'dev'
|
|
31
|
+
Requires-Dist: deptry<1.0,>=0.24.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: hatch<2.0,>=1.14.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: mypy<3.0,>=1.18.2; extra == 'dev'
|
|
34
|
+
Requires-Dist: pip-audit<3.0,>=2.9.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pydantic<3.0,>=2.12; extra == 'dev'
|
|
36
|
+
Requires-Dist: pydocstyle<7.0,>=6.3.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-asyncio<2.0,>=1.0.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest-cov<8.0,>=6.2.1; extra == 'dev'
|
|
39
|
+
Requires-Dist: pytest-timeout<3.0,>=2.4.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-xdist<4.0,>=3.8.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest<10.0,>=9.0.3; extra == 'dev'
|
|
42
|
+
Requires-Dist: radon<7.0,>=6.0.1; extra == 'dev'
|
|
43
|
+
Requires-Dist: ruff<1.0,>=0.13.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: twine<7.0,>=6.2.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: vulture<3.0,>=2.14; extra == 'dev'
|
|
46
|
+
Description-Content-Type: text/markdown
|
|
47
|
+
|
|
48
|
+
# phylogenetic
|
|
49
|
+
|
|
50
|
+
<!-- bijux-phylogenetics-badges:generated:start -->
|
|
51
|
+
[](https://pypi.org/project/phylogenetic/)
|
|
52
|
+
[](https://github.com/bijux/bijux-phylogenetics/blob/main/LICENSE)
|
|
53
|
+
[](https://github.com/bijux/bijux-phylogenetics/actions/workflows/verify.yml?query=branch%3Amain)
|
|
54
|
+
[](https://github.com/bijux/bijux-phylogenetics/actions/workflows/release-pypi.yml)
|
|
55
|
+
[](https://github.com/bijux/bijux-phylogenetics/actions/workflows/release-ghcr.yml)
|
|
56
|
+
[](https://github.com/bijux/bijux-phylogenetics/actions/workflows/release-github.yml)
|
|
57
|
+
[](https://github.com/bijux/bijux-phylogenetics/actions/workflows/deploy-docs.yml)
|
|
58
|
+
|
|
59
|
+
[](https://pypi.org/project/phylogenetic/)
|
|
60
|
+
[](https://pypi.org/project/bijux-phylogenetics/)
|
|
61
|
+
|
|
62
|
+
[](https://github.com/bijux/bijux-phylogenetics/pkgs/container/bijux-phylogenetics%2Fphylogenetic)
|
|
63
|
+
[](https://github.com/bijux/bijux-phylogenetics/pkgs/container/bijux-phylogenetics%2Fbijux-phylogenetics)
|
|
64
|
+
|
|
65
|
+
[](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/)
|
|
66
|
+
[](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/)
|
|
67
|
+
<!-- bijux-phylogenetics-badges:generated:end -->
|
|
68
|
+
|
|
69
|
+
Compatibility alias package for `bijux-phylogenetics`.
|
|
70
|
+
|
|
71
|
+
This distribution installs the canonical phylogenetics runtime under the
|
|
72
|
+
shorter `phylogenetic` package and CLI names. It is not a reduced runtime and
|
|
73
|
+
it is not a fork. It points at the same benchmark, workflow, and reporting
|
|
74
|
+
surfaces that the canonical package publishes.
|
|
75
|
+
|
|
76
|
+
```mermaid
|
|
77
|
+
flowchart LR
|
|
78
|
+
A[phylogenetic] --> B[Shorter install name]
|
|
79
|
+
A --> C[Shorter CLI name]
|
|
80
|
+
A --> D[Same canonical runtime behavior]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Install
|
|
84
|
+
|
|
85
|
+
`phylogenetic` supports Python 3.11 and newer.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python3.11 -m pip install phylogenetic
|
|
89
|
+
phylogenetic --help
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## What You Still Get
|
|
93
|
+
|
|
94
|
+
Installing the alias package still gives you access to the same documented
|
|
95
|
+
runtime depth:
|
|
96
|
+
|
|
97
|
+
| Capability family | What carries through the alias |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| Trees and alignments | inspection, validation, comparison, and preparation workflows |
|
|
100
|
+
| Native runtime | native likelihood and native inference surfaces |
|
|
101
|
+
| Comparative analysis | comparative and ancestral workflows |
|
|
102
|
+
| Reporting | benchmark, workflow, and reporting surfaces |
|
|
103
|
+
| External engines | governed wrapper-backed external-engine workflows |
|
|
104
|
+
|
|
105
|
+
## What The Alias Does Not Change
|
|
106
|
+
|
|
107
|
+
- it does not remove native inference surfaces
|
|
108
|
+
- it does not remove comparative, ancestral, or parsimony families
|
|
109
|
+
- it does not change the evidence-book or quality reading model
|
|
110
|
+
- it does not publish a smaller scientific contract than the canonical package
|
|
111
|
+
|
|
112
|
+
Choose this package when you want the shorter install and command names while
|
|
113
|
+
keeping the same public runtime contract.
|
|
114
|
+
|
|
115
|
+
Choose the canonical `bijux-phylogenetics` package instead when you want the
|
|
116
|
+
most explicit package name for notebooks, papers, release notes, or downstream
|
|
117
|
+
documentation.
|
|
118
|
+
|
|
119
|
+
## Read This Next
|
|
120
|
+
|
|
121
|
+
- [Runtime product guide](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/)
|
|
122
|
+
- [Runtime architecture](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/architecture/)
|
|
123
|
+
- [Surface selection guide](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/interfaces/surface-selection/)
|
|
124
|
+
- [Artifact consumption guide](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/interfaces/artifact-consumption-guide/)
|
|
125
|
+
- [Native Inference And Benchmark Surfaces](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/interfaces/native-inference-and-benchmarks/)
|
|
126
|
+
- [Native maximum-likelihood workflows](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/operations/native-maximum-likelihood-workflows/)
|
|
127
|
+
- [Native Bayesian workflows](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/operations/native-bayesian-workflows/)
|
|
128
|
+
- [Native benchmark review](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/operations/native-benchmark-review/)
|
|
129
|
+
- [Release review workflow](https://bijux.io/bijux-phylogenetics/01-bijux-phylogenetics/quality/release-review-workflow/)
|
|
130
|
+
- [Evidence-book guide](https://bijux.io/bijux-phylogenetics/02-bijux-phylogenetics-evidence-book/)
|
|
131
|
+
- [Canonical runtime package on GitHub](https://github.com/bijux/bijux-phylogenetics/tree/main/packages/bijux-phylogenetics)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
phylogenetic/__init__.py,sha256=0IPjTw1RjCQn2TfssxZxF0Qj2C_IrBCryiLz3WkwgaE,1398
|
|
2
|
+
phylogenetic/__main__.py,sha256=PlcZ--oVLN93-DXCckDZU0SbTLxO_G_J8oqnZoJdjGs,182
|
|
3
|
+
phylogenetic/cli.py,sha256=fVIIk3vVhxH4-TpVjqMmEh-dx20yYGMIN6biAOyffCs,1130
|
|
4
|
+
phylogenetic/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
5
|
+
phylogenetic/runtime_alias.py,sha256=-LJzUHr2b_vUGbym_gxrsmER73vuCfrUMKyleWRVgLc,3533
|
|
6
|
+
phylogenetic-0.1.0.dist-info/METADATA,sha256=CGxlAhZTgJ47zgyOQ1Eg4OMlfmh9ZjV7yJhMDEBC4Vw,8345
|
|
7
|
+
phylogenetic-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
8
|
+
phylogenetic-0.1.0.dist-info/entry_points.txt,sha256=Qkm7N5I4WeJIF7d9t7-5KF2ktLmZmCB5rF-_xewsNEU,55
|
|
9
|
+
phylogenetic-0.1.0.dist-info/RECORD,,
|