industrial-model 0.1.40__py3-none-any.whl → 0.1.41__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.
@@ -20,13 +20,13 @@ def generate_engine_params(
20
20
  file_env_parsed = env_sub_template.substitute(dict(os.environ))
21
21
 
22
22
  engine_config = yaml.safe_load(file_env_parsed)
23
- assert isinstance(engine_config, dict), (
24
- "Configuration file must contain a dictionary"
25
- )
23
+ assert isinstance(
24
+ engine_config, dict
25
+ ), "Configuration file must contain a dictionary"
26
26
  assert "cognite" in engine_config, "Configuration must contain 'cognite' section"
27
- assert "data_model" in engine_config, (
28
- "Configuration must contain 'data_model' section"
29
- )
27
+ assert (
28
+ "data_model" in engine_config
29
+ ), "Configuration must contain 'data_model' section"
30
30
 
31
31
  client = CogniteClient.load(engine_config["cognite"])
32
32
  dm_id = DataModelId.model_validate(engine_config["data_model"])
@@ -73,9 +73,9 @@ class ViewInstance(InstanceId):
73
73
  return cls.view_config.get("view_external_id") or cls.__name__
74
74
 
75
75
  def get_edge_metadata(self, property: Column | str | Any) -> list[EdgeContainer]:
76
- assert isinstance(property, Column | str), (
77
- f"Expected property to be Column, or str, got {type(property).__name__}"
78
- )
76
+ assert isinstance(
77
+ property, Column | str
78
+ ), f"Expected property to be Column, or str, got {type(property).__name__}"
79
79
  identifier = property.property if isinstance(property, Column) else property
80
80
 
81
81
  edge_map_key = self.get_field_alias(identifier) or self.get_field_name(
@@ -1,8 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: industrial-model
3
- Version: 0.1.40
3
+ Version: 0.1.41
4
4
  Summary: Industrial Model ORM
5
+ Project-URL: Homepage, https://github.com/lucasrosaalves/industrial-model
6
+ Project-URL: Source, https://github.com/lucasrosaalves/industrial-model
5
7
  Author-email: Lucas Alves <lucasrosaalves@gmail.com>
8
+ License-File: LICENSE
6
9
  Classifier: Programming Language :: Python
7
10
  Classifier: Programming Language :: Python :: 3
8
11
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -16,12 +16,12 @@ industrial_model/cognite_adapters/upsert_mapper.py,sha256=jzelnmECFcuVkQY7dgZG-x
16
16
  industrial_model/cognite_adapters/utils.py,sha256=-9NUG84r49cKvmmzoUinxNF1zhHIlmoWFypUCD_WTeM,4800
17
17
  industrial_model/cognite_adapters/view_mapper.py,sha256=9nWx0P7h8TMthLcOF5GZ4yC4UOndVuUo_s-Oz5nSAyM,1276
18
18
  industrial_model/engines/__init__.py,sha256=7aGHrUm2MxIq39vR8h0xu3i1zNOuT9H9U-q4lV3nErQ,102
19
- industrial_model/engines/_internal.py,sha256=a3fdqqP3pVTPkfYIF5W_bNSQiIps3MA4xiGC3HOIYhI,1092
19
+ industrial_model/engines/_internal.py,sha256=bepUTKygYNHcOB810-KoWIKnzf4hFpwXZoWYJyuOUfc,1090
20
20
  industrial_model/engines/async_engine.py,sha256=BSuI1vjUsjHeYSvxZM4bK2cEw-WutzjlCUFU0Nnu2-M,2139
21
21
  industrial_model/engines/engine.py,sha256=icpYh-zgzMM_jsV5AytXoXz-nb2nYKug6qkekeMAQQw,4621
22
22
  industrial_model/models/__init__.py,sha256=g8oa95iG6c22A-vTYhiZKSYa6RG2C7Ht1dpn5_HfXxs,796
23
23
  industrial_model/models/base.py,sha256=qi44m0KW9KuXKTSJqSLea1poErBeAqm6Hv08VdRYHkU,2023
24
- industrial_model/models/entities.py,sha256=-Jf7bNCijbS3_wZohlog3bRsAkXvkUeAQW9DamJqGFo,5700
24
+ industrial_model/models/entities.py,sha256=jqTgyCv8frzovKCKg6yVUNO9hoBqz_b3HGYbGwIq7gI,5698
25
25
  industrial_model/models/schemas.py,sha256=EoLK9GYdS-0DQ98myTP3wOU9YpWIJOfDSLOYZUy3xEY,4559
26
26
  industrial_model/models/utils.py,sha256=MFS8OyCfh4cYPY_R66-mUaCauQfQy0vd558Rw0tiGDc,1786
27
27
  industrial_model/queries/__init__.py,sha256=lA83zOxMRgBgkseWJgK9kCr1vD8D8iSWs9NGGRnoYKk,355
@@ -30,6 +30,7 @@ industrial_model/queries/params.py,sha256=50qY5BO5onLsXorhcv-7qCKhJaMO94UzhKLCmZ
30
30
  industrial_model/queries/utils.py,sha256=uP6PLh9IVHDK6J8x444zHWPmyV4PkxdLO-PMc6qWItc,1505
31
31
  industrial_model/statements/__init__.py,sha256=3Et9PM7AMbIS7Fh9051Q0u3qUpX6588d1yuNrvdd4wI,5429
32
32
  industrial_model/statements/expressions.py,sha256=4ZZOcZroI5-4xRw4PXIRlufi0ARndE5zSbbxLDpR2Ec,4816
33
- industrial_model-0.1.40.dist-info/METADATA,sha256=ZQMc-7ymcF2ksUHurv6UFVmmMrvb67hFwB-RmQZ5qcE,7557
34
- industrial_model-0.1.40.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
- industrial_model-0.1.40.dist-info/RECORD,,
33
+ industrial_model-0.1.41.dist-info/METADATA,sha256=NezuBkb2KOQ2zkUkvE91wXKVSC2vLtyDNhiKht4AWsM,7725
34
+ industrial_model-0.1.41.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ industrial_model-0.1.41.dist-info/licenses/LICENSE,sha256=BCHCZ1Qo7m4YvAEIQqtVBI3NebFJdZ8_7m_cxInIlN0,4934
36
+ industrial_model-0.1.41.dist-info/RECORD,,
@@ -0,0 +1,87 @@
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 l