-
Notifications
You must be signed in to change notification settings - Fork 9
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
Style unit suffix validation #706
Conversation
@trey-stafford re-writing these styles is a bit of tedium. May request to parallelize on this tomorrow :) |
|
||
def get_style_filepath(style_name: str) -> Path: | ||
"""Generate a Path object for style file represented by `style_name`.""" | ||
return ANCILLARY_DIR / "styles" / (style_name + ".qml") |
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.
Migrated from _style_filepath
in config/layer.py
a47aa9a
to
0426ee5
Compare
TODO: Does not support large numbers well, adds commas where the QGIS symbology menu | ||
does not. | ||
formatter.formatNumber(float(-9902)) | ||
>>> '-9,902' |
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'm a bit frustrated running in to this after I thought I had things figured out. Is there any way to re-use QGIS' behavior for calculating these labels? What am I doing wrong?
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.
We decided to just check that a suffix was populated for linearly-interpolated colorramps, not actually check for consistency with item labels.
Calculating the suffix from QGIS' QML file is difficult. Let's just give up on that and do this the easier way.
Classification "mode" is how the values are classified: continuous, equal interval, and quantile. It doesn't matter which of these is chosen. What matters is the "Interpolation" setting. "Linear" is the only one that will display a continuous legend.
@trey-stafford got the docs updated now too |
Co-authored-by: Trey Stafford <trey.stafford@colorado.edu>
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.
One final suggestion to update the error message w/ a link to RTD. Looks good!
Description
Resolves #685
TODO:
Checklist
If an item on this list is done or not needed, simply check it with
[x]
.inv config.export > qgreenland/config/cfg-lock.json
)bumpversion (major|minor|patch|prerelease|build
)