Skip to content

Developer infrastructure: mark code with level of user-exposure #354

@rileyjmurray

Description

@rileyjmurray

pyGSTi is both research software and a tool that's used in "production" QCVV. Its research flavor makes it impractical for us to spend a lot of effort differentiating between a public and a private API. At the same, its role in production code means we need to be judicious about changing pyGSTi in a way that would break users' workflows. These factors combined make it hard for newcomers (like myself) to contribute to pyGSTi. Here's a proposal to help get new contributors un-stuck.

Proposed policy

I suggest the following taxonomy for marking a piece of code's level of "user exposure."

  • High exposure: API changes are likely to break workflows for some users, including "casual" users.
  • Low exposure: API changes are unlikely to affect casual users of pyGSTi but might affect some of pyGSTI's advanced users.
  • Minimal exposure: while it's conceivable that API changes could break user code, the possibility of this is sufficiently remote that we can change the API at will.

I think everyone is on board with a taxonomy along those lines. However, we didn't discuss how these labels would be used to affect pyGSTi's development. I suggest we use it in the following way.

  • API changes to high-exposure code require the support of all pyGSTi maintainers. (EDIT: They'll also have to go through a formal deprecation process.)
  • API changes to low-exposure code require the support of a majority of pyGSTI's maintainers.
  • API changes to minimal-exposure code can be made with the support of any single maintainer.

For now, I'd take "pyGSTi maintainer" to mean @sserita, @coreyostrove, or @enielse.

Note: In the call, we joked a bit about marking certain code as "godforsaken," to signify that we'd like to change it substantially, but we don't quite know how or when to do so. While I think that would be helpful, I don't think we need to figure that out now.

Proposed adoption plan

Over the coming months, the pyGSTi maintainers mark all "high exposure" code. Low- and minimal-exposure code is marked along the way, to the extent possible.

The adoption process will effectively complete when we're comfortable with implicitly designating unlabeled code as "minimal exposure." API changes to any such code only require the approval of one maintainer, but the approving maintainer has a responsibility to think about whether or not the code actually has minimal user exposure.

Request to pyGSTi developers

Comment below indicating if you agree with this general direction, or if you'd like changes. Once we converge on what we want to do, we can figure out how exactly we'll do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for a new feature or a change to an existing feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions