pyfemtet 0.9.1__py3-none-any.whl → 0.9.3__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.

Potentially problematic release.


This version of pyfemtet might be problematic. Click here for more details.

pyfemtet/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.1"
1
+ __version__ = "0.9.3"
pyfemtet/opt/_femopt.py CHANGED
@@ -367,6 +367,12 @@ class FEMOpt:
367
367
 
368
368
  """
369
369
 
370
+ # ===== warning for v1.0 =====
371
+ if name is None:
372
+ logger.warning('From version 1.0, `name` will be the first required argument. '
373
+ 'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
374
+ '(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
375
+
370
376
  # 引数の処理
371
377
  if fun is None:
372
378
  from pyfemtet.opt.interface import SurrogateModelInterfaceBase
@@ -401,6 +407,13 @@ class FEMOpt:
401
407
  args: tuple or None = None,
402
408
  kwargs: dict or None = None,
403
409
  ):
410
+
411
+ # ===== warning for v1.0 =====
412
+ if names is None:
413
+ logger.warning('From version 1.0, `names` will be the first required argument. '
414
+ 'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
415
+ '(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
416
+
404
417
  from pyfemtet.opt._femopt_core import ObjectivesFunc
405
418
  components = ObjectivesFunc(fun, n_return)
406
419
 
@@ -493,6 +506,12 @@ class FEMOpt:
493
506
 
494
507
  """
495
508
 
