-
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.
- Loading branch information
1 parent
6518a22
commit c576732
Showing
12 changed files
with
110 additions
and
97 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
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 |
---|---|---|
@@ -1,26 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
|
||
import yaml | ||
|
||
import ckan.plugins.toolkit as tk | ||
from ckan import plugins as p | ||
from ckan.config.declaration import Declaration, Key | ||
from ckan.logic import clear_validators_cache | ||
|
||
|
||
@tk.blanket.config_declarations | ||
@tk.blanket.validators | ||
class EventAuditPlugin(p.SingletonPlugin): | ||
p.implements(p.IConfigDeclaration) | ||
|
||
# IConfigDeclaration | ||
|
||
def declare_config_options(self, declaration: Declaration, key: Key): | ||
# this call allows using custom validators in config declarations | ||
clear_validators_cache() | ||
|
||
here = os.path.dirname(__file__) | ||
with open(os.path.join(here, "config_declaration.yaml"), "rb") as src: | ||
declaration.load_dict(yaml.safe_load(src)) | ||
pass |
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 |
---|---|---|
@@ -1,3 +1,50 @@ | ||
[build-system] | ||
requires = [ "setuptools>=61.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "ckanext-event-audit" | ||
version = "0.1.0" | ||
description = "" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
keywords = [ "CKAN" ] | ||
dependencies = [ | ||
"pydantic>=2.3.0,<2.4.0", | ||
] | ||
authors = [ | ||
{name = "DataShades", email = "[email protected]"}, | ||
{name = "LD"}, | ||
] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.license] | ||
text = "AGPL" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/DataShades/ckanext-event-audit" | ||
Documentation = "https://datashades.github.io/ckanext-event-audit/" | ||
|
||
[project.optional-dependencies] | ||
|
||
[project.entry-points."ckan.plugins"] | ||
event_audit = "ckanext.event_audit.plugin:EventAuditPlugin" | ||
test_event_audit = "ckanext.event_audit.tests.test_interface:TestEventAuditPlugin" | ||
|
||
[project.entry-points."babel.extractors"] | ||
ckan = "ckan.lib.extract:extract_ckan" | ||
|
||
[tool.setuptools.packages] | ||
find = {} | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
exclude = [ | ||
|
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