-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adds topological features into better tracing #898
Adds topological features into better tracing #898
Conversation
…sheffield/topology
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.
It might be worth merging the #897 first so that the maxgamill-sheffield/topology
branch contains the tests and changes before merging into maxgamill-sheffield/800-better-tracing
.
pre-commit
fails on files that haven't been touched in this change set.
docs/configuration.md
Linting: 14 file(s)
Summary: 7 error(s)
docs/configuration.md:89:97 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:89:124 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:90:97 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:91:97 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:91:116 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:91:143 MD033/no-inline-html Inline HTML [Element: br]
docs/configuration.md:91:166 MD033/no-inline-html Inline HTML [Element: br]
I think these changes come from bd333b4 and the desire to show what the default values for dictionaries are it looks like there is a conflict between markdownlint-cli2
and prettier
.
Two solutions as far as I can tell...
- Split the dictionary over multiple lines with blank cells in rows.
- Add the
br
element to the list ofallowed_elements
in.markdownlint-cli2.yaml
.
config:
...
html:
allowed_elements:
- div
- br
ruff
The linting with ruff
should be straight-forward to resolve.
tests/test_processing.py:285: expected a comma-separated list of codes (e.g., `# noqa: F401, F841`).
Copy & pasta error, need to use the code rather than the pylint
error name.
tests/test_processing.py:509:39: F821 Undefined name `run_dnatracing`
The processing.run_dnatracing()
function has been removed for some reason which is why this is complaining (can't yet find the commit). Will need an equivalent for the refactored code.
tests/tracing/test_dnatracing_multigrain.py:174:9: F821 Undefined name `trace_image`
Perhaps renamed to dnatrace_image()
? Not found the commit that changed that yet.
tests/tracing/test_dnatracing_multigrain.py:425:15: F821 Undefined name `trace_image`
As above.
topostats/tracing/nodestats.py:1485:9: C901 `average_height_trace` is too complex (11 > 10)
Found 4 errors.
Could disable this check with
# noqa: C901
numpydoc
These too should be straight-forward to resolve.
+---------------------------+------------------------------------------+---------+----------------------------------------------------+
| file | item | check | description |
+===========================+==========================================+=========+====================================================+
| topostats/plotting.py:480 | plotting.plot_crossing_linetrace_halfmax | GL01 | Docstring text (summary) should start in the line |
| | | | immediately after the opening quotes (not in the |
| | | | same line, or leaving a blank line in between) |
+---------------------------+------------------------------------------+---------+----------------------------------------------------+
| topostats/plotting.py:480 | plotting.plot_crossing_linetrace_halfmax | SS05 | Summary must start with infinitive verb, not third |
| | | | person (e.g. use "Generate" instead of |
| | | | "Generates") |
+---------------------------+------------------------------------------+---------+----------------------------------------------------+
| topostats/plotting.py:480 | plotting.plot_crossing_linetrace_halfmax | PR01 | Parameters {'branch_stats_dict', 'mask_cmap', |
| | | | 'title'} not documented |
+---------------------------+------------------------------------------+---------+----------------------------------------------------+
| topostats/plotting.py:480 | plotting.plot_crossing_linetrace_halfmax | RT01 | No Returns section found |
+---------------------------+------------------------------------------+---------+----------------------------------------------------+
These come from two commits
I think the following might solve these (can't make suggestion as not in this PR)...
"""
Plot the heightmap lines traces of the branches found in the 'branch_stats' dictionary, and their meetings.
Parameters
----------
branch_stats_dict : dict
Dictionary containing branch height, distance and fwhm info.
mask_cmap : matplotlib.colors.Colormap
Colormap for plotting.
title : str
Title for the plot.
Returns
-------
fig, ax
Matplotlib fig and ax objects.
"""
I've addressed most of the above in a separate branch which I will merge into |
Further work required this is more involved, see #899 |
Hey @ns-rse , just seen your comments and want to double check what is required for this to merge:
Also the merge conflicts in |
Feel free to go with more meaningful names, I just didn't feel |
…ins to mask in tracing/conftest constructor (pylint)
Co-authored-by: Neil Shephard <[email protected]>
…ce' + descriptive combination vars
Co-authored-by: Neil Shephard <[email protected]>
…-SPM/TopoStats into maxgamill-sheffield/topology
@SylviaWhittle I think the merge conflicts in |
Yeah defo merge both I think |
For the
|
|
Comments have been addressed so is this ready to go into |
Just fixed all the tracing tests 👍 |
This all looks good to me and I'd be happy for it to be merged, I tested functionality out on a set of varied molecules and all were handled correctly! 👍 |
acf36bc
into
maxgamill-sheffield/800-better-tracing
Could these perhaps be used as part of the test suite? It could be as simple as additional regression tests that check the Matplotlib images I suspect are being manually reviewed in a notebook to make the decision that they are being handled correctly, but it would give us some reassurance in the future if/when any of the code is refactored that things aren't broken, or if they do change that we take time to consider if the change is intended. |
Adds: