Skip to content

Commit

Permalink
change classifications
Browse files Browse the repository at this point in the history
  • Loading branch information
twentyforty committed Dec 19, 2021
1 parent e5c6563 commit 9b1dc73
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 2 deletions.
2 changes: 2 additions & 0 deletions local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OS_PEOPLE_DIRECTORY=/Users/alyibrahim/projects/civiqa/backend/openstates/people
DATABASE_URL=postgres://alyibrahim:42571allahis1@localhost:5432/civiqa-db
1 change: 1 addition & 0 deletions openstates/data/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
("party", "Party"),
("committee", "Committee"),
("government", "Government"),
("subcommittee", "Subcommittee"),
)
ORGANIZATION_CLASSIFICATIONS = _keys(ORGANIZATION_CLASSIFICATION_CHOICES)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-11-19 11:53

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0044_bill_citations'),
]

operations = [
migrations.AlterField(
model_name='organization',
name='classification',
field=models.CharField(blank=True, choices=[('legislature', 'Legislature'), ('executive', 'Executive'), ('upper', 'Upper Chamber'), ('lower', 'Lower Chamber'), ('party', 'Party'), ('committee', 'Committee'), ('government', 'Government'), ('subcommittee', 'Subcommittee')], help_text='The type of Organization being defined.', max_length=100),
),
]
18 changes: 18 additions & 0 deletions openstates/data/migrations/0046_alter_bill_citations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-11-26 18:27

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0045_alter_organization_classification'),
]

operations = [
migrations.AlterField(
model_name='bill',
name='citations',
field=models.JSONField(blank=True, default=dict, null=True),
),
]
18 changes: 18 additions & 0 deletions openstates/data/migrations/0047_alter_bill_citations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.8 on 2021-12-07 14:24

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0046_alter_bill_citations'),
]

operations = [
migrations.AlterField(
model_name='bill',
name='citations',
field=models.JSONField(blank=True, default=dict),
),
]
4 changes: 2 additions & 2 deletions openstates/scrape/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
if modname is None:
self.scrape_output_handler = None
else:
handler = importlib.import_module(modname)
handler = importlib.import_module(modname)
self.scrape_output_handler = handler.Handler(self)

def save_object(self, obj):
Expand All @@ -125,7 +125,7 @@ def save_object(self, obj):

filename = "{0}_{1}.json".format(obj._type, obj._id).replace("/", "-")

self.info("save %s %s as %s", obj._type, obj, filename)
# self.info("save %s %s as %s", obj._type, obj, filename)
self.debug(
json.dumps(
OrderedDict(sorted(obj.as_dict().items())),
Expand Down

0 comments on commit 9b1dc73

Please sign in to comment.