Skip to content

Commit

Permalink
Edit for brevity.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Dec 11, 2023
1 parent 82449bc commit 089ad2f
Showing 1 changed file with 16 additions and 49 deletions.
65 changes: 16 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# HOOMD-blue component template

`hoomd-component-template` provides a framework to develop a component that extends
[HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/).

It includes:

* CMake scripts to build the component.
* Template C++ and Python modules.
* An example unit test.
* Pre-commit configuration.
* GitHub Actions configuration.
* Unit tests.
* Automatic release creation on tags starting with `v`, (e.g. `v1.0.0`).
[HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/). It includes template C++ and Python
modules, an example unit test, CMake scripts to build the component, and GitHub Actions
configurations.

## Building the component

Expand Down Expand Up @@ -44,38 +36,21 @@ import hoomd.template
To create a new component:
1. Fork the [hoomd-component-template](https://github.com/glotzerlab/hoomd-component-template/)
repository.
2. Address all TODO comments. These explain how to set your package name, add C++ files, add unit
tests, and other tasks. You can se [ripgrep](https://github.com/BurntSushi/ripgrep) to find all
TODO messages:
```
$ rg TODO . .github
```
1. Fork [hoomd-component-template](https://github.com/glotzerlab/hoomd-component-template/).
2. Address all **TODO** comments (including those in `.github/*`)
3. Add C++ and Python files to `src/`.
4. Add unit tests in `src/pytest` using [pytest](https://docs.pytest.org).
4. Add unit tests in `src/pytest`.
5. Format and check code style with [pre-commit](https://pre-commit.com/).
```
$ pre-commit run --all-files
```
6. Push your changes to GitHub and the provided [GitHub Actions](https://docs.github.com/en/actions)
workflow will run and test your that your code compiles on the CPU (with and without MPI), and
on the GPU (with and without MPI). The workflow also runs the unit tests on the CPU. You should
run GPU unit tests locally, GitHub does not provide free GPU runners for GitHub Actions.
7. When you are ready to release, bump the version number with [bump2version](https://github.com/c4urself/bump2version).
```
bump2version minor
```
Commit and push the changes to a branch, and make a pull request. After merging the working
pull request, tag the commit and push the tags. For example:
```
git switch trunk
git pull origin trunk
git tag -a v0.1.0
git push origin --tags
```
The GitHub Actions workflow `release.yaml` will automatically create a GitHub release with
a change log for each tag.
## Using the provided GitHub Actions configuration
When you push your changes to GitHub and, the [unit test workflow](.github/workflows/unit-test.yaml)
will run and test your that your code compiles on the CPU (with and without MPI), and
on the GPU (with and without MPI). The workflow also runs the unit tests on the CPU. You should
run GPU unit tests locally, GitHub does not provide free GPU runners for GitHub Actions.
When you push a new tag, the [release workflow](.github/workflows/release.yaml) will create a
new GitHub release with automatically generated release notes.
## Maintaining your component
Expand All @@ -84,14 +59,6 @@ The HOOMD-blue developers will periodically update
updates to the GitHub Actions workflow, pre-commit configuration, and CMake scripts. Merge these
changes into your fork to to test with the latest version of HOOMD-blue.
For example, run:
```
$ git remote add upstream https://github.com/glotzerlab/hoomd-component-template
$ git fetch upstream
$ git merge upstream/trunk
```
and resolve merge conflicts as appropriate.
## Documenting and releasing your component
TODO: Document your component in `README.md` (this file).
Expand Down

0 comments on commit 089ad2f

Please sign in to comment.