Skip to content

Add user_pointing table to store custom pointing centers#103

Merged
monodera merged 4 commits into
mainfrom
tickets/OBSPROC-101
Oct 25, 2024
Merged

Add user_pointing table to store custom pointing centers#103
monodera merged 4 commits into
mainfrom
tickets/OBSPROC-101

Conversation

@monodera
Copy link
Copy Markdown
Contributor

  • user_pointing table
  • is_user_pointing column to input_catalog table
  • documentation update accordingly.

- Add `user_pointing` table containing `user_pointing_id`, `ppc_code`,
  `ppc_ra`, `ppc_dec`, `ppc_pa`, `ppc_resolution`, `ppc_priority`,
  `input_catalog_id`, `created_at`, and `updated_at`.
- The primary key is `user_pointing_id`.
- Relate to the `input_catalog` table by `input_catalog_id`.

- CLI tools are updated to make inserting ppc lists to the
  `user_pointing` table possible. One of `input_catalog_name`,
  `input_catalog_id`, and `upload_id` must be provided to make
  a back reference.

Here are the columns in the `user_pointing` table:

| Column Name | Type | Description | Unit | Required[^1] | Default |

Check notice

Code scanning / Remark-lint (reported by Codacy)

Warn when shortcut reference links are used.

[no-shortcut-reference-link] Use the trailing `[]` on reference links

Here are the columns in the `user_pointing` table:

| Column Name | Type | Description | Unit | Required[^1] | Default |

Check notice

Code scanning / Remark-lint (reported by Codacy)

Warn when references to undefined definitions are found.

[no-undefined-references] Found reference to undefined definition
| created_at | datetime | The date and time in UTC when the record was created. | | | |
| updated_at | datetime | The date and time in UTC when the record was last updated. | | | |

[^1]: Required when inserted by using the [CLI tool](../reference/cli.md) or equivalent functions.

Check notice

Code scanning / Remark-lint (reported by Codacy)

Warn when shortcut reference links are used.

[no-shortcut-reference-link] Use the trailing `[]` on reference links
| created_at | datetime | The date and time in UTC when the record was created. | | | |
| updated_at | datetime | The date and time in UTC when the record was last updated. | | | |

[^1]: Required when inserted by using the [CLI tool](../reference/cli.md) or equivalent functions.

Check notice

Code scanning / Remark-lint (reported by Codacy)

Warn when references to undefined definitions are found.

[no-undefined-references] Found reference to undefined definition

"""

import sqlalchemy as sa

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'sqlalchemy' (import-error)

Unable to import 'sqlalchemy' (import-error)
),
] = ".",
force: Annotated[bool, typer.Option("--force", help="Force download.")] = False,
force: Annotated[bool, typer.Option(help="Force download.")] = False,

Check warning

Code scanning / Prospector (reported by Codacy)

syntax error in forward annotation 'Force download.' (F722)

syntax error in forward annotation 'Force download.' (F722)

# from .proposal_grade import proposal_grade # noqa E402
from .input_catalog import input_catalog # noqa E402
from .user_pointing import user_pointing # noqa E402

Check warning

Code scanning / Prospector (reported by Codacy)

Import "from .user_pointing import user_pointing" should be placed at the top of the module (wrong-import-position)

Import "from .user_pointing import user_pointing" should be placed at the top of the module (wrong-import-position)
#!/usr/bin/env python3


from sqlalchemy import (

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'sqlalchemy' (import-error)

Unable to import 'sqlalchemy' (import-error)
Integer,
String,
)
from sqlalchemy.orm import backref, relationship

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'sqlalchemy.orm' (import-error)

Unable to import 'sqlalchemy.orm' (import-error)
# define relation
input_catalogs = relationship(input_catalog, backref=backref("user_pointing"))

def __init__(

Check warning

Code scanning / Prospector (reported by Codacy)

Too many arguments (11/5) (too-many-arguments)

Too many arguments (11/5) (too-many-arguments)
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI 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
Copy Markdown

@github-advanced-security github-advanced-security AI 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.

@monodera monodera merged commit 29cc1a2 into main Oct 25, 2024
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