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

Delete unused code & add tests #18

Merged
merged 11 commits into from
Dec 15, 2023
Merged

Delete unused code & add tests #18

merged 11 commits into from
Dec 15, 2023

Conversation

adamltyson
Copy link
Member

@adamltyson adamltyson commented Dec 15, 2023

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
There is a lot of code in this repo that is no longer used by any BrainGlobe tool. Keeping it in the repo increases the maintenance burden.

What does this PR do?
Removes unused code and adds some more tests for what remains.

Also closes #12

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

Hopefully not. I've checked other BG repos for usage of deleted code, and nothing came up. This process isn't foolproof though, so we may just have to release and hope for the best! This is a fairly dangerous approach, so happy to hear of alternatives.

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b009106) 64.04% compared to head (79f6a88) 79.68%.

❗ Current head 79f6a88 differs from pull request most recent head 03f1c2d. Consider uploading reports for the commit 03f1c2d to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #18       +/-   ##
===========================================
+ Coverage   64.04%   79.68%   +15.63%     
===========================================
  Files          33       19       -14     
  Lines         840      576      -264     
===========================================
- Hits          538      459       -79     
+ Misses        302      117      -185     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamltyson adamltyson marked this pull request as ready for review December 15, 2023 14:22
@adamltyson adamltyson requested a review from a team December 15, 2023 14:22
Copy link
Contributor

@willGraham01 willGraham01 left a comment

Choose a reason for hiding this comment

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

I can't speak for all of the tests as I'm not entirely sure what they're all meant to be doing (maybe we need an issue for adding docstrings to this package, maybe a docs build that can be handed off to the website?).

But otherwise, more tests = better. One remark on a comment that's been removed but doesn't seem to have been addressed?

@@ -29,11 +29,9 @@ def get_cells(
cells_only: bool = False,
cell_type: Optional[int] = None,
):
# TODO: implement csv read
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we... actually address this? The function isn't changed

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but there's no need to.

pyproject.toml Show resolved Hide resolved
Copy link
Member

@IgorTatarnikov IgorTatarnikov left a comment

Choose a reason for hiding this comment

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

@willGraham01 beat me to the punch, but everything looks good to me!

@adamltyson
Copy link
Member Author

@willGraham01 I've raised #19 Adding docstrings is something the entirety of BG sorely needs.

@adamltyson adamltyson merged commit 86b9c98 into main Dec 15, 2023
17 checks passed
@adamltyson adamltyson deleted the tests branch December 15, 2023 16:24
@adamltyson
Copy link
Member Author

Thanks both. Going to release a new version, so yell at me if anything breaks!

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.

Simplify hyper-nested tests structure
3 participants