Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wakamex committed Mar 5, 2024
1 parent c0bbc32 commit 6306280
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: "Docker: Build and push agent0 image"
on:
workflow_dispatch:
push:
branches: ["main"]
tags: ["*"]
branches:
- uv-installable

env:
REGISTRY: ghcr.io
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: lint
on:
push:
branches:
- main
- uv-installable
pull_request:

jobs:
Expand All @@ -22,14 +22,14 @@ jobs:
cache: "pip"
token: ${{github.token}}

- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: install requirements
run: |
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements-rl.txt
python -m pip install --upgrade -r requirements-dev.txt
uv pip install --upgrade -r requirements.txt
uv pip install --upgrade -r requirements-rl.txt
uv pip install --upgrade -r requirements-dev.txt
- name: run black
run: python -m black --config pyproject.toml --check --diff .
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: static
on:
push:
branches:
- main
- uv-installable
pull_request:

jobs:
Expand All @@ -22,14 +22,14 @@ jobs:
cache: "pip"
token: ${{github.token}}

- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: install requirements
run: |
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements-rl.txt
python -m pip install --upgrade -r requirements-dev.txt
uv pip install --upgrade -r requirements.txt
uv pip install --upgrade -r requirements-rl.txt
uv pip install --upgrade -r requirements-dev.txt
- name: analysing code with pyright
run: python -m pyright $(git ls-files '*.py' '*.pyi')
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: test
on:
push:
branches:
- main
- uv-installable
pull_request:

jobs:
Expand Down Expand Up @@ -41,14 +41,14 @@ jobs:
cache: "pip"
token: ${{github.token}}

- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: install requirements
run: |
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements-rl.txt
python -m pip install --upgrade -r requirements-dev.txt
uv pip install --upgrade -r requirements.txt
uv pip install --upgrade -r requirements-rl.txt
uv pip install --upgrade -r requirements-dev.txt
- name: run pytest with coverage
run: |
Expand Down
16 changes: 2 additions & 14 deletions lib/agent0/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,17 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
# This flag installs all dependencies and should be ran when installing this subpackage in isolation
with-dependencies = ["agent0[base, lateral]"]
base = [
"fixedpointmath",
dependencies = [
"numpy",
"python-dotenv",
# will include eth- packages
"web3",
"hexbytes",
"pandas",
"nest_asyncio",
"rollbar",
"dill",
"fixedpointmath @ git+https://github.com/delvtech/fixedpointmath.git",
]
lateral = [
# Lateral dependencies across subpackages are pointing to github
"hyperlogs[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/hyperlogs",
"ethpy[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/ethpy",
"chainsync[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/chainsync",
]


[build-system]
requires = ["flit_core>=3.2"]
Expand Down
13 changes: 1 addition & 12 deletions lib/chainsync/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
# This flag installs all dependencies and should be ran when installing this subpackage in isolation
with-dependencies = [
"chainsync[base, lateral]"
]
base = [
dependencies = [
"fixedpointmath",
"matplotlib",
"numpy",
Expand All @@ -37,11 +31,6 @@ base = [
"pandas-stubs",
"requests",
]
lateral = [
# Lateral dependencies across subpackages are pointing to github
"hyperlogs[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/hyperlogs",
"ethpy[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/ethpy",
]

[build-system]
requires = ["flit_core>=3.2"]
Expand Down
12 changes: 1 addition & 11 deletions lib/ethpy/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,12 @@ classifiers = [
"License :: OSI Approved :: Apache License 2.0",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
# This flag installs all dependencies and should be run when installing this subpackage in isolation
with-dependencies = [
"ethpy[base, lateral]"
]
base = [
dependencies = [
"fixedpointmath",
"numpy",
"python-dotenv",
"web3",
]
lateral = [
# Lateral dependencies across subpackages are pointing to github
"hypertypes[with-dependencies] @ git+https://github.com/delvtech/agent0.git/#subdirectory=lib/hypertypes",
]

[project.urls]
"Homepage" = "https://github.com/delvtech/agent0"
Expand Down
8 changes: 0 additions & 8 deletions lib/hyperlogs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ classifiers = [
"Operating System :: OS Independent",
]

[project.optional-dependencies]
# This flag installs all dependencies and should be ran when installing this subpackage in isolation
with-dependencies = [
"hyperlogs[base, lateral]"
]
base = []
lateral = []

[build-system]
requires = ["flit_core>=3.2"]
build-backend = "flit_core.buildapi"
8 changes: 4 additions & 4 deletions lib/hypertypes/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ classifiers = [
"License :: OSI Approved :: Apache License 2.0",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
with-dependencies = ["hypertypes[base]"]
base = ["web3", "pypechain"]
dependencies = [
"web3",
"pypechain",
]

[build-system]
requires = ["flit_core>=3.2"]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
-e lib/chainsync[base]
-e lib/ethpy[base]
-e lib/hypertypes[base]
--find-links="packages/hyperdrivepy"
--find-links=packages/hyperdrivepy
hyperdrivepy
rollbar

0 comments on commit 6306280

Please sign in to comment.