509
+ # ===== warning for v1.0 =====
510
+ if name is None:
511
+ logger.warning('From version 1.0, `name` will be the first required argument. '
512
+ 'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
513
+ '(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
514
+
496
515
  # 引数の処理
497
516
  if args is None:
498
517
  args = tuple()
@@ -295,6 +295,9 @@ class Function:
295
295
 
296
296
  def __init__(self, fun, name, args, kwargs):
297
297
 
298
+ # ===== for 1.0 warning =====
299
+ self._shown = False
300
+
298
301
  # serializable でない COM 定数を parallelize するため
299
302
  # COM 定数を一度 _Scapegoat 型のオブジェクトにする
300
303
  # ParametricIF で使う dll 関数は _FuncPtr 型であって __globals__ を持たないが、
@@ -326,6 +329,15 @@ class Function:
326
329
  # Femtet 特有の処理
327
330
  if isinstance(fem, FemtetInterface):
328
331
  args = (fem.object_passed_to_functions, *args)
332
+ else:
333
+ # ===== for 1.0 warning =====
334
+ if not self._shown:
335
+ logger.warning('From version 1.0, an object associated with the Interface '
336
+ 'will be automatically passed as the first argument. '
337
+ 'For more details, please see https://pyfemtet.readthedocs.io/en/stable/pages/migration_to_v1.html. '
338
+ '(日本語版サイト; https://pyfemtet.readthedocs.io/ja/stable/pages/migration_to_v1.html)')
339
+ self._shown = True
340
+
329
341
  return float(self.fun(*args, **self.kwargs))
330
342
 
331
343
  def _restore_constants(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyfemtet
3
- Version: 0.9.1
3
+ Version: 0.9.3
4
4
  Summary: Design parameter optimization using Femtet.
5
5
  License: MIT
6
6
  Author: kazuma.naito
@@ -1,4 +1,4 @@
1
- pyfemtet/__init__.py,sha256=IFZntsHJ4ZDIbvSOZb10J0jAPQVPRVK5u-vM0niSiY4,21
1
+ pyfemtet/__init__.py,sha256=JUZXna98GGKqIaGzy667oH6Fxea9i3j-qiIDSs2sK8c,21
2
2
  pyfemtet/_femtet_config_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pyfemtet/_femtet_config_util/autosave.py,sha256=dNirA9XGuFehas8_Jkj2BW9GOzMbPyhnt1WHcH_ObSU,2070
4
4
  pyfemtet/_femtet_config_util/exit.py,sha256=0BWID-tjOkmZwmgPFkcJMkWW39voccz5ARIBWvZbHaw,1877
@@ -24,8 +24,8 @@ pyfemtet/dispatch_extensions/_impl.py,sha256=yH_yeAnQ-Xi9GfjX-FQt9u3yHnrLYIteRb6
24
24
  pyfemtet/logger/__init__.py,sha256=UOJ9n_U2xwdTrp0Xgg-N6geySxNzKqTBQlXsaH0kW_w,420
25
25
  pyfemtet/logger/_impl.py,sha256=rsAd0HpmveOaLS39ucp3U2OcDhQMWjC5fnVGhbJtWVw,6375
26
26
  pyfemtet/opt/__init__.py,sha256=wRR8LbEhb5I6MUgmnCgjB6-tqHlOVxDIo7yPkq0QbBs,758
27
- pyfemtet/opt/_femopt.py,sha256=MSqSJzyD2sRYBNQAe0P5rpSvvVihOV2ugUa-hZyYnBA,40671
28
- pyfemtet/opt/_femopt_core.py,sha256=zweGfu4DBr_aG0IPZHG09oQWcHLWU4EqcbQIHKAfs-4,40386
27
+ pyfemtet/opt/_femopt.py,sha256=_EmfBRzJlZHtQnNdgobkzxslcKBWN7jgSbJQaSx_kcg,41904
28
+ pyfemtet/opt/_femopt_core.py,sha256=HknVLJQlOI1Uau3DvbaL8a6dHa7wg5uVZIMQtw5U5tg,41016
29
29
  pyfemtet/opt/_test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  pyfemtet/opt/_test_utils/control_femtet.py,sha256=8oAl9y5V2n8Nnsgx_ebcZVzwFt1eI3swkdiKg6pg3-M,1085
31
31
  pyfemtet/opt/_test_utils/hyper_sphere.py,sha256=nQhw8EIY0DwvcTqrbKhkxiITLZifr4-nG77E-_6ggmA,700
@@ -150,9 +150,9 @@ pyfemtet/opt/visualization/result_viewer/.gitignore,sha256=ryvb4aqbbsHireHWlPQfx
150
150
  pyfemtet/opt/visualization/result_viewer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
151
  pyfemtet/opt/visualization/result_viewer/application.py,sha256=WcHBx_J5eNLKSaprpk9BGifwhO04oN8FiNGYTWorrXA,1691
152
152
  pyfemtet/opt/visualization/result_viewer/pages.py,sha256=MZAjzbuq0toZrR-iJhElM3A12_jHVCTt65gz1kdNPbw,32193
153
- pyfemtet-0.9.1.dist-info/LICENSE,sha256=LWUL5LlMGjSRTvsalS8_fFuwS4VMw18fJSNWFwDK8pc,1060
154
- pyfemtet-0.9.1.dist-info/LICENSE_THIRD_PARTY.txt,sha256=8_9-cgzTpmeuCqItPZb9-lyAZcH2Qp9sZTU_hYuOZIQ,191
155
- pyfemtet-0.9.1.dist-info/METADATA,sha256=R4H_SHSrvM6EC3_Al8s9Ef6roZ3SyiSxCraVUMyMyiI,3559
156
- pyfemtet-0.9.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
157
- pyfemtet-0.9.1.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
158
- pyfemtet-0.9.1.dist-info/RECORD,,
153
+ pyfemtet-0.9.3.dist-info/LICENSE,sha256=LWUL5LlMGjSRTvsalS8_fFuwS4VMw18fJSNWFwDK8pc,1060
154
+ pyfemtet-0.9.3.dist-info/LICENSE_THIRD_PARTY.txt,sha256=8_9-cgzTpmeuCqItPZb9-lyAZcH2Qp9sZTU_hYuOZIQ,191
155
+ pyfemtet-0.9.3.dist-info/METADATA,sha256=8tdHhKzryTvnOQB7wgI6l0kOJcAQBoIKeqYZA3cuDYY,3559
156
+ pyfemtet-0.9.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
157
+ pyfemtet-0.9.3.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
158
+ pyfemtet-0.9.3.dist-info/RECORD,,