GithubHelp home page GithubHelp logo

punkch / oipa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zimmerman-team/iati.cloud

0.0 2.0 0.0 40.82 MB

OIPA extracts all published IATI XML files from the IATI Registry and stores them in a PostgreSQL database, that you can access using a RESTful API.

Home Page: https://www.oipa.nl

License: GNU Affero General Public License v3.0

Python 77.37% HTML 5.18% CSS 17.14% JavaScript 0.26% Ruby 0.05%

oipa's Introduction

OIPA


Please make sure to use the develop branch. We will be merging the develop branch into master in January 2019. Default branch therefore is currently set to Develop.

Codacy Badge License: AGPLv3 Open issues CircleCI

OIPA extracts all published IATI XML files from the IATI Registry and makes them available in a normalised PostgreSQL database, that you can access using a RESTful API.

IATI is a global aid transparency standard and it makes information about aid spending easier to access, re-use and understand the underlying data using a unified open standard. You can find more about the IATI XML standard at: www.iatistandard.org

Requirements

Name Recommended version
Python 3.6.5
PostgreSQL 9.6
Redis 4.0.x
PostGIS See: installing PostGIS
SpaciaLite (for tests) See: installing SpatiaLite

Quick start

  1. Go to your OIPA folder.
  2. Run virtualenv <name> -p python3 to create a virtual environment
  3. Run source env/bin/activate to activate the virtual environment
  4. Install required libraries using pip install -r requirements.txt
  5. Create a PostgreSQL database
  6. Set your database credentials in OIPA/.env file as follows:
    • OIPA_DB_NAME= your_database_name
    • OIPA_DB_USER= your_db_user
    • OIPA_DB_PASSWORD= your_db_password
  7. Run database migrations with python manage.py migrate
  8. Start the development server: python manage.py runserver
  9. In order for the parser to work, you need to start Redis too: redis-server
  10. Create a superuser account: python manage.py createsuperuser
  11. Start the process control centre (Supervisor): python manage.py supervisor
  12. Open your browser at localhost:8000
  13. Follow instructions for signing-in: http://docs.oipa.nl/en/latest/admin_interface
  14. Finally, follow the instructions from here: http://docs.oipa.nl/en/latest/where_to_start

Happy Hunting!

For more detailed information, see the install documentation

Full Documentation

Full documentation (which, at this point, needs an update) on installing, running and using OIPA can be found at docs.oipa.nl

About the project

Can I contribute?

Yes please! We are mainly looking for coders to help on the project. If you are a coder feel free to Fork the repository and send us Pull requests!

How should I contribute?

Python already has clear PEP 8 code style guidelines, so it's difficult to add something to it, but there are certain key points to follow when contributing:

  • PEP 8 code style guidelines should always be followed
  • When making commits, in the first line try to summarize changes (in around 50 characters or less) and in the message body (if needed) try to explain what you did, and, most importantly, why. Try to avoid commit messages like "Moving to Python 3" or "Fixed bugs". Other developers should be able to understand why the change was made!
  • Always try to reference issues ("related to #614", "closes #619" and etc.)
  • Avoid huge code commits where the difference can not even be rendered by browser based web apps (Github for example). Smaller commit make it much easier to understand why the change was made, why (if) it resulted in certain bugs and etc
  • When developing new feature, write at least some basic tests for it. This helps not to break other things in the future
  • If there's a reason to commit code that is commented out (there usually should be none), always leave a "FIXME" or "TODO" comment so it's clear for other developers why this was done
  • When using external dependencies that are not in PyPI (from Github for example), stick to a particular commit (i. e. git+https://github.com/Supervisor/supervisor@ec495be4e28c694af1e41514e08c03cf6f1496c8#egg=supervisor), so if the library is updated, it doesn't break everything
  • In the near future, automatic code quality / testing checks (continuous integration tools) will be implemented to check all these things automatically when pushing / merging new branches. Quality is the key!
  • These rules are to be extended

Running the tests

Pytest-django is used to run tests. This will be installed automatically when the project is set up.

To run tests, from the top level directory of the project, run pytest OIPA/. If you are in the same directory where manage.py is, only running pytest will be sufficient. Refer to Pytest-django documentations for details.

Tip: to be able to use debuggers (f. ex. ipdb) with pytest, run it with -s option (to turn off capturing test output).

Testing / code quality settings can be found in the setup.cfg file. Test coverage settings (for pytest-cov plugin) can be found at .coveragerc file.

Who makes use of OIPA?

oipa's People

Contributors

vincentvw avatar bryanph avatar eimis avatar zz-read avatar murrx avatar luminhan-zz avatar hatimkh avatar ngaranko avatar berjan avatar vplme avatar martizs avatar bjwebb avatar taufik-hidayat avatar hatimmo avatar zemanel avatar kjod avatar andylolz avatar evilurge avatar petecoward avatar rorads avatar marcoamsterdam avatar

Watchers

James Cloos avatar Pencho BELNEYSKI avatar

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.