pyOpenSci / pyosMeta

A package that updates pyOpenSci contributor and package metadata on our website
BSD 3-Clause "New" or "Revised" License
4 stars 17 forks source link

Refactor: Move all github things to new GitHub object #125

Closed lwasser closed 5 months ago

lwasser commented 6 months ago

Currently the GitHub related API things are spread out between both the contributors and issue processing objects. One then ingests the other via instantiation / composition.

This makes it hard to maintain github related functionality. And encourages duplication.

It would be better to move that functionality out into a separate module called github_client. Then if we decide to move request to graphql (which might make sense in some calls) it would all happen in a single spot.

So the first step of this is to simply

  1. move all github related methods into a new github_client module (with an object there)
  2. Add a composition step to both issues and contributor objects where the github related methods are available.
  3. Swap out embedded functionality within each object to use the github object.

This initial step should minimize if not remove any needed modifications fo the front end API. But will make the back end easier to maintain / update / debug.