Skip to content

Commit

Permalink
First tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 30, 2024
1 parent 2ed0841 commit 817e46d
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 56 deletions.
83 changes: 83 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[project]
name = "ckanext-dcat"
version = "1.7.0"
description = "Plugins for exposing and consuming DCAT metadata on CKAN"
authors = [
{name = "Adrià Mercader", email = "amercadero@gmail.com"},
]
maintainers = [
{name = "CKAN Tech Team", email = "info@ckan.org"},
]
license = {text = "AGPL"}
classifiers = []
keywords = []
dependencies = []

[project.urls]
Homepage = "https://github.com/ckan/ckanext-dcat"
Documentation = "http://docs.ckan.org/projects/ckanext-dcat"
Repository = "https://github.com/ckan/ckanext-dcat.git"
Issues = "https://github.com/ckan/ckanext-dcat/issues"
Changelog = "https://github.com/ckan/ckanext-dcat/blob/master/CHANGELOG.md"

[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["ckanext"]
#namespace-packages = ["ckanext"]
zip-safe = false
include-package-data = true

[project.entry-points."ckan.plugins"]
dcat_xml_harvester = "ckanext.dcat.harvesters:DCATXMLHarvester"
dcat_json_harvester = "ckanext.dcat.harvesters:DCATJSONHarvester"
dcat_rdf_harvester = "ckanext.dcat.harvesters:DCATRDFHarvester"
dcat_json_interface = "ckanext.dcat.plugins:DCATJSONInterface"
dcat = "ckanext.dcat.plugins:DCATPlugin"
structured_data = "ckanext.dcat.plugins:StructuredDataPlugin"
test_rdf_harvester = "ckanext.dcat.tests.harvester.test_harvester:TestRDFHarvester"
test_rdf_null_harvester = "ckanext.dcat.tests.harvester.test_harvester:TestRDFNullHarvester"
test_rdf_exception_harvester = "ckanext.dcat.tests.harvester.test_harvester:TestRDFExceptionHarvester"

[project.entry-points."ckan.rdf.profiles"]
euro_dcat_ap = "ckanext.dcat.profiles:EuropeanDCATAPProfile"
euro_dcat_ap_2 = "ckanext.dcat.profiles:EuropeanDCATAP2Profile"
euro_dcat_ap_3 = "ckanext.dcat.profiles:EuropeanDCATAP3Profile"
euro_dcat_ap_scheming = "ckanext.dcat.profiles:EuropeanDCATAPSchemingProfile"
schemaorg = "ckanext.dcat.profiles:SchemaOrgProfile"

[project.entry-points."babel.extractors"]
ckan = "ckan.lib.extract:extract_ckan"

[tool.setuptools.package-data]
"ckanext" = [
"**.py",
"**.js",
"**/templates/**.html",
]

[tool.babel.extractors]
ckan = {callable = "ckan.lib.extract:extract_ckan", options = {}}

[tool.babel.extract_messages]
keywords = ["translate", "isPlural"]
add_comments = ["TRANSLATORS:"]
output_file = "ckanext/dcat/i18n/ckanext-dcat.pot"
width = 80

[tool.babel.init_catalog]
domain = "ckanext-dcat"
input_file = "ckanext/dcat/i18n/ckanext-dcat.pot"
output_dir = "ckanext/dcat/i18n"

[tool.babel.update_catalog]
domain = "ckanext-dcat"
input_file = "ckanext/dcat/i18n/ckanext-dcat.pot"
output_dir = "ckanext/dcat/i18n"

[tool.babel.compile_catalog]
domain = "ckanext-dcat"
directory = "ckanext/dcat/i18n"
statistics = true
112 changes: 56 additions & 56 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
from setuptools import setup, find_packages

version = '1.7.0'

setup(
name='ckanext-dcat',
version=version,
description="Plugins for exposing and consuming DCAT metadata on CKAN",
long_description='''\
''',
classifiers=[],
keywords='',
author='Open Knowledge Foundation',
author_email='info@ckan.org',
url='https://github.com/okfn/ckanext-dcat',
license='AGPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
namespace_packages=['ckanext'],
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
],
entry_points='''
[ckan.plugins]
dcat_xml_harvester=ckanext.dcat.harvesters:DCATXMLHarvester
dcat_json_harvester=ckanext.dcat.harvesters:DCATJSONHarvester
dcat_rdf_harvester=ckanext.dcat.harvesters:DCATRDFHarvester
dcat_json_interface=ckanext.dcat.plugins:DCATJSONInterface
dcat=ckanext.dcat.plugins:DCATPlugin
structured_data=ckanext.dcat.plugins:StructuredDataPlugin
# Test plugins
test_rdf_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFHarvester
test_rdf_null_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFNullHarvester
test_rdf_exception_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFExceptionHarvester
[ckan.rdf.profiles]
euro_dcat_ap=ckanext.dcat.profiles:EuropeanDCATAPProfile
euro_dcat_ap_2=ckanext.dcat.profiles:EuropeanDCATAP2Profile
euro_dcat_ap_scheming=ckanext.dcat.profiles:EuropeanDCATAPSchemingProfile
schemaorg=ckanext.dcat.profiles:SchemaOrgProfile
[babel.extractors]
ckan = ckan.lib.extract:extract_ckan
''',
message_extractors={
'ckanext': [
('**.py', 'python', None),
('**.js', 'javascript', None),
('**/templates/**.html', 'ckan', None),
],
},
)
setup()
#setup(
# name='ckanext-dcat',
# version=version,
# description="Plugins for exposing and consuming DCAT metadata on CKAN",
# long_description='''\
# ''',
# classifiers=[],
# keywords='',
# author='Open Knowledge Foundation',
# author_email='info@ckan.org',
# url='https://github.com/okfn/ckanext-dcat',
# license='AGPL',
# packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
# namespace_packages=['ckanext'],
# include_package_data=True,
# zip_safe=False,
# install_requires=[
# # -*- Extra requirements: -*-
# ],
# entry_points='''
#
# [ckan.plugins]
# dcat_xml_harvester=ckanext.dcat.harvesters:DCATXMLHarvester
# dcat_json_harvester=ckanext.dcat.harvesters:DCATJSONHarvester
#
# dcat_rdf_harvester=ckanext.dcat.harvesters:DCATRDFHarvester
#
# dcat_json_interface=ckanext.dcat.plugins:DCATJSONInterface
#
# dcat=ckanext.dcat.plugins:DCATPlugin
#
# structured_data=ckanext.dcat.plugins:StructuredDataPlugin
#
# # Test plugins
# test_rdf_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFHarvester
# test_rdf_null_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFNullHarvester
# test_rdf_exception_harvester=ckanext.dcat.tests.harvester.test_harvester:TestRDFExceptionHarvester
#
# [ckan.rdf.profiles]
# euro_dcat_ap=ckanext.dcat.profiles:EuropeanDCATAPProfile
# euro_dcat_ap_2=ckanext.dcat.profiles:EuropeanDCATAP2Profile
# euro_dcat_ap_scheming=ckanext.dcat.profiles:EuropeanDCATAPSchemingProfile
# schemaorg=ckanext.dcat.profiles:SchemaOrgProfile
#
# [babel.extractors]
# ckan = ckan.lib.extract:extract_ckan
# ''',
# message_extractors={
# 'ckanext': [
# ('**.py', 'python', None),
# ('**.js', 'javascript', None),
# ('**/templates/**.html', 'ckan', None),
# ],
# },
#)

0 comments on commit 817e46d

Please sign in to comment.