| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The goal of the DMPRoadmap project is to provide the community with a reliable and stable platform for managing data management plans. This means that all development efforts should adhere to some basic tenets to ensure that the system remains stable and provides functionality for the community as a whole.
These guidelines are an attempt to ensure that we are able to provide the community with a reliable system, stable APIs, a clear roadmap, and a predictable release schedule.
Table of contents:
A contribution consists of any work that is voluntarily submitted to the project. This includes bug fixes, enhancements and documentation that is intended as an improvement to the DMP Roadmap system.
Any individual with a GitHub account may propose a Contribution by submitting a Pull Request (PR) to this project's 'contributions' branch. The project team will evaluate each PR as time permits and communicate with the contributor via comments on the PR. We will not accept a contribution until it adheres to the guidelines outlined in this document. If your contribution fits well with the development roadmap, the team will merge it into the project and schedule it for the next upcoming release.

Please use these checklists to help you prepare your Pull Request for submission.
ALL Pull Requests MUST be made to the 'contributions' branch!
First and foremost, all of the existing tests must pass before we accept your contribution. If your work has made a change to an object that results in failed tests then you should update those tests so that they are accurate.
To run the tests:
# Make sure that your test DB has all of the current database migrations:
> rake db:migrate RAILS_ENV=test
# To run all of the tests:
> rake test
# To run all of a specific type of tests:
> rake test test/unit/
# To run a specific test:
> rake test test/unit/users_test.rbIf you are adding a new feature to the system you must build out the appropriate tests before we will accept your contribution. For example, if I add a new field to the User table that stores the user's Twitter id, I should update the test/unit/users_test.rb Unit test. If my contribution included changes to the User Profile page that allowed the user to enter this new Twitter id then I should update the test/functional/registrations_controller_test.rb Functional controller test.
DMP Roadmap uses the Travis CI framework to verify that are tests are passing. When you create your PR you will see a note stating that the tests are pending. Check back after a few minutes to give the Travis system time to run its tests.
Please Note: We will not review your PR until the tests are passing and GitHub notes that there are no merge conflicts
The original DMP Roadmap codebase did not include a full suite of tests. The project team has been busy adding them in when we can but we still have a long way to go. The requirements mentioned above are in place for pieces of the system that already have tests. For example, if your work involves an enhancement to an existing controller that has no functional test in the current codebase, we do not expect you to write tests for the entire controller (although we would welcome the help!). In cases like this, we only ask that you write tests for the endpoints that you have updated.
We do not currently have testing for the UI components. We plan to add tests for these in the near future using a headless browser like PhantomJS. We welcome any contributors who are willing to begin work in this area!
New controller/API endpoints should have tests within the test/routing_test.rb
We realize that every developer has their own style and we encourage a bit of individuality. However, we do impose some of the following rules to contributions to this project.
We quite like the principle of DRY (Don't Repeat Yourself) so please always look through the existing code to make sure you are not reinventing something that has already been done. Also clever bits of code or reuse of existing ones to avoid copying and pasting is always appreciated.
Include database migrations when you are altering the database model. Use the following command to create a new migration and be specific about what it does in the name of the file
> rails g migration AddTwitterIdToUsersYou do not need to comment every line of your code but we do expect to see inline comments explaining the intent of your if blocks and loops.
We do not want to see Tab characters. Tabs should be converted to a double space. If you are working on a file that has Tabs already, please convert them for us before making your Pull Request
If a line is going to go beyond 100 characters please break it out onto multiple lines. For example:
# This is preferable
users = [{email: @user.email, password: 'bAd_pas$word1', remember_me: true},
{email: 'unknown@institution.org', password: 'password123', remember_me: true}]
# to this long line that requires scrolling
users = [{email: @user.email, password: 'bAd_pas$word1', remember_me: true}, {email: 'unknown@institution.org', password: 'password123', remember_me: true}]Finally, please make sure your code is properly indented as this enhances readability.
| Back | FazBrowse Home | New Git URL |