-
Notifications
You must be signed in to change notification settings - Fork 16
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
Adjust models and views for LA Metro Councilmatic upgrade #260
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b1799be
adjust models and views for la metro councilmatic upgrade
fgregg 9ebd122
fixes for la_metro upgrade
fgregg 85e518a
complicated document model we didn't use
fgregg 3c6b164
Revert "complicated document model we didn't use"
hancush 6ddf2a0
Add back BillDocument – need to preserve full_text for search indexes
hancush 4426220
Revert "Add back BillDocument – need to preserve full_text for search…
fgregg f82b8aa
update minimum req for ocd
fgregg b859eae
adjustments for tests
fgregg 1e0c9e2
convert attachment to extras fulltext on billdoc
fgregg 169476c
perfect updated bill docs
fgregg 2c704a2
Handle exception due to missing encoding
hancush 82fbebb
Merge branch 'la_metro_accomodations' of https://github.com/datamade/…
hancush e6e4d59
Handle yet another encoding issue
hancush ea5cfb1
Remove BillDocument subclass, including migration
hancush 905bc10
Fix reference to primary sponsor
hancush ad40906
Continue removal of BillDocument
hancush d6fd581
Install opencivicdata from commit for tests
hancush 8986373
flake it up, baby
hancush 313c193
Default to trying to convert all bill documents without full text
hancush 6d56777
Add last_action_date
hancush 289d629
Set Bill.last_action_date on OCD Bill and Event save
hancush e7f1cbd
Merge pull request #264 from datamade/feature/hec/cache-last-action-date
hancush 834b7d8
Use model alias
hancush d5fc001
Explicitly install library to extract text from Powerpoints
hancush 6ec2e61
Take a whack at fixing convert_attachment_text
hancush 08170a9
Bump PostGIS
hancush 97178af
Add back detailed exception handling to convert_attachment_text
hancush 40e1e28
Bump both Postgres and Postgis
hancush 2809dd7
Log non-fatal exceptions as warnings
hancush 3e473ab
Try this version thing again
hancush 315e4e1
Bump Postgres one more minor version
hancush 6ac158c
Don't reference a variable that doesn't exist
hancush fdce528
Only save the councilmatic bill when updating last_action_date
hancush 9ec80db
Merge pull request #265 from datamade/patch/hec/fix-signal
hancush 0a03a62
Omit event related entities that are not associated with a bill in po…
hancush 73b2960
Remove manual installation of OCD
hancush 6a8972c
Pin opencivicdata to >= 3.1 (release that adds extras to BillDocument)
hancush 709be4a
Remove outdated information on team
hancush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 2.1.14 on 2019-11-14 19:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('councilmatic_core', '0048_post_shape'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='membership', | ||
options={'base_manager_name': 'objects'}, | ||
), | ||
migrations.AlterField( | ||
model_name='bill', | ||
name='slug', | ||
field=models.SlugField(unique=True), | ||
), | ||
migrations.AlterField( | ||
model_name='event', | ||
name='slug', | ||
field=models.SlugField(max_length=200, unique=True), | ||
), | ||
migrations.AlterField( | ||
model_name='organization', | ||
name='slug', | ||
field=models.SlugField(max_length=200, unique=True), | ||
), | ||
migrations.AlterField( | ||
model_name='person', | ||
name='slug', | ||
field=models.SlugField(unique=True), | ||
), | ||
] |
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,16 @@ | ||
# Generated by Django 2.2.9 on 2020-01-17 21:30 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('councilmatic_core', '0049_auto_20191114_1142'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='BillDocument', | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
councilmatic_core/migrations/0051_bill_last_action_date.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,18 @@ | ||
# Generated by Django 2.2.9 on 2020-01-30 19:03 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('councilmatic_core', '0050_remove_billdocument'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='bill', | ||
name='last_action_date', | ||
field=models.DateTimeField(blank=True, null=True), | ||
), | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For next week: Running this command without the all documents flag results in nothing being converted, because we query for documents that were updated after the max, which isn't possible. Also, since we're looking at the update timestamp on the bill, I'm not sure it's true that all bills from the same import have the same update timestamp. We may be better off doing something like converting everything updated in the last hour or two by default.
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.
the way the scraper importer will work is if a bill document is updated it, will delete and recreate the bill document.
So we don't need to check timestamps, we can just check to see if
full_text
is not set onextras
and it should be.