1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-06-16 15:06:53 +00:00

revert changes to master

This commit is contained in:
Anson 2023-09-03 12:02:45 -06:00
parent 4cf0330734
commit d6dd6f7353
13 changed files with 405 additions and 389 deletions

0
.env
View File

1
.gitignore vendored
View File

@ -1,2 +1 @@
__pycache__ __pycache__
.env

View File

@ -3,3 +3,32 @@ black:
image: registry.gitlab.com/pipeline-components/black:latest image: registry.gitlab.com/pipeline-components/black:latest
script: script:
- black --check --verbose -- . - black --check --verbose -- .
build:master:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:latest"
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
build:branch:
stage: build
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}"
rules:
- if: '$CI_COMMIT_BRANCH != "master"'

View File

@ -1,8 +1,7 @@
FROM python:3.11-buster AS builder FROM python:3.11-buster AS builder
COPY telegram/requirements.txt . COPY requirements.txt /requirements.txt
RUN pip install --user -r requirements.txt RUN pip install --user -r requirements.txt
@ -13,9 +12,6 @@ ENV MPLBACKEND=Agg
COPY --from=builder /root/.local /root/.local COPY --from=builder /root/.local /root/.local
COPY common common COPY . .
COPY telegram .
CMD [ "python", "./bot.py" ] CMD [ "python", "./bot.py" ]

View File

@ -8,7 +8,7 @@ import pytz
import requests as r import requests as r
import schedule import schedule
from common.Symbol import Stock from Symbol import Stock
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -28,7 +28,7 @@ from telegram.ext import (
Updater, Updater,
) )
from common.symbol_router import Router from symbol_router import Router
from T_info import T_info from T_info import T_info
# Enable logging # Enable logging

View File

@ -6,7 +6,7 @@ import requests as r
import schedule import schedule
from markdownify import markdownify from markdownify import markdownify
from common.Symbol import Coin from Symbol import Coin
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -1,4 +1,4 @@
-r telegram/requirements.txt -r requirements.txt
black==23.3.0 black==23.3.0
flake8==5.0.4 flake8==5.0.4
Flake8-pyproject==1.2.3 Flake8-pyproject==1.2.3

View File

@ -1,8 +0,0 @@
version: '3'
services:
telegram:
build:
context: .
dockerfile: telegram/Dockerfile
image: registry.gitlab.com/simple-stock-bots/simple-telegram-stock-bot
env_file: .env

View File

@ -10,9 +10,9 @@ import pandas as pd
import schedule import schedule
from cachetools import TTLCache, cached from cachetools import TTLCache, cached
from common.cg_Crypto import cg_Crypto from cg_Crypto import cg_Crypto
from common.MarketData import MarketData from MarketData import MarketData
from common.Symbol import Coin, Stock, Symbol from Symbol import Coin, Stock, Symbol
from typing import Dict from typing import Dict