Skip to content

Commit 3f7f172

Browse files
committed
Add documentation on how to add new annotators
1 parent a537a67 commit 3f7f172

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

docs/source/development.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Development
2+
===========
3+
4+
To add a new annotator to the package, follow these steps:
5+
6+
#. Make a fork of the repository.
7+
8+
- Go to the project's GitHub page (https://github.com/kusterlab/psite_annotation).
9+
- In the top-right corner of the page, click Fork.
10+
- Choose your personal GitHub account (or organization) as the destination.
11+
12+
#. Make a clone of your forked repository:
13+
14+
.. code-block:: bash
15+
16+
git clone https://github.com/YOUR_USERNAME/psite_annotation.git
17+
18+
#. Create a new file in `psite_annotation/annotators`, the easiest is to make a copy of an existing annotator such as `domain.py`.
19+
#. Implement the `__init__()`, `load_annotations()` and `annotate()` functions.
20+
#. Create unit tests in `tests/unit_tests/annotators`, strive for 100% code coverage and covering edge cases.
21+
#. Add a function that uses your annotator to `psite_annotation/functional_annotation.py` and add that function's name to the `__all__` list in the top of that file.
22+
#. Create a system test for that function in `tests/system_tests/test_functional_annotation.py`.
23+
#. Create a pull request:
24+
25+
- Go to your fork on GitHub (e.g. https://github.com/YOUR_USERNAME/psite_annotation).
26+
- You should see a “Compare & pull request” button — click it. Alter=natively, go to the Pull Requests tab and click “New pull request”.

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Python module for annotating a pandas dataframe with phosphosites, e.g. PhosphoS
1414

1515
installation
1616
usage
17+
development
1718
Annotator functions <_autosummary/psite_annotation>
1819
Annotator classes <_autosummary/psite_annotation.annotators>
1920

0 commit comments

Comments
 (0)