Skip to content

Commit

Permalink
Use submodules in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths committed Apr 15, 2024
1 parent f336af8 commit b10fbd6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/python_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: ./.github/actions/python_prepare
- name: Run mypy
run: poetry run mypy
Expand All @@ -25,6 +27,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: ./.github/actions/python_prepare
- name: Run pytest
run: poetry run pytest
Expand All @@ -33,6 +37,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: ./.github/actions/python_prepare
- name: Run pytest
run: poetry run pytest
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ show_traceback = True
disallow_incomplete_defs = True
disallow_untyped_defs = True
ignore_missing_imports = True
exclude = prediction_market_agent/agents/microchain_agent/mech/mech/
exclude = prediction_market_agent/agents/microchain_agent/mech/mech/ # A submodule

# See https://github.com/python/mypy/issues/3905#issuecomment-421065323
# We don't want to ignore all missing imports as we want to catch those in our own code
Expand Down
10 changes: 8 additions & 2 deletions prediction_market_agent/agents/microchain_agent/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def description(self) -> str:
def example_args(self) -> list[str]:
return [get_example_market_id(self.market_type)]

def __call__(self, question: str) -> str:
def __call__(self, market_id: str) -> str:
question = self.market_type.market_class.get_binary_market(
id=market_id
).question
private_key = APIKeys().bet_from_private_key.get_secret_value()
# 0.01 xDai is hardcoded cost for an interaction with the mech-client
MECH_CALL_XDAI_LIMIT = 0.011
Expand Down Expand Up @@ -158,7 +161,10 @@ def description(self) -> str:
def example_args(self) -> list[str]:
return [get_example_market_id(self.market_type)]

def __call__(self, question: str) -> str:
def __call__(self, market_id: str) -> str:
question = self.market_type.market_class.get_binary_market(
id=market_id
).question
keys = APIKeys()
openai_api_key = keys.openai_api_key.get_secret_value()
tavily_api_key = keys.tavily_api_key.get_secret_value()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
temperature=0.7,
)
agent = Agent(llm=LLM(generator=generator), engine=engine)
agent.prompt = f"""Act as a agent. You can use the following functions:
agent.prompt = f"""Act as a agent to maximise your profit. You can use the following functions:
{engine.help}
Expand Down

0 comments on commit b10fbd6

Please sign in to comment.