Note: We use uv to manage our monorepo. You can install it with the following command:
curl -fsSL https://docs.astral.sh/uv/install.sh | sh
Then, you can clone the repository and install the dependencies:
- Clone the
pragma-sdk
repository:
git clone [email protected]:astraly-labs/pragma-sdk.git
- Install dependencies with uv:
sh scripts/uv_install.sh
It will create a .venv
virtualenv for each package of our monorepo that you can later activate, for example for the sdk:
cd pragma-sdk
source .venv/bin/activate
!!! note In case you are working on other packages that depend on the SDK & utils and you want to make it editable you should always update the dependencies with the following command:
```shell
uv sync --all-extras
```
We use starknet-devnet-rs for our integration tests, you can install it through Rust's package manager, cargo
.
- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install Starknet-devnet
cargo install starknet-devnet
- Now, you can run tests, for example in the pragma-sdk repository:
cd pragma-sdk
source .venv/bin/activate
coverage run -m pytest --net=devnet --client=full_node -v --reruns 5 --only-rerun aiohttp.client_exceptions.ClientConnectorError tests
- Upgrade submodule
git submodule update --remote
- Compile contracts
cd pragma-oracle && scarb build
- Update ABIs
poe update_abis