vets-api icon indicating copy to clipboard operation
vets-api copied to clipboard

Binstubs for Better Developer Experience

Open stevenjcumming opened this issue 1 year ago • 23 comments

Summary

The introduction of binstubs, which are executable wrappers, is proposed as a solution to harmonize the development environment across different setup configurations. The primary objective of these binstubs is to standardize core development commands, such as setup, running applications, and executing tests. By ensuring uniformity in these processes, we aim to mitigate the discrepancies currently observed in testing outcomes.

Setup

  • Setup replaces the existing manual setup setups by combining most of them into one command
  • Some setup steps must be done manually such as Postgres & PostGIS for native
  • Currently bin/setup only supports Mac OSX
  • bin/setup for native, docker, and hybrid developer setup
  • Environment preference is stored in .developer-setup

Test

  • Replace existing testing command with a binstub bin/test
  • Options include --ci, --no-parallel, --coverage, --log
  • Input folders/files can be include like with rspec
  • Uses the .developer-setup preference for the testing environment

Lint

  • Add binstub for linting with command bin/lint
  • Uses rubocop, brakeman, and bundle-audit
  • Options include --dry,--only-rubocop,--only-brakeman
  • Inputs can include files and folder
  • Autocorrecting in rubocop is on by default, but --dry will override autocorrect option

Others

  • bin/help - Display vets-api related binstubs
  • bin/info - Display version related information

Related Issue(s)

  • https://github.com/department-of-veterans-affairs/va.gov-team/issues/74660
  • https://github.com/department-of-veterans-affairs/va.gov-team/issues/77053
  • https://github.com/department-of-veterans-affairs/va.gov-team/issues/75918
  • https://github.com/department-of-veterans-affairs/va.gov-team/issues/75920

Acceptance criteria

  • [ ] bin/help
  • [ ] bin/info
  • [ ] bin/setup
  • [ ] bin/test
  • [ ] bin/lint

stevenjcumming avatar Feb 26 '24 19:02 stevenjcumming