Skip to content

Latest commit

 

History

History
121 lines (82 loc) · 3.48 KB

CONTRIBUTING.md

File metadata and controls

121 lines (82 loc) · 3.48 KB

Contributing

Thank you for wanting to contribute! This project reviews PRs that have an associated issue with them. If you have not make an issue for your PR, please make one first.

Issues, feedback, and sharing that you're using Titanoboa and Vyper on social media is always welcome!

Table of Contents

Setup

Requirements

You must have the following installed to proceed with contributing to this project.

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • python
    • You'll know you did it right if you can run python --version and you see a response like Python x.x.x
  • pip
    • You'll know you did it right if you can run pip --version and you see a response like pip x.x.x
  • Linux and/or MacOS
    • This project is not tested on Windows, so it is recommended to use a Linux or MacOS machine, or use a tool like WSL for windows users.

Installing for local development

Follow the steps to clone the repo for you to make changes to this project.

  1. Clone the repo
git clone https://github.com/vyperlang/titanoboa
cd titanoboa
  1. Setup virtual environment and install dependencies

You can learn more about activating and deactivating virtual environments here.

python -m venv venv
source venv/bin/activate
# Install dev requirements
pip install -r dev-requirements.txt
# Install prod requirements (in the pyproject.tom)
pip install .

Note: When you delete your terminal/shell, you will need to reactivate this virtual environment again each time. To exit this python virtual environment, type deactivate

  1. Create a new branch
git checkout -b <branch_name>

And start making your changes! Once you're done, you can commit your changes and push them to your forked repo.

git commit -a
git push <your_forked_github>
  1. Run the linter
make lint

Running Tests

Once you have your environment setup, you can run the tests to make sure everything is working as expected. You'll need to have your virtual environment activated to run the tests.

Unit tests

Run the following:

pytest tests/unitary -x

This will skip the integration tests, which need extra "stuff".

Integration tests

Once you have setup your virtual environment, to run integration tests, you'll need to add environment variables.

You can see the .env.unsafe.example for environment variables you'll want to use.

MAINNET_ENDPOINT=<eth_mainnet_rpc_url>
SEPOLIA_ENDPOINT=<sepolia_rpc_url>
SEPOLIA_PKEY=<sepolia_private_key> # DO NOT USE A KEY ASSSOCIATED WITH REAL FUNDS

You can optionally copy .env.unsafe.example and create a new file called .env.unsafe file and run the following command to load the environment variables.

source .env.unsafe

Then, you can just run:

pytest tests/integration/ -x

Thank you!

Thank you for wanting to participate in titanoboa!