Skip to content

Commit

Permalink
open source prep: version requirements, organize devops scripts, test…
Browse files Browse the repository at this point in the history
…ing folder, contribution guidelines
  • Loading branch information
alexnicita committed Jul 31, 2024
1 parent b715b51 commit 643862e
Show file tree
Hide file tree
Showing 14 changed files with 174 additions and 38 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.venv
.env

.idea
.ipynb_checkpoints
.mypy_cache
Expand All @@ -23,13 +22,8 @@ site_build
venv
docs.zip
archive.zip

# vim temporary files
*~
.*.sw?
.cache

# macOS
.DS_Store

local_db/
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.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Agents

Please see `CONTRIBUTING.md` for contributing guidlines.

## Local Development

This repo is inteded for use with Python 3.9

```
virtualenv --python=python3.9 .venv
source .venv/bin/activate
```

```
./build-docker.sh
## Docker Development

Run the following command from the agents directory to run an ephemeral docker container with a bash shell and mounted volume:
./run-docker-dev.sh
Run the following commands from the agents directory to run an ephemeral docker container with a bash shell and mounted volume:

```
./scripts/bash/build-docker.sh
./scripts/bash/run-docker-dev.sh
```
33 changes: 15 additions & 18 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
fastapi==0.111.0
py-clob-client==0.17.1
py-order-utils
data_sources==0.0.1
fastapi==0.111.1
httpx==0.27.0
langchain_chroma==0.1.2
langchain_community==0.2.10
langchain_core==0.2.26
langchain_openai==0.1.19
newsapi==0.1.1
newsapi_python==0.2.7
py_clob_client==0.17.1
py_order_utils==0.3.0
pydantic==2.8.2
python-dotenv==1.0.1
tavily_python==0.3.4
tg.devtools==2.4.3
typer==0.12.3
httpx
devtools==0.12.2
langchain
langchainhub
langchain-openai
langchain-community
langgraph
tavily-python
newsapi-python==0.2.7
jq
langchain-chroma
eip712-structs
web3
scheduler==0.8.7

web3==5.31.4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
% python test/test.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.000s
OK
"""

import unittest

class TestStringMethods(unittest.TestCase):

def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')

def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())

def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
with self.assertRaises(TypeError):
s.split(2)

if __name__ == '__main__':
unittest.main()
10 changes: 0 additions & 10 deletions todo.txt

This file was deleted.

0 comments on commit 643862e

Please sign in to comment.