Skip to content

Conversation

@kaseyLee123
Copy link

No description provided.

@kaseyLee123 kaseyLee123 marked this pull request as draft November 27, 2025 00:10
@kaseyLee123 kaseyLee123 marked this pull request as ready for review November 27, 2025 00:46
@kelle
Copy link
Contributor

kelle commented Dec 2, 2025

Please update to reflect the new load_db_from_json and read_db_from_file functions which are intended to replace load_astrodb. (update this branch with main to see the latest changes!) https://astrodb-utils.readthedocs.io/en/stable/pages/api.html#module-astrodb_utils.loaders

Comment on lines +25 to +27
ra_col_name="ra",
dec_col_name="dec",
epoch_col_name="epoch",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will not always be needed and are specific to SIMPLE. maybe add a note (https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-note) that includes these SIMPLE-specific arguments.

ingest_source(
db,
source=source["NAME"],
reference=reference[1],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reference variable is not defined in this example. Maybe change to source["reference"]?

However, only few ingest functions exist, namely for sources, names, and instruments.
Therefore, if your data fits into one of these categories, it is recommended to use the existing functions.

Below is an example of how to use the `ingest_source` function to ingest source data into the database:
Copy link
Contributor

@kelle kelle Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link directly to the API documentation for the ingest_source function.
:py:function:ingest_source

with db.engine.connect() as conn:
conn.execute(
db.ModeledParameters.insert().values(
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make into a dictonary and then pass the dictionary to the insert method. Similar to https://astrodbkit.readthedocs.io/en/latest/#adding-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants