-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. Note documentation
|
||
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. Note documentation
| 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. Note documentation
| 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. Note documentation
|
||
""" | ||
|
||
import sqlalchemy as sa |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy' (import-error) Warning
@@ -593,16 +594,22 @@ | |||
help="Path to the data directory in the local machine", | |||
), | |||
] = ".", | |||
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) Warning
@@ -32,6 +39,7 @@ | |||
|
|||
# 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) Warning
#!/usr/bin/env python3 | ||
|
||
|
||
from sqlalchemy import ( |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy' (import-error) Warning
Integer, | ||
String, | ||
) | ||
from sqlalchemy.orm import backref, relationship |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy.orm' (import-error) Warning
# 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) Warning
There was a problem hiding this 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.
There was a problem hiding this 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.
user_pointing
tableis_user_pointing
column toinput_catalog
table