Saravanan666/pypi-org huggingface dataset:
Package: ckanext-drupal-api
ckanext-drupal-apiThe extension helps synchronize the header and footer between CKAN and Drupal.It uses two versions of the Drupal API - the core Rest API and the JSON:API.The extension receives data from the Drupal portal through an endpoint
(which can be configured in the case of the core REST API) and caches it for
a certain time, which can also be changed using the Cache TTL config option,
specifying the value in seconds. If you want to synchronize data more often,
you need to set a smaller value.RequirementsCKAN>=2.9python>=3.7InstallationTo install ckanext-drupal-api:Activate your CKAN virtual environment, for example:. /usr/lib/ckan/default/bin/activateClone the source and install it on the virtualenvgit clonehttps://github.com/DataShades/ckanext-drupal-api.gitcd ckanext-drupal-api
pip install -e .
pip install -r requirements.txtAdddrupal-apito theckan.pluginssetting in your CKAN
config file (by default the config file is located at/etc/ckan/default/ckan.ini).Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:sudo service apache2 reloadConfig settingsThe extension provides next configuration options:# The URL of connected drupal instance
ckanext.drupal_api.drupal_url = http://drupal.com

# Request timeout for API calls in seconds
# (optional, default: 5)
ckanext.drupal_api.timeout = 10

# Cache TTL in seconds
# (optional, default: 3600)
ckanext.drupal_api.cache.duration = 60

# HTTP auth credentials (optional)
ckanext.drupal_api.request.user = username
ckanext.drupal_api.request.pass = password

# API versions, only two options: core & json
# Because, there are two supported API versions: JSON API & RESTful Web Services
ckanext.drupal_api.api_version = json

