amalgam-lang 7.1.0__py3-none-win_amd64.whl → 7.2.1__py3-none-win_amd64.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.
Potentially problematic release.
This version of amalgam-lang might be problematic. Click here for more details.
- amalgam/api.py +142 -9
- amalgam/lib/version.json +3 -3
- amalgam/lib/windows/amd64/amalgam-mt-noavx.dll +0 -0
- amalgam/lib/windows/amd64/amalgam-mt.dll +0 -0
- amalgam/lib/windows/amd64/amalgam-omp.dll +0 -0
- amalgam/lib/windows/amd64/amalgam-st.dll +0 -0
- amalgam/lib/windows/amd64/docs/version.json +1 -1
- {amalgam_lang-7.1.0.dist-info → amalgam_lang-7.2.1.dist-info}/METADATA +1 -1
- amalgam_lang-7.2.1.dist-info/RECORD +13 -0
- amalgam_lang-7.1.0.dist-info/RECORD +0 -13
- {amalgam_lang-7.1.0.dist-info → amalgam_lang-7.2.1.dist-info}/LICENSE.txt +0 -0
- {amalgam_lang-7.1.0.dist-info → amalgam_lang-7.2.1.dist-info}/WHEEL +0 -0
- {amalgam_lang-7.1.0.dist-info → amalgam_lang-7.2.1.dist-info}/top_level.txt +0 -0
amalgam/api.py
CHANGED
|
@@ -596,7 +596,10 @@ class Amalgam:
|
|
|
596
596
|
handle_buf = self.str_to_char_p(handle)
|
|
597
597
|
label_buf = self.str_to_char_p(label)
|
|
598
598
|
|
|
599
|
-
self._log_execution(
|
|
599
|
+
self._log_execution((
|
|
600
|
+
f"GET_JSON_FROM_LABEL \"{self.escape_double_quotes(handle)}\" "
|
|
601
|
+
f"\"{self.escape_double_quotes(label)}\""
|
|
602
|
+
))
|
|
600
603
|
result = self.char_p_to_bytes(self.amlg.GetJSONPtrFromLabel(handle_buf, label_buf))
|
|
601
604
|
self._log_reply(result)
|
|
602
605
|
|
|
@@ -630,7 +633,11 @@ class Amalgam:
|
|
|
630
633
|
label_buf = self.str_to_char_p(label)
|
|
631
634
|
json_buf = self.str_to_char_p(json)
|
|
632
635
|
|
|
633
|
-
self._log_execution(
|
|
636
|
+
self._log_execution((
|
|
637
|
+
f"SET_JSON_TO_LABEL \"{self.escape_double_quotes(handle)}\" "
|
|
638
|
+
f"\"{self.escape_double_quotes(label)}\" "
|
|
639
|
+
f"{json}"
|
|
640
|
+
))
|
|
634
641
|
self.amlg.SetJSONToLabel(handle_buf, label_buf, json_buf)
|
|
635
642
|
self._log_reply(None)
|
|
636
643
|
|
|
@@ -657,10 +664,10 @@ class Amalgam:
|
|
|
657
664
|
The handle to assign the entity.
|
|
658
665
|
amlg_path : str
|
|
659
666
|
The path to the filename.amlg/caml file.
|
|
660
|
-
persist : bool
|
|
667
|
+
persist : bool, default False
|
|
661
668
|
If set to true, all transactions will trigger the entity to be
|
|
662
669
|
saved over the original source.
|
|
663
|
-
load_contained : bool
|
|
670
|
+
load_contained : bool, default False
|
|
664
671
|
If set to true, contained entities will be loaded.
|
|
665
672
|
write_log : str, default ""
|
|
666
673
|
Path to the write log. If empty string, the write log is
|
|
@@ -683,7 +690,8 @@ class Amalgam:
|
|
|
683
690
|
print_log_buf = self.str_to_char_p(print_log)
|
|
684
691
|
|
|
685
692
|
load_command_log_entry = (
|
|
686
|
-
f"LOAD_ENTITY \"{handle}\"
|
|
693
|
+
f"LOAD_ENTITY \"{self.escape_double_quotes(handle)}\" "
|
|
694
|
+
f"\"{self.escape_double_quotes(amlg_path)}\" {str(persist).lower()} "
|
|
687
695
|
f"{str(load_contained).lower()} \"{write_log}\" \"{print_log}\""
|
|
688
696
|
)
|
|
689
697
|
self._log_execution(load_command_log_entry)
|
|
@@ -721,7 +729,7 @@ class Amalgam:
|
|
|
721
729
|
self.amlg.VerifyEntity.restype = _LoadEntityStatus
|
|
722
730
|
amlg_path_buf = self.str_to_char_p(amlg_path)
|
|
723
731
|
|
|
724
|
-
self._log_execution(f"VERIFY_ENTITY \"{amlg_path}\"")
|
|
732
|
+
self._log_execution(f"VERIFY_ENTITY \"{self.escape_double_quotes(amlg_path)}\"")
|
|
725
733
|
result = LoadEntityStatus(self, self.amlg.VerifyEntity(amlg_path_buf))
|
|
726
734
|
self._log_reply(result)
|
|
727
735
|
|
|
@@ -729,6 +737,71 @@ class Amalgam:
|
|
|
729
737
|
self.gc()
|
|
730
738
|
|
|
731
739
|
return result
|
|
740
|
+
|
|
741
|
+
def clone_entity(
|
|
742
|
+
self,
|
|
743
|
+
handle: str,
|
|
744
|
+
clone_handle: str,
|
|
745
|
+
amlg_path: str = "",
|
|
746
|
+
persist: bool = False,
|
|
747
|
+
write_log: str = "",
|
|
748
|
+
print_log: str = ""
|
|
749
|
+
) -> bool:
|
|
750
|
+
"""
|
|
751
|
+
Clones entity specified by handle into a new entity specified by clone_handle.
|
|
752
|
+
|
|
753
|
+
Parameters
|
|
754
|
+
----------
|
|
755
|
+
handle : str
|
|
756
|
+
The handle of the amalgam entity to clone.
|
|
757
|
+
clone_handle : str
|
|
758
|
+
The handle to clone the entity into.
|
|
759
|
+
amlg_path : str, default ""
|
|
760
|
+
The path to store the filename.amlg/caml file. Only relevant if persist is True.
|
|
761
|
+
persist : bool, default False
|
|
762
|
+
If set to true, all transactions will trigger the entity to be
|
|
763
|
+
saved over the original source.
|
|
764
|
+
write_log : str, default ""
|
|
765
|
+
Path to the write log. If empty string, the write log is
|
|
766
|
+
not generated.
|
|
767
|
+
print_log : str, default ""
|
|
768
|
+
Path to the print log. If empty string, the print log is
|
|
769
|
+
not generated.
|
|
770
|
+
|
|
771
|
+
Returns
|
|
772
|
+
-------
|
|
773
|
+
bool
|
|
774
|
+
True if cloned successfully, False if not.
|
|
775
|
+
"""
|
|
776
|
+
self.amlg.CloneEntity.argtype = [
|
|
777
|
+
c_char_p, c_char_p, c_char_p, c_bool, c_char_p, c_char_p]
|
|
778
|
+
handle_buf = self.str_to_char_p(handle)
|
|
779
|
+
clone_handle_buf = self.str_to_char_p(clone_handle)
|
|
780
|
+
amlg_path_buf = self.str_to_char_p(amlg_path)
|
|
781
|
+
write_log_buf = self.str_to_char_p(write_log)
|
|
782
|
+
print_log_buf = self.str_to_char_p(print_log)
|
|
783
|
+
|
|
784
|
+
clone_command_log_entry = (
|
|
785
|
+
f'CLONE_ENTITY "{self.escape_double_quotes(handle)}" '
|
|
786
|
+
f'"{self.escape_double_quotes(clone_handle)}" '
|
|
787
|
+
f'"{self.escape_double_quotes(amlg_path)}" {str(persist).lower()} '
|
|
788
|
+
f'"{write_log}" "{print_log}"'
|
|
789
|
+
)
|
|
790
|
+
self._log_execution(clone_command_log_entry)
|
|
791
|
+
result = self.amlg.LoadEntity(
|
|
792
|
+
handle_buf, amlg_path_buf, persist,
|
|
793
|
+
write_log_buf, print_log_buf)
|
|
794
|
+
self._log_reply(result)
|
|
795
|
+
|
|
796
|
+
del handle_buf
|
|
797
|
+
del clone_handle_buf
|
|
798
|
+
del amlg_path_buf
|
|
799
|
+
del write_log_buf
|
|
800
|
+
del print_log_buf
|
|
801
|
+
self.gc()
|
|
802
|
+
|
|
803
|
+
return result
|
|
804
|
+
|
|
732
805
|
|
|
733
806
|
def store_entity(
|
|
734
807
|
self,
|
|
@@ -757,7 +830,9 @@ class Amalgam:
|
|
|
757
830
|
amlg_path_buf = self.str_to_char_p(amlg_path)
|
|
758
831
|
|
|
759
832
|
store_command_log_entry = (
|
|
760
|
-
f"STORE_ENTITY \"{handle}\"
|
|
833
|
+
f"STORE_ENTITY \"{self.escape_double_quotes(handle)}\" "
|
|
834
|
+
f"\"{self.escape_double_quotes(amlg_path)}\" "
|
|
835
|
+
f"{str(update_persistence_location).lower()} "
|
|
761
836
|
f"{str(store_contained).lower()}"
|
|
762
837
|
)
|
|
763
838
|
self._log_execution(store_command_log_entry)
|
|
@@ -784,13 +859,49 @@ class Amalgam:
|
|
|
784
859
|
self.amlg.DestroyEntity.argtype = [c_char_p]
|
|
785
860
|
handle_buf = self.str_to_char_p(handle)
|
|
786
861
|
|
|
787
|
-
self._log_execution(f"DESTROY_ENTITY \"{handle}\"")
|
|
862
|
+
self._log_execution(f"DESTROY_ENTITY \"{self.escape_double_quotes(handle)}\"")
|
|
788
863
|
self.amlg.DestroyEntity(handle_buf)
|
|
789
864
|
self._log_reply(None)
|
|
790
865
|
|
|
791
866
|
del handle_buf
|
|
792
867
|
self.gc()
|
|
793
868
|
|
|
869
|
+
def set_random_seed(
|
|
870
|
+
self,
|
|
871
|
+
handle: str,
|
|
872
|
+
rand_seed: str
|
|
873
|
+
) -> bool:
|
|
874
|
+
"""
|
|
875
|
+
Sets an entity's random seed.
|
|
876
|
+
|
|
877
|
+
Parameters
|
|
878
|
+
----------
|
|
879
|
+
handle : str
|
|
880
|
+
The handle of the amalgam entity.
|
|
881
|
+
rand_seed : str
|
|
882
|
+
A string representing the random seed to set.
|
|
883
|
+
|
|
884
|
+
Returns
|
|
885
|
+
-------
|
|
886
|
+
bool
|
|
887
|
+
True if the set was successful, false if not.
|
|
888
|
+
"""
|
|
889
|
+
self.amlg.SetRandomSeed.argtype = [c_char_p, c_char_p]
|
|
890
|
+
self.amlg.SetRandomSeed.restype = c_bool
|
|
891
|
+
|
|
892
|
+
handle_buf = self.str_to_char_p(handle)
|
|
893
|
+
rand_seed_buf = self.str_to_char_p(rand_seed)
|
|
894
|
+
|
|
895
|
+
self._log_execution(f'SET_RANDOM_SEED "{self.escape_double_quotes(handle)}"'
|
|
896
|
+
f'"{self.escape_double_quotes(rand_seed)}"')
|
|
897
|
+
result = self.amlg.SetRandomSeed(handle_buf, rand_seed)
|
|
898
|
+
self._log_reply(None)
|
|
899
|
+
|
|
900
|
+
del handle_buf
|
|
901
|
+
del rand_seed_buf
|
|
902
|
+
self.gc()
|
|
903
|
+
return result
|
|
904
|
+
|
|
794
905
|
def get_entities(self) -> List[str]:
|
|
795
906
|
"""
|
|
796
907
|
Get loaded top level entities.
|
|
@@ -843,7 +954,12 @@ class Amalgam:
|
|
|
843
954
|
json_buf = self.str_to_char_p(json)
|
|
844
955
|
|
|
845
956
|
self._log_time("EXECUTION START")
|
|
846
|
-
self._log_execution(
|
|
957
|
+
self._log_execution((
|
|
958
|
+
"EXECUTE_ENTITY_JSON "
|
|
959
|
+
f"\"{self.escape_double_quotes(handle)}\" "
|
|
960
|
+
f"\"{self.escape_double_quotes(label)}\" "
|
|
961
|
+
f"{json}"
|
|
962
|
+
))
|
|
847
963
|
result = self.char_p_to_bytes(self.amlg.ExecuteEntityJsonPtr(
|
|
848
964
|
handle_buf, label_buf, json_buf))
|
|
849
965
|
self._log_time("EXECUTION STOP")
|
|
@@ -1079,3 +1195,20 @@ class Amalgam:
|
|
|
1079
1195
|
f"call to amlg.GetConcurrencyTypeString() - returned: "
|
|
1080
1196
|
f"{amlg_concurrency_type}\n")
|
|
1081
1197
|
return amlg_concurrency_type
|
|
1198
|
+
|
|
1199
|
+
@staticmethod
|
|
1200
|
+
def escape_double_quotes(s: str) -> str:
|
|
1201
|
+
"""
|
|
1202
|
+
Get the string with backslashes preceeding contained double quotes.
|
|
1203
|
+
|
|
1204
|
+
Parameters
|
|
1205
|
+
----------
|
|
1206
|
+
s : str
|
|
1207
|
+
The input string.
|
|
1208
|
+
|
|
1209
|
+
Returns
|
|
1210
|
+
-------
|
|
1211
|
+
str
|
|
1212
|
+
The modified version of s with escaped double quotes.
|
|
1213
|
+
"""
|
|
1214
|
+
return s.replace('"', '\\"')
|
amalgam/lib/version.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": {
|
|
3
|
-
"amalgam": "48.
|
|
4
|
-
"amalgam_sha": "
|
|
5
|
-
"amalgam_url": "https://github.com/howsoai/amalgam/releases/tag/48.
|
|
3
|
+
"amalgam": "48.2.0",
|
|
4
|
+
"amalgam_sha": "fc26b24b0954ea87d8c4fde8ca0b58a17663c1ef",
|
|
5
|
+
"amalgam_url": "https://github.com/howsoai/amalgam/releases/tag/48.2.0",
|
|
6
6
|
"amalgam_build_date": "",
|
|
7
7
|
"amalgam_display_title": ""
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
amalgam/__init__.py,sha256=oHu7Zr4eGDUqj93pLwz8t7gLa8lpAx6Q-xbGiJ3nJx0,18
|
|
2
|
+
amalgam/api.py,sha256=10BFeXShtVxzacxfjBUoZzJBYS0vMf5qlle3jN4DD3M,40396
|
|
3
|
+
amalgam/lib/version.json,sha256=W8_nxG0KMVlaoO6ghUkU5iWbxNlJlGPv5s550on0tmg,250
|
|
4
|
+
amalgam/lib/windows/amd64/amalgam-mt-noavx.dll,sha256=cyxqMgYPnKHd3UmPbnFEwkqKBF5RZKUhKEA3CuHtSOY,2562560
|
|
5
|
+
amalgam/lib/windows/amd64/amalgam-mt.dll,sha256=1YlhbJjXMdcyEH2LnMmhL-5eVV8l_hSsXg2pryxFBKs,2504192
|
|
6
|
+
amalgam/lib/windows/amd64/amalgam-omp.dll,sha256=3ydyO1QyYa2RHZyj6JSuQCzpTisDFSPdYX4UYW_Jk0Q,2417664
|
|
7
|
+
amalgam/lib/windows/amd64/amalgam-st.dll,sha256=OGqXNDe8HIEK7cuyl7ENcyOS4EooeDNBNV1apqXhSEc,2416640
|
|
8
|
+
amalgam/lib/windows/amd64/docs/version.json,sha256=Sv3ShUvvQE-bPVCuBZ__2ryg4zcmJ7EIef2OgSQ5tdc,27
|
|
9
|
+
amalgam_lang-7.2.1.dist-info/LICENSE.txt,sha256=2xqHuoHohba7gpcZZKtOICRjzeKsQANXG8WoV9V35KM,33893
|
|
10
|
+
amalgam_lang-7.2.1.dist-info/METADATA,sha256=AGkhBcdFxn2Fr9vT6IuXrJp-Zx0ow6OwLIU5Mu3ygmY,43351
|
|
11
|
+
amalgam_lang-7.2.1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
12
|
+
amalgam_lang-7.2.1.dist-info/top_level.txt,sha256=rmPHU144SyaB25u5-FAQyECAQnJ39NvuJEcKXMRcdBo,8
|
|
13
|
+
amalgam_lang-7.2.1.dist-info/RECORD,,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
amalgam/__init__.py,sha256=oHu7Zr4eGDUqj93pLwz8t7gLa8lpAx6Q-xbGiJ3nJx0,18
|
|
2
|
-
amalgam/api.py,sha256=8DnZnEa9_qYg-zCz6_myus516bgpTwZHMhG5BFiyuBA,36170
|
|
3
|
-
amalgam/lib/version.json,sha256=vu5Je_Y8yHf8nGVI8YKMRsBHG-baoo1tN-UMtnqKbI4,250
|
|
4
|
-
amalgam/lib/windows/amd64/amalgam-mt-noavx.dll,sha256=rm7kxrlYYIh1K3F5tNqR3sfoFncv1dP5LnYRlTXJIDM,2563072
|
|
5
|
-
amalgam/lib/windows/amd64/amalgam-mt.dll,sha256=oPMYFgZm2beCUv90ZAZj32TSJMbGjBHAApik59rI_A8,2504192
|
|
6
|
-
amalgam/lib/windows/amd64/amalgam-omp.dll,sha256=nSwwfqlptwlGVwJwcKPFXU8BaFt5QNEEmRtGNR5ssFw,2418176
|
|
7
|
-
amalgam/lib/windows/amd64/amalgam-st.dll,sha256=PUWg-lVEg3r0veUN32XNhGCRAEiXpCvSj3Ftyaaxi0w,2417152
|
|
8
|
-
amalgam/lib/windows/amd64/docs/version.json,sha256=QHcXBkWxCce9TII-j2vzkJqmGnqGsLWJ6IPhwb_Zkf0,27
|
|
9
|
-
amalgam_lang-7.1.0.dist-info/LICENSE.txt,sha256=2xqHuoHohba7gpcZZKtOICRjzeKsQANXG8WoV9V35KM,33893
|
|
10
|
-
amalgam_lang-7.1.0.dist-info/METADATA,sha256=Sgdgv3y9YuVxZrV3cpK_MIeNZuv14NNuXzGf_ni7w6o,43351
|
|
11
|
-
amalgam_lang-7.1.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
12
|
-
amalgam_lang-7.1.0.dist-info/top_level.txt,sha256=rmPHU144SyaB25u5-FAQyECAQnJ39NvuJEcKXMRcdBo,8
|
|
13
|
-
amalgam_lang-7.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|