Giter Site home page Giter Site logo

lisajd / eahub.org-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rtcharity/eahub.org

0.0 1.0 0.0 7.43 MB

A global directory for effective altruists to connect

Home Page: https://eahub.org

License: MIT License

Python 39.67% Dockerfile 0.12% HTML 33.32% JavaScript 11.15% CSS 4.55% Shell 0.06% Vue 2.61% TypeScript 0.45% SCSS 8.08%

eahub.org-1's Introduction

Backend for https://eahub.org

eahub.org reboot

Setup

  • Make sure to have Docker Compose 3 and Nodejs 10.X installed.
  • npm ci
  • npm run build-watch
  • docker-compose run --rm web bash -c "python manage.py migrate" (only necessary when you're setting it up for the first time or pulled python migration changes)
  • docker-compose up web

If everything went well, you should be able to get the Hub at http://localhost:8000

If requirements.txt or Dockerfile have changed since last time you built the project, you'll need to run docker-compose build.

If package.json changes - run npm install to generate a new package-json.lock.

You can access the email server at localhost:1080.

Running Tests

docker-compose run --rm web pytest
npm test

Running a particular python test, e.g., test_localgroups_model.py:

docker-compose run --rm web pytest eahub/tests/test_localgroups_model.py

Debugging python code

To debug the python code in the docker container:

  1. Add import ipdb to the python file you want to debug
  2. Add ipdb.set_trace() on the line where you want to set a breakpoint
  3. Run docker-compose run --service-ports web

Formatting Code

docker-compose run --rm web black eahub

You must run this before sending a pull request or else it will be automatically blocked from merging.

You can also automatically sort your imports:

docker-compose run --rm web isort -rc --atomic eahub

Running django commands

docker-compose run --rm web bash
docker-compose run --rm web bash -c "python manage.py shell_plus"
docker-compose run --rm web bash -c "python manage.py makemigrations"
docker-compose run --rm web bash -c "python manage.py migrate"

Browser Support Policy

We support the most recent version of Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge.

Commit Message Practices

These are primarily for the benefit of maintainers, but all contributors are urged to follow them in order to make maintainers' lives easier.

  • In general, follow the practices outlined in "How to Write a Git Commit Message" by Chris Beams.
  • As an exception to the above, do not manually wrap the body of a commit message. The main reason for this is because our workflow depends on the GitHub web interface, which doesn't provide an easy way to do this. It does not depend on emailing patches, so the benefits of wrapped lines don't apply. There is arguably some benefit to the usability of git log, but it doesn't outweigh the costs.
  • Maintainers should use GitHub's squash merging exclusively. Merge commits and rebase merging have been disabled in GitHub.

eahub.org-1's People

Contributors

manoj-nathwani avatar taymonbeal avatar michaltrzesimiech avatar dependabot[bot] avatar cephalin avatar patbl avatar david-mears avatar mattg95 avatar lisajd avatar marcin-wosinek avatar berndverst avatar microsoftopensource avatar richenda avatar austin226 avatar msftgits avatar cafelow avatar

Watchers

James Cloos 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.