armi icon indicating copy to clipboard operation
armi copied to clipboard

Change the name Database3 to Database

Open john-science opened this issue 1 year ago • 0 comments

This is a big, complex change that will have to be done in phases.

It is an unfortunate fluke of history that ARMI's database class is called Database3. This was meant to be a temporary name used during a transition.

But, obviously, this is a big, API-breaking change that will cause a ton of (trivial) code changes in ARMI and downstream. So, I would suggest a long, gradual transition:

  • [ ] Move database3.py to database.py, but create the stub file below in a new database3.py.
  • [ ] Slowly transition all code in ARMI and downstream to use Database (without the "3").
  • [ ] Eventually, add a DeprecationWarning in Database3.py
  • [ ] Finally, eventually, remove Database3 from ARMI.

Suggested stub file to ease our transition:

# database3.py
from armi.bookkeeping.db.database import *

class Database3(Database):
    pass

john-science avatar Mar 29 '24 16:03 john-science