Giter Club home page Giter Club logo

feti's Introduction

Welcome to the FETI code base!

Join the chat at https://gitter.im/kartoza/feti Build Status

FETI is a django application for mapping acadamic institutes and their courses in the Western Cape.

Please note that this project is in the early phase of its development.

License

Code: Free BSD License

Our intention is to foster wide spread usage of the data and the code that we provide. Please use this code and data in the interests of humanity and not for nefarious purposes.

Setup instructions

Simple deployment under docker

Overview

You need two docker containers:

  • A postgis container
  • A uwsgi container

We assume you are running nginx on the host and we will set up a reverse proxy to pass django requests into the uwsgi container. Static files will be served directly using nginx on the host.

A convenience script is provided under scripts\create_docker_env.sh which should get everything set up for you. Note you need at least docker 1.2 - use the installation notes on the official docker page to get it set up.

Check out the source

First checkout out the source tree:

git clone git://github.com/kartoza/feti.git

Build your docker images and run them

You need to have http://docker.io and http://docs.docker.com/compose/ installed first. (docker-compose is the replacement of fig http://fig.sh which was deprecated)

Note you need at least docker 1.2 - use the installation notes on the official docker page to get it set up.

Docker-compose will build and deploy the docker images for you. Note if you are using apt-cacher-ng (we recommend it as it will dramatically speed up build times), be sure to edit docker-prod/71-apt-cacher-ng and comment out existing lines, adding your own server. Alternatively if you wish to fetch packages are downloaded directly from the internet, ensure that all lines are commented out in your hosts:

  • docker-prod/71-apt-cacher-ng
  • docker-dev/71-apt-cacher-ng
cd deployment
docker-compose build
docker-compose up -d uwsgi
docker-compose run migrate
docker-compose run collectstatic

Setup nginx reverse proxy

You should create a new nginx virtual host - please see jakarta-flood-maps-nginx.conf in the root directory of the source for an example.

For local development

Install dependencies

virtualenv venv
source venv/bin/activate
pip install -r REQUIREMENTS-dev.txt
nodeenv -p --node=0.10.31
npm -g install yuglify

Create your dev profile

cd django_project/core/settings
cp dev_timlinux.py dev_${USER}.py

Now edit dev_<your username> setting your database connection details as needed. We assume you have created a postgres (with postgis extentions) database somewhere that you can use for your development work. See http://postgis.net/install/ for details on doing that.

Running migrate, collect static, and development server

Prepare your database and static resources by doing this:

virtualenv venv
source venv/bin/activate
cd django_project
python manage.py migrate --settings=core.settings.dev_${USER}
python manage.py collectstatic --noinput --settings=core.settings.dev_${USER}
python manage.py runserver --settings=core.settings.dev_${USER}

Note: You can also develop in docker using the instructions provided in README-dev.md.

feti's People

Contributors

anitanh avatar cchristelis avatar dimasciput avatar euclidian avatar gitter-badger avatar gubuntu avatar gustry avatar lucernae avatar meomancer avatar myarjunar avatar nyakudyaa avatar pierrealixt avatar timlinux avatar

Stargazers

 avatar  avatar

Watchers

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

feti's Issues

Geocoding script

We need a geocoding script to locate campuses based on their addresses. This can later be incorporated as a management command.

link behaviour problem

I know these links are going to change but I noticed it needs two clicks on either Find or Project team login before it does anything

Create a PDF with the current search results and map

Outline

We need to allow the user to share the current results as a printable PDF. The format of the PDF is slightly different to the on screen version and hence a custom pdf should be generated.

Proposed solution

All the information required is already on the client side. It is hard to recreate the same map on the server. Therefore I suggest that we use a client side pdf generation tool.

