-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1744 from laws-africa/gazette-improvements
Gazette improvements
- Loading branch information
Showing
21 changed files
with
375 additions
and
121 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# flake8: noqa | ||
from .adapters import * | ||
from .base import * | ||
from .gazettes import * | ||
from .indigo import * |
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,34 @@ | ||
class Adapter: | ||
def __init__(self, settings): | ||
self.settings = settings | ||
self.predicates = { | ||
"amended-by": { | ||
"name": "amended by", | ||
"verb": "is amended by", | ||
"reverse_verb": "amends", | ||
}, | ||
"repealed-by": { | ||
"name": "repealed by", | ||
"verb": "is repealed by", | ||
"reverse_verb": "repeals", | ||
}, | ||
"commenced-by": { | ||
"name": "commenced by", | ||
"verb": "is commenced by", | ||
"reverse_verb": "commences", | ||
}, | ||
} | ||
|
||
def check_for_updates(self, last_refreshed): | ||
"""Checks for documents updated since last_refreshed (which may be None), and returns a list | ||
of document identifiers (expression FRBR URIs) which must be updated. | ||
""" | ||
raise NotImplementedError() | ||
|
||
def update_document(self, document_id): | ||
"""Update the document identified by some opaque id, returned by check_for_updates.""" | ||
raise NotImplementedError() | ||
|
||
@classmethod | ||
def name(cls): | ||
return cls.__name__ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Generated by Django 3.2.20 on 2024-02-23 12:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("peachjam", "0119_matomo"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="part", | ||
field=models.CharField( | ||
blank=True, max_length=10, null=True, verbose_name="part" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="publication", | ||
field=models.CharField( | ||
blank=True, max_length=100, null=True, verbose_name="publication" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="sub_publication", | ||
field=models.CharField( | ||
blank=True, max_length=100, null=True, verbose_name="sub publication" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="supplement", | ||
field=models.BooleanField(default=False, verbose_name="supplement"), | ||
), | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="supplement_number", | ||
field=models.IntegerField( | ||
blank=True, null=True, verbose_name="supplement number" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="gazette", | ||
name="key", | ||
field=models.CharField( | ||
max_length=512, null=True, blank=True, db_index=True, verbose_name="key" | ||
), | ||
), | ||
] |
Oops, something went wrong.