Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
JMMC
jmmc-jmdcui-docker
Commits
9fd6534a
Commit
9fd6534a
authored
Jan 17, 2020
by
Guillaume Mella
Browse files
add rough support for star_info unknown_by_simbad
parent
458327cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
jmdc-ui/jmdc_app/models/star_info.py
View file @
9fd6534a
import
re
from
sqlalchemy
import
Column
,
Float
,
Index
,
Integer
,
String
from
sqlalchemy
import
Column
,
Float
,
Index
,
Integer
,
String
,
Boolean
from
sqlalchemy.ext.associationproxy
import
association_proxy
from
sqlalchemy.inspection
import
inspect
from
sqlalchemy.orm
import
relationship
...
...
@@ -81,7 +81,8 @@ class StarInfo(Base):
'NOTES'
:
{
'field'
:
'notes'
,
'must'
:
False
},
'BIBCODE'
:
{
'field'
:
'bibcode'
,
'must'
:
True
,
'check'
:
'check_bibcode'
,
'alternate'
:
'REFERENCE'
},
'COM'
:
{
'field'
:
'com'
,
'must'
:
False
,
'alternate'
:
'REFERENCE'
},
'REFERENCE'
:
{
'must'
:
False
,
'parse'
:
'parse_reference'
}
'REFERENCE'
:
{
'must'
:
False
,
'parse'
:
'parse_reference'
},
'UNKNOW_BY_SIMBAD'
:
{
'field'
:
'unknown_by_simbad'
,
'must'
:
False
},
},
'checks'
:
[
# here we should have names of methods to call that check object coherency
...
...
@@ -131,6 +132,7 @@ class StarInfo(Base):
notes
=
Column
(
String
(
255
))
bibcode
=
Column
(
String
(
19
))
com
=
Column
(
String
(
255
))
unknown_by_simbad
=
Column
(
Boolean
)
star_info_entry
=
relationship
(
'StarInfoEntry'
,
back_populates
=
'star_info'
)
submission
=
association_proxy
(
'star_info_entry'
,
'submission'
)
...
...
@@ -473,7 +475,10 @@ class StarInfo(Base):
elif
bc
:
self
.
append_error
(
'band'
,
'calculated band_code invalid
\'
%s
\'
'
%
(
repr
(
bc
)))
#
def
check_unknown_by_simbad
(
self
,
field_name
,
field_info
,
value
):
pass
#
# header parsing function
#
...
...
jmdc-ui/jmdc_app/templates/jmdc_catalog.jinja2
View file @
9fd6534a
...
...
@@ -17,6 +17,7 @@
<th>notes</th>
<th>bibcode</th>
<th>com</th>
<th>simbad</th>
</tr>
</thead>
<tbody>
...
...
@@ -35,6 +36,7 @@
<td>{{star.notes}}</td>
<td>{{star.bibcode}}</td>
<td>{{star.com}}</td>
<td>{{star.unknown_by_simbad}}</td>
</tr>
{% endif %}
{% endfor %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment