Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""add total fluxes

Check warning

Code scanning / Pylint (reported by Codacy)

Module name "20250505-162126_fc8ea63b8c9d_add_total_fluxes" doesn't conform to snake_case naming style Warning

Module name "20250505-162126_fc8ea63b8c9d_add_total_fluxes" doesn't conform to snake_case naming style

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Module name "20250505-162126_fc8ea63b8c9d_add_total_fluxes" doesn't conform to snake_case naming style Warning

Module name "20250505-162126_fc8ea63b8c9d_add_total_fluxes" doesn't conform to snake_case naming style

Revision ID: fc8ea63b8c9d
Revises: 5b40ed8dcd48
Create Date: 2025-05-05 16:21:26.652825

"""
from alembic import op

Check warning

Code scanning / Pylint (reported by Codacy)

No name 'op' in module 'alembic' Warning

No name 'op' in module 'alembic'
import sqlalchemy as sa

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'sqlalchemy' (import-error) Warning

Unable to import 'sqlalchemy' (import-error)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

third party import "import sqlalchemy as sa" should be placed before "from alembic import op" Warning

third party import "import sqlalchemy as sa" should be placed before "from alembic import op"


# revision identifiers, used by Alembic.
revision = 'fc8ea63b8c9d'

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "revision" doesn't conform to UPPER_CASE naming style Warning

Constant name "revision" doesn't conform to UPPER_CASE naming style

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Constant name "revision" doesn't conform to UPPER_CASE naming style Warning

Constant name "revision" doesn't conform to UPPER_CASE naming style
down_revision = '5b40ed8dcd48'

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "down_revision" doesn't conform to UPPER_CASE naming style Warning

Constant name "down_revision" doesn't conform to UPPER_CASE naming style

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Constant name "down_revision" doesn't conform to UPPER_CASE naming style Warning

Constant name "down_revision" doesn't conform to UPPER_CASE naming style
branch_labels = None

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "branch_labels" doesn't conform to UPPER_CASE naming style Warning

Constant name "branch_labels" doesn't conform to UPPER_CASE naming style

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Constant name "branch_labels" doesn't conform to UPPER_CASE naming style Warning

Constant name "branch_labels" doesn't conform to UPPER_CASE naming style
depends_on = None

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "depends_on" doesn't conform to UPPER_CASE naming style Warning

Constant name "depends_on" doesn't conform to UPPER_CASE naming style

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Constant name "depends_on" doesn't conform to UPPER_CASE naming style Warning

Constant name "depends_on" doesn't conform to UPPER_CASE naming style


def upgrade():

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('target', sa.Column('total_flux_g', sa.Float(), nullable=True, comment='g-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_r', sa.Float(), nullable=True, comment='r-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_i', sa.Float(), nullable=True, comment='i-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_z', sa.Float(), nullable=True, comment='z-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_y', sa.Float(), nullable=True, comment='y-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_j', sa.Float(), nullable=True, comment='J band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
op.add_column('target', sa.Column('total_flux_error_g', sa.Float(), nullable=True, comment='Error in g-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_r', sa.Float(), nullable=True, comment='Error in r-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_i', sa.Float(), nullable=True, comment='Error in i-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_z', sa.Float(), nullable=True, comment='Error in z-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_y', sa.Float(), nullable=True, comment='Error in y-band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_j', sa.Float(), nullable=True, comment='Error in J band total flux (nJy)'))

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
# ### end Alembic commands ###


def downgrade():

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('target', 'total_flux_error_j')
op.drop_column('target', 'total_flux_error_y')
op.drop_column('target', 'total_flux_error_z')
op.drop_column('target', 'total_flux_error_i')
op.drop_column('target', 'total_flux_error_r')
op.drop_column('target', 'total_flux_error_g')
op.drop_column('target', 'total_flux_j')
op.drop_column('target', 'total_flux_y')
op.drop_column('target', 'total_flux_z')
op.drop_column('target', 'total_flux_i')
op.drop_column('target', 'total_flux_r')
op.drop_column('target', 'total_flux_g')
# ### end Alembic commands ###
Binary file added diagrams/erdiagram_targetdb-20250506094125.pdf
Binary file not shown.
202 changes: 102 additions & 100 deletions docs/reference/cli.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/schema/target.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ Here are the columns in the `target` table:
| psf_flux_error_z | float | Error in PSF flux in _z_-band | nJy | (\*) | |
| psf_flux_error_y | float | Error in PSF flux in _y_-band | nJy | (\*) | |
| psf_flux_error_j | float | Error in PSF flux in _j_-band | nJy | (\*) | |
| total_flux_g | float | Total flux in _g_-band | nJy | (\*) | |
| total_flux_r | float | Total flux in _r_-band | nJy | (\*) | |
| total_flux_i | float | Total flux in _i_-band | nJy | (\*) | |
| total_flux_z | float | Total flux in _z_-band | nJy | (\*) | |
| total_flux_y | float | Total flux in _y_-band | nJy | (\*) | |
| total_flux_j | float | Total flux in _j_-band | nJy | (\*) | |
| total_flux_error_g | float | Error in total flux in _g_-band | nJy | (\*) | |
| total_flux_error_r | float | Error in total flux in _r_-band | nJy | (\*) | |
| total_flux_error_i | float | Error in total flux in _i_-band | nJy | (\*) | |
| total_flux_error_z | float | Error in total flux in _z_-band | nJy | (\*) | |
| total_flux_error_y | float | Error in total flux in _y_-band | nJy | (\*) | |
| total_flux_error_j | float | Error in total flux in _j_-band | nJy | (\*) | |
| filter_g | str | Photometric band used to measure the PSF flux in _g_-band | | (\*) | |
| filter_r | str | Photometric band used to measure the PSF flux in _r_-band | | (\*) | |
| filter_i | str | Photometric band used to measure the PSF flux in _i_-band | | (\*) | |
Expand Down
Loading