Closed flongford closed 4 years ago
Merging #16 into master will increase coverage by
0.13%
. The diff coverage is96.77%
.
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
+ Coverage 94.55% 94.68% +0.13%
==========================================
Files 34 35 +1
Lines 826 847 +21
Branches 98 101 +3
==========================================
+ Hits 781 802 +21
Misses 31 31
Partials 14 14
Impacted Files | Coverage Δ | |
---|---|---|
force_gromacs/gromacs_plugin.py | 100% <ø> (ø) |
:arrow_up: |
force_gromacs/api.py | 0% <0%> (ø) |
:arrow_up: |
...romacs/data_sources/simulation/simulation_model.py | 96% <100%> (+0.16%) |
:arrow_up: |
...romacs/pipeline/base_gromacs_simulation_builder.py | 96.15% <100%> (ø) |
|
force_gromacs/pipeline/i_simulation_builder.py | 100% <100%> (ø) |
|
.../data_sources/simulation/simulation_data_source.py | 96.87% <100%> (+1.04%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 20e4453...55b306c. Read the comment docs.
Happy to merge then, if you think we want to keep some methods as NotImplemented for now.
Sure - similar to some objects in the force-bdss
, the intention is for these objects to act as base classes for developers to implement. Do you think therefore it would be clearer to rename the class containing these methods to BaseGromacsSimulationBuilder
?
Happy to merge then, if you think we want to keep some methods as NotImplemented for now.
Sure - similar to some objects in the
force-bdss
, the intention is for these objects to act as base classes for developers to implement. Do you think therefore it would be clearer to rename the class containing these methods toBaseGromacsSimulationBuilder
?
Good question, I didn't think about it - I thought that the GromacsSimulationBuilder
is a ready to use class. How different can the NotImplemented methods be?
Happy to merge then, if you think we want to keep some methods as NotImplemented for now.
Sure - similar to some objects in the
force-bdss
, the intention is for these objects to act as base classes for developers to implement. Do you think therefore it would be clearer to rename the class containing these methods toBaseGromacsSimulationBuilder
?Good question, I didn't think about it - I thought that the
GromacsSimulationBuilder
is a ready to use class. How different can the NotImplemented methods be?
They have a fixed input / output signature, but otherwise are pretty generic - we could probably think of a better way to handle this using defaults but that might be out of the scope of the current PR
This PR introduces an option on the
SimulationDataSourceModel
class to overwrite any simulation data if it already exists on file. Consequently, a new check is performed before running the simulation to see whetherA
: an output data file already existsB
: theSimulationDataSourceModel
requires this data to be overwrittenIf
A
returnsFalse
, then a simulation is always performed.If
A
returnsTrue
, then a simulation will only be performed whenB
returnsTrue
also.Whilst implementing this check, we have refactored some of the required functionalities of
GromacsSimulationBuilder
into the new interface classISimualtionBuilder
. This can be considered a step towards obataining generic simulation classes for the BDSS, similar to #14.Change log:
SimulationDataSourceModel
class includesow_data
attributeISimulationBuilder
interface class requires subclasses to implement aget_results_path
method, which will define output file location for simulation data.GromacsSimulationBuilder
class now providesISimulationBuilder
class, and so can be queried to provide an output data file path before a simulation is performed.SimulationDataSource
class includes context manager block using_check_perform_simulation
method to return outcome ofA
andB
checks for anGromacsSimulationBuilder
instanceSimulationFactory
to be usable from the BDSS, since theSimulationDataSource
requires thecreate_simulation_builder
method to be implemented