Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Duplicated #150

Merged
merged 4 commits into from
Jun 13, 2022
Merged

Duplicated #150

merged 4 commits into from
Jun 13, 2022

Conversation

emthompson-usgs
Copy link
Member

Duplicated code is no good very bad.

impactutils hosts the rupture package because it is needed by other applicantions than shakemap; it also includes the distance module. These edits bring the impactutils code up to date with shakemap so that we can remove the dupclicated code in shakelib.

Note that this also updates the unit tests for rupture and distsance in impactutils and so they should be removed from shakemap. There are some exceptions:

  • test_rupture_depth in rupture_test.py must stay in shakemap because it uses maptio.
  • test_exceptions, test_distance_no_rupture, test_distance_from_sites_origin in distance_test.py because they use Sites
  • test_EdgeRupture_vs_QuadRupture in rupture_distance_tests.py because it uses Sites

I also had to move tensor.py from strec into impactutils because it is used by origin.py.

This also fixes the pandas future warning about append (closees #149). @gferragu, note that there is no concat method for a dataframe, it is a pandas method and the solution here is newdf = pd.concat([newdf, tdf]).

@mhearne-usgs mhearne-usgs merged commit 3e538f6 into usgs:master Jun 13, 2022
@emthompson-usgs emthompson-usgs deleted the duplicated branch June 13, 2022 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants