3.16.1 • Published 1 year ago

trucks-psd-v3 v3.16.1

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
1 year ago

trucks-psd-v3

Date 2024/6/12

Stores and Retrieves Particle Size Distribution Data for TruckMetrics

Getting started for developers

  1. Copy trucks-psd-v3.env from \motionmetrics.net\i2l\Bamboo_Files\MMPro_Env\I2L-Staging and rename it as .env

  2. Copy .npmrc from \motionmetrics.net\i2l\Bamboo_Files\MMPro_Env\I2L-Staging

  3. Install all the dependencies with the command:

    npm ci
  1. Verify Segmentation-Service-Python is running locally or as a Docker container at localhost:7199/fmsegmentation/v2/help

  2. Run Unit test

    npm test
  1. Compile the typescript to javascript and run lint
    npm run-script build
  1. Start the program
    npm start

Commit Message Format - Angular Convention

(): │ │ │ │ │ └─⫸ Summary in present tense. Not capitalized. No period at the end. │ │ │ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core| │ elements|forms|http|language-service|localize|platform-browser| │ platform-browser-dynamic|platform-server|router|service-worker| │ upgrade|zone.js|packaging|changelog|docs-infra|migrations| │ devtools │ └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test see https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format for more details

Alternatively, you can use the module commitizen to help you format the commit message. 1. install commitizen

    npm install -g commitizen
  1. making your repo commitizen-friendly
    commitizen init cz-conventional-changelog --save-dev --save-exact
  1. commit your changes Simply use git cz or just cz instead of git commit when committing. You can also use git-cz, which is an alias for cz.
    git add .
    git cz

see https://github.com/commitizen/cz-cli for more details

Versioning and changeLog

semantic-release will be implemented once the node version meets the minimum required version 1. Update the CHANGELOG.md file with the new version and changes

  1. Update the version new feature increment the minor version bug fix and typo increment the patch version
    npm version <major|minor|patch>

Running Integration Tests

  1. Copy the npm-qc-user-credentials.env from NAS, and save it to the IntegrationTest folder and rename it as .env

  2. Repeat Steps in "Getting started for developer" if you haven't done

  3. Run the Integration Test:

    npm run-script integration-test

Releasing APIdoc (OpenAPI definition) - before implementing auto upload

  1. Start the program
    npm start
  1. Verify APIdoc is viewable at http://localhost:8080/api
  2. Navigate to http://localhost:8080/api-json and copy JSON format then save as trucks-status-v3.json
  3. Manually upload to mm-staging-openapi-definitions S3 bucket along with metadata in the Properties section :
    {
        "Type": "User defined",
        "Key": "x-amz-meta-apidoc-access",
        "Value": "edit"
    }
  1. Navigate to https://v2.metricsmanagerstaging.com/documentation/serve.html?name=trucks-status-v3 view the documentation

Bitbucket Repository variables

The variables defined in the repository for the bitbucket-pipelines are:

  • SERVICE_NAME - trucks-psd-v3
  • NPMRC_base64 - the base64 encoded .npmrc which defines the authtoken for registry.npmjs.org
  • ENV_QC_I2LStaging_base64 - the base64 encoded .env for I2L-staging deployments for QC tests

To create the base64 encoded strings use:

base64 --wrap=0 staging.env > staging.b64
base64 --wrap=0 production.env > production.b64

Note

We are currently using Node LTS v16.13.0