astrodbtoolkit / astrodbtoolkit/astrodb-template-db

check out warnings thrown by `test_adding_data`

Open
#133 0 comments 0 reactions 1 assignee Claimed by @dr-rodriguez View on GitHub
tests
Dominant language
Python
Stars
3
Forks
5
Avg merge
34m
Merged PRs (30d)
2

Description

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.

``` python
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")
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.