ecosemantic 0.1.8__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.
- ecosemantic-0.1.8/.gitignore +24 -0
- ecosemantic-0.1.8/LICENSE +73 -0
- ecosemantic-0.1.8/NOTICE +13 -0
- ecosemantic-0.1.8/PKG-INFO +75 -0
- ecosemantic-0.1.8/README.md +35 -0
- ecosemantic-0.1.8/ecosemantic/__init__.py +59 -0
- ecosemantic-0.1.8/ecosemantic/cli/__init__.py +635 -0
- ecosemantic-0.1.8/ecosemantic/cli/accounts.py +26 -0
- ecosemantic-0.1.8/ecosemantic/cli/clients.py +141 -0
- ecosemantic-0.1.8/ecosemantic/cli/doctor.py +86 -0
- ecosemantic-0.1.8/ecosemantic/cli/progress.py +29 -0
- ecosemantic-0.1.8/ecosemantic/cli/py.typed +0 -0
- ecosemantic-0.1.8/ecosemantic/cli/text.py +219 -0
- ecosemantic-0.1.8/ecosemantic/console/__init__.py +13 -0
- ecosemantic-0.1.8/ecosemantic/console/py.typed +0 -0
- ecosemantic-0.1.8/ecosemantic/installs/__init__.py +2 -0
- ecosemantic-0.1.8/ecosemantic/installs/handover.py +30 -0
- ecosemantic-0.1.8/ecosemantic/installs/sources.py +192 -0
- ecosemantic-0.1.8/ecosemantic/installs/supervisor.py +87 -0
- ecosemantic-0.1.8/ecosemantic/installs/worker.py +146 -0
- ecosemantic-0.1.8/ecosemantic/local/__init__.py +112 -0
- ecosemantic-0.1.8/ecosemantic/local/py.typed +0 -0
- ecosemantic-0.1.8/ecosemantic/runs/__init__.py +1 -0
- ecosemantic-0.1.8/ecosemantic/runs/py.typed +0 -0
- ecosemantic-0.1.8/ecosemantic/runs/supervisor.py +98 -0
- ecosemantic-0.1.8/ecosemantic/runs/worker.py +117 -0
- ecosemantic-0.1.8/ecosemantic/serve/__init__.py +445 -0
- ecosemantic-0.1.8/ecosemantic/serve/py.typed +0 -0
- ecosemantic-0.1.8/ecosemantic/telemetry/__init__.py +292 -0
- ecosemantic-0.1.8/ecosemantic/workspace/__init__.py +750 -0
- ecosemantic-0.1.8/ecosemantic/workspace/py.typed +0 -0
- ecosemantic-0.1.8/pyproject.toml +61 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
.venv/
|
|
4
|
+
venv/
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
node_modules/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.mypy_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
coverage.json
|
|
14
|
+
htmlcov/
|
|
15
|
+
|
|
16
|
+
.env
|
|
17
|
+
.env.*
|
|
18
|
+
!.env.example
|
|
19
|
+
|
|
20
|
+
.DS_Store
|
|
21
|
+
graphify-out
|
|
22
|
+
knowledge/
|
|
23
|
+
.okf-cache.json
|
|
24
|
+
**/ecosemantic/view/static/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
12
|
+
|
|
13
|
+
## Distribution License
|
|
14
|
+
|
|
15
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
16
|
+
|
|
17
|
+
## Notices
|
|
18
|
+
|
|
19
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
20
|
+
|
|
21
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
22
|
+
|
|
23
|
+
## Changes and New Works License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
30
|
+
|
|
31
|
+
## Noncommercial Purposes
|
|
32
|
+
|
|
33
|
+
Any noncommercial purpose is a permitted purpose.
|
|
34
|
+
|
|
35
|
+
## Personal Uses
|
|
36
|
+
|
|
37
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
## Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
42
|
+
|
|
43
|
+
## Fair Use
|
|
44
|
+
|
|
45
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
46
|
+
|
|
47
|
+
## No Other Rights
|
|
48
|
+
|
|
49
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
## Violations
|
|
56
|
+
|
|
57
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
58
|
+
|
|
59
|
+
## No Liability
|
|
60
|
+
|
|
61
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
62
|
+
|
|
63
|
+
## Definitions
|
|
64
|
+
|
|
65
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
66
|
+
|
|
67
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
ecosemantic-0.1.8/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
EcoSemantic
|
|
2
|
+
Required Notice: Copyright 2026 Carlos Gaete-Morales (https://github.com/cdgaete/ecosemantic)
|
|
3
|
+
|
|
4
|
+
EcoSemantic is licensed under the PolyForm Noncommercial License 1.0.0, in LICENSE
|
|
5
|
+
and at https://polyformproject.org/licenses/noncommercial/1.0.0. Any noncommercial
|
|
6
|
+
purpose is permitted. Commercial use needs a separate licence from Carlos
|
|
7
|
+
Gaete-Morales: cdgaete@gmail.com.
|
|
8
|
+
|
|
9
|
+
The page that ecosemantic-view carries bundles third-party software under its
|
|
10
|
+
own licences; their notices are in ecosemantic/view/static/THIRD_PARTY_NOTICES.txt
|
|
11
|
+
inside that distribution. Components of the page adapt shadcn/ui, Copyright (c)
|
|
12
|
+
2023 shadcn, under the MIT licence, as page/PROVENANCE.md in the source
|
|
13
|
+
repository records.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ecosemantic
|
|
3
|
+
Version: 0.1.8
|
|
4
|
+
Summary: Agent-driven life cycle assessment on your own machine: the command and the local composition.
|
|
5
|
+
Project-URL: Homepage, https://github.com/cdgaete/ecosemantic
|
|
6
|
+
Project-URL: Repository, https://github.com/cdgaete/ecosemantic
|
|
7
|
+
Project-URL: Issues, https://github.com/cdgaete/ecosemantic/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/cdgaete/ecosemantic/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Carlos Gaete-Morales <cdgaete@gmail.com>
|
|
10
|
+
License-Expression: PolyForm-Noncommercial-1.0.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: NOTICE
|
|
13
|
+
Keywords: LCA,MCP,ecoinvent,life cycle assessment,openLCA
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Requires-Dist: ecosemantic-core==0.1.8
|
|
25
|
+
Requires-Dist: ecosemantic-databases[ecoinvent]==0.1.8
|
|
26
|
+
Requires-Dist: ecosemantic-engine==0.1.8
|
|
27
|
+
Requires-Dist: ecosemantic-mcp==0.1.8
|
|
28
|
+
Requires-Dist: ecosemantic-view==0.1.8
|
|
29
|
+
Requires-Dist: fastmcp-slim<5,>=4
|
|
30
|
+
Requires-Dist: fastmcp<5,>=4
|
|
31
|
+
Requires-Dist: opentelemetry-api<2,>=1.44
|
|
32
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-common<2,>=1.44
|
|
33
|
+
Requires-Dist: opentelemetry-sdk<2,>=1.44
|
|
34
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
35
|
+
Requires-Dist: starlette<2,>=1.6.0
|
|
36
|
+
Requires-Dist: uvicorn<1,>=0.52.4
|
|
37
|
+
Provides-Extra: mkl
|
|
38
|
+
Requires-Dist: ecosemantic-engine[mkl]==0.1.8; extra == 'mkl'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# ecosemantic
|
|
42
|
+
|
|
43
|
+
The command that runs EcoSemantic on a machine, and the Python API over the same workspace: `ecosemantic serve` runs the MCP server with the page beside it, `ecosemantic setup` installs a background database, `ecosemantic connect` writes a chatbot's configuration, and `import ecosemantic as es` opens a workspace from Python.
|
|
44
|
+
|
|
45
|
+
## Names it publishes
|
|
46
|
+
|
|
47
|
+
- `ecosemantic.cli` and `ecosemantic.console` — the command: `serve`, `setup`, `database`, `connect`, `doctor`, `init`, `export`, `import` and `compute`.
|
|
48
|
+
- `ecosemantic.local` — `build_context`, the local composition that binds the server's ports to their backends.
|
|
49
|
+
- `ecosemantic.serve` — the process: the listener and its handover, the MCP endpoint over stdio or HTTP, and the view mounted beside it.
|
|
50
|
+
- `ecosemantic.workspace` — the Python API: `open`, and the `Workspace`, `Database`, `ProductSystem` and `Process` handles, each method the tool of that name.
|
|
51
|
+
- `ecosemantic.installs` — the sources an install comes from, the process that carries one and the account handed to it.
|
|
52
|
+
- `ecosemantic.runs` — the launcher and the worker of a calculation that outlives its request.
|
|
53
|
+
- `ecosemantic.open`, `Workspace`, `Parameter`, `Case`, `Uncertainty`, `ExchangeOverride`, `ParameterOverride`, `DemandItem`, `BackgroundRef`, `ForegroundRef`, `ElementaryFlowRef`, `SystemRef` and `MonteCarloConfig` — the names `import ecosemantic as es` gives.
|
|
54
|
+
|
|
55
|
+
## Installing it
|
|
56
|
+
|
|
57
|
+
`uv tool install --python 3.12 ecosemantic` installs this distribution as a command, with a Python of its own; `uv tool install --python 3.12 "ecosemantic[mkl]"` adds the PARDISO solver, on Linux and Windows x86-64. `pip install ecosemantic` installs it into an environment of Python 3.12 or newer instead.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
ecosemantic doctor
|
|
61
|
+
ecosemantic setup uslci
|
|
62
|
+
ecosemantic serve --transport http
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Telemetry
|
|
66
|
+
|
|
67
|
+
A server counts its starts and tool calls anonymously unless you turn that off: `ecosemantic telemetry off`, `ECOSEMANTIC_TELEMETRY=off` or `DO_NOT_TRACK=1`. The repository's `TELEMETRY.md` states exactly what is sent.
|
|
68
|
+
|
|
69
|
+
## What it depends on
|
|
70
|
+
|
|
71
|
+
The other five distributions at the same version, `ecosemantic-databases` with its `ecoinvent` extra, so a default install builds an ecoinvent release; and fastmcp, fastmcp-slim, pydantic, starlette and uvicorn. The `mkl` extra is `ecosemantic-engine`'s.
|
|
72
|
+
|
|
73
|
+
## Licence
|
|
74
|
+
|
|
75
|
+
PolyForm Noncommercial License 1.0.0, copyright Carlos Gaete-Morales: `LICENSE` and `NOTICE` in this distribution. Any noncommercial purpose is permitted, by individuals and by charities, schools, public research and government bodies; commercial use needs a separate licence from him (cdgaete@gmail.com). EcoSemantic is his trademark, and the licence grants no right to use that name (`TRADEMARK.md` in the repository). The repository's README says how to install, connect a chatbot and start a first model: https://github.com/cdgaete/ecosemantic
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ecosemantic
|
|
2
|
+
|
|
3
|
+
The command that runs EcoSemantic on a machine, and the Python API over the same workspace: `ecosemantic serve` runs the MCP server with the page beside it, `ecosemantic setup` installs a background database, `ecosemantic connect` writes a chatbot's configuration, and `import ecosemantic as es` opens a workspace from Python.
|
|
4
|
+
|
|
5
|
+
## Names it publishes
|
|
6
|
+
|
|
7
|
+
- `ecosemantic.cli` and `ecosemantic.console` — the command: `serve`, `setup`, `database`, `connect`, `doctor`, `init`, `export`, `import` and `compute`.
|
|
8
|
+
- `ecosemantic.local` — `build_context`, the local composition that binds the server's ports to their backends.
|
|
9
|
+
- `ecosemantic.serve` — the process: the listener and its handover, the MCP endpoint over stdio or HTTP, and the view mounted beside it.
|
|
10
|
+
- `ecosemantic.workspace` — the Python API: `open`, and the `Workspace`, `Database`, `ProductSystem` and `Process` handles, each method the tool of that name.
|
|
11
|
+
- `ecosemantic.installs` — the sources an install comes from, the process that carries one and the account handed to it.
|
|
12
|
+
- `ecosemantic.runs` — the launcher and the worker of a calculation that outlives its request.
|
|
13
|
+
- `ecosemantic.open`, `Workspace`, `Parameter`, `Case`, `Uncertainty`, `ExchangeOverride`, `ParameterOverride`, `DemandItem`, `BackgroundRef`, `ForegroundRef`, `ElementaryFlowRef`, `SystemRef` and `MonteCarloConfig` — the names `import ecosemantic as es` gives.
|
|
14
|
+
|
|
15
|
+
## Installing it
|
|
16
|
+
|
|
17
|
+
`uv tool install --python 3.12 ecosemantic` installs this distribution as a command, with a Python of its own; `uv tool install --python 3.12 "ecosemantic[mkl]"` adds the PARDISO solver, on Linux and Windows x86-64. `pip install ecosemantic` installs it into an environment of Python 3.12 or newer instead.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ecosemantic doctor
|
|
21
|
+
ecosemantic setup uslci
|
|
22
|
+
ecosemantic serve --transport http
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Telemetry
|
|
26
|
+
|
|
27
|
+
A server counts its starts and tool calls anonymously unless you turn that off: `ecosemantic telemetry off`, `ECOSEMANTIC_TELEMETRY=off` or `DO_NOT_TRACK=1`. The repository's `TELEMETRY.md` states exactly what is sent.
|
|
28
|
+
|
|
29
|
+
## What it depends on
|
|
30
|
+
|
|
31
|
+
The other five distributions at the same version, `ecosemantic-databases` with its `ecoinvent` extra, so a default install builds an ecoinvent release; and fastmcp, fastmcp-slim, pydantic, starlette and uvicorn. The `mkl` extra is `ecosemantic-engine`'s.
|
|
32
|
+
|
|
33
|
+
## Licence
|
|
34
|
+
|
|
35
|
+
PolyForm Noncommercial License 1.0.0, copyright Carlos Gaete-Morales: `LICENSE` and `NOTICE` in this distribution. Any noncommercial purpose is permitted, by individuals and by charities, schools, public research and government bodies; commercial use needs a separate licence from him (cdgaete@gmail.com). EcoSemantic is his trademark, and the licence grants no right to use that name (`TRADEMARK.md` in the repository). The repository's README says how to install, connect a chatbot and start a first model: https://github.com/cdgaete/ecosemantic
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Open a workspace with `ecosemantic.open()`; every MCP tool is a method on it."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from ecosemantic.model.entities import (
|
|
7
|
+
Case,
|
|
8
|
+
DemandItem,
|
|
9
|
+
ExchangeOverride,
|
|
10
|
+
Parameter,
|
|
11
|
+
ParameterOverride,
|
|
12
|
+
Uncertainty,
|
|
13
|
+
)
|
|
14
|
+
from ecosemantic.model.refs import BackgroundRef, ElementaryFlowRef, ForegroundRef, SystemRef
|
|
15
|
+
from ecosemantic.ports.types import MonteCarloConfig
|
|
16
|
+
from ecosemantic.workspace import Workspace, open
|
|
17
|
+
|
|
18
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
19
|
+
|
|
20
|
+
PUBLIC = {
|
|
21
|
+
"open": "ecosemantic.workspace",
|
|
22
|
+
"Workspace": "ecosemantic.workspace",
|
|
23
|
+
"Parameter": "ecosemantic.model.entities",
|
|
24
|
+
"Case": "ecosemantic.model.entities",
|
|
25
|
+
"Uncertainty": "ecosemantic.model.entities",
|
|
26
|
+
"ExchangeOverride": "ecosemantic.model.entities",
|
|
27
|
+
"ParameterOverride": "ecosemantic.model.entities",
|
|
28
|
+
"DemandItem": "ecosemantic.model.entities",
|
|
29
|
+
"BackgroundRef": "ecosemantic.model.refs",
|
|
30
|
+
"ForegroundRef": "ecosemantic.model.refs",
|
|
31
|
+
"ElementaryFlowRef": "ecosemantic.model.refs",
|
|
32
|
+
"SystemRef": "ecosemantic.model.refs",
|
|
33
|
+
"MonteCarloConfig": "ecosemantic.ports.types",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"BackgroundRef",
|
|
38
|
+
"Case",
|
|
39
|
+
"DemandItem",
|
|
40
|
+
"ElementaryFlowRef",
|
|
41
|
+
"ExchangeOverride",
|
|
42
|
+
"ForegroundRef",
|
|
43
|
+
"MonteCarloConfig",
|
|
44
|
+
"Parameter",
|
|
45
|
+
"ParameterOverride",
|
|
46
|
+
"SystemRef",
|
|
47
|
+
"Uncertainty",
|
|
48
|
+
"Workspace",
|
|
49
|
+
"open",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def __getattr__(name: str) -> object:
|
|
54
|
+
"""The public name from the module that defines it, imported on first use."""
|
|
55
|
+
if name not in PUBLIC:
|
|
56
|
+
raise AttributeError(f"module 'ecosemantic' has no attribute {name!r}")
|
|
57
|
+
from importlib import import_module
|
|
58
|
+
|
|
59
|
+
return getattr(import_module(PUBLIC[name]), name)
|