eqasim-org / synpp

Synthetic population pipeline code for eqasim
http://www.eqasim.org
MIT License
18 stars 12 forks source link

Add *externals* support #67

Closed Nitnelav closed 2 years ago

Nitnelav commented 2 years ago

Here an implementation of https://github.com/eqasim-org/synpp/issues/66 It relies on the importlib.util.spec_from_file_location function to be able to replace a Module default source with another one external to the Python PATH.

Nitnelav commented 2 years ago

I'm working on fixing tests but I figured @sebhoerl could allready have suggestions/ideas/remarques based on that

Nitnelav commented 2 years ago

tests are working now. the trick is to cleanup sys.modules between tests to let the externals stuff work

sebhoerl commented 2 years ago

Nice! :) Can you just reset the version to the previous one? The idea is that we always keep the version at the last release and once we make a new release, we decide on the new number, depending on the changes, whether there were compatibility breaks, etc. (more or less https://semver.org/). If you want, we can directly make a release commit after.

Nitnelav commented 2 years ago

Yes no problem I forgot I did that, reverting back to 1.5...

Nitnelav commented 2 years ago

If you're happy with the change sure let's have a release :)