-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added several plot methods and fixed a few minor bugs/warnings #262
base: develop
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.
There are a couple of missing docstrings, and the utci comparison plot has a formatting issue. I have tested everything that has been changed, and these are the only issues I have come across.
LadybugTools_Engine/Python/src/ladybugtools_toolkit/plot/_seasonality.py
Outdated
Show resolved
Hide resolved
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.
Tested everything again (as well as new stuff added since last comment), and formatting of plots is all fixed now, though there are still some issues with unit tests, and a logic issue with the tilt orientation factor plot method.
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.
Unit tests are failing due to removing create_legend()
and heatmap_histogram()
.
(I see that heatmap_histogram
was renamed to annual_heatmap_histogram
with practicallly the same function, so that should be fine)
need some more thought on changes to create_legend
, maybe keep the original method and just have it call create_legend_handles_labels
and then create a legend with the output of that?
see:
_____________________________________________________ test_legend _____________________________________________________
def test_legend():
"""_"""
> assert isinstance(TEST_CATEGORICAL_UNBOUNDED.create_legend(), Legend)
E AttributeError: 'Categorical' object has no attribute 'create_legend'
tests\test_categorical.py:129: AttributeError
_______________________________________________ test_heatmap_histogram ________________________________________________
def test_heatmap_histogram() -> None:
"""_"""
> assert isinstance(UTCI_DEFAULT_CATEGORIES.heatmap_histogram(TEST_TIMESERIES_DATA), Figure)
E AttributeError: 'CategoricalComfort' object has no attribute 'heatmap_histogram'. Did you mean: 'annual_heatmap_histogram'?
tests\test_categorical.py:182: AttributeError
# shuffle the iterations | ||
np.random.shuffle(target_iterations) |
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.
why shuffle the iterations?
I would expect the order doesn't matter much, though when not running parallel it might be better if they were in order so that if one fails/is missed, it's easier to tell which one it was.
_tilts = np.linspace(0, 90, tilts)[:-1].tolist() + [89.999] | ||
rrs: list[RadiationRose] = [] | ||
for ta in tqdm(_tilts): | ||
sp = _dir / f"{epw_file.stem}_{ndir}_{ta:0.4f}.pickle" |
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.
This path also needs to include the analysis period description, as the analysis period is taken into account when creating the sky matrix.
Or some sort of representation of analysis_period.hoys
, though I think ap start and end dates/times would be best.
As it currently is, if using the same tilts, directions and epw file, but different analysis periods (eg. comparing summer and winter), then one analysis period would be pickled, and then future analysis periods would only show the first used, ignoring the rest.
return ax | ||
|
||
|
||
def tilt_orientation_factor( |
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.
Does this replace the functionality of plot_tilt_orientation_factor
? If so, remove that method as this is just an improvement upon that old version.
Issues addressed by this PR
Closes #261
See commit message.
Test files
See changes to pytest files for examples of use of the newly added methods. Bug fixes mainly regarded fixing methods which raised warnings about deprecation.
Changelog
Additional comments