Skip to content
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

Changes to test files from PR #876 #880

Draft
wants to merge 2 commits into
base: maxgamill-sheffield/800-better-tracing
Choose a base branch
from

Conversation

llwiggins
Copy link
Collaborator

This PR isolates the changes to tests made in PR #876 so that they can be reviewed/amended separately to the changes to the main tracing code. Suggestions in the comments from @ns-rse have been included here so that they can be addressed before merging to maxgamill-sheffield/800-better-tracing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From @ns-rse:
Not sure this file needs to be here 🤔

My understanding is that the tests/resources/ministats.topostats file is one that is compared to the output that is written to the tmp_path/ directory when running TopoStats. I can't see that this is read in anywhere (minicircle.topostats.out is but I've suggested moving and renaming that to reflect the test it relates to).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From @ns-rse:
I think this file shouldn't be under _regtest_outputs/ as this is a directory that pytest-regtest writes the output of the print() statement to.

Its also not clear how or why it differs from tests/resources/processed/minicircle.topostats.

I would expect there to be one target HDF5 file in the tests that are compared to what is produced by a full run. If there is need to have different versions then I would place them under tests/resources/ with a name that makes it clear what aspect they relate to (in this instance nodestats so something like tests/resources/minicircle_nodestats.topostats).

)

BASE_DIR = Path.cwd()
REGRESSION = BASE_DIR / "tests/nodestats-regression"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
REGRESSION = BASE_DIR / "tests/nodestats-regression"
RESOURCES = BASE_DIR / "tests/resources"

with h5py.File(tmp_path / "tests/resources/processed/minicircle.topostats", "r") as f:
saved_topostats = hdf5_to_dict(f, group_path="/")

with h5py.File(REGRESSION / "minicircle.topostats.out", "r") as f:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
with h5py.File(REGRESSION / "minicircle.topostats.out", "r") as f:
with h5py.File(RESOURCES / "minicircle_nodestats.topostats", "r") as f:

@ns-rse
Copy link
Collaborator

ns-rse commented Aug 2, 2024

Thanks @llwiggins is this ready for review?

I also wonder if it might make more sense to merge this into the maxgamill-sheffield/800-btr_disordered-tracing branch since it addresses issues raised on that branch in #876. Doing so before that is merged into maxgamill-sheffield/800-better-tracing obviously!

@llwiggins
Copy link
Collaborator Author

Hi @ns-rse, @MaxGamill-Sheffield is going to take a look at this next week. There are some additional changes to be made so best to keep this as a draft PR for now I think!

@MaxGamill-Sheffield
Copy link
Collaborator

Hey @ns-rse, this test is now very outdated as both the structure and saved keys of the disordered tracing, nodestats, and ordered tracing stats in the .topostats file differs greatly.

The intention of this test was just to ensure that of the keys that were saved, they were the same but now this needs more manual coercion of the dictionaries which will be done once the final .topostats structure is saved (upon finishing the final splining section). And this PR & branch then serves to save those outputs somewhere findable while keeping the individual section PR's / branches solely focused on their features.

This PR never has any intention of being merged with main or 800-btr as it should already be covered in the main tests, again, it is here just to not break the working tests and save a temporary output.

@ns-rse
Copy link
Collaborator

ns-rse commented Sep 6, 2024

This PR never has any intention of being merged with main or 800-btr as it should already be covered in the main tests, again, it is here just to not break the working tests and save a temporary output.

Can we close this PR then? If its never going to be merged the work can remain on a branch.

@ns-rse
Copy link
Collaborator

ns-rse commented Sep 17, 2024

This PR never has any intention of being merged with main or 800-btr as it should already be covered in the main tests, again, it is here just to not break the working tests and save a temporary output.

Can we close this PR then? If its never going to be merged the work can remain on a branch.

Bump...if the PR isn't going to be merged it doesn't really serve any purpose. The changes persist on the branch and can be referenced if needed, can we therefore close it?

/cc @llwiggins @MaxGamill-Sheffield @SylviaWhittle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants