Giter Club home page Giter Club logo

amy's Introduction

develop branch

AMY is a web-based workshop administration application for The Carpentries and related projects. Its target audience is workshop coordinators, most of whom are non-programmers, who need to keep track of what workshops are being arranged, when they're supposed to occur, who's teaching what, and so on.

AMY is built using Django with Python 3, with a bit of Javascript and other things thrown in. If you would like to help, please read:

Please check with us or open an issue before starting work on new features.

Getting Started

  1. Clone the repository:

    $ git clone https://github.com/carpentries/amy.git
    $ cd amy
    
  2. Configure git to automatically ignore revisions in the .git-blame-ignore-revs:

    $ git config blame.ignoreRevsFile .git-blame-ignore-revs
    
  3. Install Pipenv:

    $ python -m pip install --user pipenv
    
  4. Install Python dependencies:

    $ pipenv sync --dev
    

    Note: Pipenv will create a new virtual environment for this installation, so you don't have to create one yourself. The --dev flag installs development dependencies, required e.g. for testing.

  5. Install yarn, the tool that manages AMY's JavaScript and CSS dependencies. You can install it here.

  6. Start running a local instance of Postgres and Redis. This requires Docker to be installed locally. Redis is required to have certain features (like creating a new person and viewing a workshop request) work correctly.

    $ docker compose -f docker/docker-compose.yml -p amy up -d database redis
    
  7. Set up your local database with fake (development-ready) data. This will create a superuser with "admin" as both the username and password.

    $ pipenv run make dev_database
    
  8. Create cache tables for use with the database cache backend.

    $ pipenv run python manage.py createcachetable
    
  9. Start a local Django development server by running:

    $ pipenv run make serve
    

    Note: this also installs front-end dependencies for AMY, including jQuery and Bootstrap (full list here).

  10. Open http://127.0.0.1:8000/workshops/ in your browser and start clicking. Use the default "admin" as username and password.

  11. Shut down the local server by typing Ctrl-C. Shut down the Docker Redis instance with:

    $ docker compose -f docker/docker-compose.yml -p amy down
    

Upgrading

  1. Update the code:

    1. Get the list of changes:

      $ git fetch
      
    2. Look for the newest tag:

      $ git tag -n
      
    3. Get the code from the newest tag:

      $ git checkout tags/<tag_name>
      
  2. Update dependencies front-end and back-end dependencies:

    $ pipenv run make upgrade
    
  3. (Optional) make fresh development-ready database:

    $ pipenv run make dev_database
    

    Note: this command requires removing (by hand) the old database file.

  4. Run database migrations:

    $ pipenv run python manage.py migrate
    
  5. Enjoy your new version of AMY:

    $ pipenv run make serve
    

Start hacking on email automation

  1. Make sure you have Redis running. See instructions above.

  2. Create dev database (it will add a super user, too!):

    $ pipenv run make dev_database
    
  3. Install required objects in database:

    $ pipenv run python manage.py loaddata amy/autoemails/fixtures/templates_triggers.json
    
  4. Run the server:

    $ pipenv run python manage.py runserver
    
  5. Check if you have a Tag automated-email available. If not, create one (you can use Django admin interface for that). Use superuser account (admin:admin). Now scheduling the emails should work, however there's no worker to execute them.

  6. (Optional) Run the RQ worker and scheduler (use separate terminals or processes for each command):

    $ pipenv run python manage.py rqworker
    $ pipenv run python manage.py rqscheduler
    

amy's People

Contributors

aa-dit-yuh avatar askingalot avatar carlosp420 avatar chrismedrela avatar cudevmaxwell avatar darshan95 avatar dependabot[bot] avatar drio avatar erinbecker avatar fmichonneau avatar gvwilson avatar jduckles avatar kamilkulerz avatar lauryndbrown avatar maneesha avatar marwahaha avatar neon-ninja avatar nikhilweee avatar pbanaszkiewicz avatar prerit2010 avatar rbeagrie avatar sburns avatar shapiromatron avatar sheraaronhurt avatar shubhsingh594 avatar slayoo avatar staeff avatar timtomch avatar tracykteal avatar wking avatar

Watchers

 avatar  avatar

Forkers

klemensnoga

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.