-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore/mula/add-tests-external-services' into chore/mula…
…/add-tests-external-services-octopoes * chore/mula/add-tests-external-services: (27 commits) Skip unittest Fix observed_at parsing (#1959) Add code review suggestions Update mula/.ci/docker-compose.yml Translations update from Hosted Weblate (#1941) Pre-commit Remove octopoes integration Fix error adding settings when schema doesn't have required attribute (#1952) Fix installing rocky packages in RDO workflow (#1946) Add reporting templates to djlint pre-commit hook (#1943) Fix reports and normalizer detail page (#1942) Fix report tables overflowing whole page (#1940) Add 1.13 release notes (#1935) Update granian and use new of configuration via env vars (#1931) Create general feature flag context processor (#1925) Revert accidental pillow downgrade (#1929) Bumped `urllib3` package (#1927) New feature: Generate DNS and TLS report from a list of OOIs (basic Report page) (#1908) Translations update from Hosted Weblate (#1915) Fix import (#1917) ...
- Loading branch information
Showing
131 changed files
with
4,918 additions
and
1,247 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
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,20 @@ | ||
============ | ||
Contributing | ||
============ | ||
|
||
Thank you, dear developer, who is considering to help out with OpenKAT! Feel welcome. If you want to get in touch, please do so! | ||
|
||
Documentation | ||
============= | ||
|
||
We keep `our documentation here <https://docs.openkat.nl>`_, generated from our github repo. | ||
|
||
Guidelines | ||
========== | ||
|
||
`Our contribution guidelines <https://docs.openkat.nl/guidelines/contributions.html>`_ might help you find your way. | ||
|
||
Contact | ||
======= | ||
|
||
`Get in touch <https://github.com/minvws/nl-kat-coordination/blob/main/README.rst#contact>`_ with our dev team or community managers here. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Empty file.
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,45 @@ | ||
#!/usr/bin/env python3 | ||
# ruff: noqa: E402 | ||
|
||
import logging | ||
import pdb | ||
import sys | ||
import uuid | ||
from pathlib import Path | ||
|
||
import click | ||
|
||
sys.path.append(str(Path(__file__).resolve().parent.parent)) | ||
|
||
from boefjes.job_handler import BoefjeHandler | ||
from boefjes.job_models import Boefje, BoefjeMeta | ||
from boefjes.katalogus.local_repository import get_local_repository | ||
from boefjes.local import LocalBoefjeJobRunner | ||
|
||
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) | ||
|
||
|
||
@click.command() | ||
@click.option("--pdb", "start_pdb", is_flag=True, help="Start pdb on exceptions") | ||
@click.argument("organization_code") | ||
@click.argument("boefje_id") | ||
@click.argument("input_ooi") | ||
def run_boefje(start_pdb, organization_code, boefje_id, input_ooi): | ||
"""Run boefje""" | ||
|
||
meta = BoefjeMeta(id=uuid.uuid4(), boefje=Boefje(id=boefje_id), organization=organization_code, input_ooi=input_ooi) | ||
|
||
local_repository = get_local_repository() | ||
|
||
handler = BoefjeHandler(LocalBoefjeJobRunner(local_repository), local_repository) | ||
try: | ||
handler.handle(meta) | ||
except Exception: | ||
if start_pdb: | ||
pdb.post_mortem() | ||
|
||
raise | ||
|
||
|
||
if __name__ == "__main__": | ||
run_boefje() |
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,47 @@ | ||
#!/usr/bin/env python3 | ||
# ruff: noqa: E402 | ||
|
||
import logging | ||
import pdb | ||
import sys | ||
import uuid | ||
from pathlib import Path | ||
|
||
import click | ||
|
||
sys.path.append(str(Path(__file__).resolve().parent.parent)) | ||
|
||
from boefjes.job_handler import NormalizerHandler, bytes_api_client | ||
from boefjes.job_models import Normalizer, NormalizerMeta | ||
from boefjes.katalogus.local_repository import get_local_repository | ||
from boefjes.local import LocalNormalizerJobRunner | ||
|
||
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) | ||
|
||
|
||
@click.command() | ||
@click.option("--pdb", "start_pdb", is_flag=True, help="Start pdb on exceptions") | ||
@click.argument("normalizer_id") | ||
@click.argument("raw_id") | ||
def run_normalizer(start_pdb, normalizer_id, raw_id): | ||
"""Run normalizer""" | ||
|
||
bytes_api_client.login() | ||
raw = bytes_api_client.get_raw_meta(raw_id) | ||
|
||
meta = NormalizerMeta(id=uuid.uuid4(), raw_data=raw, normalizer=Normalizer(id=normalizer_id)) | ||
|
||
local_repository = get_local_repository() | ||
|
||
handler = NormalizerHandler(LocalNormalizerJobRunner(local_repository)) | ||
try: | ||
handler.handle(meta) | ||
except Exception: | ||
if start_pdb: | ||
pdb.post_mortem() | ||
|
||
raise | ||
|
||
|
||
if __name__ == "__main__": | ||
run_normalizer() |
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,38 @@ | ||
#!/usr/bin/env python3 | ||
# ruff: noqa: E402, T201 | ||
|
||
import json | ||
import sys | ||
from pathlib import Path | ||
|
||
import click | ||
from pygments import highlight | ||
from pygments.formatters import TerminalFormatter | ||
from pygments.lexers import JsonLexer | ||
|
||
sys.path.append(str(Path(__file__).resolve().parent.parent)) | ||
|
||
from boefjes.job_handler import bytes_api_client | ||
|
||
|
||
@click.command() | ||
@click.option("--json", "print_json", is_flag=True, help="Pretty print raw as json") | ||
@click.argument("raw_id") | ||
def show_raw(print_json, raw_id): | ||
"""Show raw file""" | ||
|
||
bytes_api_client.login() | ||
raw = bytes_api_client.get_raw(raw_id) | ||
|
||
raw_str = raw.decode("utf-8") | ||
|
||
if print_json: | ||
json_object = json.loads(raw_str) | ||
formatted_json_str = json.dumps(json_object, indent=4, sort_keys=True) | ||
print(highlight(formatted_json_str, JsonLexer(), TerminalFormatter())) | ||
else: | ||
print(raw_str) | ||
|
||
|
||
if __name__ == "__main__": | ||
show_raw() |
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
Oops, something went wrong.