Skip to content

Commit

Permalink
Add contribution guidelines for adding new object properties (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt authored Apr 22, 2024
1 parent 0c34334 commit 547edca
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,43 @@ model for code contributions. Follow these steps:
5. Repeat steps 3 and 4 as needed
6. Submit a pull request back to the upstream repository

### Curation Workflow

#### Adding a new Object Property

An object property is one that goes between two classes or two instances. DeBiO has
a file `typedefs.json` where new properties can be added. At minimum, they need:

1. `identifier` - the local unique identifier
2. `name` - the label
3. `creator` - the ORCID ID of the contributor
4. `description`

There are other optional fields like:

- `parents` - a list of one or more parent object properties
- `xrefs` - see existing examples
- `range` - an object type restriction
- `domain` - a subject type restriction
- `transitive` - true for relation X if `a X b` and `b X c` implies `a X c`
- `holds_over_chain` - true for relation X that holds over chain C1, C2, ... if `a X b` implies
the existing of some intermediate nodes that `a C1 <> C2 <> ... <> b`

#### Building the Resources

After cloning, you can build the resource with:

```shell
python -m pip install tox
tox -e export
```

This updates the content in the `/releases/latest/` folder.

When you're ready for a release to PyPI, you can use `tox -e release`, but make sure that you're on the
main branch, have no uncommitted changes, and have PyPI configured with `twine`, and have SSH pushing enabled.
This makes a folder in `/releases/<version>/` and puts the current content there.

### Merge Model

This repository uses [squash merges](https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits)
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@

A community-curated, decentralized biomedical ontology.

## ๐Ÿ‘ Contributing

Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See
[CONTRIBUTING.md](https://github.com/biopragmatics/debio/blob/master/.github/CONTRIBUTING.md) for more information on
getting involved. This document also includes:

1. Curation guidelines for new object properties
2. Instructions for rebuilding the ontology
3. Instructions for releasing the ontology to PyPI

## ๐Ÿš€ Installation

The most recent release can be installed from
Expand All @@ -58,11 +68,6 @@ The most recent code and data can be installed directly from GitHub with:
$ pip install git+https://github.com/biopragmatics/debio.git
```

## ๐Ÿ‘ Contributing

Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See
[CONTRIBUTING.md](https://github.com/biopragmatics/debio/blob/master/.github/CONTRIBUTING.md) for more information on getting involved.

## ๐Ÿ‘‹ Attribution

### โš–๏ธ License
Expand Down Expand Up @@ -127,7 +132,8 @@ run reproducibly with:
$ tox
```

Additionally, these tests are automatically re-run with each commit in a [GitHub Action](https://github.com/biopragmatics/debio/actions?query=workflow%3ATests).
Additionally, these tests are automatically re-run with each commit in
a [GitHub Action](https://github.com/biopragmatics/debio/actions?query=workflow%3ATests).

### ๐Ÿ“– Building the Documentation

Expand Down Expand Up @@ -160,9 +166,11 @@ This script does the following:
1. Uses [Bump2Version](https://github.com/c4urself/bump2version) to switch the version number in the `setup.cfg`,
`src/debio/version.py`, and [`docs/source/conf.py`](docs/source/conf.py) to not have the `-dev` suffix
2. Packages the code in both a tar archive and a wheel using [`build`](https://github.com/pypa/build)
3. Uploads to PyPI using [`twine`](https://github.com/pypa/twine). Be sure to have a `.pypirc` file configured to avoid the need for manual input at this
3. Uploads to PyPI using [`twine`](https://github.com/pypa/twine). Be sure to have a `.pypirc` file configured to avoid
the need for manual input at this
step
4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped.
5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
use `tox -e bumpversion minor` after.

</details>

0 comments on commit 547edca

Please sign in to comment.