(Also in #41)

Search results not being kept in the search box.

Since the search is very central in this application and the current page state hinges on that:

  • keep those terms in the current search box
  • have button to reset / restart search (now in #82)
  • add search string to url (RESTful) so it can be bookmarked and shared (in spec c iv)

Need to review default values for the import

For the import, I've set some default values about the new fields :
course.py : _long_description
campus.py : _long_description, _complete

We may check that together Christian if we need.

Turn this into a single page app

Currently we have 3 pages. The search and results, the login and the admin page(s). I would be great if the user experience could all happen from the front page. This would imply, Removing the find link. Changing the login page and to an ajax query hovering over the page.

incorrect search results

I searched for 'fibre processing' and result included at least one record without that string

screenshot from 2015-06-03 14 58 40

And I searched for 'fibre' and got no results!

Load most recent data

  • Update / merge spreadsheet and MS Access database and load into PostgreSQL such that the FETI database is fully populated with all available course, provider and lookup table data. As clean as possible, no duplicates, etc.
  • load geocoding results and update campus geometry column with them.
  • test and confirm acceptance by FETI, than back up and use for deployment.

Thereafter, all data maintenance will happen on the live database via the admin functions of the website or via other backend db clients.

fields and placeholders in results

In the sidebar and popup results, it would be nice to more clearly see what each item in the result represents. (returned popup fields must be as per #13)

The name of the provider and list of courses are fairly obvious, but 'None' in the popups and the item before the colon in the sidebar results - what do they represent? and if they are empty, do we put dummy or greyed out text in their place?

RFC: Investingate Search Options

RFC:

Problem:

The site is very search centric and as such choosing the best search solution is important.

Proposed Solution:

A very common search app is haystack (http://haystacksearch.org/). This in conjunction with Solar may be the correct solution for this site.

Expected Outcome:

  • Briefly review alternatives and if there is a much better solution we should consider this.
  • Investigate haystack and solar to define the system requirements and estimate the time and effort to implement this.
  • Provide a implementation breakdown.

Handle results

Refer to spec 3c i-iv

The results of a search must:

  • appear in the RH panel, alphabetical order showing Providers incl campuses.
  • appear in detailed list with courses that meet search criteria as in http://pi.mapaproject.org/, with same fields as popups (Gavin thinks all available info about a course should be returned -- i.e. all fields and lookups)
  • if multiple courses per provider are returned, the provider itself must only appear once (slight modification of c i)
  • download pdf of search results (as they appear below the map) (#67)
  • --optional nice to have -- A email results link could be quite useful. Adding an email option can be achieved by simply sending a search query with the currently entered search terms.

implement admin functionality

input from March:

This seems to be some way off at the moment?
The key thing is to have one function for courses, where you can search for individual courses (partial name searches must work as well) and access / edit all fields for that course.
Ditto for Provider.

This is a jumble of different fields which are not navigable (e.g. to edit providers details there are three different options).

What is required is on point of entry per provider, where all the fields can be edited. Mandatory fields to be kept to an absolute minimum at this stage while the data is so raw.

This should all be achievable through Django admin configuration.

A popup on the map.

A popup on the map should provide the user with information on the selected course/ campus.

Provider popup

This for searches that exclude courses and for the home page where only Providers are mapped by default.

  • Bubble to clearly locate the placemarker on the map and to include the following from the database: Provider, Provider Address, status, URL

Course popup

Active in all cases not covered by Provider popup conditions.

  • Bubble to clearly locate the placemarker on the map and to include the following from the database: Provider, Provider address, Provider Status, Course name, Level and any information associated with the level. There are four different ‘Level’ fields. Where a value is NULL for any of those ‘Level’ fields, it should be invisible in the Pop-up bubble. In March's review of the data it looks as if there should be a maximum of two different ‘Levels’ in any record.

Course description

The course description needs to be shown next to the course and there should be a default showing users that this hasn't yet been loaded.

Expand / Unexpand courses at each campus

We currently show all the courses expanded under the various campuses. This may be a bit much. It would be better if these where minimized and when the user is allowed to expand the courses offered at each campus.

RFC: Add fine grained permissions.

RFC

Problem.

The user permissions seem to be more finely grained than a simple binary flag can solve. For this purpose we should add a permissions module to grant users access to editing various models.

Proposed Solution

The built auth in conjunction with models.Permission could be set up to serve this purpose.

Expected Outcome

  • Investigate alternatives.

- Provide an implementation breakdown.

popup placement

larger popups headers go under the top bar. The map should pan to show the whole popup.

very large popups cross the whole map and you lose control. They should be concertina'd or tabbed or reduced in some way.

It only seems to behave like this when clicking in the side bar. If you click on the map, it pans properly (though large popups still need to be reduced to fit on the screen.)

Fuzzy search results

The search is quite powerful. But also this causes issues when a user tries to search for something and he misspells. This may leave a 0 results page, which is quite frustrating. Increasing the fuzziness of the search results may assist here.

Many to many

The course campus link should not be managed by a link model, but rather by django implicitly and as a many to many relationship between campus and course. (as attribute of the campus.)

Non-superuser admin page.

The non-superuser admin page should allow the logged in users to add/edit those tables that they have permissions for.

admin login does nothing

I can login now as gavin or March but then just get the same search page with an option to log out. No editing functionality?

Where is Django admin?

Popup on selection

When a campus or course is selected (clicked on) on the panel the map zooms to the selection. The popup should be visible at this point.

Search box in navigation bar

The search box is currently in the side panel and hence when scrolling it can go out of view. Hence it should be moved into the navigation bar.

Results below map.

Please add a list of results below the main map. These should be an expanded version of the list on the right.

add logos to top bar

IPSS and UWC logos are in django_project/feti/static/feti/images/.

Please provide specs (size and resolution) for final images to be supplied by client.

also feel free to move the images to a more django-best-practice location in the repo.

duplicate courses?

several providers show what appear to be duplicate courses, e.g.
screenshot from 2015-06-03 15 51 13

If these are not duplicates, then more fields should be shown to allow them to be discriminated.

If they are duplicates perhaps we need another round of improving the data import?

Zoom to extents

The default zoom should always include all results.

The zoom to a specific campus is too deep. A more reasonable zoom level should be selected there.

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.