ckan | source DMS ( data management system | Dataset library

 by   ckan Python Version: ckan-2.9.9 License: Non-SPDX

kandi X-RAY | ckan Summary

kandi X-RAY | ckan Summary

ckan is a Python library typically used in Artificial Intelligence, Dataset, Docker applications. ckan has no bugs, it has build file available and it has high support. However ckan has 2 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers catalog.data.gov, open.canada.ca/data, data.humdata.org among many other sites.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ckan has a highly active ecosystem.
              It has 3838 star(s) with 1890 fork(s). There are 198 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 516 open issues and 2659 have been closed. On average issues are closed in 137 days. There are 124 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of ckan is ckan-2.9.9

            kandi-Quality Quality

              ckan has 0 bugs and 0 code smells.

            kandi-Security Security

              ckan has 2 vulnerability issues reported (0 critical, 2 high, 0 medium, 0 low).
              ckan code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ckan has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              ckan releases are available to install and integrate.
              Build file is available. You can build the component from source.
              It has 184429 lines of code, 5741 functions and 1687 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ckan and discovered the below as its top functions. This is intended to give you an instant insight into ckan implemented functionality, and help decide if they suit your requirements.
            • Render a pager page
            • Create a link to the page
            • Update tracking_summary
            • Update the database
            • Package create action
            • Check if group is valid
            • Replace groups of a string
            • Searches for a given package type
            • Returns an iterator over options matching pattern
            • Update the configuration
            • Upgrade legacy engine
            • Returns a list of organizations for a given user
            • List users
            • Return the fields for a resource
            • Run a search query
            • Update a configuration option
            • User creation
            • Resource creation
            • Create a package
            • View package show
            • Update a package
            • Revise a package
            • Returns a resource search
            • Submit a data dictionary
            • Return a dictionary representation of a package
            • Create a datastore
            Get all kandi verified functions for this library.

            ckan Key Features

            No Key Features are available at this moment for ckan.

            ckan Examples and Code Snippets

            copy iconCopy
            source ~/ckan/bin/activate
            
            createdb -O dgu ckan --template template_postgis
            
            sudo -u www-data /home/co/ckan/bin/paster --plugin=ckanext-packagezip packagezip init --config=/var/ckan/ckan.ini
            sudo -u www-data /home/co/ckan/bin/paster --plugin=ckanext  
            Docker Compose setup for CKAN,CKAN images,Extending the base images
            Pythondot img2Lines of Code : 16dot img2License : Strong Copyleft (AGPL-3.0)
            copy iconCopy
            ckan
            ├── docker-entrypoint.d
            │   └── setup_validation.sh
            ├── Dockerfile
            └── Dockerfile.dev
            
            
            #!/bin/bash
            
            # Create DB tables if not there
            paster --plugin=ckanext-validation validation init-db -c $CKAN_INI
            
            FROM openknowledge/ckan-dev:2.9
            
            R  
            Docker Compose setup for CKAN,CKAN images
            Pythondot img3Lines of Code : 14dot img3License : Strong Copyleft (AGPL-3.0)
            copy iconCopy
                +-------------------------+                +----------+
                |                         |                |          |
                | openknowledge/ckan-base +---------------->   ckan   | (production)
                |                         |                |        

            Community Discussions

            QUESTION

            CKAN 2.9 ValueError: Registry initialized :: ckan basic-charts plugins
            Asked 2022-Feb-22 at 11:12

            I am new to ckan. After successfully installing ckan when I went to use some ckan plugins as an example ckan-basiccharts i am getting ValueError. After some research, I understand it's related to web-assets. In basicchart folder, I change the {%resource ....} to {%asset ..}

            ckanext/basiccharts/theme/templates/basechart_view.html in .html file

            but I am still getting the same error. Can anyone please explain the logic behind this error and some tricks to get rid of this error?

            ...

            ANSWER

            Answered 2022-Feb-16 at 13:56

            For migration to webassets, you need to create an assets folder and place there .js and .css files of the extension. In addition, you need to create webassets.yml inside the assets folder where those .js and .css files should be registered. This process is described here and here.

            But you can use this version of ckanext-basiccharts that is compatible with current ckan versions.

            Source https://stackoverflow.com/questions/71058834

            QUESTION

            Fetch complex data from API, create a array of objects and iterate this
            Asked 2022-Jan-07 at 12:25

            I'm trying to make a array of complex objects from this:

            https://demo.ckan.org/api/3/action/package_show?id=sample-dataset-1

            I want use this array of objects to create components using map()

            ...

            ANSWER

            Answered 2022-Jan-07 at 12:25

            In the first example you're trying to push to undefined because allDatasets wasn't initialised with a value.

            Source https://stackoverflow.com/questions/70621170

            QUESTION

            Creating a CKAN Extension Error: No such command 'create'
            Asked 2021-Oct-27 at 22:18

            I'm Creating a CKAN EXTENSION base in their official documentation.

            https://docs.ckan.org/en/2.9/theming/templates.html#creating-a-ckan-extension

            When I'm in this step,

            ckan -c /etc/ckan/default/ckan.ini create -t ckanext-example_theme

            I got this error. *

            (default) root@ccgeo:/usr/lib/ckan/default/src# ckan -c /etc/ckan/default/ckan.ini create -t ckanext-example_theme 2021-10-27 02:27:45,515 INFO [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini 2021-10-27 02:27:45,515 INFO [ckan.config.environment] Loading static files from public 2021-10-27 02:27:45,544 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates 2021-10-27 02:27:45,762 INFO [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates Usage: ckan [OPTIONS] COMMAND [ARGS]... Error: No such command 'create'. (default) root@ccgeo:/usr/lib/ckan/default/src#

            ...

            ANSWER

            Answered 2021-Oct-27 at 22:18

            There is an error in the docs, it should be ckan generate extension as correct CLI command or in your case:

            ckan -c /etc/ckan/default/ckan.ini generate extension -o *location-to-put-generated-template*

            Source https://stackoverflow.com/questions/69732065

            QUESTION

            python 2.7 simple file upload
            Asked 2021-Sep-24 at 05:34
            Development environment

            wsgi, ckan, python2.7, jquery1.4 use

            An error occurred during development of python cgi simple file upload. Ajax upload request Chrome Debugging shows the file fine. It is also included in wsgi.input in the server log environ. Take that data out and make it into a tempfile Is it not properly created to create FieldStorage? All values ​​in FieldStorage are empty

            HTML

            Script ...

            ANSWER

            Answered 2021-Sep-24 at 05:34

            The communication methods of ckan, wsgi, and python were not known exactly. However, only CGI body data came into "environ" and "FieldStorage" was not created normally when "wsgi.input" was created using that data. The reason is that it was already in the form of file storage. However, "wsgi.input" is a cgi object and cannot be read as a read. The final solution was processed by reading the data of "webob._parseed_post_vars"

            Source https://stackoverflow.com/questions/69202017

            QUESTION

            Python setup.py entry_points syntax with triple single quotes
            Asked 2021-Sep-09 at 22:37

            I'm looking at extensions for CKAN, and their entry_points entries look like this:

            ...

            ANSWER

            Answered 2021-Sep-09 at 22:37

            Per response from Zharktas on CKAN's GitHub discussion board:

            The syntax is in .ini-style: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#creating-and-parsing "If data is a string or sequence of lines, it is first split into .ini-style sections (using the split_sections() utility function) and the section names are used as group names."

            Click commands implemented with IClick interface do not require entry in entry_points anymore as they are executed through the new ckan command instead of paster which required that you tell paster about them via entry_points.

            You can just remove whole entry if you want to support only CKAN 2.9.

            Source https://stackoverflow.com/questions/69111347

            QUESTION

            Disable Users (other than Sysadmins) from setting datasets/packages as Public in CKAN?
            Asked 2021-Mar-26 at 08:53

            Is there a way to disable users (other than Sysadmins) from setting datasets/packages as Public (or delete the dataset) in CKAN (basically and Editor that can't delete or set Public)? Somewhere in the source files I can see the logic related to this? Any extensions that would require user edits be approved by data stewards of a dataset before it is actually displayed to anyone on the platform (so that we could just include checking that the edit did no include setting the data/package as Public in the moderation process)?

            We want to give as much editing control to Editor-privileged users as possible while still preventing them from editing the Public/Private setting for data/packages as we want only sysadmins to have this control for certain data privacy and responsibility reasons.

            From the moderation route, saw this extension, but unsure if the moderation is before it is displayed (and don't have a server to test this on atm). Unsure if there are any other packages like this as the CKAN extension searchbar seems to only hit on exact words, so seems easy to miss extension that are conceptually similar but titled very differently.

            Anyone with more CKAN experience know how this could be achieved (else where approximately in the CKAN source code I could start looking into adding a new extension for this)?

            ...

            ANSWER

            Answered 2021-Mar-26 at 08:53

            Made my own extension to do what I needed: https://github.com/reedv/ckanext-publicrestrictiondatasets

            Adds restrictions to datasets so that only sysadmin users can set visibility to Public. This is in order to make CKAN's behavior match closer how it is described here (https://ckan.org/portfolio/publish-and-manage-data/).

            Admins can approve datasets for publication with our bulk editing tool which let’s you search, facets and pick datasets to become public or private.

            Source https://stackoverflow.com/questions/65755460

            QUESTION

            CKAN: how do I update/create the data dictionary of a resource using the api?
            Asked 2021-Mar-22 at 14:19

            My company is using a CKAN instance configured with Data Store and DataPusher. When a CSV file is uploaded to CKAN, DataPusher sends it to the DataStore and creates a default Data Dictionary for the resource. The Data Dictionary is a very nice feature to display the description of data fields for the users. Here is an example:

            I can update the Data Dictionary using the UI, or it can be sent as part of the Fields passed to datastore_create().

            My problem, is that I don't control the call of datastore_create() because this method is automatically called buy the DataPusher service.

            I want to programatically set the values of the Data Dictionary, but I can't find and api call that allow me to do it. An api call that update the Fields metadata. Can I do it using the Api? Or maybe it is possible create it when I create the data resource. I'd like a code example.

            ...

            ANSWER

            Answered 2021-Mar-22 at 14:19

            You can use the API call datastore_create on top of an existing table. This will not impact the data in the table.

            You should use the datastore_search to check the format of how the dictionary is saved in one of your resources (result->fields->info). Use that as your base, make the desired changes, and use it in the body of the datastore_create call.

            Unfortunately, the API call datastore_info does not give you back that information.

            The majority of the CKAN UI functionalities can be made through the API as well. In this case, you can make use of the "datastore_create" by the controller --> See Code here.

            Source https://stackoverflow.com/questions/66640439

            QUESTION

            Is there a way to disable API tokens for non-Sysadmins in CKAN?
            Asked 2021-Mar-20 at 11:39

            Basically, I want to totally disable API access for all user other than sysadmins (v2.9.1).

            1. Where in the code can I see the logic related to this? Closest I could find was via
            ...

            ANSWER

            Answered 2021-Mar-19 at 01:17

            Currently just hiding the API token generation tab from non sysadmin users in the web UI html (https://github.com/ckan/ckan/blob/cc000d3acf7401957d8321be53e8cabc2d9ebf3a/ckan/templates/user/api_tokens.html) by a similar mechanism that html templates can control visibility of the Visibility functionality of packages here (https://github.com/ckan/ckan/blob/master/ckan/templates/package/snippets/package_basic_fields.html#L72)...

            Source https://stackoverflow.com/questions/66667266

            QUESTION

            Incorrect loading order from local storage
            Asked 2021-Feb-24 at 10:37

            I'm having problem with loading from local storage.

            Here's a part of the code

            ...

            ANSWER

            Answered 2021-Feb-24 at 10:37

            Alright, as @Yoshi stated, it was insequential promise error. I managed to fix it by using reduce().

            Here are the threads that helped me

            Resolve promises one after another (i.e. in sequence)?

            Why Using reduce() to Sequentially Resolve Promises Works

            Source https://stackoverflow.com/questions/66333862

            QUESTION

            How can i convert a JSON file in R to a dataframe?
            Asked 2020-Dec-08 at 15:33

            I want to load the data from a JSON file into R to make a new dataframe. However the JSON file consists out of other links with data, so i can't seem to find the actual data from the JSON file. I got the JSON file from this website: https://ckan.dataplatform.nl/dataset/467dc230-20e0-4c3a-8240-dccbfc20807a/resource/531cc276-b88e-49bb-a97f-443707936a12/download/p-route-autoparkeren.json

            This is the code i used.

            ...

            ANSWER

            Answered 2020-Dec-08 at 15:31

            Maybe try fromJSON from package jsonlite

            Source https://stackoverflow.com/questions/65201743

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ckan

            You can download it from GitHub.
            You can use ckan like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ckan/ckan.git

          • CLI

            gh repo clone ckan/ckan

          • sshUrl

            git@github.com:ckan/ckan.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link