Coder Social home page Coder Social logo

yemeni / tolaactivity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toladata/tolaactivity

1.0 1.0 0.0 83.89 MB

Workflow, visualizations and data services for managing NGO projects and programs

Python 56.52% Shell 0.06% JavaScript 8.05% HTML 35.37%

tolaactivity's Introduction

Tola Activity Build Status Coverage Status

http://toladata.com/products/activity/

TolaActivity extends the functionality of TolaData to include a set of forms and reports for managing project activities for a WorkflowLevel1. It includes workflow for approving and completing projects as well as sharing the output data.

TolaActivity functionality http://www.github.com/toladata/TolaActivity is intended to allow importing and exporting of project specific data from 3rd party data sources or excel files.

Configuration

Location of settings:

  • Development: tola/settings/dev.py
  • Test runner: tola/settings/test.py and tola/settings/test_pkg.py
  • Staging/Production: tola/settings/local.py

Check the documentation on setting up search functionality in search/Readme.md

Deploy locally via Docker

Build first the images:

docker-compose -f docker-compose-dev.yml build

To run the webserver (go to 127.0.0.1:8080):

docker-compose -f docker-compose-dev.yml up # -d for detached

User: admin Password: admin.

To run the tests:

docker-compose -f docker-compose-dev.yml run --entrypoint '/usr/bin/env' --rm web python manage.py test # --keepdb to run second time faster

To run the package building tests, follow these steps:

docker-compose -f docker-compose-dev.yml run --entrypoint '/usr/bin/env' --rm web bash
# Now inside the container
pip freeze | grep -v "^-e" | xargs pip uninstall -y; pip uninstall -y social_auth_core; cat requirements/base.txt | grep "^Django==\|^psycopg2" | xargs pip install; pip install -r requirements/pkg.txt
python manage.py test --tag=pkg --keepdb

To run the webserver with pdb support:

docker-compose -f docker-compose-dev.yml run --rm --service-ports web

To run bash:

docker-compose -f docker-compose-dev.yml run --entrypoint '/usr/bin/env' --rm web bash

or if you initialized already a container:

docker exec -it web bash

To connect to the database when the container is running:

docker exec -it postgres psql -U root tola_activity

If the database is empty, you may want to populate extra demo data to play around with Activity:

docker-compose -f docker-compose-dev.yml run --entrypoint '/usr/bin/env' --rm web python manage.py loadinitialdata  --demo

(Be careful using this, only on demo!) If the database is already populated and you want to restore the default data:

docker-compose -f docker-compose-dev.yml run --entrypoint '/usr/bin/env' --rm web python manage.py loadinitialdata  --restore

Issue with the local environment

If you're getting an error in your local environment, it can be related to the social-core library. To solve this issue you need to execute the following step:

  • With the container running, go into it with this command:

    docker exec -it web bash

  • Install the social-core lib again:

    pip install -e git://github.com/toladata/social-core#egg=social-core

  • Now, restart the container.

It should solve the problem!

Deploy locally using virtualenv

Given pip is installed:

pip install virtualenv

Create the environment:

virtualenv —no-site-packages venv

Note: use no site packages to prevent virtualenv from seeing your global packages.

Activate the environment:

. venv/bin/activate

or:

source venv/bin/activate

Install requirements:

pip install -r requirements/dev.txt

Set up database:

python manage.py migrate

Run the server:

python manage.py runserver 0.0.0.0:8000

Creating PRs and Issues

The following templates were created to easy the way to create tickets and help the developer.

  • Bugs and Issues [+]
  • New features [+]
  • Pull requests [+]

tolaactivity's People

Contributors

jefmoura avatar odenypeter avatar minedamnesia avatar dborchers avatar joash avatar mattjurz avatar crajapax avatar denisneuling avatar augustmiller avatar mahmoodkhan avatar aziz-haddad avatar startakovsky avatar ybekdemir avatar

Stargazers

Marwan Al-Ragehi avatar

Watchers

Yousef Al-Hadhrami 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.