Skip to content

Commit

Permalink
Merge pull request #12 from ivoa-std/require-line-reference
Browse files Browse the repository at this point in the history
Now requiring line_reference.
  • Loading branch information
mmpcn authored Nov 21, 2024
2 parents e97364e + d8696f8 commit 6a42ebf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions LineTAP.tex
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ \subsection{Non-Use Cases}
\rowsep
\texttt{xsams\_uri} \hfil\break\ucd{meta.ref} & text & \raggedright A URI for a full XSAMS description of this line.\tabularnewline
\rowsep
\texttt{line\_reference} \hfil\break\ucd{meta.ref} & text & \raggedright Reference to the source of the line data; this could be a bibcode, a DOI, or a plain URI.\tabularnewline
\texttt{line\_reference} \hfil\break\ucd{meta.ref} & \textbf{text} & \raggedright Reference to the source of the line data; this could be a bibcode, a DOI, or a plain URI.\tabularnewline

% /GENERATED
\sptablerule
Expand Down Expand Up @@ -391,7 +391,9 @@ \section{Spectral Lines Table}\label{sect:quantities}
return exactly one transition, and it MUST be in XSAMS version 1.

\item \texttt{line\_reference} Information about the source of the line data,
like an URI, DOI or bibcode.
like an URI, DOI or bibcode. This is a mandatory column. Users should
have a guaranteed way of finding out where a piece of information came
from and where additional information is available.

\end{itemize}

Expand Down
10 changes: 5 additions & 5 deletions make-columns-table.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

import pyvo

NON_NULL_COLUMNS = {'title', 'vacuum_wavelength'}
NON_NULL_COLUMNS = {'title', 'vacuum_wavelength', 'line_reference'}
TYPE_MAP = {
("char", "*"): "text",
("int", ""): "integer",
("double", ""): "float",}


def e(tx):
"""returns tx with TeX's standard active (and other magic) characters
"""returns tx with TeX's standard active (and other magic) characters
escaped.
"""
return tx.replace("\\", "$\\backslash$"
Expand Down Expand Up @@ -49,7 +49,7 @@ def main():
for row in svc.run_sync("""
select column_name, description, unit, ucd, datatype, arraysize
from tap_schema.columns
where
where
table_name='casa_lines.line_tap'
and std=1
order by column_index"""):
Expand All @@ -61,8 +61,8 @@ def main():

parts.append("&")
parts.append(get_type(
row["datatype"],
row["arraysize"],
row["datatype"],
row["arraysize"],
row["column_name"] in NON_NULL_COLUMNS))

parts.append("&")
Expand Down

0 comments on commit 6a42ebf

Please sign in to comment.