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 ADR and AF to API #3359

Closed
10 tasks done
lbeaufort opened this issue Sep 4, 2018 · 4 comments · Fixed by #3365
Closed
10 tasks done

Add ADR and AF to API #3359

lbeaufort opened this issue Sep 4, 2018 · 4 comments · Fixed by #3365
Assignees
Milestone

Comments

@lbeaufort
Copy link
Member

lbeaufort commented Sep 4, 2018

From @vrajmohan:

ADRs and AFs are similar to MURs in may respects:

  • they have a similar but simpler data structure
  • they are available in the same Postgres DB

This task is to:

  • retrieve ADRs and AFs from Postgres
  • load any attached documents into S3
  • index the ADRs and AFs in Elasticsearch

Most of the design and code for MURs can be reused here.

Developer testing

  • Take a backup of dev
  • Take a baseline load test of dev
  • Add ADR/AF locust tests
  • Reload legal docs: cf run-task api "python manage.py initialize_current_legal_docs" -m 4G --name reinit-legal-docs
  • Re-load test dev with a manual deploy
  • Test front-end legal search on dev with manual deploy
  • Make a follow-up ticket for:
    • backing up dev after merge/reload
    • and backing up, reloading legal docs, and backing up again on stage and prod
@qqss88
Copy link
Contributor

qqss88 commented Sep 7, 2018

steps:

  1. define how the ADR and AF docs look like: which fields need to be included
  2. define doc type mapping file and add them to ./webservices/legal_docs/index_management.py
  3. query database, build ADR and AF doc, index it, refer to:
    ./webservices/legal_docs/current_murs.py

it is 'one doc build, one doc injected' indexing approach.

@lbeaufort
Copy link
Member Author

Tracking fields here: https://docs.google.com/spreadsheets/d/1i8GeWHEeTzt3jdN3RZg3wKA_dSq2J-6CR5JGtq6G2nQ/edit#gid=0

MUR fields - classic

screen shot 2018-09-07 at 11 16 26 am

ADR fields - classic

screen shot 2018-09-07 at 11 14 53 am

Admin Fine fields - classic

screen shot 2018-09-07 at 11 14 38 am

@qqss88
Copy link
Contributor

qqss88 commented Sep 7, 2018

those are the fields from the af_case table:
{
"case_id": "46000000003307",
"af_number_rad": "3307",
"case_number": "3307",
"committee_id": "C00612861",
"report_year": "2016",
"report_type": "YE",
"rtb_action_date": "2017-04-03 00:00:00",
"rtb_fine_amount": "3751",
"chal_receipt_date": "",
"chal_outcome_code_desc": "",
"fd_date": "2017-07-13 00:00:00",
"fd_final_fine_amount": "0",
"check_amount": "3751",
"treasury_date": "",
"treasury_amount": "",
"petition_court_filing_date": "",
"petition_court_decision_date": "",
"action_date": "",
"af_category": "",
"title": "",
"meeting_type": "",
"action": "",
"vote_result": "",
"commissioner_1": "",
"commissioner_1_vote": "",
"commissioner_2": "",
"commissioner_2_vote": "",
"commissioner_3": "",
"commissioner_3_vote": "",
"commissioner_4": "",
"commissioner_4_vote": "",
"commissioner_5": "",
"commissioner_5_vote": "",
"commissioner_6": "",
"commissioner_6_vote": "",
"pg_date": "2017-08-16 08:45:27.770891"
}

@lbeaufort
Copy link
Member Author

Thanks, @qqss88! My WIP PR is here: #3365

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 a pull request may close this issue.

3 participants