Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump project version; prune authors #863

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 38 additions & 30 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# Install -- overview

Elf-simulations is currently supported only for Python 3.10.
All `elf-simulations` packages should be accessed from Python 3.10.
The following outlines our recommended install workflow, although alternatives are listed below.

## 1. Install Pyenv

Follow [Pyenv install instructions](https://github.com/pyenv/pyenv#installation).

## 2. Clone Elf-simulations repo
## 1. Clone the `elf-simulations` repo

Clone the repo into a <repo_location> of your choice.

```bash
git clone https://github.com/delvtech/elf-simulations.git <repo_location>
git clone git@github.com:delvtech/elf-simulations.git <repo_location>
```

## 3. Set up virtual environment
## 2. Install Pyenv

Follow [Pyenv install instructions](https://github.com/pyenv/pyenv#installation).


## 3. Set up a virtual environment

You can use any environment, but we recommend [venv](https://docs.python.org/3/library/venv.html), which is part of the standard Python library.
You can use any environment; we use [venv](https://docs.python.org/3/library/venv.html):

```bash
cd <repo_location>
Expand All @@ -26,7 +28,7 @@ python -m venv .venv
source .venv/bin/activate
```

## 4. Install Elf-simulations
## 4. Install `elf-simulations` packages and requirements

All of the elf-simulations packages can be installed from `requirements.txt`:

Expand All @@ -43,44 +45,50 @@ python -m pip install --upgrade -r requirements-dev.txt

Finally, you can test that everything is working by calling: `python -m pytest .`

## Working with smart contracts (optional)
# Alternate install paths

We run tests and offer utilities that depend on executing bytecode compiled from Hyperdrive solidity contracts. This is not required to use elfpy.
The default installation directions above should automatically install all local sub-packages, and should be sufficient for development.
We also support these installation options:

NOTE: The Hyperdrive solidity implementation is currently under security review, and thus is not available publicly.
The following instructions will not work for anyone who is not a member of Delv.
## Installing each subpackage independently

### 1. Set up smart contracts
After you have cloned the repository you can install each package independently.
For example:

Clone the hyperdrive repo, then create a [sym link](https://en.wikipedia.org/wiki/Symbolic_link#POSIX_and_Unix-like_operating_systems) at `hyperdrive_solidity/` pointing to the repo location.
```bash
python -m pip install --upgrade lib/agent0[with-dependencies]
```

Internally, the above installation calls

```bash
git clone git@github.com:delvtech/hyperdrive.git ../hyperdrive
ln -s ../hyperdrive hyperdrive_solidity
pip install agent0[base] # Install with base packages only (this is what's called in requirements.txt)
pip install agent0[lateral] # Installs dependent sub-packages from git (e.g., ethpy)
```

### 2. Install Hyperdrive
# Working with smart contracts

Complete the steps in Hyperdrive's [Pre-requisites](https://github.com/delvtech/hyperdrive#pre-requisites) and [Build](https://github.com/delvtech/hyperdrive#build) sections.
We run tests and offer utilities that depend on executing bytecode compiled from Hyperdrive solidity contracts. This is not required to use elfpy.

## Notes
NOTE: The Hyperdrive solidity implementation is currently under security review, and thus is not available publicly.
The following instructions will not work for anyone who is not a member of Delv.

The default installation directions above should automatically install all local sub-packages, and should be sufficient for development.
## 1. Set up smart contracts

We also support installing each subpackage independently. For example:
Clone the hyperdrive repo, then create a [sym link](https://en.wikipedia.org/wiki/Symbolic_link#POSIX_and_Unix-like_operating_systems) at `hyperdrive_solidity/` pointing to the repo location.

```bash
python -m pip install --upgrade lib/agent0[with-dependencies]
git clone git@github.com:delvtech/hyperdrive.git ../hyperdrive
ln -s ../hyperdrive hyperdrive_solidity
```

Internally, the above installation calls
## 2. Install Hyperdrive

```bash
pip install agent0[base] # Install with base packages only (this is what's called in requirements.txt)
pip install agent0[lateral] # Installs dependent sub-packages from git (e.g., ethpy)
```
Complete the steps in Hyperdrive's [Pre-requisites](https://github.com/delvtech/hyperdrive#pre-requisites) and [Build](https://github.com/delvtech/hyperdrive#build) sections.

# Additional useful applications

You can test against a local testnet node using [Anvil](<[url](https://book.getfoundry.sh/reference/anvil/)>) with `anvil`.
You can test against a local testnet node using [Anvil](https://book.getfoundry.sh/reference/anvil/) with `anvil`.

We use [Docker](docs.docker.com/get-docker) for building images. Tests also use docker to launch a local postgres server.
If there are Docker issues when running tests, ensure "Allow the default Docker socket to be used" is set under Advanced settings (typically when running
Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
[project]
# TODO test this with docker
name = "elf-simulations"
version = "0.5.0"
version = "0.6.0"
# Authors are the current, primary stuards of the repo
# contributors can be found on github
authors = [
{ name = "Dylan Paiton", email = "dylan@delv.tech" },
{ name = "Mihai Cosma", email = "mihai@delv.tech" },
{ name = "Jonny Rhea", email = "jonny@delv.tech" },
{ name = "Matthew Brown", email = "matt@delv.tech" },
{ name = "Alex Towle", email = "alex@delv.tech" },
{ name = "Sheng Lundquist", email = "sheng@delv.tech" },
{ name = "Patrick Morris", email = "patrick@delv.tech" },
{ name = "Jonny Rhea", email = "jonny@delv.tech" },
{ name = "Alex Towle", email = "alex@delv.tech" },
{ name = "Giovanni Effio", email = "mazygio@delv.tech" },
{ name = "Ryan Goree", email = "ryan@delv.tech" },
{ name = "Will Villanueva", email = "will@delv.tech" },
{ name = "Jacob Arruda", email = "jacob@delv.tech" },
{ name = "Violet Vienhage", email = "violet@delv.tech" },
]


Expand Down
Loading