Skip to content

Latest commit

 

History

History
72 lines (44 loc) · 3.06 KB

CONTRIBUTING.md

File metadata and controls

72 lines (44 loc) · 3.06 KB

CONTRIBUTING

Getting Started

When contributing, please ensure that you know and understand which package your contribution affects.

Setup

Python

Tools

This repository uses Poetry for managing Python projects. In addition to this, currently Borg, an in-house monorepo management tool, is used for merging dependencies of all packages into a top-level pyproject.toml.

Installation

To install dependencies for all python projects in this repository, run:

borg install

or

poetry install && make link

Running package scripts

To run a script for every package in this monorepo, use borg run <script name>, where the <script name> is a script found in the pyproject.toml files of packages. Alternatively, if borg is not available, you can use make run script=<script name>.

To run scripts for individual packages, change directory to the package folder and run commands using borg run <script name>. Alternatively run the script defined in the pyproject.toml file of the package manually.

TypeScript

Tools

For TypeScript projects, pnpm and lerna are our chosen package managers.

Installation

Use the following command to install all dependencies.

pnpm install

Running Package Scripts

To run a script for every package in this monorepo, use lerna run <script name>, where <script name>, is the name of a script found in the package.json file of each package.

To run scripts in an individual package, change directory to the package and use pnpm run <script name>.

File Structure

  • tooling/: Includes packages/scripts for assistance in the CI/CD process.
  • packages/: This subfolder should include all of the individual packages within this mono-repo. Each of these packages can be individually published.
  • borg.toml: Borg configuration file, includes the version number used for all packages
  • lerna.json: Configuration file for the lerna build tool, this also includes the version number for all js packages.
  • package.json: Base package.json file which defines paths to packages.
  • pnpm-lock.yaml/poetry.lock: Auto-generated lock file for pnpm and poetry, respectively.
  • pnpm-workspace.yaml: Yaml configuration for pnpm workspaces, this also includes the rules for discovering packages (in addition to lerna.json).
  • pyproject.toml: Base package configuration file for Python. This is used and generated by borg.
  • tsconfig.json: Base TypeScript configuration which can be extended by inner packages.

Development Practice, Branches & Pull Requests

For this repository, Trunk Based Development is followed. Branches are created from and merged into the master branch. Versions of all of the packages are created by pushing a tag with a name that matches VERSION*.

For features/fixes that can be tested with unit or cypress tests, tests should be created as part of building the feature/fix. If a test case cannot be automated, then you should test manually and list the test cases tested.