SIMPLE-AstroDB / SIMPLE-db

BSD 3-Clause "New" or "Revised" License
11 stars 21 forks source link

Refactor ingest_spectral_types function #481

Open kelle opened 4 months ago

kelle commented 4 months ago

Should be just for one spectral type, not for a list of them.

Change:

n_added = 0
n_skipped = 0

to a flags dictionary with added and skipped keys.


flags = {'added': 0, 'skipped': 0}
if <added>:
    flags['added'] = 1
if <skipped>:
     flags['skipped]=1
...
return flags