code-corps / code-corps-api

Elixir/Phoenix API for Code Corps.
https://www.codecorps.org
MIT License
234 stars 86 forks source link

Reorganize GitHub modules #1365

Closed begedin closed 6 years ago

begedin commented 6 years ago

What's in this PR?

Performs some long needed cleanup for some of our Github modules. While this does not tackle everything listed under #1092, I added a comment into the issue where I'm explaining why we might not want to do all of it.

Done - Changesets

Also done

Moved InstallationRepositories event logic into the Sync namespace Moved Installation event logic into the Sync namespace

References

Progress on: #1092

Notes

The Sync module is moving towards unmanageable. It seems like we're just shifting the weight from one end to the other, instead of distributing it.

Couple of things I suggest

joshsmith commented 6 years ago

@begedin I see you added some commits after your needs code review label. Is this awaiting review for sure?

joshsmith commented 6 years ago

It also looks like there are test failures with a coverage drop.

begedin commented 6 years ago

Found more stuff to cleanup here. Basically, I've decoupled and flattened out the sync module structure.

I'll be able to remove some of the code which is unused now, as well as moving some tests around.

The line count in the sync module is higher now, but the benefit is that we have a much clearer picture on how to break things down into the queue system, for example.

We also have a much clearer picture of what's tested and what's untested. One look at the coverals report should explain that.

Basically, we were unit testing bits, but not all integrated paths are covered properly.

I can continue work by cleaning up unused code and moving tests around/adding tests as part of this PR next week, or we can merge this one and do it separately. It should not be put on the backlog, though, since there will be chunks of unused code in the codebase now, which are bound cause confusion and wasted time down the line.

begedin commented 6 years ago

Created #1367