Skip to content

Commit

Permalink
Release v3 (#5)
Browse files Browse the repository at this point in the history
* Release v3

* Update README.md
  • Loading branch information
cusma authored Sep 2, 2023
1 parent 31b834f commit ba81510
Show file tree
Hide file tree
Showing 23 changed files with 2,203 additions and 879 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre-commit

on:
push:

permissions:
contents: read

jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3

- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
39 changes: 39 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish PPoS Dex data

on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
publish:
name: Publish PPoS Dex data
env:
ALGO_MNEMONIC: ${{ secrets.ALGO_MNEMONIC }}
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.6.1

- name: Install Python dependencies
run: poetry install

- name: Publish data
run: poetry run python3 ppos_dex.py publish
52 changes: 52 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: PPoS Dex Test

on:
pull_request:

push:
branches: [ main ]

release:
types: [ published ]

permissions:
contents: read

jobs:
ppos-dex-test:
name: PPoS Dex Test
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.3

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.6.1

- name: Install Python dependencies
run: poetry install

- name: Run LocalNet
run: |
pipx install algokit
algokit localnet start
- name: Sleep to allow the LocalNet to start
run: |
sleep 5
algokit localnet status
- name: Test
run: poetry run pytest --verbose
132 changes: 4 additions & 128 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,129 +1,5 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# IDE
.idea/

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
# Artifacts
.src/artifacts/
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
repos:
# YAML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

# Python
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3.11

- repo: https://github.com/myint/autoflake
rev: v2.2.0
hooks:
- id: autoflake
args:
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
- --expand-star-imports
- --ignore-init-module-imports

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
args: [
"--check-untyped-defs",
"--ignore-missing-imports",
"--scripts-are-modules",
"--python-version=3.11",
]
additional_dependencies: ["types-requests", "types-python-dateutil"]
language_version: python3.11

# GitHub Actions
- repo: https://github.com/bridgecrewio/checkov.git
rev: 2.4.14
hooks:
- id: checkov
files: .+
verbose: false
Loading

0 comments on commit ba81510

Please sign in to comment.