Commit 297e2e76 authored by Zac Wood's avatar Zac Wood
Browse files


parent e4129468
Pipeline #5347 passed with stage
in 11 seconds
- Added "Save as PNG" feature for the calendar view
- Fixed bugs related to exporting/sharing a view-only schedule
- Fixed crash related to adding online courses
- Fixed broken CI
- Added option to seeds.rb script allowing for easy updates
- Changed instructions for Google Calendar upload
- Schedules now specify a correct timezone
- Fixed broken API endpoints that did not filter by semester
# Contributing to Schedules
We would love for you to contribute to Schedules and help make it even better
than it is today! As a contributor, here are the guidelines we would like you to
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Coding Style](#style)
- [Submission Guidelines](#submit)
- [Submitting a Pull Request](#submit-pr)
## <a name="question"></a> Got a Question or Problem?
Please, do not open issues for the general support questions as we want to keep
GitLab issues for bug reports and feature requests. You've got much better
chances of getting your question answered on [Slack Group][slack] where
questions should be asked in their respective channels.
## <a name="issue"></a> Found a Bug?
If you find a bug in the source code, you can help us by
[submitting an issue](#submit-issue) to our [GitLab Repository][gitlab]. Even
better, you can [submit a Merge Request](#submit-pr) with a fix.
## <a name="feature"></a> Missing a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our
GitLab Repository. If you would like to *implement* a new feature, please ensure
an issue already exists to be associated with your commits.
* For any **contribution**, first [open an issue](#submit-issue) and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project.
## <a name="style"></a> Coding style
The style for this project is the [Relaxed Ruby Style](, which is a subset of the community-driven [Ruby style guide]( with more relaxed rules.
A great tool for making sure your code meets the project's style is [RuboCop]( To use RuboCop, install it by running the command
gem install rubocop
Then, when inside the `/schedules/` directory, you can run the command `rubocop` to see where your style does not match the project's.
## <a name="submit"></a> Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, please search through open issues, maybe an issue for
your problem already exists and the discussion might inform you of workarounds
readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we
need to reproduce and confirm it. In order to reproduce bugs we may
ask you to describe a use-case that fails to assist in the debugging process.
In GitLab there are issue templates that you can use which paste in a sample
format for you to use.
Check out the following issue for an example: [](
You can file new issues by filling out our [new issue form][new-issue].
### <a name="submit-pr"></a> Steps to contribute and submit a Merge Request (MR)
Before you submit your Merge Request (MR) consider the following steps:
* Search [GitLab][merge-request] for an open or closed MR that relates to your
submission. You don't want to duplicate effort.
* Pull the latest commits from GitLab
git pull
* Check into the current development branch:
All new commits are merged into this development branch before going live on
the site in a tagged release (merge into master branch).
git checkout consolidation
* Create a new git branch:
git checkout -B ##-shortdescription
# Example
git checkout -B 31-contibution-guidelines-proposal
All branches need to follow the above convention (`##-shortdescription`) `##`
in this case represents the issue number that your branch is related to. Each
issue has one and only one branch and each branch has one and only one purpose:
to add, modify, or remove a feature/bug from the repo. `shortdescription` is
a few hyphon (`-`) seperated words that consisely describe the branch. This helps people
who may be unfamiliar with the issue number to know at a glance what the branch
* Now you're ready to write your code in your new branch! Make sure to follow
listed [style](#rules) & [commit](#commit) guidelines/rules when contributing
* Before you push your code to GitLab it is suggested that you run all unit tests locally.
rails test
* Commit your changes using a descriptive commit message.
git add --all
git commit # first line is title, two newlines is description
* You will need to ask in the slack channel to be added to the GitLab repo. This
step is necessary such that you have the necessary permissions to push up your
* Push your branch to GitLab:
git push origin ##-shortdescription
# ex.
git push origin 31-contibution-guidelines-proposal
* In GitLab, send a merge request to the current development branch.
* If we suggest changes to your branch then:
* Make the required updates.
* Re-run the unit tests to ensure tests are still passing.
* Rebase your branch and force push to your GitLab repository (this will update
your Merge Request):
git rebase consolidation -i
git push -f
That's it! Thank you for your contribution! :tada:
#### After your merge request is merged
After your merge request is merged, you can safely delete your branch and merge
the changes from the main (upstream) repository:
* Delete the remote branch on GitLab either through the GitLab web UI or your
local shell as follows:
git push origin --delete ##-shortdescription
# ex.
git push origin --delete 31-contibution-guidelines-proposal
* Check out the current development branch:
git checkout consolidation -f
* Delete the local branch:
git branch -D ##-shortdescription
# ex.
git branch -D 31-contibution-guidelines-proposal
* Update your current development branch with the latest upstream version:
git l --ff upstream consolidation
......@@ -6,7 +6,7 @@ The project manager for Schedules is Zac Wood.
## Contributing
Schedules is currently in version 3 and is a somewhat mature web application. However, there are always new features that can be added and old bugs that need fixing, so all help is much appreciated. See the current project [issues]( to see what needs to get done, or submit an issue of your own if you have a feature request or found a bug.
Schedules is currently in version 4 and is a somewhat mature web application. However, there are always new features that can be added and old bugs that need fixing, so all help is much appreciated. See the current project [issues]( to see what needs to get done, or submit an issue of your own if you have a feature request or found a bug.
If you need any help, please feel free to reach out in the `#schedules` channel in our [Slack group]( This is where most of the discussion about the project occurs, so if you are interesting in contributing, please join and say hi!
......@@ -18,88 +18,11 @@ Thankfully, there are tons of great free online resources to learn Rails. Here a
- [Derek Banas' Ruby on Rails Tutorial (30min)](
- [Rails Tutorial (free online ebook)](
### Modifying and Deploying Code
Please read through the document for in depth
instructions on the process of making and submitting changes to
## Setup instructions
### Install Ruby
#### MacOS
First, install Homebrew if you haven't already by running the following command in your terminal:
/usr/bin/ruby -e "$(curl -fsSL"
Next, install Ruby:
brew install ruby
#### Linux
See the offical [Ruby docs]( for distro-specific install info.
#### Windows
First, install Chocolatey by following the [official install instructions](
Next, install Ruby:
choco install ruby
You'll also have to install SQLite:
choco install sqlite
### Install Yarn
To install the project's JavaScript dependencies, we need to install Yarn. Follow the offical Yarn [install instructions](
You might have to install node.js as well, which allows you to run JavaScript code on your computer.
### Clone the schedules workspace
To get the code for schedules on your machine, you can _clone_, or download, it from its
GitLab repository. Before you can clone projects, you first need to set up your SSH Keys
with GitLab. This lets GitLab know who you are.
Follow [this page]( to setup your SSH keys, then run the following in your terminal:
git clone
This will create a directory in the current folder named `schedules` and download the project into it. Run `cd schedules/` to enter the cloned directory.
## Setting up Project
Execute `cd schedules/` to enter the Project directory.
### Install dependencies
To install the project dependencies, first install `bundler`, the tool used to manage Ruby dependencies:
gem install bundler
And then run `bundle install`. If this doesn't work, remove the lock file with `rm Gemfile.lock` and try again. Next, run `yarn` to install the JavaScript dependencies.
### Database
To populate your local database, run `rails db:migrate` and `rails db:seed`. This sets up your local database and loads it with data from Patriot Web.
**NOTE:** Sometimes Patriot Web doesn't appriciate being parsed. If you're having problems,
please let us know in [Slack](!
## Development servers
While developing for schedules, it is useful to have a development server running
so you can see updates to your code in real time.
Follow the instructions for your operating system:
To start the project, run the `rails server` command in the `/schedules` directory. The website should now be accessible in your web browser from `localhost:3000`.
- [Windows](
- [Mac](
- Linux (TODO - for now, follow the Mac instructions using your distro's package manager instead of Homebrew)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment