terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
214 stars 82 forks source link

Renaming Database3 to Database, but creating API stubs #1674

Closed john-science closed 1 day ago

john-science commented 3 months ago

What is the change?

This PR nominally renames Database3 to Database. But, since that is a big API-breaking change, this PR also creates API stubs for database3.py to fully support the old name.

Why is the change being made?

Database3 was only ever meant to be a placeholder name, while ARMI made the switch from the old Database class to the new one. The name was supposed to be fixed ~6 years ago.


Checklist

john-science commented 3 months ago

Testing in all the downstream projects I can find, this is a pretty seamless change.

Since I preserved Database3 in the API, nearly everything works perfectly.

I only found one place where someone was doing a mock of Database3 directly in a unit test in a place where Database would be the new default. So, that one, ultra-specific unit test will need a one-line update.

john-science commented 1 day ago

This was about #1673

john-science commented 1 day ago

Too much time has passed, I will try to get to this PR again in August/September.

I still think this is a good idea.