Skip to content
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

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

monodera
Copy link
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. Note documentation

[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. Note documentation

[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. Note documentation

[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. Note documentation

[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) Warning

Unable to import 'sqlalchemy' (import-error)
@@ -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

syntax error in forward annotation 'Force download.' (F722)
@@ -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

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) Warning

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) Warning

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) Warning

Too many arguments (11/5) (too-many-arguments)
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.

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