-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from HUPO-PSI/metadata-docs
Add sphinx documentation with Python API/CLI and metadata attributes
- Loading branch information
Showing
22 changed files
with
821 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"/Library": { | ||
"title": "Metadata specific to the library", | ||
"description": "The following attributes describe an entire collection of spectra, the library itself. They should be listed under the tag <mzSpecLib 1.0> and nowhere else in the library.", | ||
"subgroups": [ | ||
"Terms that define the library as a collection and how it was constructed", | ||
"Terms that define attribute sets", | ||
"Terms that define clusters of spectra" | ||
] | ||
}, | ||
"/Library/Spectrum": { | ||
"title": "Metadata specific to library spectra", | ||
"description": "The second level of metadata provides information specific to each library spectrum. The attributes SHOULD be organized in subcategories: those that pertain to the library spectrum and the origin of the spectrum, those that pertain to the spectrum itself, those that pertain to the interpretation of the spectrum, and those that pertain to the analyte(s) the spectrum is identified to. The following are attributes pertaining to the library spectrum and the origin of the spectrum, including the acquisition method and information about the precursor ion. They MUST be listed under <Spectrum=_>, or listed in library spectrum attribute sets.", | ||
"subgroups": [ | ||
"Terms that identify the spectrum", | ||
"Terms that describe how the spectrum is acquired, including the method and the context", | ||
"Terms that describe how the spectrum itself, including steps of data processing leading to it", | ||
"Terms that describe an aggregated spectrum (e.g. a consensus spectrum constructed from multiple replicates)", | ||
"Terms that cross-reference other spectra in the same library or elsewhere", | ||
"Terms that define the additional columns of the peak list" | ||
] | ||
}, | ||
"/Library/Spectrum/Interpretation": { | ||
"title": "Metadata specific to the interpretation", | ||
"description": "These attributes describe the details of the interpretation of the spectrum. They MUST be listed under <Interpretation=_>. Additional attributes can be children of PSM-level search engine specific statistics [MS:1001143](https://www.ebi.ac.uk/ols/ontologies/ms/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FMS_1001143), e.g., Comet:xcorr.", | ||
"subgroups": ["Describing details of the interpretation of the spectrum"] | ||
}, | ||
"/Library/Spectrum/Analyte": { | ||
"title": "Metadata specific to the analyte", | ||
"description": "These attributes refer to the analyte(s) to which the spectrum is identified. In the present version of the library format, only peptide analytes are supported, but support for other kinds of analytes (e.g. small molecule metabolites) are expected in the future. They MUST be listed under <Analyte=_>", | ||
"subgroups": ["Terms that describe the analyte"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
############ | ||
Contributing | ||
############ | ||
|
||
This document briefly describes how to contribute to | ||
`mzSpecLib <https://github.com/hupo-psi/mzspeclib>`_. | ||
|
||
|
||
|
||
Before you begin | ||
################ | ||
|
||
If you have an idea for a feature, use case to add or an approach for a bugfix, | ||
you are welcome to communicate it with the community by opening a | ||
thread in `GitHub Issues <https://github.com/hupo-psi/mzspeclib/issues>`_. | ||
|
||
|
||
|
||
Development setup | ||
################# | ||
|
||
Local install | ||
************* | ||
|
||
#. Setup Python 3, and preferably create a virtual environment. | ||
#. Clone the `mzSpecLib repository <https://github.com/hupo-psi/mzspeclib>`_. | ||
#. Use pip in editable mode to setup the development environment: | ||
|
||
.. code-block:: sh | ||
pip install --editable .[test,docs] | ||
Unit tests | ||
********** | ||
|
||
Run tests with ``pytest``: | ||
|
||
.. code-block:: sh | ||
pytest ./tests | ||
Documentation | ||
************* | ||
|
||
To work on the documentation and get a live preview, install the requirements | ||
and run ``sphinx-autobuild``: | ||
|
||
.. code-block:: sh | ||
pip install .[docs] | ||
sphinx-autobuild ./docs/ ./docs/_build/ | ||
Then browse to http://localhost:8000 to watch the live preview. | ||
|
||
|
||
|
||
How to contribute | ||
################# | ||
|
||
- Fork `mzSpecLib <https://github.com/hupo-psi/mzspeclib>`_ on GitHub to | ||
make your changes. | ||
- Commit and push your changes to your | ||
`fork <https://help.github.com/articles/pushing-to-a-remote/>`_. | ||
- Ensure that the tests and documentation (both Python docstrings and files in | ||
``/docs/``) have been updated according to your changes. Python | ||
docstrings are formatted in the | ||
`numpydoc style <https://numpydoc.readthedocs.io/en/latest/format.html>`_. | ||
- Open a | ||
`pull request <https://help.github.com/articles/creating-a-pull-request/>`_ | ||
with these changes. You pull request message ideally should include: | ||
|
||
- A description of why the changes should be made. | ||
- A description of the implementation of the changes. | ||
- A description of how to test the changes. | ||
|
||
- The pull request should pass all the continuous integration tests which are | ||
automatically run by | ||
`GitHub Actions <https://github.com/hupo-psi/mzspeclib/actions>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
builder: dirhtml | ||
|
||
formats: | ||
- epub | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: implementations/python | ||
extra_requirements: | ||
- docs |
Oops, something went wrong.