krischer / instaseis

Instant high-frequency seismograms from an AxiSEM database
http://instaseis.net
Other
49 stars 23 forks source link

Implement source time functions for force sources #49

Closed sstaehler closed 6 years ago

sstaehler commented 7 years ago

Opening this PR to trigger coverage tests.

krischer commented 7 years ago

This should already work, right? Can you still add an explicit test for this? It will not add any new coverage but better safe than sorry I guess.

CI failures are due to some code formatting things. This happens sometimes when flake8 is updated and it catches some new things. Feel free to also fix them in this branch. Otherwise I'll do it in the master.

krischer commented 6 years ago

These three are duplicated from the default source right? Could you pull them into a separate class and then just pull them in as mixins, e.g.

class Source(SourceOrReceiver, SourceTimeFunctionSource):
   ...

class ForceSource(SourceOrReceiver, SourceTimeFunctionSource):
   ...

I think this should work and would reduce code duplication.

krischer commented 6 years ago

Rebased on the latest master and test pass now.