Skip to content

Comments

Add total flux columns#112

Merged
monodera merged 5 commits intomainfrom
tickets/OBSPROC-118
May 8, 2025
Merged

Add total flux columns#112
monodera merged 5 commits intomainfrom
tickets/OBSPROC-118

Conversation

@monodera
Copy link
Contributor

@monodera monodera commented May 6, 2025

  • total_flux_{g,r,i,z,y,j} and total_flux_error_{g,r,i,z,y,j} are added.
  • CLI tools now have --flux-type option for inserting target lists.
  • Documentation update.


"""
from alembic import op
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)
flux_type: Annotated[
FluxType,
typer.Option(
"--flux-type", help="Flux type for the flux standard star catalog."

Check warning

Code scanning / Prospector (reported by Codacy)

undefined name 'flux' (F821) Warning

undefined name 'flux' (F821)
flux_type: Annotated[
FluxType,
typer.Option(
"--flux-type", help="Flux type for the flux standard star catalog."

Check warning

Code scanning / Prospector (reported by Codacy)

syntax error in forward annotation 'Flux type for the flux standard star catalog.' (F722) Warning

syntax error in forward annotation 'Flux type for the flux standard star catalog.' (F722)
flux_type: Annotated[
FluxType,
typer.Option(
"--flux-type", help="Flux type for the flux standard star catalog."

Check warning

Code scanning / Prospector (reported by Codacy)

undefined name 'flux' (F821) Warning

undefined name 'flux' (F821)
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Pylintpython3 (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Pylint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Remark-lint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@@ -0,0 +1,50 @@
"""add total fluxes

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

"""
from alembic import op
import sqlalchemy as sa

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 / 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

# revision identifiers, used by Alembic.
revision = 'fc8ea63b8c9d'
down_revision = '5b40ed8dcd48'

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
# revision identifiers, used by Alembic.
revision = 'fc8ea63b8c9d'
down_revision = '5b40ed8dcd48'
branch_labels = None

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
op.add_column('target', sa.Column('total_flux_j', sa.Float(), nullable=True, comment='J band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_g', sa.Float(), nullable=True, comment='Error in g-band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_r', sa.Float(), nullable=True, comment='Error in r-band total flux (nJy)'))
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 / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

Line too long (131/100)
op.add_column('target', sa.Column('total_flux_error_g', sa.Float(), nullable=True, comment='Error in g-band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_r', sa.Float(), nullable=True, comment='Error in r-band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_i', sa.Float(), nullable=True, comment='Error in i-band total flux (nJy)'))
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 / 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)'))
op.add_column('target', sa.Column('total_flux_error_i', sa.Float(), nullable=True, comment='Error in i-band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_z', sa.Float(), nullable=True, comment='Error in z-band total flux (nJy)'))
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 / 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)'))
op.add_column('target', sa.Column('total_flux_error_z', sa.Float(), nullable=True, comment='Error in z-band total flux (nJy)'))
op.add_column('target', sa.Column('total_flux_error_y', sa.Float(), nullable=True, comment='Error in y-band total flux (nJy)'))
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 / Pylintpython3 (reported by Codacy)

Line too long (131/100) Warning

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


def downgrade():

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
@monodera monodera merged commit b670e70 into main May 8, 2025
12 checks passed
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.

1 participant