Install all dependencies by running
npm install
.
├── examples
| ├── opencv/ - The canonical OpenCV demo rewritten to use node-pachyderm
├── src
│ ├── builders/ - Functions for translating json objects to protobuf types
│ ├── lib/ - Contains types defined by developers
│ ├── services/ - Service calls organized by each proto type
│ └── utils/ - Utility functions
└── version.json - Spec for the version of this library, as well as its pachyderm dependency
This project uses prettier and eslint to ensure coding consistency. To run the linter locally run
npm run lint
The linter will also run in CI and fail if there are any stylistic discrepancies.
- Install jq
- Update the pachyderm version in
version.json
- Generate new protos with
npm run build:proto
- Commit the proto updates and merge into main via pull request
- Install helm
- Install minikube
- Grab the latest pachyderm helm chart:
helm repo add pachyderm https://pachyderm.github.io/helmchart
- If you haven't already, start up minikube
- Install pachyderm locally:
helm install pachyderm --set deployTarget=LOCAL --version {DESIRED_VERSION} pachyderm/pachyderm
- Delete any existing pachctl config file:
rm ~/.pachyderm/config.json
- Run
pachctl port-forward
- WARNING: Keep in mind that the tests will delete any existing repos and pipelines in the activate context.
- Disable auth for the active context:
pachctl auth deactivate
- Run
pachctl port-forward
After deploying pachyderm locally you can run all tests with the following command
npm run test
As of now we are testing the builders and service functions.
These tests do not require you to deploy pachyderm locally to run against. Tests should be in the __tests__
directory inside the builders
folder. For each builder function, the default parameters along with parameters that override the default values should be tested.
Tests should be in the __tests__
directory inside the services
folder. These tests should use the pachClient
to hit pachyderm and test that the expected behavior of each service call is satisfied.
To run the openCV example run the following command
npm run opencv
- Code your change on a feature branch
- Add the appropriate tests and make sure existing tests pass
- Create a PR
Once your PR is approved, it will be merged into the library.
- Update the
version
inpackage.json
- Update the
version
inpackage-lock.json
- Commit the version update and merge into main via pull request
A Pachyderm team member will draft a new release on Github and create a tag, for example v0.19.7. CircleCI will automatically publish the updates to npm once a release is created.