-
-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from CyberPunkMetalHead/release-1.0.0
Release 1.0.0
- Loading branch information
Showing
30 changed files
with
1,288 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Black Lint Check | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--check --verbose" | ||
src: "." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Unit Tests/Flake8 check for Python 3.8, 3.9 | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ['3.8', '3.9'] | ||
defaults: | ||
run: | ||
working-directory: . | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_language_version: | ||
python: python3.8 | ||
default_stages: [commit, push] | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 21.12b0 | ||
hooks: | ||
- id: black | ||
args: [--safe, --config=pyproject.toml] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: debug-statements | ||
language_version: python3 | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
args: [--config=setup.cfg] | ||
language_version: python3 | ||
|
||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v2.6.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
args: [--application-directories=./src, --py37-plus] | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.29.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] | ||
|
||
# Add later, due to typing issues this is currently disabled | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v0.920 | ||
# hooks: | ||
# - id: mypy | ||
# files: ^src/ | ||
# args: [--no-strict-optional, --ignore-missing-imports] | ||
# additional_dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
# API Dockerfile | ||
|
||
FROM python:3.9-alpine | ||
RUN mkdir /app | ||
COPY src /app | ||
COPY ./requirements.txt /app/requirements.txt | ||
WORKDIR /app | ||
|
||
# Copy requirements file | ||
COPY requirements.txt . | ||
|
||
# Copy module files | ||
COPY src/gateio_new_coins_announcements_bot ./src/gateio_new_coins_announcements_bot | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
COPY setup.cfg . | ||
COPY setup.py . | ||
COPY main.py . | ||
|
||
# Copy relevant files to run bot | ||
COPY config.yml . | ||
COPY old_coins.json . | ||
COPY auth/auth.yml ./auth/ | ||
|
||
#root directory contains main.py to start the bot as well as all config/auth.yml files | ||
WORKDIR . | ||
|
||
# install necessary requirements | ||
RUN pip3 install -r requirements.txt | ||
|
||
CMD [ "python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
flake8==3.9.2 | ||
tox==3.24.3 | ||
pytest==6.2.5 | ||
pytest-cov==3.0.0 | ||
mypy==0.910 | ||
pre-commit==2.15.0 | ||
black==21.12b0 |
Oops, something went wrong.