Giter Club home page Giter Club logo

ckanext-openafrica's Introduction

openAFRICA CKAN Extension

CKAN theme for openAFRICA platform accessible at https://openafrica.net/

Development

Then follow the steps below to install the openAfrica extension:

Step 1:

  • Activate your virtual environment; use the path to your virtual environment. On Mac OSX, you may have to use /usr/local/lib/ckan/default/bin/activate. You can copy the code as it is below, including the preceeding dot.
. /usr/lib/ckan/default/bin/activate

Step 2:

  • Install the extension

If you are not a developer and just want to install the extension from package, just run this command from your virtual environment:

pip install ckanext-openafrica

Note: If you wish to modify the extension in any way, you can download the source code and install the extension manually. To do so, execute the following command:

$ pip install -e git+https://github.com/CodeForAfrica/ckanext-openafrica.git#egg=ckanext-openafrica

Alternatively: You can clone this repo (preferrably into the /src directory where you installed CKAN), cd into ckanext-openafrica and run

$ python setup.py develop

Step 3:

  • Modify your configuration file (generally in /etc/ckan/default/production.ini) and add openafrica in the ckan.plugins property.
ckan.plugins = openafrica <OTHER_PLUGINS>

Step 4:

  • Restart your server:
paster serve /etc/ckan/default/production.ini

OR

paster serve --reload /etc/ckan/default/production.ini

With --reload, your server is restarted automatically whenever you make changes in your source code.

If your extension is installed successfully, your page will change to the openAfrica theme.

Note: This extension, being a thememing extension, may override templates from other extensions. Templates in /ckanext/openafrica/templates may require some modifications to render properly with openAfrica extension.

Contributing

If you've found a bug/issue in the extension, open a new issue here _ (try searching first to see if there's already an issue for your bug).

If you are interested in contributing to the development of openAfrica extension, you are welcome. A good starting point will be reading the CKAN general Contributing guide. Then you can checkout existing issues that are open for contribution; new features and issues are welcome. To work on any issue, comment on the issue to indicate your interest and the issue will be assigned to you. It is always a good idea to seek for clarification (where necessary) on any issue you work on.

It is important that changes that require some form of configurations should be documented in the README.


License

GNU General Public License

openAFRICA aims to be the largest independent repository of open data on the African continent. Copyright (C) 2017 Code for Africa

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

ckanext-openafrica's People

Contributors

davidlemayian avatar jmwenda avatar kelvinkipruto avatar koechkevin avatar mevey avatar phillipahereza avatar thepsalmist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ckanext-openafrica's Issues

Update logos

Update the following logos on home and about page:

  • Remove AMI logo (?)
  • Latest WB logo
  • Latest OKF logo
  • Add Google logo
  • Add ICFJ logo

UndefinedError: 'dict object' has no attribute 'tracking_summary'

I started having this error after pulling from the current develop branch.

I suspect something went wrong while merging develop/master. @DavidLemayian

Before the merge, this error was noticed in master but not in develop. But recently, the error was brought to my knowledge by Ignatius.

To replicate the error, pull from develop, reload the server and navigate to /dataset.

I will be pushing a fix to the error soon, Or we revert the merge, fix the bug and remerge.

Better social share meta tags info

When sharing a dataset link, the social sharing meta tags should include a more appropriate title + description, e.g of the dataset/page title + short description.

Round circles for organisation icons on organisation pages cut off most of the icons

The existing rectangular icons/logos used for all organisations on openAFRICA work fine on http://52.19.159.10/organization + http://52.19.159.10/group pages.

But on the organisation pages themselves, the new openAFRICA design uses a round space for logos which is currently cutting off the majority of the organisational logos:
http://52.19.159.10/organization/ancir
http://52.19.159.10/organization/code-for-kenya

How could we fix that?

[Showcases] Improve landing page

Currently the showcases landing page doesn't give users enough information on what the page is and what to expect. We should therefore improve it by:

  1. Adding a title header.
  2. Adding a description of the page and what to expect.
  3. Adding featured showcases that we have moderated / copy edited to stand out.

Wireframe:

screen shot 2018-02-28 at 12 27 51

Create QZ Atlas for Africa page

We should create a page showcasing the charts created by QZ Atlas for Africa team.

Roadmap:

Read more here.

Add tests

Currently, this extension does not have any test.
There is need to write test for the entire extension. This may mean splitting this issue into tasks -
Unit test, Integration test and E2E test.

  • Unit tests
  • Integration Test
  • E2E Test

Your thoughts @DavidLemayian and @shemogumbe.

Make openafrica more mobile responsive.

Currently:

On mobile, most of the pages are not responsive. In some cases, particularly the sidebar, there are overflowing texts. One most serious case is the /dataset page where the datasets are displayed as static white boxes.

Desired Behaviour:

The pages should be responsive with regards to the modern mobile devices.
No text overflows.
No missing or unintentionally hidden components.

Dev Notes:

Prefer vertical scrollability to horizontal scrollability: What this means is that pages should horizontally fitted to the device screen and vertically scrollable.

Screenshots:

This is /dataset page; static white boxes displayed

