CWorthy-ocean / C-Star

5 stars 3 forks source link

Repr displays incorrect checkout_target #13

Open TomNicholas opened 1 month ago

TomNicholas commented 1 month ago
roms_base_model=cstar.ROMSBaseModel(
     source_repo='https://github.com/dafyddstephenson/ucla-roms.git',
     checkout_target='main',
)
ROMSBaseModel object 
---------------------
source_repo = https://github.com/dafyddstephenson/ucla-roms.git
checkout_target = marbl_improvements_20240611 corresponding to hash 27a31e29f1126a6fcf2675a032655acde4487d6e
local_config_status=3 (Environment variable ROMS_ROOT is not present and it is assumed the base model is not installed locally)

There are a few problems with this:

dafyddstephenson commented 1 month ago

I cannot reproduce this problem, can you run that line from a clean import and see if it still happens? I agree we should revisit the repr functions which are all just set equal to str currently so if the checkout_target problem is fixed lmk and I'll close this and open a specific repr-related issue.

TomNicholas commented 4 weeks ago

I'm struggling to reproduce this now as well. I hesitate to say that because I can't easily reproduce it the bug doesn't exist though... It might get fixed by fixing https://github.com/CWorthy-ocean/C-Star/issues/27.

I'll open another issue to track improvements to the repr (#29), and leave this one open until we feel more confident that we are protected against this bug (right now we neither explicitly make that property read-only nor explicitly test that this bug doesn't exist).