Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bringing deployment up to date #14

Merged
merged 17 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
# Using multiple Python versions
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.x"]
python-version: ["3.10", "3.11", "3.x"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .safe_env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DEV_ENV=true
DEV_ENV=true
74 changes: 69 additions & 5 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"python-dotenv>=1.0.1",
"loguru>=0.7.2",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
readme = "README.md"
license = {text = "BSD-3-Clause"}

Expand All @@ -40,4 +40,10 @@ Repository = "https://github.com/mayushii21/market-dashboard"
addopts = [
"--import-mode=importlib",
]

[tool.pdm]

[tool.pdm.dev-dependencies]
test = [
"pytest>=8.2.2",
]
4 changes: 3 additions & 1 deletion src/innov8/components/price_chart.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import dash_bootstrap_components as dbc
import dash_tvlwc
import plotly
Expand Down Expand Up @@ -196,7 +198,7 @@ def plot_line(indicator) -> None:
{
"watermark": {
"visible": True,
"text": "mayushii21",
"text": os.getenv("WATERMARK"),
"color": hex_to_rgba(text_color, 0.3),
"fontFamily": "Consolas, monospace, Roboto, Ubuntu, sans-serif, 'Trebuchet MS'",
"fontSize": 72,
Expand Down
18 changes: 12 additions & 6 deletions src/innov8/db_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ def scrape_symbols():
"https://www.slickcharts.com/sp500", headers=headers, timeout=120
)
soup = BeautifulSoup(r.text, "lxml")
# Extract the text (replacing . with -) from the third cell (Symbol column) of each row of the main table
# (ordered by component weights)
return [
tr.find_all("td")[2].text.replace(".", "-")
for tr in cast(Tag, soup.find("tbody")).find_all("tr")
]
try:
# Extract the text (replacing . with -) from the third cell (Symbol column) of each row of the main table
# (ordered by component weights)
return [
tr.find_all("td")[2].text.replace(".", "-")
for tr in cast(Tag, soup.find("tbody")).find_all("tr")
]
except:
with open(
Path(__file__).resolve().parent / "sp500_tickers.txt", "r"
) as file:
return [line.strip() for line in file]

def create_tables(self):
create_tables_query = """
Expand Down
Loading
Loading