Skip to content

Commit

Permalink
feat: config declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Aug 16, 2023
1 parent cadacfc commit 42467a2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DEFAULT_GOAL := help
.PHONY = help

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'


changelog: ## compile changelog
git changelog -c conventional -o CHANGELOG.md
20 changes: 20 additions & 0 deletions ckanext/drupal_api/config_declaration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 1
groups:
- annotation: ckanext-drupal-api
options:
- key: ckanext.drupal_api.drupal_url
- key: ckanext.drupal_api.cache.duration
type: int
default: 3600

- key: ckanext.drupal_api.timeout
type: int
default: 5

- key: ckanext.drupal_api.request.user
- key: ckanext.drupal_api.request.pass
- key: ckanext.drupal_api.api_version
default: core

- key: ckanext.drupal_api.core.menu_export_endpoint
default: "/resource/layout/export"
6 changes: 5 additions & 1 deletion ckanext/drupal_api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ def update_config(self, config_):
# IBlueprint

def get_blueprint(self):
return blueprints
return blueprints


if tk.check_ckan_version("2.10"):
tk.blanket.config_declarations(DrupalApiPlugin)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# http://packaging.python.org/en/latest/tutorial.html#version
version='0.5.3',
version='0.5.4',

description='''''',
long_description=long_description,
Expand Down

0 comments on commit 42467a2

Please sign in to comment.