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

feat: add analysis results creation #8

Merged
merged 10 commits into from
Nov 28, 2023

Conversation

DerekMaggio
Copy link
Contributor

Description

This change adds the creation of:

  • protocols_and_analyses.zip - This file contains all the protocols and their respective analysis results zipped together
  • summary.md - This file provides a summary of what is in the zip file.

summary.md contains the following information:

  • A list of all protocols ran
  • Whether analysis passed for each protocol
  • If the analysis failed, a simplified version of the error
  • The elapsed time it took to execute the analysis

Changes

There aren't many large changes to the existing functionality. The main change to existing functionality is the added ProtocolPaths dataclass.

Each protocol becomes an instance of this dataclass, and contains the following:

  • The path to the protocol file
  • The path to the analysis file
  • The amount of time analysis took to execute
  • Various helper methods used in generating the markdown file

The way this changed the functionality was to, generate the expected analysis paths after the protocol paths were generated. This logic was pulled out of the analyze function and instead added inside of the main function. This was done to make the pairing of the protocol and its respective analysis file easier. This pairing is utilized when generating the markdown file to group each result by protocol name.

The other functionality is mainly additions that don't directly interact with the main functionality of analyzing a protocol.

Testing

I modified the existing tests to use the ProtocolPaths dataclass.

Besides that I didn't add any testing, didn't think it was worth it to ensure the markdown was created correctly at this point.

I could unzip one of the created zipfiles. But all I am doing is using shutil.make_archive to create the entire thing. There is basically no logic at all for this.

DerekMaggio and others added 10 commits November 15, 2023 08:10
chore: cleanup a bit

chore: nicer output
chore: it has been a while since I wrote code

fix: fix zipfile method that was resaving the zipfile

chore: no idea how this passed linting

chore: use shutil.make_archive

chore: rename as the file gets moved

chore: this is getting annoying

chore: ugh

chore: needs to be an absolute path

chore: an absolute path
chore: remove prints and fix imports
chore: Don't check in generated files

chore: remove OUTPUT_TYPE env var

chore: rename uploaded files

chore: sort inputs
@y3rsh y3rsh merged commit 668ca90 into y3rsh:main Nov 28, 2023
1 check passed
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.

2 participants