amalgam-lang 7.2.0__py3-none-win_amd64.whl → 8.0.0__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 CHANGED
@@ -664,10 +664,10 @@ class Amalgam:
664
664
  The handle to assign the entity.
665
665
  amlg_path : str
666
666
  The path to the filename.amlg/caml file.
667
- persist : bool
667
+ persist : bool, default False
668
668
  If set to true, all transactions will trigger the entity to be
669
669
  saved over the original source.
670
- load_contained : bool
670
+ load_contained : bool, default False
671
671
  If set to true, contained entities will be loaded.
672
672
  write_log : str, default ""
673
673
  Path to the write log. If empty string, the write log is
@@ -737,6 +737,71 @@ class Amalgam:
737
737
  self.gc()
738
738
 
739
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
+
740
805
 
741
806
  def store_entity(
742
807
  self,
@@ -801,6 +866,42 @@ class Amalgam:
801
866
  del handle_buf
802
867
  self.gc()
803
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
+
804
905
  def get_entities(self) -> List[str]:
805
906
  """
806
907
  Get loaded top level entities.
amalgam/lib/version.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": {
3
- "amalgam": "48.2.0",
4
- "amalgam_sha": "fc26b24b0954ea87d8c4fde8ca0b58a17663c1ef",
5
- "amalgam_url": "https://github.com/howsoai/amalgam/releases/tag/48.2.0",
3
+ "amalgam": "49.0.0",
4
+ "amalgam_sha": "af48bc36a3a041676746ec7359f89af828aab494",
5
+ "amalgam_url": "https://github.com/howsoai/amalgam/releases/tag/49.0.0",
6
6
  "amalgam_build_date": "",
7
7
  "amalgam_display_title": ""
8
8
  }
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "48.2.0"
2
+ "version": "49.0.0"
3
3
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: amalgam-lang
3
- Version: 7.2.0
3
+ Version: 8.0.0
4
4
  Summary: A direct interface with Amalgam compiled DLL or so.
5
5
  Author: Howso Incorporated
6
6
  Author-email: support@howso.com
@@ -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=D_0dEnv4QZ64AvvfAi9YRnVz-IwTFK1v3AQLcUbbdv0,250
4
+ amalgam/lib/windows/amd64/amalgam-mt-noavx.dll,sha256=5uQ_CQn5ZD3GzbXASSmDR6UbazWz_xm5SkuzUJiMBfc,2564096
5
+ amalgam/lib/windows/amd64/amalgam-mt.dll,sha256=nY85SzwS5kbHdEvgeJDPh4rRtNYS5zVwR7GboSUjOHQ,2505216
6
+ amalgam/lib/windows/amd64/amalgam-omp.dll,sha256=EskNLcWaRm2CnHFLOrXyraerCF1nFu000Xq3ZjcARFs,2419712
7
+ amalgam/lib/windows/amd64/amalgam-st.dll,sha256=HgXAsFVmlR-VHCriI5gOsn2sNK8x7xpJf4-u_20FLfY,2418176
8
+ amalgam/lib/windows/amd64/docs/version.json,sha256=cLcYqDfglyi16NQHydIWYUMvKuCEHG3q6HNw7SvWMKI,27
9
+ amalgam_lang-8.0.0.dist-info/LICENSE.txt,sha256=2xqHuoHohba7gpcZZKtOICRjzeKsQANXG8WoV9V35KM,33893
10
+ amalgam_lang-8.0.0.dist-info/METADATA,sha256=3Q5bn9YQNF4dKv_VNVjSYfeJdxH64lWxAYc2T_i_UHM,43351
11
+ amalgam_lang-8.0.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
12
+ amalgam_lang-8.0.0.dist-info/top_level.txt,sha256=rmPHU144SyaB25u5-FAQyECAQnJ39NvuJEcKXMRcdBo,8
13
+ amalgam_lang-8.0.0.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- amalgam/__init__.py,sha256=oHu7Zr4eGDUqj93pLwz8t7gLa8lpAx6Q-xbGiJ3nJx0,18
2
- amalgam/api.py,sha256=EKH3yK0Agpy6HtqtvzYvS5yVsNo7ICwrIwf31q2xM8w,37106
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.0.dist-info/LICENSE.txt,sha256=2xqHuoHohba7gpcZZKtOICRjzeKsQANXG8WoV9V35KM,33893
10
- amalgam_lang-7.2.0.dist-info/METADATA,sha256=ZZXB3klw6L3c5OqnVTyHNmidKLJTqje7AqgNXKb_IIk,43351
11
- amalgam_lang-7.2.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
12
- amalgam_lang-7.2.0.dist-info/top_level.txt,sha256=rmPHU144SyaB25u5-FAQyECAQnJ39NvuJEcKXMRcdBo,8
13
- amalgam_lang-7.2.0.dist-info/RECORD,,