Skip to content

Conversation

@atravitz
Copy link
Contributor

@atravitz atravitz commented Oct 14, 2025

I'm open to feedback, but I'm starting this PR to formalize much of what I communicated to @ethanholz today.

note that external contributors cannot make sub-issues! #1582 (comment)

Checklist

  • Added a news entry

Developers certificate of origin

@atravitz atravitz changed the title Add/contributing add contributing guidelines Oct 14, 2025
@atravitz atravitz marked this pull request as ready for review October 14, 2025 21:50
Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

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

LGTM! Just some comments really

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want a link to this location? I recall github showing a link to this file when someone opens up a PR for the first time.

Or put another way, can you check to see if having a file here does something special? I don't want to maintain two copies which is why a system link might be best

Copy link
Member

Choose a reason for hiding this comment

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


### Installing openfe for development

``` bash
Copy link
Contributor

Choose a reason for hiding this comment

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

Opportunity to push for micromamba here

mamba activate openfe_env # if not already activated
git clone git@github.com:OpenFreeEnergy/gufe.git
cd gufe/
pip install -e .
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pip install -e .
pip install -e --no-deps .

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is technically incorrect. It would be pip install -e . --no-deps

Copy link
Contributor

Choose a reason for hiding this comment

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

😱 the worst kind of incorrect! I make this mistake all the time and want to guide others on how to troubleshoot the mistake


## Contribution Guidelines

### Use semantic branch names
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

- CI tests, docs, etc, will run on every PR that has `main` or a branch that begins with `feat/` as a target.
- Add a news item for any user-facing changes.
- Rebase or merge, we don't care, but keep your branch up to date with `main`.
- Always "squash and merge" to keep the git log readable.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Always "squash and merge" to keep the git log readable.
- Always "squash and merge" when merging pull requests into main or a feature branch to keep the git log readable. This also makes it easier to use the `git bisect` tool.

@github-actions
Copy link

No API break detected ✅

Copy link
Member

Choose a reason for hiding this comment

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

```

### Multi-project development
It's common to need to develop *openfe** in tandem with another OpenFE Ecosystem package.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It's common to need to develop *openfe** in tandem with another OpenFE Ecosystem package.
It's common to need to develop *openfe** in tandem with another OpenFE Ecosystem package.

Just a nit, equal empty spaces everywhere.

## Contribution Guidelines

### Use semantic branch names
- Start branch names with one of the following "types", followed by a short description or issue number.
Copy link
Member

Choose a reason for hiding this comment

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

This is a rather opiniated take on how we should work going forward and I think this needs discussion amongst the team - I, at least in the short term, am not likely to follow this, frankly there's just too much to think about all the time.

<!-- - PR titles should be essentially a changelog entry. TODO: make this clearer, maybe examples -->

### CI, linting, style guide
- CI tests, docs, etc, will run on every PR that has `main` or a branch that begins with `feat/` as a target.
Copy link
Member

Choose a reason for hiding this comment

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

Why just feat? Surely if I want to fix something going into another branch, I would like to run CI on it?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is for if it targets feat/*
So like if you make a PR that targets main, CI will run.
If you have a branch called new_feature that targets main in a PR, CI will run.
If you have a branch called new_feature_sub_pr that targets new_feature in a PR, CI will not run.
This is because we have "PRs that target main" listed as the trigger for our CI yaml.
We can add feat/* as a trigger so that if you have a branch called feat/new_feature and then a sub-pr that targets the feat/new_feature branch for a PR, CI will then run.

RE: this guide for branch names, I view this as a guide/reference but not like a "I desk reject PRs that don't follow this convention".

Copy link
Member

Choose a reason for hiding this comment

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

Same principle applies, there are plenty of fixes where I PR into them. It just seems really odd to isolate one specific sub-type of PR.

Copy link
Member

Choose a reason for hiding this comment

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

RE: this guide for branch names, I view this as a guide/reference but not like a "I desk reject PRs that don't follow this convention".

The thing is that we can't have two sets of rules for how we work. If we don't engage ourselves to using that system, then we can't tell others that they should be using it.

- Rebase or merge, we don't care, but keep your branch up to date with `main`.
- Always "squash and merge" to keep the git log readable.
- Use [numpy docstrings](https://numpydoc.readthedocs.io/en/latest/format.html)
- We encourage but do not require [type hints](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html).
Copy link
Member

Choose a reason for hiding this comment

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

We should require it - anywhere that doesn't currently have type hints either exists in vendored code or is old stuff we didn't get around to adding type hints to.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to require it (maybe we need to make a few PRs and play with mypy settings but we should start linting/testing for it)



### Review process
- In general, push PRs early so that work is visible, but leave a PR in draft-mode until you want it to be reviewed by the team. Once it's marked as "ready for review," the OpenFE team will assign a reviewer.
Copy link
Member

Choose a reason for hiding this comment

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

If the idea is to leave things in draft mode, then I don't think we should be disabling CI for those.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.40%. Comparing base (a2f08ac) to head (08b1ac4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1580      +/-   ##
==========================================
- Coverage   95.44%   93.40%   -2.04%     
==========================================
  Files         174      174              
  Lines       14537    14545       +8     
==========================================
- Hits        13875    13586     -289     
- Misses        662      959     +297     
Flag Coverage Δ
fast-tests 93.40% <ø> (?)
slow-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atravitz atravitz self-assigned this Oct 16, 2025
@atravitz atravitz marked this pull request as draft October 16, 2025 00:02
@atravitz atravitz changed the title add contributing guidelines [WIP] add contributing guidelines Oct 16, 2025
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.

5 participants