{"id":27172225,"url":"https://github.com/pacificcommunity/ckanext-spc-pdh","last_synced_at":"2025-10-28T02:48:36.816Z","repository":{"id":43226394,"uuid":"133765866","full_name":"PacificCommunity/ckanext-spc-pdh","owner":"PacificCommunity","description":"CKAN repo for the Pacific Data Hub, an open data portal for datasets from the Pacific.","archived":false,"fork":false,"pushed_at":"2023-10-03T22:48:20.000Z","size":43494,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T09:42:04.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PacificCommunity.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-17T06:00:04.000Z","updated_at":"2024-02-27T22:18:35.000Z","dependencies_parsed_at":"2025-04-09T09:47:07.682Z","dependency_job_id":null,"html_url":"https://github.com/PacificCommunity/ckanext-spc-pdh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PacificCommunity/ckanext-spc-pdh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fckanext-spc-pdh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fckanext-spc-pdh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fckanext-spc-pdh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fckanext-spc-pdh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PacificCommunity","download_url":"https://codeload.github.com/PacificCommunity/ckanext-spc-pdh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fckanext-spc-pdh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262518105,"owners_count":23323301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T09:35:44.431Z","updated_at":"2025-10-28T02:48:31.795Z","avatar_url":"https://github.com/PacificCommunity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n=============\nckanext-spc\n=============\n\n.. Put a description of your extension here:\n   What does it do? What features does it have?\n   Consider including some screenshots or embedding a video!\n\n\n------------\nRequirements\n------------\n\n- `ckanext-scheming \u003chttps://github.com/ckan/ckanext-scheming\u003e`_\n\n\n------------\nInstallation\n------------\n\n.. Add any additional install steps to the list below.\n   For example installing any non-Python dependencies or adding any required\n   config settings.\n\nTo install ckanext-spc:\n\n1. Activate your CKAN virtual environment, for example::\n\n     . /usr/lib/ckan/default/bin/activate\n\n2. Install the ckanext-spc and its requirements into your virtual environment::\n\n     pip install ckanext-spc\n     pip install -r dev-requirements.txt\n\n3. Add ``spc`` to the ``ckan.plugins`` setting in your CKAN\n   config file (by default the config file is located at\n   ``/etc/ckan/default/production.ini``).\n\n4. For the SpcNadaHarvester to work, install this branch of ckanext-ddi: ``github.com/roly97/ckanext-ddi/tree/nada_harvester``.\n   Alternatively, install the original ckanext-ddi extension ``github.com/liip/ckanext-ddi`` and then replace the files ``ddiharvester.py`` and ``metadata.py`` with the changed files found in ``ckanext-ddi_changes`` directory in this repo.\n\n5. Update SOLR schema::\n\n     \u003cfield name=\"topic\" type=\"string\" indexed=\"true\" stored=\"true\" multiValued=\"true\"/\u003e\n\n6. Update DB schema::\n\n     paster spc db-upgrade -c config.ini\n\n\n6. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::\n\n     sudo service apache2 reload\n\n\n---------------\nConfig Settings\n---------------\n\nConfig options::\n\n    scheming.dataset_schemas = ckanext.spc.schemas:dataset.json\n\n------------------------\nDevelopment Installation\n------------------------\n\nTo install ckanext-spc for development, activate your CKAN virtualenv and\ndo::\n\n    git clone https://github.com/DataShades/ckanext-spc.git\n    cd ckanext-spc\n    python setup.py develop\n    pip install -r dev-requirements.txt\n    paster spc db-upgrade -c config.ini\n\n---------------\nTemplate macros\n---------------\n\nThis extension provides new template macro _nested_field_ which is\nused for rendering fields in nested schemas. It can be easily added to\nany page that have access to dataset metadata via next snippet::\n\n  {{ nested_field(parent_field_name, index_of_current_field_amoung_other_siblings, current_field_name, parent_data_dict, parent_errors_dict) }}\n\nMore examples can be found in `templates/macro/spc.html`.\n\n---------------------\nSPC specific examples\n---------------------\n\nRecently updated dataset(within thematic area)::\n  http://ckan.url/api/action/package_search?q=extras_thematic_area_string:%22Climate%20Change%22\u0026sort=metadata_modified+desc\n\nMost popular dataset(within thematic area)::\n  http://site.url/api/action/package_search?q=extras_thematic_area_string:%22Climate%20Change%22\u0026sort=extras_ga_view_count+desc\n\n\n-------------------\nInteractive widgets\n-------------------\n\nDeveleopment server with the examples started via::\n\n  npm run dev-widgets\n\nWhen development phase completed, build widgets with::\n\n  npm run build-widgets\n\nWidgets registered inside `SPCWidgets` global JS variable. Use them\nform your CKAN JS modules as following::\n\n  var widget = new SPCWidgets.SearchForm({target: document.querySelector(selector)})\n\nSearch form\n###########\n\n-----------------\nRunning the Tests\n-----------------\n\nTo run the tests, do::\n\n        pytest --ckan-ini test.ini ckanext/spc\n\n-------------------\nGeneral Information\n-------------------\n\n\nHarvesters\n##########\n\nOAI-PMH\n*******\n\n* Name used in config: **spc\\_oaipmh\\_harvester**\n* Dataset type: **publications**\n* Sources:\n\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| Url                                       | Title                           | Settings                                       | Organization |\n+===========================================+=================================+================================================+==============+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Social Development Program      | {\"set\": \"SDP_PDH\", \"topic\": \"Gender and Youth\"}          | spc-sdp      |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Climate Change and              | {\"set\": \"CCES_PDH\", \"topic\": \"Climate Change\"} | spc-cces     |\n|                                           | Environmental Sustainability    |                                                |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Fisheries, Aquaculture \u0026        | {\"set\": \"FAME_PDH\", \"topic\": \"Fisheries\"}      | spc-fame     |\n|                                           | Marine Ecosystems               |                                                |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Geoscience, Energy and Maritime | {\"set\": \"GEM_PDH\", \"topic\": \"Geoscience\"}      | spc-gem      |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Land Resources Division         | {\"set\": \"LRD_PDH\", \"topic\": \"Land Resources\"}  | spc-lrd      |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Public Health Division          | {\"set\": \"PHD_PDH\", \"topic\": \"Health\"}          | spc-phd      |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://www.spc.int/DigitalLibrary/SPC/OAI | Statistics for Development      | {\"set\": \"SDD_PDH\", \"topic\": \"Official Statistics\"}      | spc-sdd      |\n|                                           | Division                        |                                                |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n\nDKAN\n****\n\n* Name used in config: **spc\\_dkan\\_harvester**\n* Dataset type: **dataset**\n* Sources:\n\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| Url                                       | Title                           | Settings                                       | Organization |\n+===========================================+=================================+================================================+==============+\n|                                           |                                 |                                                |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n\nGBIF\n****\n\n* Name used in config: **spc\\_gbif\\_harvester**\n* Dataset type: **biodiversity\\_data**\n* Sources:\n\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| Url                                       | Title                           | Settings                                       | Organization |\n+===========================================+=================================+================================================+==============+\n| http://api.gbif.org                       | GBIF SPREP published            | {\"topic\": \"Fisheries\", \"hosting_org\":          | sprep        |\n|                                           |                                 | \"cd3512e7-886c-4873-b629-740abe8ae74e\",        |              |\n|                                           |                                 | \"q\": \"-spc\"}                                   |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| http://api.gbif.org                       | GBIF SPC published              | {\"topic\": \"Fisheries\", \"hosting_org\":          | spc-fame     |\n|                                           |                                 | \"cd3512e7-886c-4873-b629-740abe8ae74e\",        |              |\n|                                           |                                 | \"q\": \"+spc\"}                                   |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n\nPRDR Publications Harvester\n***************************\n\n* Name used in config: **spc\\_prdr\\_publications\\_harvester**\n* Dataset type: **publications**\n* Sources:\n\n+--------------------------------------------------------------------+-----------------------+---------------------+--------------+\n| Url                                                                | Title                 | Settings            | Organization |\n+====================================================================+=======================+=====================+==============+\n| https://prdr-dev.spc.links.com.au/api/action/publications_list     | SPC PRDR Publications | {\"topic\": \"Energy\"} | spc-gem      |\n+--------------------------------------------------------------------+-----------------------+---------------------+--------------+\n\nPRDR Data(energy-resource) Harvester\n************************************\n\n* Name used in config: **spc\\_prdr\\_res\\_energy\\_harvester**\n* Dataset type: **dataset**\n* Sources:\n\n+--------------------------------------------------------------------+-----------------------+---------------------+--------------+\n| Url                                                                | Title                 | Settings            | Organization |\n+====================================================================+=======================+=====================+==============+\n| https://prdr-dev.spc.links.com.au/api/action/energy_resources_list | SPC PRDR Data         | {\"topic\": \"Energy\"} | spc-gem      |\n+--------------------------------------------------------------------+-----------------------+---------------------+--------------+\n\nSPREP\n*****\n\n* Name used in config: **spc\\_sprep\\_harvester**\n* Dataset type: **dataset**\n* Sources:\n\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n| Url                                       | Title                           | Settings                                       | Organization |\n+===========================================+=================================+================================================+==============+\n|  https://pacific-data.sprep.org           | Inform Regional Data Portal     | {\"topic_mapping\": {\"Atmosphere and Climate\":   | sprep        |\n|                                           |                                 | \"Climate Change\", \"Info\": null,                |              |\n|                                           |                                 | \"Land\": \"Land Resources\",                      |              |\n|                                           |                                 | \"Biodiversity\": \"Fisheries\",                   |              |\n|                                           |                                 | \"Build Environment\": \"Economic Development\",   |              |\n|                                           |                                 | \"Coastal and Marine\": \"Fisheries\",             |              |\n|                                           |                                 | \"Culture and Heritage\": \"Gender and Youth\",              |              |\n|                                           |                                 | \"Inland Waters\": \"Geoscience\"}}                |              |\n+-------------------------------------------+---------------------------------+------------------------------------------------+--------------+\n\n\nDatasets types\n##############\n\n* **Biodiversity data** - EML schema\n\nThis Dataset type has multiple fields which includes subfields:\n\t- Creator\n\t- Metadata Provider\n\t- Associated Party\n\t- Keyword Set\n\t- Coverage\n\t- Maintenance\n\t- Contact\n\t- Methods\n\t- Project\n\n* **Dataset** - DCAT schema\n* **Geographic data** - ANZLIC schema\n* **Publications** - Dublin Core schema\n\nCKAN Patches\n##############\ncurl https://patch-diff.githubusercontent.com/raw/ckan/ckan/pull/5546.diff | git apply\ncurl https://patch-diff.githubusercontent.com/raw/ckan/ckan/pull/5594.diff | git apply","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fckanext-spc-pdh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacificcommunity%2Fckanext-spc-pdh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fckanext-spc-pdh/lists"}