Skip to content

Latest commit

 

History

History
153 lines (102 loc) · 5.91 KB

CONTRIBUTING.md

File metadata and controls

153 lines (102 loc) · 5.91 KB

Contribution Guide

This is the common top-level contribution guide for this monorepo. A sub-package may have an additional CONTRIBUTING.md file if needed.

Legal

All contributors must sign the DCO

This is managed automatically via https://cla-assistant.io/ pull request voter.

Development Environment

pre-requisites

Initial Setup

The initial setup is trivial:

  • clone this repo
  • yarn

Commit Messages format.

This project enforces the conventional-commits commit message formats. The possible commits types prefixes are limited to those defined by conventional-commit-types. This promotes a clean project history and enabled automatically generating a changelog.

The commit message format will be inspected both on a git pre-commit hook and during the central CI build and will fail the build if issues are found.

It is recommended to use git cz to construct valid conventional commit messages.

Formatting.

Prettier is used to ensure consistent code formatting in this repository. This is normally transparent as it automatically activated in a pre-commit hook using lint-staged. However, this does mean that dev flows that do not use a full dev env (e.g editing directly on github) may result in voter failures due to formatting errors.

Compiling

Use the following npm scripts at the repo's root to compile all the TypeScript sub-packages.

  • yarn compile
  • yarn compile:watch (will watch files for changes and re-compile as needed)

These scripts may also be available inside the sub-packages. However, it is recommended to use the top-level compilation scripts to avoid forgetting to (re-)compile a sub-package's dependency.

Run the yeoman framework in dev mode

Dev mode allows you to run the yeoman framework in the browser, using vue cli for fast development cycles, and easy debug tools. To run it do the following:

  • comment out the logger instantiating in env.ts source file.
  • in the packages/backend folder run webpack or webpack-dev:watch, then run the server.
    yarn webpack
    yarn ws:run
  • in the packages/frontend folder run serve
    yarn serve
  • open the broswer on localhost:8080 to access the framework.

Run the explore generators framework in dev mode

Dev mode allows you to run the explore generators framework in the browser, using vue cli for fast development cycles, and easy debug tools. To run it do the following:

  • comment out the logger instantiating in env.ts source file.
  • in the packages/backend folder run webpack or webpack-dev:watch, then run the server.
    yarn webpack-dev:watch
    yarn ws:egRun
  • in the packages/frontend folder run serve
    yarn serve
  • open the broswer on localhost:8080/exploregens to access the framework.

Run the VSCode extension

  • Start VSCode on your local machine, and click on open workspace. Select this repo folder.
  • On the debug panel choose Run Extension, and click on the Run button.

Advanced scenarios

Testing

Mocha and Chai are used for unit-testing and Istanbul/Nyc for coverage reports for the TypeScript sub-packages and Jest is used for unit-testing and coverage reports for the Vue sub-packages.

  • To run the tests execute yarn test in a specific sub-package.
  • To run the tests with coverage run yarn coverage in a specific sub-package.

Code Coverage

Code Coverage is enforced for all productive code in this mono repo.

  • Specific statements/functions may be excluded from the report.
    • However, the reason for each exclusion must be documented.

Full Build

To run the full Continuous Integration build run yarn ci in either the top-level package or a specific subpackage. (When running in a specific package, ensure to run at least once in the top-level package.)

Release Life-Cycle.

This monorepo uses Lerna's Fixed/Locked which means all the sub-packages share the same version number.

Release Process

Performing a release requires push permissions to the repository.

  • Ensure you are on the default branch and synced with origin.
  • yarn run release:version
  • Follow the lerna CLI instructions.
  • Track the build system until successful completion
  • Once the tag builds have successfully finished:
    • Inspect the npm registry to see the new sub packages versions.
    • Inspect the new github release and verify it contains the .vsix artifact.

Contribute Code

You are welcome to contribute code. PRs will be examined and if it fits the quality requirements and the roadmap of the product they will be merged.