Skip to content

Commit

Permalink
init: polymarket agents
Browse files Browse the repository at this point in the history
  • Loading branch information
pinegreene committed Aug 12, 2024
0 parents commit d447be4
Show file tree
Hide file tree
Showing 35 changed files with 2,666 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POLYGON_WALLET_PRIVATE_KEY=""
OPENAI_API_KEY=""
TAVILY_API_KEY=""
NEWSAPI_API_KEY=""
39 changes: 39 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
# packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency review'
on:
pull_request:
branches: [ "main" ]

# If using a dependency submission action in this workflow this permission will need to be set to:
#
# permissions:
# contents: write
#
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
permissions:
contents: read
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
with:
comment-summary-in-pr: always
# fail-on-severity: moderate
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
# retry-on-snapshot-warnings: true
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag polymarket-agents:$(date +%s)
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Welcome to Polymarket Agents. Thank you for filing your first issue."
pr-message: "Welcome to Polymarket Agents. Thank you for creating your first PR. Cheers!"
36 changes: 36 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with black
run: |
black .
- name: Test with unittest
run: |
python -m unittest discover
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.venv
.env
.idea
.ipynb_checkpoints
.mypy_cache
.vscode
__pycache__
.pytest_cache
htmlcov
dist
site
.coverage
coverage.xml
.netlify
test.db
log.txt
Pipfile.lock
env3.*
env
docs_build
site_build
venv
docs.zip
archive.zip
*~
.*.sw?
.cache
.DS_Store
local_db*
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
language_version: python3.9
120 changes: 120 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Introduction

### Welcome and Thanks!

> First off, thank you for considering contributing to our Decentralized AI Agent for Polymarket! It's contributors like you that help make this project a powerful tool for prediction markets.
### Why Follow These Guidelines?

> Following these guidelines shows that you respect the time and effort of the developers working on this project. In return, we’ll address your contributions efficiently, review your changes, and help you finalize your pull requests.
### Types of Contributions We Welcome

We value all kinds of contributions! Whether it’s improving our documentation, triaging bugs, or enhancing our algorithms, your contributions are greatly appreciated.

> This project is open source, and we’re thrilled to receive contributions from the community. You can help by writing tutorials, reporting bugs, suggesting new features, or contributing code to improve our AI agent.
### Contributions We Do Not Seek

To streamline the process, please avoid these types of contributions:

> Please do not use the issue tracker for general support questions. For help, consider joining our the Polymarket Discord or referring to the [Polymarket API documentation](https://polymarket.com/docs).
# Ground Rules

### Setting Expectations

We ask that all contributors adhere to the following standards:

> Responsibilities
> * Ensure compatibility with multiple environments where our AI agent operates.
> * Create issues for significant changes and gather community feedback.
> * Keep changes modular and focused.
> * Foster an inclusive environment and welcome contributors from diverse backgrounds.
# Your First Contribution

### Getting Started

New to contributing? Here’s how you can start:

> Begin by exploring our beginner-friendly issues, which are tagged as [good first issue](#). These are smaller tasks that are great for newcomers.
### Bonus: Helpful Resources

Here are some tutorials to guide you through your first open source contribution:

> New to open source? Check out [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
### Next Steps?

> At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first :smile_cat:
>
> If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
# Getting Started

### Submitting Your Contribution

Follow these steps to submit your contributions:

* Fork the repository and make changes in your fork.
* Ensure your code follows our [style guide](#) and passes all tests.
* Sign the Contributor License Agreement (CLA), if required.
* Submit a pull request with a detailed description of your changes.

> For significant changes:
> 1. Fork the repo and make your changes.
> 2. Ensure your changes align with the project’s coding standards.
> 3. Sign the Contributor License Agreement if applicable.
> 4. Open a pull request and describe the changes you’ve made.
### For Small or “Obvious” Fixes

For minor fixes, such as typos or documentation improvements, you can:

> Submit a simple patch without a CLA if the change does not involve significant new functionality. Examples include:
> * Typographical corrections
> * Simple formatting changes
> * Non-functional code adjustments
# How to Report a Bug

### Security Disclosures

If you discover a security issue, please report it privately:

> If you find a security vulnerability, do NOT open an issue. Instead, email Polymarket directly.
### Filing a Bug Report

When reporting a bug, please provide the following details:

> When filing a bug, include:
> 1. The version of the AI agent you are using.
> 2. Your operating system and environment.
> 3. Steps to reproduce the issue.
> 4. Expected behavior.
> 5. Actual behavior observed.
# How to Suggest a Feature or Enhancement

### Project Goals and Philosophy

Before suggesting a feature, understand our project goals:

> Our AI agent aims to leverage decentralized mechanisms to provide accurate predictions within Polymarket's markets. We are focused on enhancing market analysis and prediction accuracy.
### Suggesting a Feature

If you have an idea for a new feature:

> Open an issue on GitHub with a detailed description of the feature, including its purpose, benefits, and any proposed implementation details.
# Code Review Process

### Review and Acceptance

Our review process is as follows:

> The core team must approve the PR.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.9

COPY . /home
WORKDIR /home

RUN pip3 install -r requirements.txt
Loading

0 comments on commit d447be4

Please sign in to comment.