Skip to content

Comments

Automated comment on GitHub Pull Requests#78

Merged
mogres merged 132 commits intomainfrom
feature/automated_test
Feb 6, 2023
Merged

Automated comment on GitHub Pull Requests#78
mogres merged 132 commits intomainfrom
feature/automated_test

Conversation

@mogres
Copy link
Collaborator

@mogres mogres commented Sep 27, 2022

This PR tests the automated comment functionality

Closes #35

@github-actions
Copy link
Contributor

This is a fancy comment

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2023

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/jitter

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 45.88

Possible errors:

  • Packed minimum distance 45.88 is less than the expected minimum distance 50.00

Distance distribution:
Distance distribution

@meganrm meganrm marked this pull request as ready for review February 2, 2023 21:56
@mogres mogres requested review from meganrm and rugeli February 2, 2023 22:15
.gitignore Outdated
**/converted/*

# test outputs
cellpack/tests/outputs/
Copy link
Member

Choose a reason for hiding this comment

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

this looks like a duplicate?

"ingredient_key" : "ext_A",
"run_similarity_analysis": true,
"save_plots": true,
"max_plots_to_save": 1
Copy link
Member

Choose a reason for hiding this comment

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

TODO: formalize the analysis config options and add default settings for all of them

interior_z z coordinates of reference particles
"""
from numpy import zeros, sqrt, where, pi, average, arange, histogram
from numpy import arange, average, histogram, pi, sqrt, where, zeros
Copy link
Member

Choose a reason for hiding this comment

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

[nit] - these imports should be at the top of the file

Copy link
Collaborator Author

@mogres mogres Feb 3, 2023

Choose a reason for hiding this comment

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

Huh, looks like these were imported automatically. I'll check on this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like these functions are leftover from the original codebase. Not sure if they're in use anymore. Might be worth going over them at some point to check their coverage.

interior_y y coordinates of reference particles
"""
from numpy import zeros, sqrt, where, pi, average, arange, histogram
from numpy import arange, average, histogram, pi, sqrt, where, zeros
Copy link
Member

Choose a reason for hiding this comment

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

same here, move imports to top of file


return minimum_packed_distance

def create_report(self, report_options):
Copy link
Member

Choose a reason for hiding this comment

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

maybe for another PR, but this could be put in our "Writers" file as a more generic md writer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea!

"""
Returns the minimum distance between packed objects
"""
minimum_packed_distance = 9999
Copy link
Member

Choose a reason for hiding this comment

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

this could be initialized to the diagonal of the bounding box to be a more accurate starting point

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Initializing this to infinity since we don't know the size of the bounding box.

if plot and two_d:
width = 1000.0 # should be the boundary here ?
fig = pyplot.figure()
width = self.env.get_size_of_bounding_box()
Copy link
Member

Choose a reason for hiding this comment

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

oh, this was causing problems before, thanks for fixing

Copy link
Collaborator Author

@mogres mogres Feb 3, 2023

Choose a reason for hiding this comment

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

Doesn't fit the scope of this PR, but it's a small enough change that we can keep it.

@mogres mogres merged commit ab6331f into main Feb 6, 2023
@mogres mogres deleted the feature/automated_test branch February 6, 2023 21:09
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.

Proof of concept: Automatic testing/analysis/validation

2 participants