Giter Club home page Giter Club logo

go3's Introduction

Gig-o-Matic

Tools to help a Honk band manage itself!

Features:

  • Multiple band support - each member is associated with one or more bands
  • Multiple instrument support - each member can play more than one instrument
  • Calendar view & integration with popular calendar services
  • Email updates

Local development

This project is targeted at Python 3.12, and the minimum supported version is Python 3.10. The development environment uses Docker to make installing Postgres easier. Install Docker Desktop before continuing.

  1. Create Python sandbox

        cd GO3 # the place you checked out the source for Gig-O-Matic 3
    python3 -mvenv .venv
    source .venv/bin/activate
    
  2. Install required Python packages:

    pip install -r requirements.txt
    
  3. Use the default environment

    ln -s go3/.env.example go3/.env # Optional: copy instead and edit the file to taste
    
  4. Start the DB engine

    docker compose up -d db
    sleep 30 # wait for DB to finish initializing
    
  5. Run the migrations

    python manage.py migrate
    
  6. OPTIONAL: Fill database with sample data

    python manage.py loaddata fixtures/testdata.json
    
  7. Create an administrative user

    python manage.py createsuperuser
    
  8. Launch Gig-O! At this point, you should be able to run the project locally:

    python manage.py runserver
    

    You can log in with the user created above.

  9. OPTIONAL: Start the task queue Certain actions kick off activities that run in the background, using DjangoQ to manage the queue. This runs concurrently, so kick it off in a separate shell. You should see the tasks come and go in the DjangoQ section of the admin pages.

    python manage.py qcluster
    
  10. OPTIONAL: set up the scheduled tasks Some tasks - like updating calendar feeds, archiving gigs, send snooze reminders - require repeating events to be scheduled in DjangoQ. This should only be done once - check the DjangoQ "scheduled tasks" page to see the events that have been set up.

    python manage.py schedule_tasks
    

Testing

We use sqlite3 for the test suite for now

python manage.py collectstatic
DATABASE_URL="sqlite:///gig-o-matic-test.sqlite" python manage.py test

GraphQL API

To test the GraphQL endpoint, run the project locally and navigate to http://127.0.0.1:8000/graphql in your browser.

Queries in the GUI are formatted as such:

query {
	allBands {
		band {
      		name,
		  	hometown,
		  	creation_date
		}
	}
}

Formatting standards

We are converting the project to autopep8.

Task queue

Django-Q is used as a task queue, and the default setting uses the standard database as a broker. Tasks can be serialized into the database without any additional configuration. However, a separate process is used to run these items in the queue. This can be launched with

python manage.py qcluster

You can cause tests to run synchronously by setting 'sync': True in the Q_CLUSTER settings.

go3's People

Contributors

aaronoppenheimer avatar bklang avatar rschroll avatar flite999 avatar dependabot[bot] avatar ljpendergrass 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.