-
Notifications
You must be signed in to change notification settings - Fork 3
Build from Source
csp-gateway
is written in Python and Javascript. While prebuilt wheels are provided for end users, it is also straightforward to build csp-gateway
from either the Python source distribution or the GitHub repository.
- Table of Contents
- Make commands
- Prerequisites
- Clone
- Install NodeJS
- Install Python dependencies
- Build
- Lint and Autoformat
- Testing
As a convenience, csp-gateway
uses a Makefile
for commonly used commands. You can print the main available commands by running make
with no arguments
> make
build build the library
clean clean the repository
fix run autofixers
install install library
lint run lints
test run the tests
csp-gateway
has a few system-level dependencies which you can install from your machine package manager. Other package managers like conda
, nix
, etc, should also work fine.
Clone the repo with:
git clone https://github.com/Point72/csp-gateway.git
cd csp-gateway
Follow the instructions for installing NodeJS for your system. Once installed, you can install pnpm
with:
npm instal --global pnpm
Python build and develop dependencies are specified in the pyproject.toml
, but you can manually install them:
make requirements
Note that these dependencies would otherwise be installed normally as part of PEP517 / PEP518.
Build the python project in the usual manner:
make build
csp-gateway
has linting and auto formatting.
Language | Linter | Autoformatter | Description |
---|---|---|---|
Python | ruff |
ruff |
Style |
Python | ruff |
ruff |
Imports |
JavaScript | prettier |
prettier |
Style |
Markdown | prettier |
prettier |
Style |
Python Linting
make lint-py
Python Autoformatting
make fix-py
JavaScript Linting
make lint-js
JavaScript Autoformatting
make fix-js
Documentation Linting
We use prettier
for our Markdown linting, so follow the above docs.
csp-gateway
has both Python and JavaScript tests. The bulk of the functionality is tested in Python, which can be run via pytest
. First, install the Python development dependencies with
make develop
Python
make test-py
JavaScript
make test-js
This wiki is autogenerated. To made updates, open a PR against the original source file in docs/wiki
.
Get Started
Key Components
For Developers
Modules
- API/UI Modules
- Logging Modules
- Replay Engine Modules
- Utility Modules
For Contributors