# If you are using the core API version, you might face the situation when your endpoint differ from the default one
# In this case, you can specify the menu export endpoint through the config, e.g.:
ckanext.drupal_api.core.menu_export_endpoint = /api/v1/menu_exportDeveloper installationTo install ckanext-drupal-api for development, activate your CKAN virtualenv and
do:git clone https://github.com/DataShades/ckanext-drupal-api.git
cd ckanext-drupal-api
python setup.py develop
pip install -r dev-requirements.txtTestsTo run the tests, do:pytest --ckan-ini=test.iniReleasing a new version of ckanext-drupal-apiIf ckanext-drupal-api should be available on PyPI you can follow these steps to publish a new version:Update the version number in thesetup.pyfile. SeePEP 440for how to choose version numbers.Make sure you have the latest version of necessary packages:pip install --upgrade setuptools wheel twineCreate a source and binary distributions of the new version:python setup.py sdist bdist_wheel && twine check dist/*Fix any errors you get.Upload the source distribution to PyPI:twine upload dist/*Commit any outstanding changes:git commit -a
git pushTag the new release of the project on GitHub with the version number from
thesetup.pyfile. For example if the version number insetup.pyis
0.0.1 then do:git tag 0.0.1
git push --tagsLicenseAGPL
Package: ckanext-drupal-idp
ckanext-drupal-idpWhen Drupal's session cookie is available use it for user authentication. Create missing users, using data from Drupal's DB and synchronize(conditionally) fields when user details changed on Drupal's side.Requirementspython >= 3.6CKAN >= 2.9InstallationTo install ckanext-drupal-idp:Activate your CKAN virtual environment, for example:. /usr/lib/ckan/default/bin/activateClone the source and install it on the virtualenvgit clone https://github.com/DataShades/ckanext-drupal-idp.git
 cd ckanext-drupal-idp
 pip install -e .Adddrupal-idpto theckan.pluginssetting in your CKAN
config file (by default the config file is located at/etc/ckan/default/ckan.ini).Configure Drupal's DB:ckanext.drupal_idp.db_url = <URL>Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:sudo service apache2 reloadConfig settings# ckanext-drupal-idp
# Defines database used by the Drupal application
# (mandatory).
ckanext.drupal_idp.db_url = mysql://drupal_user:drupal_pass@127.0.0.1:3306/db_name

# Whether to make an attempt to synchronize user's details everytime
# session is used. This may result in unauthenticated session if new name or email
# already present in CKAN database
# (optional, default: false).
ckanext.drupal_idp.synchronization.enabled = true

# Configure hostname of the drupal instance statically. Usefull for local testing with
# manually added cookie from any accessible drupal instance
# (optional)
ckanext.drupal_idp.host = my.site.com

# Whether to set sysadmin flag on the user who has Drupal's admin role
# (optional, default: false)
ckanext.drupal_idp.admin_role.inherit = true

# Name of the role that grants sysadmin status
# (optional, default: administrator)
ckanext.drupal_idp.admin_role.name = administrator

# When user created, set his ID to the same value as DrupalID
# (optional, default: false)
ckanext.drupal_idp.same_id = true

# Custom Drupal fields that shold be synchronized as well
# (optional, default: [])
ckanext.drupal_idp.extra_fields = field_age field_xxx

# Skip user identification during static requests(css/js)
# (optional, default: false)
ckanext.drupal_idp.skip_static = yesAPI actionsdrupal_idp_user_showParameters:id: (mandatory) DrupalID of the userDetails:Accepts mandatoryid(DrupalID). The rest of parameters will be
passed to underlyinguser_show.Auth functionsdrupal_idp_user_showDetails:Checks whether user is allowed to get user details by DrupalID. At the
moment only sysadmin can pass this check.CLI* drupal-idp - ckanext-drupal-idp CLI
  * user - User management
    * list - List all users with DrupalIDDeveloper installationTo install ckanext-drupal-idp for development, activate your CKAN virtualenv and
do:git clone https://github.com/DataShades/ckanext-drupal-idp.git
cd ckanext-drupal-idp
python setup.py develop
pip install -r dev-requirements.txtTestsTo run the tests, do:pytest --ckan-ini=test.ini ckanext/drupal_idp
Package: ckanext-duo
ckanext-duoTranslate dataset/organization/group titles and descriptions using custom<field>_<locale>fields.RequirementsCompatibility with core CKAN versions:CKAN versionCompatible?2.9yesInstallationTo install ckanext-duo:Activate your CKAN virtual environment, for example:. /usr/lib/ckan/default/bin/activateClone the source and install it on the virtualenvpip install ckanext-duoAddduo duo_dataset duo_organization duo_groupto theckan.pluginssetting in your CKAN config file.Make sure you have non-emptyckan.locale_defaultandckan.locales_offeredoptions inside CKAN config file.Restart CKAN.How to useDepending on entity that must be translated(group, dataset, organization), one
must update corresponding metadata schema. Following fields must be added:organization/grouptitle_<locale>(ex.,title_ar)description_<locale>(ex.,description_ar)datasettitle_<locale>(ex.,title_ar)notes_<locale>(ex.,notes_ar)If you are using ckanext-scheming, define field like this::...
{
    "field_name": "title_ar",
    "label": "Arabic Name",
    "validators": "if_empty_same_as(title)"
},
...Or you can define custom fields using low-levelIDatasetForm/IGroupForm/IOrganizationForm.If none of above is possible, provide an extra field via CKAN extras(key/value
pairs of fields in the very bottom of dataset/group/organization form).
Package: ckanext-fdt-sqlalchemy
ckanext-fdt-sqlalchemyEnable Flask-DebugToolbar's SQLAlchemy pane.RequirementsCompatibility with core CKAN versions:CKAN versionCompatible?2.9yes2.10yesThis plugin requiresflask-sqlalchemy~=2.5.0.The latest version(v3.0) offlask-sqlalchemyonly partially supported. While
it shows all the queries,SELECTandEXPLAINlinks for individual queries
do not work.InstallationTo install ckanext-fdt-sqlalchemy:Install the plugin andflask-sqlalchemy~=2.5.0:pipinstall'ckanext-fdt-sqlalchemy[deps]'Addfdt_sqlalchemyto theckan.pluginssetting in your CKAN
config file.Developer installationTo install ckanext-fdt-sqlalchemy for development, activate your CKAN virtualenv and
do:gitclonehttps://github.com/ckan/ckanext-fdt-sqlalchemy.gitcdckanext-fdt-sqlalchemy
pythonsetup.pydevelopTestsTo run the tests, do:pytest--ckan-ini=test.iniLicenseAGPL
Package: ckanext-federated-index
ckanext-federated-indexTODO:Put a description of your extension here:  What does it do? What features does it have? Consider including some screenshots or embedding a video!RequirementsTODO:For example, you might want to mention here which versions of CKAN this
extension works with.If your extension works across different versions you can add the following table:Compatibility with core CKAN versions:CKAN versionCompatible?2.6 and earliernot tested2.7not tested2.8not tested2.9not testedSuggested values:"yes""not tested" - I can't think of a reason why it wouldn't work"not yet" - there is an intention to get it working"no"InstallationTODO:Add any additional install steps to the list below.
For example installing any non-Python dependencies or adding any required
config settings.To install ckanext-federated-index:Activate your CKAN virtual environment, for example:. /usr/lib/ckan/default/bin/activateClone the source and install it on the virtualenvgit clonehttps://github.com/DataShades/ckanext-federated-index.gitcd ckanext-federated-index
pip install -e .
pip install -r requirements.txtAddfederated-indexto theckan.pluginssetting in your CKAN
config file (by default the config file is located at/etc/ckan/default/ckan.ini).Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:sudo service apache2 reloadConfig settingsNone at presentTODO:Document any optional config settings here. For example:# The minimum number of hours to wait before re-checking a resource
# (optional, default: 24).
ckanext.federated_index.some_setting = some_default_valueDeveloper installationTo install ckanext-federated-index for development, activate your CKAN virtualenv and
do:git clone https://github.com/DataShades/ckanext-federated-index.git
cd ckanext-federated-index
python setup.py develop
pip install -r dev-requirements.txtTestsTo run the tests, do:pytest --ckan-ini=test.iniReleasing a new version of ckanext-federated-indexIf ckanext-federated-index should be available on PyPI you can follow these steps to publish a new version:Update the version number in thesetup.pyfile. SeePEP 440for how to choose version numbers.Make sure you have the latest version of necessary packages:pip install --upgrade setuptools wheel twineCreate a source and binary distributions of the new version:python setup.py sdist bdist_wheel && twine check dist/*Fix any errors you get.Upload the source distribution to PyPI:twine upload dist/*Commit any outstanding changes:git commit -a
git pushTag the new release of the project on GitHub with the version number from
thesetup.pyfile. For example if the version number insetup.pyis
0.0.1 then do:git tag 0.0.1
git push --tagsLicenseAGPL
Package: ckanext-feedback
ckanext-feedbackこのCKAN Extensionはデータ利用者からのフィードバックを得るための機能を提供します。
本Extensionの利用者からの意見・要望や活用事例の報告を受け付ける仕組み等によって、データ利用者はデータの理解が進みデータ利活用が促進され、データ提供者はデータのニーズ理解やデータ改善プロセスの効率化が行えます。フィードバックにより利用者と提供者間でデータを改善し続けるエコシステムを実現することができます。主な機能👀 集計情報の可視化機能(ダウンロード数、利活用数、課題解決数)💬 データおよび利活用方法に対するコメント・評価機能🖼 データを利活用したアプリやシステムの紹介機能🏆 データを利活用したアプリやシステムの課題解決認定機能クイックスタートCKANの仮想環境をアクティブにする(CKANコンテナ等の環境内で実行してください)./usr/lib/ckan/venv/bin/activate仮想環境にckanext-feedbackをインストールするpipinstallckanext-feedback以下のコマンドで設定を行うファイルを開くvim/etc/ckan/production.ini以下の行にfeedbackを追加ckan.plugins=stats・・・recline_viewfeedbackフィードバック機能に必要なテーブルを作成するckan--config=/etc/ckan/production.inifeedbackinit構成本Extensionは3つのモジュールで構成されていますutilizationresourcedownload設定や管理に関するドキュメントリソースや利活用方法へのコメントを管理することが出来ます詳しくは管理者用画面ドキュメントをご覧ください特定のモジュールのみを利用することも可能です設定方法はオンオフ機能の詳細ドキュメントをご覧ください開発者向けビルド方法ckanext-feedbackをローカル環境にGitHub上からクローンするgitclonehttps://github.com/c-3lab/ckanext-feedback.gitckanext-feedback/development下にあるsetup.pyを実行し、コンテナを起動CKAN公式の手順に従い、以下のコマンドを実行dockerexecckan/usr/local/bin/ckan-c/etc/ckan/production.inidatastoreset-permissions|dockerexec-idbpsql-Uckandockerexec-itckan/usr/local/bin/ckan-c/etc/ckan/production.inisysadminaddadmin以下のコマンドを実行し、コンテナ内に入るdockerexec-itckanbashCKANの仮想環境をアクティブにする./usr/lib/ckan/venv/bin/activate仮想環境にckanext-feedbackをインストールするpipinstall/opt/ckanext-feedback以下のコマンドで設定を行うためのファイルを開くvim/etc/ckan/production.ini以下の行にfeedbackを追加ckan.plugins=stats・・・recline_viewfeedbackフィードバック機能に必要なテーブルを作成するckan--config=/etc/ckan/production.inifeedbackinithttp://localhost:5000にアクセスする参考ドキュメントfeedbackコマンド 詳細ドキュメント言語対応(i18n) 詳細ドキュメントテスト上記のビルド方法に従い、ビルドを行うコンテナ内に入るdockerexec-it--userrootckan/bin/bashその他の必要なものをインストールするpipinstall-r/usr/lib/ckan/venv/src/ckan/dev-requirements.txt
pipinstallpytest-ckanテスト用DBを作成するcreatedbckan_test-Ockan-Eutf-8-hdb-Uckanディレクトリを移動cd/usr/lib/ckan/venv/lib/python3.8/site-packages/ckanext/feedback/testsテストを実行CKAN_SQLALCHEMY_URL=CKAN_DATASTORE_READ_URL=CKAN_DATASTORE_WRITE_URL=pytest-s--ckan-ini=config/test.ini--cov=ckanext.feedback--cov-branch--disable-warnings./LICENSEAGPLv3 LICENSECopyRightCopyright (c) 2023 C3Lab
Package: ckanext-files
ckanext-filesUpload and use standalone files. No resources, no datasets, just files.RequirementsCompatibility with core CKAN versions:CKAN versionCompatible?2.9yesmasteryesInstallationTo install ckanext-files:Install the extensionpip install ckanext-filesAddfilesto theckan.pluginssetting in your CKAN
config file.Updgrade DBckan db upgrade -p filesAPIEach API action has corresponding auth-function with the same name. By default
only sysadmin can pass auth check(unless different behavior explicitly
mentioned in action description). Whenever you are using this extension feel
free to redefine these auth-functions usingtk.chained_auth_function.Some of API actions haskindparameter. It defines which folder will store
the file, which config options will be applied, etc. Default value isckanext_files_filefiles_file_createCreate newfileentity.Parameters:nameName for the uploaded file.uploadFile itselfkindType of uploaded file.extrasDictionary with any details that can be used for your needs.Returns:id: strUnique ID of the newfile.name: strName for thefile.url: strFile itselfkind: strType of uploaded file.uploaded_at: datetime.datetimeFile creation dateextras: Optional[dict[str, Any]]Dictionary with any details that can be used for your needs.files_file_showShowfiledetiles.Parameters:id: str: ID or name of file entityReturns: same asfiles_file_createfiles_file_updateUpdatefileentity.Parameters:id: strname: Optional[str]Name for thefilefile.upload: Optional[werkzeug.datastructures.FileStorage]File itselfkind: Optional[str]Type of uploaded file.extras: Optional[dict[str, Any]]Dictionary with any details that can be used for your needs.Returns: same asfiles_file_createfiles_file_deleteRemovefileentity.Parameters:id: str: ID of file entityReturns:TrueConfig settings# Allowed size for uploaded file in MB.
# (optional, default: 2).
ckanext.files.kind.<KIND>.max_size = 2
Package: ckanext-file-uploader-ui
# ckanext-file_uploader_uiEnhance the [CKAN]() file uploading UI with the following features:Upload multiple files at onceDrag & Drop filesMinimal supported CKAN version: 2.8.1## InstallationActivate your CKAN virtual environmentInstall the ckanext-file_uploader_ui package into your virtual environment:
*pip install ckanext-file_uploader_uiIf you are using [xloader](https://github.com/ckan/ckanext-xloader) to load data into the datastore
* install this version of xloader (until [this PR](https://github.com/ckan/ckanext-xloader/pull/44) is merged)
*pip install -U https://github.com/OriHoch/ckanext-xloader/archive/support-modifying-download-request.zip#egg=ckanext-xloaderAddfile_uploader_uito theckan.pluginssetting in your CKANRestart CKAN.## TranslationsTranslations are done in Transifex:https://www.transifex.com/the-public-knowledge-workshop/ckanext-file_uploader_ui### Updating translations codeUpdate the .pot file - should be done in case of additional / modified strings in the templates` python setup.py extract_messages `Edit the .pot file and remove core ckan strings (which are there only because of extending core ckan templates)Upload pot to transifex, translate on transifexInstall [Transifex client](https://docs.transifex.com/client/installing-the-client)` ./release.sh--update-translations`Test the updated translations and commit the changes
Package: ckanext-fluent
ckanext-fluent==============This extension provides a way to store and return multilingulfields in CKAN datasets, resources, organizations and groups.Add the `fluent` plugin to your ckan.plugins configurationsettings and use ckanext-scheming or a custom form plugin touse the provided validators to store multilingual text inextra fields.The easiest way to use fluent multilingual text fields is with[ckanext-scheming](https://github.com/open-data/ckanext-scheming/).Add `ckanext.fluent:presets.json` to your scheming.presetsconfiguration settings:```jsonscheming.presets = ckanext.scheming:presets.jsonckanext.fluent:presets.json```A fluent multilingual field in a scheming schemawill look something like::```json{"field_name": "books","preset": "fluent_text","label": {"en": "Books","fr": "Livres"},"form_languages": ["en", "fr"]}```This new extra field "books" will appear as multiple fields in thedataset form, one for each language specified in `form_languages`by the [form snippet](ckanext/fluent/templates/scheming/form_snippets/fluent_text.html).![Example of fluent form snippet](docs/multilingual-form.png)When displayed, each language with text entered will appear separatelyby the[display snippet](ckanext/fluent/templates/scheming/display_snippets/fluent_text.html), eg.:![Example of fluent display snippet](docs/multilingual-display.png)When the dataset is accessed from the API the language values appearand are updated as an object, eg.:```json{"...": "...","books": {"en": "Franklin","fr": "Benjamin"},"...": "..."}
Package: ckanext-fpx
ckanext-fpxCKAN adapter for FPX serviceRequirementsConfigured and running FPXInstallationTo install ckanext-fpx:Activate your CKAN virtual environmentInstall the ckanext-fpx Python package:pip install ckanext-fpxAddfpxto theckan.pluginssetting in your CKAN config fileAddfpx.client.secretandfpx.service.urlconfig optionsConfig settings# Client secret generated by FPX
# (required).
fpx.client.secret = 123abc

# Name corresponding to the secret. Required only for file-streaming.
# (optional).
fpx.client.secret = client-name-for-123abc-secret


# URL of the running FPX service
# (required).
fpx.service.url = http://0.0.0.0:8000
Package: ckanext-gallery
ckanext-galleryA CKAN extension for a dataset gallery view.OverviewAdds a gallery view for resources on a CKAN instance. Three plugins are included in this extension: the main plugin (gallery) and two view plugins for specific image/data types (gallery_imageandgallery_iiif).Based onblueimp Gallery.InstallationPath variables used below:$INSTALL_FOLDER(i.e. where CKAN is installed), e.g./usr/lib/ckan/default$CONFIG_FILE, e.g./etc/ckan/default/development.iniInstalling from PyPIpipinstallckanext-galleryInstalling from sourceClone the repository into thesrcfolder:cd$INSTALL_FOLDER/src
gitclonehttps://github.com/NaturalHistoryMuseum/ckanext-gallery.gitActivate the virtual env:.$INSTALL_FOLDER/bin/activateInstall via pip:pipinstall$INSTALL_FOLDER/src/ckanext-galleryInstalling in editable modeInstalling from apyproject.tomlin editable mode (i.e.pip install -e) requiressetuptools>=64; however, CKAN 2.9 requiressetuptools==44.1.0. Seeour CKAN forkfor a version of v2.9 that uses an updated setuptools if this functionality is something you need.Post-install setupAdd 'gallery' to the list of plugins in your$CONFIG_FILE:ckan.plugins=... galleryInstalllesscglobally:npminstall-g"less@~4.1"ConfigurationThere's only one option that can be specified in the.inifile:NameDescriptionDefaultckanext.gallery.records_per_pageNumber of images to display on a page32UsageTo use as a view, no further setup is needed; the 'Gallery' type should be available for resources
after installing the plugin.InterfacesTheIGalleryImageinterface allows plugins to override settings.fromckan.pluginsimportSingletonPlugin,implementsfromckanext.gallery.plugins.interfacesimportIGalleryImageclassYourPlugin(SingletonPlugin):implements(IGalleryImage)defimage_info(self):'''Return info for this plugin. If resource type is set,only datasets of that type will be available.'''return{u'title':u'Text',u'resource_type':[u'csv',u'tsv'],u'field_type':[u'text']}defget_images(self,field_value,record,data_dict):'''Process images from a single record to return custom metadata.The field_value depends on the image field you choose.'''images=[{u'href':field_value[u'url'],u'thumbnail':field_value[u'url'].replace(u'preview',u'thumbnail'),u'record_id':record[u'_id']}forimginfield_value]returnimageTemplatesGallery block snippet{%snippet'gallery/snippets/gallery.html',images=g.images,resource_id=res.id%}TestingThere is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in thedocker/folder.To run the tests against ckan 2.9.x on Python3:Build the required images:docker-composebuildThen run the tests.
The root of the repository is mounted into the ckan container as a volume by the Docker compose
configuration, so you should only need to rebuild the ckan image if you change the extension's
dependencies.docker-composerunckan
Package: ckanext-gbif
ckanext-gbifA CKAN extension that that connects with the GBIF API.OverviewThis extension retrieves additional data (e.g. DQIs) from theGBIFAPI for a record with an associated GBIF ID.This extension also provides some templates for displaying these data.InstallationPath variables used below:$INSTALL_FOLDER(i.e. where CKAN is installed), e.g./usr/lib/ckan/default$CONFIG_FILE, e.g./etc/ckan/default/development.iniInstalling from PyPIpipinstallckanext-gbifInstalling from sourceClone the repository into thesrcfolder:cd$INSTALL_FOLDER/src
gitclonehttps://github.com/NaturalHistoryMuseum/ckanext-gbif.gitActivate the virtual env:.$INSTALL_FOLDER/bin/activateInstall via pip:pipinstall$INSTALL_FOLDER/src/ckanext-gbifInstalling in editable modeInstalling from apyproject.tomlin editable mode (i.e.pip install -e) requiressetuptools>=64; however, CKAN 2.9 requiressetuptools==44.1.0. Seeour CKAN forkfor a version of v2.9 that uses an updated setuptools if this functionality is something you need.Post-install setupAdd 'gbif' to the list of plugins in your$CONFIG_FILE:ckan.plugins=... gbifInstalllesscglobally:npminstall-g"less@~4.1"ConfigurationThese are the options that can be specified in your .ini config file.Template variables[REQUIRED]NameDescriptionckanext.gbif.organisation_keyFor linking to the dataset publisher (i.e.https://gbif.org/publisher/ORG_KEY)ckanext.gbif.dataset_keyFor linking to the dataset itself (i.e.https://gbif.org/dataset/DATA_KEY)UsageActionsgbif_record_showGet the associated GBIF data for a record.fromckan.pluginsimporttoolkitgbif_record=toolkit.get_action(u'gbif_record_show')(context,{u'occurrence_id':record_gbif_occurrence_id})TemplatesThe templates inherit fromrecord/specimen.htmlandrecord/dwc.htmland will insert a link to the GBIF view in thecontent_primary_navblock.TestingThere is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in thedocker/folder.To run the tests against ckan 2.9.x on Python3:Build the required images:docker-composebuildThen run the tests.
The root of the repository is mounted into the ckan container as a volume by the Docker compose
configuration, so you should only need to rebuild the ckan image if you change the extension's
dependencies.docker-composerunckan