Giter Club home page Giter Club logo

malasakit's Introduction

malasakit

Build Status

Malasakit is a customizable participatory assessment platform that collects and integrates quantitative assessment, qualitative feedback, and peer-to-peer collaborative filtering on ways local communities can become better prepared for typhoons and floods.

The documentation for the project lives on the project pages site as well as the repository wiki. To get started, see the setup instructions and the guidelines for contributing to the project.

Permission is granted to copy and distribute this material, provided that the complete bibliographic citation and following credit line is included: "Copyright (C) 2017 UCB." Permission is granted to alter and distribute this material provided that the following credit line is included: "Adapted from (complete bibliographic citation). Copyright (C) 2017 UCB." This material may not be copied or distributed for commercial purposes without express written permission of the copyright holder.

malasakit's People

Contributors

jonathan-j-lee avatar justinmi avatar liboan avatar manolitooctaviano avatar msimora avatar sequoiatree avatar sjyk avatar thanatchapanpairoj avatar zeroh729 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

malasakit's Issues

Switching Language Bug

First load the site (in English). Then click the “menu” circle in the upper right. Then, in the menu, switch language to Filipino. Now click “back” in the upper right. For some reason it doesn’t work, and you have to click it again. (I double checked that without switching languages, it takes only 1 click.) The same problem occurs if you load it in Filipino and copy the process above, but switch to English

Fix style to comply with PEP 8

Much of views.py appears to use tabs, rather than the four spaces recommended by PEP 8. All existing (and future) code should transition to the use of spaces for indentation.

views.py assumes all ratings are in the database and fetched in order.

This one is sort of big. Here’s the link to the screenshot: https://drive.google.com/open?id=0B9O5aF-I424xVkhNVGZPd05Xdms. I accessed the page at http://opinion.berkeley.edu/pcari-test/comparison/5/ and then I randomly switched between pages by modifying the page number in the link and using the provided buttons. Will notify the team once ableFor example, when you are on the landing page, click begin, backspace / hotkey for “back”, and then begin again from the landing page, there is a CSRF verification error. to replicate. In the meantime, I have provided the error message so we can get started on addressing this one right away. The problem is that lines 332 - 350 in views.py assumes all ratings are in the database and fetched in order.

Unit tests

Write unit tests for all of the views. This means generating post requests with data and testing to see if the data is stored properly.

Display average quantitative question ratings

The current implementation of generating histograms of quantitative question ratings is copy-and-pasted. That is, a for-loop in Django's templating language creates multiple script tags, each corresponding to one histogram. The histogram data is passed into the template.

We should only have one script with reusable components (that is, functions), and pull histogram data dynamically using AJAX calls to endpoints.

Edit: see comments below.

Validate data

We can use validators to sanity check model data on assignment (e.g. preventing negative numbers when storing an age).

Minifier

Minify resources and pages (i.e. eliminate syntactically unimportant whitespace) to reduce file sizes.

Add Pylint to Travis Build

Currently, pylint fails badly with the code (e.g. -12.60/10 for views.py). However, once the code base is cleaned up, we will want to enforce good style.

Fix cafe/urls.py to avoid hard coding urls.

E.g "urlpatterns = [
url(r'^v21/', include('pcari.urls')),
url(r'^admin/', admin.site.urls),
url(r'^pcari/', include('pcari.urls')),
]"

Remove these patterns and always reference the root.

Set up Docker

Putting dependencies on Docker containers allows easier integration between our machines, and makes setup for new users easier as well.

FB Webhook

make sure that Facebook sharing works

Changing languages doesn't always work (see comments)

From the google doc:

  • First load the site (in English). Then click the “menu” circle in the upper right. Then, in the menu, switch language to Filipino. Now click “back” in the upper right. For some reason it doesn’t work, and you have to click it again. (I double checked that without switching languages, it takes only 1 click.) The same problem occurs if you load it in Filipino and copy the process above, but switch to English.

  • When you are writing your own idea in the text box, there are a few issues with switching languages. It was loaded in Filipino, and I clicked “menu”. It took 2 clicks to switch languages to English, and it took 3 for “back” to work. Once I did get back to the page with the text box, the language reset back to Filipino. (Notably, when I clicked “menu” again, that page was still in English). Then, switching to English on the main page also makes the menu switch back to Filipino...

Template inheritance

Currently, most templates share the same frontmatter (for instance, the head tag). To cut down on redundant boilerplate and make creating new templates easier, templates should inherit from a base template.

Remove SQLite files

Now that we have agreed to not commit SQLite files, we should remove the data in malasakit-django (to avoid noisy commits when SQLite files are updated).

404 Page

Add a 404 page or 404 redirect for invalid GET requests

Make database add-only

Once a record is written to the database (especially concerning user data), it should never be able to be deleted. We should have flags that indicate whether a record is active or not.

0-9 is arbitrary, change that interface

Rating from 0-9 seems sort of arbitrary without any frame of reference. For example in question 1, instead of “select a number”, there could be a statement by each number, or for every few numbers. For example, “0: I have not suffered due to a flood, and know no one who has suffered due to a flood.” All the way up to “9: I have lost a home or loved one to a flood.”

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.