antelope-interface 0.3.1__tar.gz → 0.3.2__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.
- {antelope_interface-0.3.1/src/antelope_interface.egg-info → antelope_interface-0.3.2}/PKG-INFO +1 -1
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/pyproject.toml +1 -1
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/setup.py +2 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/__init__.py +1 -1
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/ibackground.py +7 -0
- antelope_interface-0.3.2/src/antelope/qdb/qdb.py +32 -0
- antelope_interface-0.3.2/src/antelope/qdb/units.py +15 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/base.py +4 -1
- antelope_interface-0.3.2/src/antelope/refs/tests/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2/src/antelope_interface.egg-info}/PKG-INFO +1 -1
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/SOURCES.txt +3 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/LICENSE +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/MANIFEST.in +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/README.md +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/setup.cfg +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/exchanges_from_spreadsheet.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/flows/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/flows/flow.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/flows/flow_interface.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/flows/openlca_locales.json +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/abstract_query.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/ibasic.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iconfigure.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iexchange.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iforeground.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iindex.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iquantity.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/models/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/models/auth.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/models/comparators.py +0 -0
- {antelope_interface-0.3.1/src/antelope/refs/tests → antelope_interface-0.3.2/src/antelope/qdb}/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/__init__.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/catalog_ref.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/exchange_ref.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/flow_ref.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/process_ref.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/quantity_ref.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/refs/tests/test_flows.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/xdb_tokens.py +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/dependency_links.txt +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/requires.txt +0 -0
- {antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@ from .interfaces.ibasic import BasicInterface, EntityNotFound, NoAccessToEntity,
|
|
|
11
11
|
from .interfaces.iconfigure import ConfigureInterface
|
|
12
12
|
from .interfaces.iexchange import ExchangeInterface, ExchangeRequired
|
|
13
13
|
from .interfaces.iindex import IndexInterface, IndexRequired, directions, comp_dir, num_dir, check_direction, valid_sense, comp_sense
|
|
14
|
-
from .interfaces.ibackground import BackgroundInterface, BackgroundRequired
|
|
14
|
+
from .interfaces.ibackground import BackgroundInterface, BackgroundRequired, LinkingError
|
|
15
15
|
from .interfaces.iquantity import QuantityInterface, QuantityRequired, NoFactorsFound, ConversionReferenceMismatch, FlowableMismatch
|
|
16
16
|
from .interfaces.iforeground import ForegroundInterface
|
|
17
17
|
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/ibackground.py
RENAMED
|
@@ -26,6 +26,13 @@ class BackgroundRequired(Exception):
|
|
|
26
26
|
pass
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
class LinkingError(Exception):
|
|
30
|
+
"""
|
|
31
|
+
To be returned when a strict linking strategy cannot be implemented
|
|
32
|
+
"""
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
|
|
29
36
|
_interface = 'background'
|
|
30
37
|
|
|
31
38
|
BACKGROUND_VALUES_REQUIRED = {'dependencies', 'emissions', 'cutoffs', 'lci', 'sys_lci', 'foreground', 'ad', 'bf'}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""
|
|
2
|
+
An interface specification for a quantity database. This was originally conceived as being *the* quantity
|
|
3
|
+
interface, but as things have developed it's become clear that the qdb does more (and less) than the
|
|
4
|
+
quantity interface governs, and many (even most) of the operations of qdb are not even part of the antelope
|
|
5
|
+
interface spec.
|
|
6
|
+
|
|
7
|
+
For that reason, we are putting this *still in* antelope interface but *outside of* the abstract query framework,
|
|
8
|
+
and making it a straight abstract base class.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from abc import ABC
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class QdbInterface(ABC):
|
|
15
|
+
"""
|
|
16
|
+
The main purpose of the qdb is to maintain a free-standing database of quantities and flows. This will
|
|
17
|
+
most likely be implemented as a graph, but the interface for interacting with it is not going to care about
|
|
18
|
+
that. Here we brainstorm about all the things we would want the qdb to do.
|
|
19
|
+
|
|
20
|
+
# quantities
|
|
21
|
+
|
|
22
|
+
Quantities are a fundamental concept in physical science; yet my implementation of them is basically made up
|
|
23
|
+
based on my experience and intuition. We distinguish between reference quantities, which are directly measurable,
|
|
24
|
+
and which are [within qdb] *strictly* canonical and can therefore only be created or altered by privileged users,
|
|
25
|
+
and *indicators*, which are quantities that may or may not be directly measurable but are owned by users and
|
|
26
|
+
therefore not canonical.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
In qdb, we only store *reference* quantities (right? or do we allow users
|
|
30
|
+
to make their own quantities? we allow users to make their own *indicators*. Only privileged users can c
|
|
31
|
+
"""
|
|
32
|
+
pass
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/SOURCES.txt
RENAMED
|
@@ -22,6 +22,9 @@ src/antelope/interfaces/iquantity.py
|
|
|
22
22
|
src/antelope/models/__init__.py
|
|
23
23
|
src/antelope/models/auth.py
|
|
24
24
|
src/antelope/models/comparators.py
|
|
25
|
+
src/antelope/qdb/__init__.py
|
|
26
|
+
src/antelope/qdb/qdb.py
|
|
27
|
+
src/antelope/qdb/units.py
|
|
25
28
|
src/antelope/refs/__init__.py
|
|
26
29
|
src/antelope/refs/base.py
|
|
27
30
|
src/antelope/refs/catalog_ref.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/exchanges_from_spreadsheet.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/flows/openlca_locales.json
RENAMED
|
File without changes
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/abstract_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope/interfaces/iforeground.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{antelope_interface-0.3.1 → antelope_interface-0.3.2}/src/antelope_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|