image

This is user profile page

image

This is /datarequest page; the sidebar

image

How to replicate the behavior:

Just open https://africaopendata.org on your mobile device and navigate to different pages.

Suggestions:

This issue may have to be broken into smaller tasks, to cover all areas affected.

Dataset counter broken on organisation pages

At the top of each organisation page, there is a blue box underneath the description which should show the number of datasets that that organisation has uploaded to openAFRICA. But all the counter boxes seem to show 0 datasets even for organisations with dozens or hundreds of datasets on openAFRICA:
http://52.19.159.10/organization/ancir
http://52.19.159.10/organization/code-for-africa

Dataset counters do seem to be working fine on the http://52.19.159.10/organization page

Update documentation

The documentation for this extension could be better so let's add comments into the code as docstrings and inline where needed.

Change homepage text

Change the text on the homepage:

Africa's Largest Volunteer Driven Open Data Platform
openAFRICA aims to be largest independent repository of open data on the African continent

screen shot 2016-03-27 at 12 36 27 pm

Include "suggest a dataset" functionality

This would give users the ability to suggest a dataset that may not be available on openAFRICA and even for other users to contribute the dataset if known.

Quick suggestions:

  1. Using/Re-using an already built ckan extension for this?
  2. Using a forum/Zendesk like approach for this.

Add Data Request button on openafrica home page.

Currently:

When you install ckanext-datarequest on your ckan instance, it shows the button for DATAREQUEST. But once ckanext-openafrica is installed, the button is overridden.
Navigating to /datarequest show the page for requesting for dataset but the button is missing on the home page. see https://africaopendata.org/datarequest

Desired Behaviour:

A user should be able to see the datarequest button on the home page, which when clicked, should navigate to /datarequest.

Why This Issue is Important:

Without the button, the user may not have any clue that datasets can be requested for. Moreover, a user who is aware of datarequest will not have to type /datarequest but can easily navigate to the page by clicking on the button.

Notes:

  • This issue can easily be handled by replicating the Suggest a dataset button shown at the bottom when no dataset is found for a user's search.
  • Since ckanext-datarequest adds the button, it seems like a bug when the button does not appear after installing ckanext-openafrica

Let's also ensure there is a way to check if data requests extension is activated before it shows the link to avoid 404 in a case where it isn't
by @DavidLemayian

.

Move to using Sass

Sass provides for a more streamlined approach to writing and compiling CSS. We should therefore move to using it. Cost-benefit analysis needs to be done though e.g learning curve, development process degradation, etc.

Show view counts on the packages and resources.

I think adding view counts on the packages and resources could be a good feature on ckanext-openafrica. The view count will show how many views a dataset or resource has received.

DEV NOTES:
User should be able to enable or disable the view counts from config.ini.

CkanUrlException Error Issues with ckanext-openafrica and CKAN 2.8

Greetings,

I have ckanext-openafrica running well under CKAN 2.7 in a test environment. Since they're now on version 2.9, I decided to move up one level to CKAN 2.8. Ckanext-openafrica and ckan 2.8 don't seem to get along. :)

I'm getting errors when logging into the user dashboard:

File "/usr/lib/ckan/default/src/ckanext-openafrica/ckanext/openafrica/templates/header.html", line 49, in block "header_wrapper"
   <a href="{{ h.url_for(controller='user', action='dashboard') }}">Control Panel</a>
 File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 332, in url_for
   return _local_url(my_url, locale=locale, **kw)
 File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 537, in _local_url
   raise ckan.exceptions.CkanUrlException(error)
CkanUrlException: There is a broken url being created {'action': 'dashboard', 'controller': 'user'}

Looking at the code the error seems to be triggered triggered by this bit in function _local_url under section lines 535-539 of helpers.py, which is as follows:

if url == '/packages':
    error = 'There is a broken url being created %s' % kw
    raise ckan.exceptions.CkanUrlException(error)

return url

Any thoughts on how to get around it?

Repetition of text in 'Who uses openAFRICA?' text on homepage

Text on homepage currently says:

Find out who and how several actors are using open data to address some of Africa's challenges
address some of Africa's challenges

Should be:
Find out who and how several actors are using open data to address some of Africa's challenges

Better define extension dependencies

Should openAFRICA depend on other extensions, we should provide an easy way to define them here so that deployment is a lot more streamlined.

Register button not present until you visit the Login page

Currently:

When you install the Open-Africa extension, the Register button is absent at the top right side of the page where it is found without the extension. However, clicking on Log in takes you to the Login page where you can find the Create an account button.

Desired behaviour:

The Register button should be present on the page header beside the Log in button so that users can easily find it when they need it.

Why this issue is important:

Most users will expect to find a register button on the Homepage and might not think that they need to visit the Login page in order to find the Register button

Notification of profile update is partially hidden by menu bar

Currently

When a user updates their profile, the alert that comes up is partially hidden by the menu bar.

screen shot 2017-09-22 at 12 17 48 pm

Desired

Notification of profile update should be completely visible.

Why this feature is important

Users of the extension will trust the team more if styling of elements is done right.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.