-
Notifications
You must be signed in to change notification settings - Fork 25
Assorted uplifts #6
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ned, thank you so much for improving this!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering should we specify in the README that the entry path is /run_analysis.py? I think sometimes candidates could be searching for main.py
##### YOUR CODE GOES HERE ##### | ||
pyplot.savefig(Path(__file__).parents[1].joinpath(*["plots", "left_right_parties.png"])) | ||
pyplot.title("Lefty/righty parties") | ||
plt.title("Lefty/righty parties") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since we have commented out the code for dim_reduced_data charts above, should we also comment out these codes?
@@ -1,43 +1,46 @@ | |||
from pathlib import Path | |||
|
|||
from matplotlib import pyplot | |||
import matplotlib.pyplot as plt | |||
|
|||
from political_party_analysis.loader import DataLoader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As run_analysis.py is now in root directory, rather than src/, the import should be from src.political_party_analysis.loader import DataLoader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since run_analysis.py is in repo root now, maybe we could remove "political_party_analysis" folder and simply move the files to src/? (i.e. import from src.loader)
A range of uplifts to the codebase:
pyproject.toml & poetry.lock
[project]
rather than[tool.poetry]
*
version specifiers for dependencies with locked major versionsother changes:
test_dimensionality_reducer
testtest_dimensionality_reducer
test as skipped initially, so that tests can go green after completing first exerciserun_analysis.py
to the top level directory, which is a less surprising location for workflow runner, and will ensure that the package has been installed correctly (and not succeeding just because it's in the same directory as thepolitical_party_analysis
module).gitignore
loader.py
,visualization.py
, anddim_reducer.py
run_analysis.py
andloader.py