Add user_pointing table to store custom pointing centers#103
Conversation
- 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.
|
|
||
| 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.
| | 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.
| | 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.
|
|
||
| """ | ||
|
|
||
| import sqlalchemy as sa |
Check warning
Code scanning / Prospector (reported by Codacy)
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)
|
|
||
| # 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)
| #!/usr/bin/env python3 | ||
|
|
||
|
|
||
| from sqlalchemy import ( |
Check warning
Code scanning / Prospector (reported by Codacy)
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)
| # 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)
There was a problem hiding this comment.
Pylintpython3 (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Pylint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
user_pointingtableis_user_pointingcolumn toinput_catalogtable