Rosalind is an admin app for large-batch operations on artist and artwork genomes (Artsy-created genomes as well as "partner-applied categories").
Among its major components are Rails 5 + Kinetic on the backend and React + Webpack on the frontend.
You can read more about the motivation for the app over in Pull Request #1, and in the blog post we wrote when we open-sourced it.
Meta
- State: production
- Staging: https://rosalind-staging.artsy.net/
- Production: https://rosalind.artsy.net/
- GitHub: https://github.com/artsy/rosalind
- Deployment:
- PRs from feature branches (on this repo) → master will automatically deploy to staging
- PRs from staging → release will automatically deploy to production. (Start a deploy)
- Point People: @anandaroop
Setup
-
Fork the project to your GitHub account
-
Clone your fork:
$ git clone git@github.com:your-github-username/rosalind.git
-
Read and run setup script:
$ cat bin/setup $ bin/setup
Tests
There are two levels of testing on this project: those at the Ruby level and those at the Javascript level. Same goes for linting. That means to run everything individually you would do:
$ bundle exec rubocop
$ bundle exec rspec
$ yarn run lint
$ yarn run test
Note: the default rake task (e.g. bundle exec rake
) is setup to run all
linting and tests.
Acceptance Tests
In order to improve our confidence that the Ruby and Javascript parts of this project work together, we've added acceptance tests that run in Chrome.
They will be run as part of the default RSpec run. Or you can invoke them directly with:
$ bundle exec rspec spec/system
In order to view the specs running in a real browser, you can change the
driven_by
config to :selenium_chrome
in spec/rails_helper.rb
.
Developing with Storybook
In order to facilitate development and documentation of UI components, we've added Storybook to this project.
$ yarn run storybook
Storybook can only show accurate styling if it can load the Rails
application.css
stylesheet. For this reason we require you to have the Rails
server running first.
Starting the Server
Foreman is used to manage the server configuration, so starting a server is as
easy as foreman start
, but you might want to use the development version
in Procfile.dev instead.
Procfile.dev is configured to run Webpack's dev server, for hot reloading of React components.
$ foreman start -f Procfile.dev
See the Procfiles for more.
Docker and Hokusai
As an alternative to the full local workflow outlined above, it should be possible to use a Docker & Hokusai workflow to boot up, test, and (slowly) iterate on the app, without having to install and start up the usual backing services (Postgres, Redis).
$ hokusai build
$ hokusai test
$ hokusai dev start
Gravity Connection
Rosalind uses Gravity to get detail about some models. See the gravity docs for the process.
Elasticsearch Connection
Rosalind communicates directly with the Elasticsearch cluster to search for artworks. Elasticsearch is guarded behind a VPN, so to retrieve artwork search results locally, make sure you're connected to VPN associated with the environment you're targeting (production or staging).
See documentation available here or here
Contributing Pull Requests
Rosalind accepts PRs from branches on the main artsy/rosalind repo. PRs from forks will not be built in the CI environment and cannot be merged directly.
The name
Rosalind is named after Rosalind Franklin, the biophysicist whose pioneering work in X-ray crystallography led to the discovery of the double helix.