Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add notes about REST Contract PRs

...

  •  Create a ticket in the DSpace Issue Tracker (describe your contribution, how to use it, and perhaps some use cases).  This helps ensure your upcoming work is "known" to other developers, and we can let you know if someone else is working on something similar.
  •  Make sure your code adheres to our Code Style Guide (only required for DSpace 7.x or above)
  •  Write unit/integration tests per our Code Testing Guide (only required for DSpace 7.x or above)
  •  Submit your code via GitHub. Please submit a GitHub Pull Request (see GitHub's "About Pull Requests"), which references your newly created ticket by number. 
    • If your code involves changes to the v7 REST API, please also include a REST Contract Pull Request which documents the endpoint(s) that require changes.
    • Ideally submit your code or ideas early on before it turns into a massive project.  Larger code changes take a very long time to understand, review and test.  Starting the discussion early (or breaking the changes up into several smaller changes) can make it much easier to get your code accepted.
  •  Review your own code. Does it follow our Contribution Checklist? Does it need Documentation? If you are using any third party tools/APIs, do they all have an acceptable Open Source License (see Licensing of Contributions)? The Committers will also be reviewing these aspects of your code, but if you can catch these gaps or issues up front it can speed up the process of correcting them.
  •  Respond to feedback. If the Committers ask questions or make suggestions for changes, please try to be responsive. The Committers are all volunteers and are trying to help as best we can, but the process moves more quickly if you can try to be responsive as well.
  •  Help rework/update code as needed. If suggestions for changes are made, if you can rework the code, it speeds up the process. If you submitted your code as a Pull Request, you can just quickly add changes/updates to the branch linked to from your Pull Request.
  •  Ask questions. If there is a long delay in the Committers responding, or if you aren't sure of the status of your contribution, please ask. We'd be glad to explain whether the delay is just because we are all busy, or if there's something else we are waiting on.
  •  Pay attention to release deadlines. As the next DSpace release approaches, the Committers will announce a "Contribution Deadline" for the upcoming release (usually these are found in Developer meeting notes). In order to keep releases on-time, the Committers must set a date after which they can no longer accept new feature contributions.  Although you may add code contributions year round, they will only be considered for a specific release if they are contributed before that release's contribution deadline.

...

  1. Any changes must be compliant with the supported version of Java (e.g. for DSpace 7, Java 11 compliance is required)
  2. Your code must adhere to our Java Code Style Guide. Most major IDEs can easily import our Checkstyle configurations to ensure alignment with this code style.
    1. Your code should be well commented with Javadoc (required for all classes, public methods and larger private/protected methods).
  3. Your code must provide unit/integration tests for new features, bug fixes or improvements per our Code Testing Guide.
  4. If your contribution adds REST API endpoints or changes existing endpoint(s) behavior, you must submit a corresponding REST Contract Pull Request which documents the require changes.
  5. If your contribution adds new third-party tools or libraries, they must adhere to licensing requirements to be included. Refer to the Licensing of Contributions below
  6. User interface changes must use i18n keys to allow for easy translation to other languages (see the DSpace 7 Translation - Internationalization (i18n) - Localization (l10n) guide). At a minimum, please provide English text so that others may translate it.
  7. User interface changes should have a W3C WCAG 2.1 Conformance Level of "Double-A"
  8. Your code must come with Documentation. Minimally, technical documentation must be part of the system docs – see Documentation Contributions below. Ideally, we'd also like User/Usage Documentation.
  9. Ideally, new features should be configurable (i.e. generalized so as to not be specific to one institution's needs/use cases).  Any new configurations should have sane defaults which can be overridden (as needed) in a site's local.cfg file.
  10. Add appropriate/useful logging to your code (ERROR, WARN, INFO, DEBUG, etc).
    1. Provide informative log statements and/or the entire Throwable exception. For example, "log.error('My custom error message', e)" is more useful than "log.error(e.getMessage(), e)"
  11. Where reasonable, retain feature/functionality backwards compatibility. This does NOT mean you have to create PRs for older versions of DSpace. But, it does mean that you do your best to keep in mind the behavior of features in older DSpace releases, and attempt to keep similar behaviors where reasonable. If there are questions/concerns about this, let us know. There are always exceptions.
  12. No database schema changes unless absolutely necessary to support a new feature. See Database schema changes below.
  13. If your code makes changes to the database schema or content, and you are patching more than one branch (for example, dspace-6_x and master), see Patching multiple branches below.

...