-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding proponent version of csv export (#2209)
* Changes to show all survey results to superusers * removing hard coded values * fixing linting * splitting to seperate end points * fixing auth check * fixing linting * merging method in service * Handle no data error for graphs * adding new nodata component * adding new email for submission response * fixing linting and testing * Upgrades to Issue Tracking Table * removing try catch * Adding proponent version of csv export * fixing unit test
- Loading branch information
1 parent
9f90872
commit fa7f4d2
Showing
13 changed files
with
306 additions
and
70 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
met-api/migrations/versions/d9777850eb98_add_proponent_template.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""add_proponent_template | ||
Revision ID: d9777850eb98 | ||
Revises: 7ebd9ecfccdd | ||
Create Date: 2023-09-17 12:47:48.475329 | ||
""" | ||
from datetime import datetime | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'd9777850eb98' | ||
down_revision = '7ebd9ecfccdd' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
document_type = sa.Table( | ||
'generated_document_type', | ||
sa.MetaData(), | ||
sa.Column('id', sa.Integer), | ||
sa.Column('name', sa.String), | ||
sa.Column('description', sa.String), | ||
sa.Column('created_date', sa.DateTime, default=datetime.utcnow) | ||
) | ||
|
||
document_template = sa.Table( | ||
'generated_document_template', | ||
sa.MetaData(), | ||
sa.Column('id', sa.Integer), | ||
sa.Column('type_id', sa.Integer), | ||
sa.Column('hash_code', sa.String), | ||
sa.Column('extension', sa.String), | ||
sa.Column('created_date', sa.DateTime, default=datetime.utcnow) | ||
) | ||
|
||
op.bulk_insert(document_type, [ | ||
{'id': 3, 'name': 'proponent_comments_sheet', 'description': 'Comments export for proponent'} | ||
]) | ||
|
||
op.bulk_insert(document_template, [ | ||
{'id': 3, 'type_id': 3, 'hash_code': None, "extension": "xlsx"} | ||
]) | ||
op.execute('UPDATE generated_document_template SET hash_code = null where id = 1') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute('DELETE FROM document_type WHERE id = 3') | ||
op.execute('DELETE FROM document_template WHERE id = 3') | ||
# ### end Alembic commands ### |
Binary file added
BIN
+7.81 KB
met-api/src/met_api/generated_documents_carbone_templates/proponent_comments_sheet.xlsx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.