Skip to content

Commit

Permalink
Merge pull request #141 from bessagroup/pr/1.3.2
Browse files Browse the repository at this point in the history
add overwrite run method to function
  • Loading branch information
mpvanderschelling authored Sep 7, 2023
2 parents fe359be + 3ed04e3 commit c2f4c78
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1
1.3.2
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
project = 'f3dasm'
author = 'Martin van der Schelling'
copyright = '2022, Martin van der Schelling'
version = '1.3.1'
release = '1.3.1'
version = '1.3.2'
release = '1.3.2'

# -- General configuration ----------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Operating System :: Microsoft :: Windows
Operating System :: POSIX :: Linux
Operating System :: MacOS
Expand Down
2 changes: 1 addition & 1 deletion src/f3dasm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#
# =============================================================================

__version__ = '1.3.1'
__version__ = '1.3.2'

# Log welcome message and the version of f3dasm
logger.info(f"Imported f3dasm (version: {__version__})")
Expand Down
6 changes: 3 additions & 3 deletions src/f3dasm/datageneration/datagenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
class DataGenerator:
"""Base class for a data generator"""

def pre_process() -> None:
def pre_process(self, **kwargs) -> None:
"""Function that handles the pre-processing"""
...
# raise NotImplementedError("No pre-process function implemented!")

def execute() -> None:
def execute(self, **kwargs) -> None:
"""Function that calls the FEM simulator the pre-processing"""
raise NotImplementedError("No execute function implemented!")

def post_process() -> None:
def post_process(self, **kwargs) -> None:
"""Function that handles the post-processing"""
...

Expand Down
3 changes: 3 additions & 0 deletions src/f3dasm/datageneration/functions/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def execute(self, design: Design) -> Design:
design['y'] = float(self(x).ravel())
return design

def run(self, design: Design) -> Design:
return self.execute(design)

def _retrieve_original_input(self, x: np.ndarray):
"""Retrieve the original input vector if the input is augmented
Expand Down

0 comments on commit c2f4c78

Please sign in to comment.