Skip to content
Contributions Welcome: A developer community for everyone with an interest in Technology & Meetups
Python JavaScript Shell Makefile HTML Mako Dockerfile
Branch: master
Clone or download
dependabot-preview and apoclyps [Security] Bump lodash.template from 4.4.0 to 4.5.0 in /services/clie…
…nt (#776)

Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.4.0...4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Latest commit a9996d7 Jul 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Adding stale probot plugin configuration (#601) Nov 17, 2018
docs Replacing make commands with docker commands (#653) Dec 11, 2018
e2e Adding useful ui prompts for errors/missing data (#368) Sep 16, 2018
ecs
scripts [Security] Bump urllib3 from 1.24.1 to 1.24.2 in /scripts (#770) Apr 20, 2019
services [Security] Bump lodash.template from 4.4.0 to 4.5.0 in /services/clie… Jul 25, 2019
.all-contributorsrc Add @annettemccullough as a contributor (#555) Nov 9, 2018
.codeclimate.yml
.env Postgres dockerfile fix (#558) Nov 9, 2018
.env.example Adding react-ga to provide google analytics for all environments (#274) Jul 30, 2018
.gitignore Removal of .DS_Store & update to .gitignore (#400) Oct 1, 2018
.huskyrc updating pre-commit hook (#435) Oct 7, 2018
.travis.yml Update travis output with timings Nov 7, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#155) Jun 11, 2018
CONTRIBUTING.md
LICENSE.md Adding readme, license, and contribution Mar 30, 2018
Makefile
PULL_REQUEST_TEMPLATE.md updating pre-commit hook (#435) Oct 7, 2018
Pipfile Implements video listings within the Client and Events service (#224) Jul 9, 2018
Pipfile.lock Adding ipython to services (#294) Aug 6, 2018
README.md
dangerfile.js Adding danger (#374) Sep 29, 2018
docker-compose-dev.yml
docker-compose-prod.yml Remove lambda code from monorepo Dec 23, 2018
docker-compose-stage.yml
docker-deploy-prod.sh Correcting RDS configuration for events and users services (#240) Jul 12, 2018
docker-deploy-stage.sh Correcting RDS configuration for events and users services (#240) Jul 12, 2018
docker-push.sh Adding https production links (#334) Aug 26, 2018
package-lock.json Bump all-contributors-cli from 5.10.1 to 5.10.2 (#729) Jan 19, 2019
package.json Bump all-contributors-cli from 5.10.1 to 5.10.2 (#729) Jan 19, 2019
pre-push-tests.sh
test.sh Remove lambda code from monorepo Dec 23, 2018

README.md

Muxer

Build StatusGitHub licenseAll ContributorsPRs Welcome Code of Conduct

A open source developer community to promote local hackathons, conferences, and meetups, mentoring, calls for speakers, and collaboration.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software (latest versions) and how to install them

  • Docker - Used to build, ship, and run all services
  • Python - Dependency Management for backend services & scripts
  • Pipenv - A tool that aims to bring the best of all packaging worlds
  • Node - Used to create a UI via React, manage frontend dependencies

Setting up a local development environment

The following steps are required for first time setup. These steps will check out the repository, install the project dependencies, and the client dependencies needed for the React frontend and run the service on http://localhost. Note http://localhost will show a gateway error until the client has completed building (typically 1 minute for first time setup).

git clone https://github.com/apoclyps/my-dev-space
cd my-dev-space
npm install
cd services/client
npm install
cd ../../
docker-compose -f docker-compose-dev.yml up -d

Once the service is up and running, you will need to manually create the required tables in the database and install the optional seed data to complete the local Postgres setup.

docker-compose -f docker-compose-dev.yml run users-service python manage.py recreate_db
docker-compose -f docker-compose-dev.yml run users-service python manage.py seed_db
docker-compose -f docker-compose-dev.yml run events-service python manage.py recreate_db

On subsequent runs (when the above steps have been completed), you can apply new database migrations to your local service by running:

docker-compose -f docker-compose-dev.yml run users-service python manage.py db upgrade
docker-compose -f docker-compose-dev.yml run events-service python manage.py db upgrade

Alternatively, if you make a change to a model during development, you will need to create and commit a migration file for that service. As a best practice, migration files should be committed independently to code:

docker-compose -f docker-compose-dev.yml run users-service python manage.py db migrate
docker-compose -f docker-compose-dev.yml run events-service python manage.py db migrate

To load data into the service for development, the recommended solution is to use the load script within the scripts folder to populate the local database. Details on how to configure the script can be found in scripts/README.md.

cd scripts/
./load_data.sh dev

And to tear down the local development stack, simply run:

docker-compose -f docker-compose-dev.yml down

If you wish to populate your local database with events from external services, you can use the steps outlined in the scripts README.

Running the tests

The following will run the unit tests for each respective service:

client
docker-compose -f docker-compose-dev.yml run client-test npm test
users-service
docker-compose -f docker-compose-dev.yml run users-service python manage.py test
events-service
docker-compose -f docker-compose-dev.yml run events-service python manage.py test

Running linting

client
docker-compose -f docker-compose-dev.yml run client npm run lint
users-service
docker-compose -f docker-compose-dev.yml run user-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml
events-service
docker-compose -f docker-compose-dev.yml run events-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml

Running code coverage

docker-compose -f docker-compose-dev.yml run users-service python manage.py cov

Local Postgres Connections

docker-compose -f docker-compose-dev.yml run events-db sh

psql postgres://postgres:postgres@events-db:5432/events_dev

Running one off scripts

Allows scripts/tasks to be run in environments specific docker containers.

docker-compose -f docker-compose-dev.yml build events-task
docker-compose -f docker-compose-dev.yml run events-task python scripts/test.py

Debugging Python Applications

End to End tests

Integration tests used to evaluate all services behave correctly

npm install testcafe -g
export TEST_URL='http://localhost'
testcafe chrome e2e

Deployment

Deployments to the staging and production environments require a PR to be opened against the staging/production branches; Upon successfully merging a PR into either branch; Travis CI will build, run, test, and deploy the changes to AWS ECS.

Built With

  • React - Javascript client framework
  • Flask - Python web framework
  • Postgres - Relational Database Management System
  • Docker - Build, run, and deploy services
  • Swagger - Generate API documentation
  • Nginx - high-performance HTTP server, reverse proxy

Contributors

A list of contributors who participated in this project.


Kyle Harrison

💻 📖

Adam Smith

💻

Ewa G

💻

Michael Grundie

💻

DermotMcAteer

💻

kimmoylan

💻

Peter Stevenson

💻

Alistair Brown

💻

gingerzoealex

💻 🎨

Annette McCullough

💻

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

You can’t perform that action at this time.