{"id":16200955,"url":"https://github.com/marks/polio","last_synced_at":"2025-04-07T18:16:35.194Z","repository":{"id":34453510,"uuid":"38388899","full_name":"marks/polio","owner":"marks","description":"Web application developed for UNICEF in order to collect, store, aggregate and visualize information on the Global Polio Eradication Initiative.","archived":false,"fork":false,"pushed_at":"2015-06-30T02:00:46.000Z","size":20017,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T20:15:03.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marks.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-01T18:50:09.000Z","updated_at":"2018-08-28T14:24:40.000Z","dependencies_parsed_at":"2022-09-17T12:01:52.588Z","dependency_job_id":null,"html_url":"https://github.com/marks/polio","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fpolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fpolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fpolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fpolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marks","download_url":"https://codeload.github.com/marks/polio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704572,"owners_count":20982298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:34:59.194Z","updated_at":"2025-04-07T18:16:35.160Z","avatar_url":"https://github.com/marks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Set up\n\n## Prerequisites\n\n1. [Python][] 2.7\n2. [PIP][]\n3. [Node][] \u003e= 0.10.0\n4. [Ruby][] 2.0\n5. [PostgreSQL][]\n\n## Recommended\n\n1. [Virtualenv][]\n2. [Virtualenvwrapper][]\n\n## Building technical documentation\n\n1. cd docs\n2. make clean\n3. make html\n4. Docs files now available here: docs/_build/html\n\n## Setting up the development environment\n\n### Virtual Environment (optional)\n\nIt is recommended that you create a virtual environment for Python. For more\ninformation see the documentation on [virtualenv][] and [virtualenvwrapper][].\n\n### Installing backend dependencies\n\n    $ pip install -r requirements.txt\n\nIf you are not installing in a virtual environment, you may require root\nprivileges, so you'll need to `sudo` the above command.\n\n### Installing frontend dependencies\n\n    $ npm install\n    $ npm install -g gulp bower\n    $ bower install\n    $ sudo gem install sass compass\n\nIf you don't want to install `gulp` or `bower` globally (with the `-g` flag),\nyou can run them from the copies installed in `node_modules` by running\n\n    $ ./node_modules/.bin/gulp\n    $ ./node_modules/.bin/bower\n\n## Setting up the database\n\n    $ createuser --no-createdb --no-createrole --no-superuser --password djangoapp\n    Password: \n    $ createdb --owner djangoapp polio\n    $ python manage.py syncdb\n    $ python manage.py migrate\n\nThe password for the djangoapp user can be found in `settings.py`.\n\n## Building\n\n    $ npm run build\n\nThis will compile the SASS, pack the JavaScript, and place both in the `static/`\ndirectory along with all the fonts. If you have `gulp` in your `PATH`, you can\nalso run:\n\n    $ gulp build\n\n## Deploying\n\n    $ npm run dist\n\nThis will build the frontend, collect all of Django's static files, and then\ncreate zip files for the frontend and backend in the `dist/` directory:\n\n1. uf04-backend.zip\n2. uf04-frontend.zip\n\nEach contains the source necessary to deploy the backend and frontend,\nrespectively. These can be copied to whatever server is hosting each of those\ncomponents.\n\nThe JavaScript and CSS in the frontend zip file is minimized.\n\nIf you have `gulp` in your `PATH`, you can also run:\n\n    $ gulp dist\n\n### Deploying the backend\n\nYou'll need to configure Apache and WSGI on whatever server you're deploying to,\nand set up a PostgreSQL database for the application first. Make sure that\nApache is configured to use the\n[prefork MPM](https://httpd.apache.org/docs/2.4/mpm.html); the worker and event\nMPMs result in incorrect responses returned for requests when multiple requests\nare made to the server.\n\nFor more information on deploying [Django][] applications, see the\n[Django documentation](https://docs.djangoproject.com/en/1.7/howto/deployment/).\n\n#### Build the application and copy it to the server\n\n    $ npm run dist\n    $ scp dist/*.zip \u003cserver\u003e\n\n#### Unzip the application files\n\n    $ ssh \u003cserver\u003e\n    $ unzip -o uf04-backend.zip -d \u003cpath/to/python/docroot\u003e\n    $ unzip -o uf04-frontend.zip -d \u003cpath/to/static/files/docroot\u003e\n    $ chown -R \u003capache user\u003e \u003cpath/to/python/docroot\u003e\n    $ chown -R \u003capache user\u003e \u003cpath/to/static/files/docroot\u003e\n\n#### Update Python dependencies\n\n    $ cd \u003cpath/to/python/docroot\u003e\n    $ pip install -r requirements.txt\n\n#### Update the database\n\n    $ python manage.py syncdb --migrate\n\nYou may need to use the `--settings` option for `manage.py` if your\n`settings.py` is not in `PYTHONPATH`.\n\n    $ bash bin/build_db.sh\n\nYou will need to make sure that whatever user you are executing `build_db.sh` as\nis recognized by the PostgreSQL database and is the owner of the views being\nmodified by the script.\n\nFinally, you'll need to restart Apache.\n\n### Deploying the frontend\n\nThe frontend files can be served statically by any webserver. Make sure that\nthe `STATIC_URL` setting in the backend's `settings.py` is set to wherever you\ndeploy the static files. ([Read more about static files in Django.][static-files])\n\n[static-files]: https://docs.djangoproject.com/en/1.7/howto/static-files/)\n\n# Gulp tasks\n\nThe default task runs `clean`, `fonts`, `browserify`, and `styles` so that if\nyou simply execute\n\n    $ gulp\n\nfrom the command line it will build the entire frontend for development.\n\n## build\n\nCompile the SASS, pack the JavaScript, and copy both, along with any fonts into\n`static/`.\n\n## clean\n\nDelete the `build/`, `dist/`, and `static/` directories.\n\n## dist\n\nBuild the backend and frontend zip files. (Executes `dist-py` and `dist-ui`.)\n\n## dist-py\n\nCreate `dist/uf04-backend.zip` which contains `requirements.txt` and all of the\nPython and SQL files.\n\n## dist-ui\n\nExecute `collectstatic` and then zip up all of the files contained in `build/`.\nThe zip file is `dist/uf04-frontend.zip`.\n\n## watch\n\nStart a livereload server and watch SASS and JavaScript files for changes. Run\n`gulp styles` whenever SASS changes, and `gulp browserify` whenever JavaScript\nchanges.\n\n[Django]: https://djangoproject.com/\n[Node]: http://nodejs.org/\n[PIP]: https://pip.pypa.io/en/latest/\n[PostgreSQL]: http://www.postgresql.org/\n[Python]: http://python.org\n[Ruby]: https://www.ruby-lang.org/en/\n[Virtualenv]: https://virtualenv.pypa.io/en/latest/\n[Virtualenvwrapper]: https://virtualenvwrapper.readthedocs.org/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Fpolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarks%2Fpolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Fpolio/lists"}