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

Otter Grade Write Individual Notebook Results #826

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

sean-morris
Copy link
Contributor

@sean-morris sean-morris commented Aug 20, 2024

Addresses Issue #814: Otter Grade: Write out Individual Results as well as final_grades.csv

@coveralls
Copy link
Collaborator

coveralls commented Aug 20, 2024

Pull Request Test Coverage Report for Build 10587753743

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 82.905%

Totals Coverage Status
Change from base Build 10443161398: 0.04%
Covered Lines: 3807
Relevant Lines: 4592

💛 - Coveralls

otter/grade/__init__.py Show resolved Hide resolved
if os.path.isfile(file_path):
assert os.path.exists(file_path)
with open(file_path, 'r') as file:
assert file.read()
Copy link
Member

Choose a reason for hiding this comment

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

Regardless of what's being written, this test should check that the contents are correct.

Copy link
Member

Choose a reason for hiding this comment

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

PTAL at this as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good deal -- checking the contents of summary files now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not quite sure how you would mock this -- the summary files are written in grade/init.py main function. I am checking the files that are written to the disk. Maybe I am missing something here?

Copy link
Member

Choose a reason for hiding this comment

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

Since the changes are in __init__.py, you can mock out the launch_containers function so it doesn't actually run but instead just returns some predetermined results. There's an example of this in test_config_overrides above (the mock is created with the @mock.patch(...) decorator and the return value is set by setting mocked_launch_grade.return_value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, wait I am with you. Give me a second

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rebased and forced the last commit to prevent another commit here.

I think I got it. Good deal

test/test_grade/test_integration.py Show resolved Hide resolved
if os.path.isfile(file_path):
assert os.path.exists(file_path)
with open(file_path, 'r') as file:
assert file.read()
Copy link
Member

Choose a reason for hiding this comment

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

PTAL at this as well.

@chrispyles
Copy link
Member

@sean-morris PTAL at my comments above. I'd like to get v5.6.0 out this week if possible. Thanks

@sean-morris
Copy link
Contributor Author

sean-morris commented Aug 25, 2024 via email

@chrispyles chrispyles merged commit b76a733 into ucbds-infra:master Aug 28, 2024
1 check passed
@chrispyles chrispyles added this to the v5.6.0 milestone Aug 28, 2024
@sean-morris sean-morris deleted the summaries branch August 28, 2024 22:14
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