Skip to content

Commit

Permalink
new pd table for grants (monthly)
Browse files Browse the repository at this point in the history
  • Loading branch information
RabiaSajjad committed Oct 29, 2024
1 parent 7986755 commit 705d005
Show file tree
Hide file tree
Showing 6 changed files with 860 additions and 1 deletion.
26 changes: 26 additions & 0 deletions bin/filter/filter_grants_monthly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"filter for grantsmonthly.csv"

import csv
import sys

REMOVE_COLUMNS = [
'record_created',
'record_modified',
'user_modified',
]

def main():
reader = csv.DictReader(sys.stdin)
outnames = [f for f in reader.fieldnames if f not in REMOVE_COLUMNS]
writer = csv.DictWriter(sys.stdout, outnames)
writer.writeheader()
for row in reader:
try:
for rem in REMOVE_COLUMNS:
del row[rem]
writer.writerow(row)
except ValueError:
pass

main()
1 change: 1 addition & 0 deletions ckanext/canada/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ def update_config(self, config):
ckanext.canada:tables/contracts.yaml
ckanext.canada:tables/contractsa.yaml
ckanext.canada:tables/grants.yaml
ckanext.canada:tables/grantsmonthly.yaml
ckanext.canada:tables/hospitalityq.yaml
ckanext.canada:tables/reclassification.yaml
ckanext.canada:tables/travela.yaml
Expand Down
Loading

0 comments on commit 705d005

Please sign in to comment.