Skip to content

Hyrax Development Guide

Eliot Jordan edited this page Sep 5, 2023 · 41 revisions

The Hyrax Development Guide is for people who want to modify Hyrax itself. See the Hyrax Management Guide for guidance on how to configure and set up a Hyrax-based application.

Contributing

When you find an issue you'd like to work on, please assign yourself the issue in GitHub. This is an important step that signals to other developers that you're working on the issue and that they shouldn't pick it up too.

As you get started please review the contributing guidelines for the Samvera community.

Setup development environment

Since Hyrax is a Rails engine, in order to develop/test new Hyrax UI features you'll want to test/demo Rails application (based on Hyrax). Hyrax uses Docker to set up a test application which can be used for this purpose:

Run the test suite

It's a good idea to run the test suite in its entirety when you first set up. It does take about 2 hours to run (on CI this is parallelized 10x). It is known to fail 1-2 dozen tests when run locally.

Hyrax has rspec tests for ruby and jasmine tests for javascript. See the individual development environment guides for details on running the test suites.

Testing internationalization

If you'd like to check if any i18n translations are missing, check out Testing-internationalization-(i18n)-support

Run stylechecker

Run Rubocop style checker:

rubocop

If Rubocop finds style violations, you can ask it to try automatically fixing them. We recommend committing all work prior to running this command, though, as sometimes Rubocop will create breaking changes:

rubocop -a

Regenerating the README TOC

Install the gh-md-toc tool, then ensure your README changes are up on GitHub, and then run:

gh-md-toc https://github.com/USERNAME/hyrax/blob/BRANCH/README.md

That will print to stdout the new TOC, which you can copy into README.md, commit, and push.

Clone this wiki locally