Skip to content

Conversation

@Koeng101
Copy link
Contributor

Closes #101

Added a Rebase parser. We still need a way to convert from the enzyme cut sites to the format used by the cloning simulator, but that will come in another PR.

Copy link

@qlty-cloud-legacy qlty-cloud-legacy bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 54902 lines exceeds the maximum allowed for the inline comments feature.

@qlty-cloud-legacy
Copy link

qlty-cloud-legacy bot commented Apr 25, 2021

Code Climate has analyzed commit f95220d and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 95.4% (95% is the threshold).

This pull request will bring the total coverage in the repository to 96.9%.

View more on Code Climate.

Copy link

@qlty-cloud-legacy qlty-cloud-legacy bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 54902 lines exceeds the maximum allowed for the inline comments feature.

@TimothyStiles
Copy link
Collaborator

TimothyStiles commented Apr 25, 2021

@Koeng101 Things before merge:

  • Code climate is saying there's no issues but also that it doesn't give inline comments for PRs with files this big. Not sure if no issues means that it didn't analyze it at all or what.

  • I'm not sure how we want to deploy this largish file. Would rather not add a tracked 4MB file into prime. Thoughts? Git lfs or something?

  • I need to understand how this will affect project docs etc. Even if merged and released there may have to be unmerging and releasing just to test stuff out with godocs before final merge.

  • Can we change link_withrefm.txt to something more readable?

@Koeng101
Copy link
Contributor Author

Code climate is saying there's no issues but also that it doesn't give inline comments for PRs with files this big. Not sure if no issues means that it didn't analyze it at all or what.

Guess gotta do a manual check then... I think the code is pretty good.

I'm not sure how we want to deploy this largish file. Would rather not add a tracked 4MB file into prime. Thoughts? Git lfs or something?

If it's only once it might be ok. Not like a monthly thing. No other thoughts really, since you need it for testing.

I need to understand how this will affect project docs etc. Even if merged and released there may have to be unmerging and releasing just to test stuff out with godocs before final merge.

Ok

Can we change link_withrefm.txt to something more readable?

I don't think this would be a good idea, since that is literally the name of the file when you download it from Rebase - keeping the name the same as what someone would download it as is a good idea IMO. That's also commented in the large comment^

@TimothyStiles
Copy link
Collaborator

@Koeng101 what's the status on the smaller rebase file? Any thoughts on deployment since it would actually need to be shipped with each release?

Copy link
Collaborator

@TimothyStiles TimothyStiles left a comment

Choose a reason for hiding this comment

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

Code looks solid. Going to check coverage in a second.

My inline comments revolve around naming and exporting. Essentially. How do we pose this to users and devs?

}

// ParseRebase parses the Rebase database into a map of enzymes
func ParseRebase(file []byte) map[string]Enzyme {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be exposed to end users? It seems like this would be better as a private function for Poly developers to use unless NEB asks us to export it for them to use.

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 was thinking of having it exposed for end users in case they want to store the enzymes elsewhere, in which they can just pass bytes in to the function. Kinda similar to the idea of GetEnzymeMap, where you actually just directly download the file and pass it into ParseRebase.

}

// ReadRebase returns an enzymeMap from a Rebase data dump
func ReadRebase(path string) (map[string]Enzyme, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ReadRebase makes sense to developers but should we use a name like GetEnzymeMap for those who don't know what rebase is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we have a function GetEnzymeMap that downloads the file directly from NEB and parses? Seems like we'd be hitting their endpoints quite hard in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it would run on every test.

@TimothyStiles TimothyStiles merged commit dd81ed2 into prime Jun 4, 2021
@delete-merged-branch delete-merged-branch bot deleted the rebase branch June 4, 2021 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants