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

chat gpt for elegance on Will's functions and carrying the output file input through #63

Merged
merged 5 commits into from
Jul 27, 2023

Conversation

wcornwell
Copy link
Contributor

Check out how good Chat-GPT is at decomposing functions. Worked the first time.

@fontikar
Copy link
Collaborator

Totally nitpicky, do we want to allow users to save the output when full = FALSE? Lines 528 - 537.

If so, may need another if statement with the else on line 527

Copy link
Member

@dfalster dfalster left a comment

Choose a reason for hiding this comment

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

Before accepting a refactoring like this, we need some more tests to check specific outputs. Most/all of our existing tests just check that there was output created, with easy-to-pass tests like n >100

I'm unwilling to approve until we can show it produces the same results.

I'm very sceptical the new code for state-diversity will produce the same results
In any case, we don't know as we don't have any tests that would tell us. the current tests are very lenient,int

R/clean_names.R Show resolved Hide resolved
R/state_diversity.R Show resolved Hide resolved
fontikar
fontikar previously approved these changes Jul 26, 2023
Copy link
Collaborator

@fontikar fontikar left a comment

Choose a reason for hiding this comment

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

most_likely_species defaults to the original_name if that name is accepted by the APC; this will be right for certain species subsets, but make errors in other cases, use with caution.

That worries me a little as an argument. Let's keep for now, but we should come up with use cases for each of these methods for documentation and clever code to avoid errors. If its too hard maybe collpase to most_likely_species is too risky as an option!

@dfalster
Copy link
Member

Before accepting a refactoring like this, we need some more tests to check specific outputs. Most/all of our existing tests just check that there was output created, with easy-to-pass tests like n >100

I'm unwilling to approve until we can show it produces the same results.

I'm very sceptical the new code for state-diversity will produce the same results In any case, we don't know as we don't have any tests that would tell us. the current tests are very lenient,int

Regarding workflow, these tests should be added on a seperate branch off master, then be merged in here

@wcornwell wcornwell dismissed dfalster’s stale review July 26, 2023 03:52

added tests to address

@fontikar
Copy link
Collaborator

I forced rerun of jobs, once they pass I am happy for this to merge in :)

@wcornwell wcornwell requested a review from fontikar July 26, 2023 09:15
Copy link
Collaborator

@fontikar fontikar left a comment

Choose a reason for hiding this comment

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

Passing all new tests! Approved! Great work

@fontikar
Copy link
Collaborator

@wcornwell could you please squash and merge and delete branch once thats done :)

@wcornwell wcornwell merged commit 8634b74 into master Jul 27, 2023
6 checks passed
@wcornwell wcornwell deleted the decomposing-functions branch July 27, 2023 01:50
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