Skip to content

check out warnings thrown by test_adding_data #133

Open
@kelle

Description

@kelle

the test_adding_data test throws a bunch of warnings which I don't know how to address. Also because I'm not quite sure of the purpose of this test.

tests/test_database.py::test_adding_data
astrotemplate-db/tests/test_database.py:59: 
SAWarning: relationship 'ModeledParameters.sources' will copy column Sources.source to column 
ModeledParameters.source, which conflicts with relationship(s): 'ModeledParameters.sources' 
(copies Sources.source to ModeledParameters.source), 'Sources.modeledparameters_collection' 
(copies Sources.source to ModeledParameters.source). If this is not the intention, consider if these 
relationships should be linked with back_populates, or if viewonly=True should be applied to one 
or more if they are read-only. For the less common case that foreign key constraints are partially 
overlapping, the orm.foreign() annotation can be used to isolate the columns that should be 
written towards.   
To silence this warning, add the parameter 'overlaps="modeledparameters_collection,sources"' 
to the 'ModeledParameters.sources' relationship. 
(Background on this warning at: https://sqlalche.me/e/20/qzyx) (This warning originated from the `configure_mappers()` process, which was invoked automatically in response to a user-initiated operation.)
    s = Sources(source="V4046 Sgr", ra_deg=273.54, dec_deg=-32.79, reference="Cohe03")

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions