OpenStax Exercises is an open homework and test question bank, where questions are written by the community and access is free. Successor to Quadbase.
To run Exercises, you must have the following dependencies installed:
- Ruby 2.6.1
See the COPYRIGHT and LICENSING files.
Contributions to Exercises are definitely welcome.
Note that like a bunch of other organizations (Apache, Sun, etc), we require contributors to sign and submit a Contributor Agreement. The Rice University Contributor Agreement (RCA) gives Rice and you, the contributor, joint copyright interests in the code or other contribution. The contributor retains copyrights while also granting those rights to Rice as the project sponsor.
The RCA can be submitted for acceptance by emailing a scanned, completed, signed copy to info@[the openstax domain]. Only scans of physically signed documents will be accepted. No electronically generated 'signatures' will be accepted.
Here's how to contribute to Exercises:
- Send us a completed Rice Contributor Agreement:
- Download the form
- Complete it ("Project Name" is "OpenStax Exercises" and "Username" is your GitHub username)
- Sign it, scan it, and email it to info@[the openstax domain]
- Fork the code from our repository on GitHub.
- Create a thoughtfully named topic branch to contain your change
- Make your changes
- Add tests and make sure everything passes
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up to GitHub
- Send a pull request for your branch
$> docker-compose up
Or use docker-compose up -d
for a daemonized run.
Drop into a bash shell with
$> docker-compose run api bash
To run tests, make sure the test database is ready:
$> docker-compose run api bundle exec rake db:test:prepare
Then
$> docker-compose run api bundle exec rspec
- Install a ruby version manager on your machine, such as rbenv or rvm
- Install ruby 2.6.1
- Run the following shell commands from the OpenStax Exercises folder:
$ bundle --without production
$ createuser --superuser ox_exercises
$ rails db:setup
$ rails s
If any of the above commands fail, try prepending bundle exec
, e.g. bundle exec rails db:setup
You should then be able to point a web browser to http://localhost:3000 and access OpenStax Exercises.