-
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
Tickets/obsproc 110 #104
Tickets/obsproc 110 #104
Conversation
- Added: `partner_id` column in the `proposal` column - Added: `partner.partner_id` and `proposal.partner_id` are related. - Added: `partner` table - Added: `example/data/partner.csv` - Added: alembic update file - Removed: "keck", "gemini", and "uh" from `proposal_category` values
- CLI code is modified to accommodate the possible path change. Older versions are not compatible
…ts_target_database into tickets/OBSPROC-110
|
||
Here are the columns in the `partner` table: | ||
|
||
| Column Name | Type | Description | 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 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
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.
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy' (import-error) Warning
sa.Column('partner_id', sa.Integer(), autoincrement=False, nullable=False, comment='Unique identifier of the partner'), | ||
sa.Column('partner_name', sa.String(), nullable=False, comment='Name of the partner (e.g., subaru, gemini, keck, and uh)'), | ||
sa.Column('partner_description', sa.String(), nullable=True, comment='Description of the partner'), | ||
sa.Column('created_at', sa.DateTime(), server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"), nullable=True, comment='The date and time in UTC when the record was created'), |
Check warning
Code scanning / Prospector (reported by Codacy)
line too long (184 > 159 characters) (E501) Warning
@@ -36,6 +36,7 @@ | |||
from .filter_name import filter_name # noqa E402 | |||
from .pfs_arm import pfs_arm # noqa E402 | |||
from .proposal_category import proposal_category # noqa E402 | |||
from .partner import partner # noqa E402 |
Check warning
Code scanning / Prospector (reported by Codacy)
Import "from .partner import partner" should be placed at the top of the module (wrong-import-position) Warning
@@ -0,0 +1,44 @@ | |||
#!/usr/bin/env python | |||
|
|||
from sqlalchemy import ( |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy' (import-error) Warning
Integer, | ||
String, | ||
) | ||
from sqlalchemy.orm import relationship |
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'sqlalchemy.orm' (import-error) Warning
@@ -0,0 +1,41 @@ | |||
"""add partner column in the proposal table and partner table |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Module name "20241220-145409_0b72e62efd44_add_partner_column_in_the_proposal_" doesn't conform to snake_case naming style Warning
|
||
""" | ||
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
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0b72e62efd44' |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Constant name "revision" doesn't conform to UPPER_CASE naming style Warning
|
||
# revision identifiers, used by Alembic. | ||
revision = '0b72e62efd44' | ||
down_revision = 'b68482e38606' |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Constant name "down_revision" doesn't conform to UPPER_CASE naming style Warning
# revision identifiers, used by Alembic. | ||
revision = '0b72e62efd44' | ||
down_revision = 'b68482e38606' | ||
branch_labels = None |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Constant name "branch_labels" doesn't conform to UPPER_CASE naming style Warning
@@ -0,0 +1,44 @@ | |||
#!/usr/bin/env python |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing module docstring Warning
from . import Base, comment_created_at, comment_updated_at, utcnow | ||
|
||
|
||
class partner(Base): |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Class name "partner" doesn't conform to PascalCase naming style Warning
from . import Base, comment_created_at, comment_updated_at, utcnow | ||
|
||
|
||
class partner(Base): |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Too few public methods (0/2) Warning
from . import Base, comment_created_at, comment_updated_at, utcnow | ||
|
||
|
||
class partner(Base): |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Missing class docstring Warning
@@ -307,7 +307,8 @@ | |||
outfile = os.path.join(output_dir, f"{sc_outprefix}-{time_string}.pdf") | |||
|
|||
comm = [ | |||
f"{os.path.join(config['schemacrawler']['SCHEMACRAWLERDIR'],'_schemacrawler/bin/schemacrawler.sh')}", | |||
f"{os.path.join(config['schemacrawler']['SCHEMACRAWLERDIR'],'bin/schemacrawler.sh')}", | |||
# f"{os.path.join(config['schemacrawler']['SCHEMACRAWLERDIR'],'_schemacrawler/bin/schemacrawler.sh')}", |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (115/100) Warning
Add
partner
information (subaru, keck, gemini, uh, etc.) toproposal
table.