transientskp / tkp

A transients-discovery pipeline for astronomical image-based surveys
http://docs.transientskp.org/
BSD 2-Clause "Simplified" License
19 stars 14 forks source link

Fixes SAWarning #597 #613

Closed HannoSpreeuw closed 1 year ago

HannoSpreeuw commented 1 year ago

This is removal of line 337 in model.py:

    extractedsources = relationship('Extractedsource',
                                    secondary='assocxtrsource',
                                    backref='runningcatalogs')

This in fact issues two relationships which may be redundant given line 311:

    xtrsrc = relationship('Extractedsource',
                          primaryjoin='Runningcatalog.xtrsrc_id == Extractedsource.id',
                          backref=backref('extractedsources', cascade="all,delete"))

This fixes #597, please read that discussion.

AntoniaR commented 1 year ago

I've just been taking a look at this issue but it's failing a lot of the database tests for me when I use runtests.py. Did you see similar problems or is it just my set up?

HannoSpreeuw commented 1 year ago

I guess it must be a set up setting.....I just ran python runtests.py -v to check this. That does not yield any errors using this Fix_SAWarning_copying_to_the_same_column_by_two_relationships branch. Using Python 3.10.

AntoniaR commented 1 year ago

Ok, I'm confused why the tests are not working for me. But, as it is an issue with my setup rather than TraP let's get this pull request merged.