Skip to content
Open
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
8 changes: 8 additions & 0 deletions isthisstockgood/Active/Zacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,13 @@ def get_growth_rate(self, text):
if "Next 5 Years" in line:
result = lines[i+1]

if "NA" not in result:
estimate = re.sub(r"[^\d\.]", "", result)
return float(estimate)

for i, line in enumerate(lines):
if "Next Year (" in line:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opening bracket is important. Earlier on the page, "Next Year" appears in another context, and there it lacks the parentheses.

result = lines[i+1]

estimate = re.sub(r"[^\d\.]", "", result)
return float(estimate)
2 changes: 1 addition & 1 deletion isthisstockgood/DataFetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def fetchDataForTickerSymbol(ticker):
zacks_analysis = data_fetcher.zacks_analysis
# NOTE: Some stocks won't have analyst growth rates, such as newly listed stocks or some foreign stocks.
five_year_growth_rate = \
yahoo_finance_analysis.five_year_growth_rate if yahoo_finance_analysis \
yahoo_finance_analysis.five_year_growth_rate if yahoo_finance_analysis.five_year_growth_rate \
else zacks_analysis.five_year_growth_rate if zacks_analysis \
else 0
margin_of_safety_price, sticker_price = _calculateMarginOfSafetyPrice(
Expand Down
1 change: 0 additions & 1 deletion isthisstockgood/Obsolete/StockRow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def __init__(self, ticker_symbol):

def parse_json_data(self, data):
try:
print(data)
json_data = json.loads(data)
data_dict = {}
rows = json_data.get("fundamentals", {}).get("rows", [])
Expand Down
6 changes: 3 additions & 3 deletions isthisstockgood/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def get_logger():
def create_app(fetchDataForTickerSymbol):
app = Flask(__name__)

@app.route('/api/ticker/nvda')
def api_ticker():
template_values = fetchDataForTickerSymbol("NVDA")
@app.route('/api/ticker/<ticker>')
def api_ticker(ticker):
template_values = fetchDataForTickerSymbol(ticker)

if not template_values:
data = render_template('json/error.json', **{'error' : 'Invalid ticker symbol'})
Expand Down
708 changes: 0 additions & 708 deletions poetry.lock

This file was deleted.

42 changes: 29 additions & 13 deletions pyproject.toml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel said it'll only deploy my preview if the app's config is UV-compatible.

@mrhappyasthma, if this would break your deployments, please let me know and I'll revert👍

@kocielnik kocielnik Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a good experience with UV so far.

For every problem I've had with it, I was able to find the solution (find, not "prompt") much quicker than when I had a similar problem using other tools, even Poetry.

My experience with Python and UV agrees with this:

‒ Which Python package manager should I use?
‒ Use uv. It handles dependency management, virtual environments, Python version management, and package building in a single tool. It follows Python packaging standards, generates cross-platform lockfiles, and resolves dependencies faster than any alternative. For most Python projects in 2026, uv is the right default.

‒ Tim Hopper, https://pydevtools.com/handbook/explanation/which-python-package-manager-should-i-use/

Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
[tool.poetry]
[project]
name = "IsThisStockGood"
version = "0.1.0"
description = ""
authors = ["Mark Klara"]
authors = [{ name = "Mark Klara" }]
requires-python = ">=3.8,<4"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"requests-futures>=1.0.1,<2",
"wheel>=0.43.0,<0.44",
"lxml>=5.2.2,<6",
"flask==3.0.3",
"virtualenv>=20.26.6,<21",
]

[dependency-groups]
dev = ["pytest>=8.2.1,<9"]

[tool.poetry.dependencies]
python = "^3.8"
requests-futures = "^1.0.1"
wheel = "^0.43.0"
lxml = "^5.2.2"
flask = "3.0.3"
virtualenv = "^20.26.6"
[tool.uv]
default-groups = "all"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.1"
[tool.uv.build-backend]
module-root = ""

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.8.17,<0.9.0"]
build-backend = "uv_build"

[tool.pylint]
indent-string=" "
Expand Down
2 changes: 1 addition & 1 deletion tests/test_DataSources.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def test_msn_money():
test_ticker = 'MSFT'
test_name = 'Microsoft Corp'
test_name = 'Microsoft Corporation'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data returned from the source changed.


data = get_msn_money_data(test_ticker)

Expand Down
4 changes: 4 additions & 0 deletions tests/test_Zacks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from isthisstockgood.Active.Zacks import Zacks

def test_zacks():
zacks = Zacks("TSLA")
563 changes: 563 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

Loading