Skip to content

Commit 63fdab2

Browse files
authored
Merge pull request #442 from cbielow/tutorial_enhancements
Tutorial enhancements
2 parents 7628c88 + b86f949 commit 63fdab2

15 files changed

+185
-202
lines changed

.github/workflows/test-pr.yaml

+60-60
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
name: Build and Test code in notebooks
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- master
7-
8-
jobs:
9-
10-
build-test:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- uses: actions/checkout@v3
15-
16-
- uses: actions/setup-python@v4
17-
with:
18-
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
19-
20-
- name: Get changed files
21-
id: changed-files
22-
uses: tj-actions/changed-files@v41
23-
with:
24-
dir_names_max_depth: 0
25-
files: |
26-
docs/source/*.rst
27-
docs/source/**/*.rst
28-
!docs/source/**/_templates
29-
30-
- uses: r-lib/actions/setup-pandoc@v2
31-
with:
32-
pandoc-version: '3.1.2'
33-
34-
# - uses: actions/setup-python@v4
35-
# with:
36-
# python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
37-
38-
- name: Installing Dependencies
39-
run: |
40-
python3 -m pip install --upgrade pip
41-
python3 -m pip install --upgrade pandocfilters jupyter
42-
python3 -m pip install --upgrade -r requirements.txt
43-
44-
45-
- name: Generating notebooks
46-
run: |
47-
pushd docs/source
48-
./generate_ipynb.sh
49-
popd
50-
51-
- name: Execute all notebooks generated from modified files
52-
run: |
53-
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
54-
jupyter nbconvert --to notebook --inplace --execute ${file%.rst}.ipynb || (echo "${file%.rst}" >> failed_nbs.txt)
55-
done
56-
if [ -f "failed_nbs.txt" ]; then
57-
echo "Some notebooks failed to run. Please check logs."
58-
cat failed_nbs.txt
59-
exit 1
60-
fi
1+
name: Build and Test code in notebooks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
build-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
19+
20+
- name: Get changed files
21+
id: changed-files
22+
uses: tj-actions/changed-files@v45
23+
with:
24+
dir_names_max_depth: 0
25+
files: |
26+
docs/source/*.rst
27+
docs/source/**/*.rst
28+
!docs/source/**/_templates
29+
30+
- uses: r-lib/actions/setup-pandoc@v2
31+
with:
32+
pandoc-version: '3.1.2'
33+
34+
# - uses: actions/setup-python@v4
35+
# with:
36+
# python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
37+
38+
- name: Installing Dependencies
39+
run: |
40+
python3 -m pip install --upgrade pip
41+
python3 -m pip install --upgrade pandocfilters jupyter
42+
python3 -m pip install --upgrade -r requirements.txt
43+
44+
45+
- name: Generating notebooks
46+
run: |
47+
pushd docs/source
48+
./generate_ipynb.sh
49+
popd
50+
51+
- name: Execute all notebooks generated from modified files
52+
run: |
53+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
54+
jupyter nbconvert --to notebook --inplace --execute ${file%.rst}.ipynb || (echo "${file%.rst}" >> failed_nbs.txt)
55+
done
56+
if [ -f "failed_nbs.txt" ]; then
57+
echo "Some notebooks failed to run. Please check logs."
58+
cat failed_nbs.txt
59+
exit 1
60+
fi

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ docs/source/_autosummary/*
55
docs/source/apidocs/_autosummary/*
66
docs/source/_build/
77
docs/build/
8-
venv
8+
venv
9+
build/

docs/README.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
pyOpenMS Documentation
22
======================
3-
43
The source code for the pyOpenMS documentation lies here. We use sphinx to
5-
build documentation and to build you can run
4+
build documentation.
5+
6+
Preparation
7+
8+
Install Sphinx (which is a Python package) and some of its modules/plugins.
9+
We recommend doing this in a [python venv](https://docs.python.org/3/library/venv.html).
10+
11+
python -m venv /path/to/myenv
12+
# activate it, e.g.
13+
source <venv>/bin/activate
614

7-
sphinx-build source/ build/
15+
Once the environment is active, you can install all required python packages using
816

9-
On a linux system, you can also use the provided Makefile and run
17+
cd <pyOpenMS_dir>/docs
18+
pip install -r requirements.txt
19+
20+
21+
To build the docs run the line below (works on all operating systems), but make sure that your working dir is `<pyOpenMS_dir>/docs` (see above):
1022

1123
make html
24+
25+
and check validity of links using
26+
27+
make linkcheck
28+
1229

1330

1431

docs/make.bat

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
if "%SPHINXOPTS%" == "" (
13+
set SPHINXOPTS=-j auto
14+
)
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.https://www.sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
if "%1" == "" goto help
29+
30+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
31+
goto end
32+
33+
:help
34+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
35+
36+
:end
37+
popd

docs/requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ readthedocs-sphinx-search==0.3.2
55
sphinx-copybutton==0.5.1
66
sphinx-hoverxref
77
sphinx-remove-toctrees
8+
## for pygment coloring of code snippets using ipython syntax
9+
ipython
10+
pygments-lexer-pseudocode
811

912
--extra-index-url https://pypi.cs.uni-tuebingen.de/simple/
1013
pyopenms

docs/source/community/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ displayed jupyter notebooks can not be used to edit the existing documentation.
1515
All edits need to happen through the .rst files in the OpenMS/pyopenms-docs repository.)
1616

1717
If you are unsure how to do that or want to discuss questions
18-
(e.g. your example workflow can be included on this webpage) contact us via the
19-
`OpenMS Gitter chat channel <https://gitter.im/OpenMS/OpenMS/>`_.
18+
(e.g. your example workflow can be included on this webpage) contact the
19+
`contact the OpenMS team <https://openms.de/communication/>`_ today.
2020

2121
pyopenms sources
2222
----------------

docs/source/community/wrapping_workflows_new_classes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Open it and add your new function *with the correct indentation*:
6868
- Note: The space between the hash and wrap-doc (# wrap-doc) is not necessary, but used for consistency.
6969
- Note: Please start the comment with a capital letter.
7070

71-
See the next section for a `simple example <#A-Simple-Example>`_ and a more `advanced example <#A-Further-Example>`_ of a wrapped class with several functions.
71+
See the next section for a `simple example <#a-simple-example>`_ and a more `advanced example <#a-further-example>`_ of a wrapped class with several functions.
7272

7373
How to Wrap New Classes
7474
^^^^^^^^^^^^^^^^^^^^^^^

docs/source/hyperscore.rst

-89
This file was deleted.

docs/source/index.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Summary
22
=======
33

4-
pyOpenMS is an open-source Python library for :term:`mass spectrometry<Mass spectrometry>`, specifically for the analysis of proteomics
4+
pyOpenMS is an open-source Python library for :term:`mass spectrometry<Mass Spectrometry>`, specifically for the analysis of proteomics
55
and metabolomics data in Python. pyOpenMS implements a set of Python bindings to the OpenMS library for computational
6-
:term:`mass spectrometry<Mass spectrometry>` and is available for Windows, Linux and macOS.
6+
:term:`mass spectrometry<Mass Spectrometry>` and is available for Windows, Linux and macOS.
77

88
pyOpenMS provides functionality that is commonly used in computational mass
9-
spectrometry. The pyOpenMS package contains Python bindings for a large part of the `OpenMS <openms.de>`_
10-
library for :term:`mass spectrometry<Mass spectrometry>` based proteomics. It thus provides easy access to
9+
spectrometry. The pyOpenMS package contains Python bindings for a large part of the `OpenMS <https://openms.de>`_
10+
library for :term:`mass spectrometry<Mass Spectrometry>` based proteomics. It thus provides easy access to
1111
a feature-rich, open-source algorithm library for mass-spectrometry based proteomics analysis.
1212

1313
pyOpenMS facilitates the execution of common tasks in proteomics (and other fields of mass spectrometry) such as
@@ -20,8 +20,8 @@ pyOpenMS facilitates the execution of common tasks in proteomics (and other fiel
2020
- Chromatogram analysis (chromatographic peak picking, smoothing, elution profiles and peak scoring for :term:`SRM`/MRM/PRM/:term:`SWATH`/DIA data)
2121
- Interaction with common tools in proteomics and metabolomics:
2222

23-
- Search engines such as Comet, Mascot, MSGF+, MSFragger, SpectraST, XTandem
24-
- Post-processing tools such as Percolator, MSstats, Fido
23+
- Search engines such as Comet, Mascot, MSGF+, MSFragger, SpectraST, Sage
24+
- Post-processing tools such as Percolator, MSstats, Epiphany
2525
- Metabolomics tools such as SIRIUS, CSI:FingerId
2626

2727

docs/source/user_guide/adduct_detection.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In pyOpenMS, :py:class:`~.MetaboliteFeatureDeconvolution` takes a :term:`feature
1616
1717
| **Suggested follow up step:**
1818
| The resulting feature map can be exported to a pandas DataFrame with adduct information from the *dc_charge_adducts* feature meta values.
19-
| Multiple feature maps can be `combined using the feature linking algorithms <feature_linking.html>`_. Each consensus feature will get a new meta value *best ion* based on the most common annotated adduct within the consensus feature group.
19+
| Multiple :term:`feature maps` can be `combined using the feature linking algorithms <feature_linking.html>`_. Each consensus feature will get a new meta value *best ion* based on the most common annotated adduct within the consensus feature group.
2020
2121
.. code-block:: python
2222

docs/source/user_guide/background.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Proteomics and metabolomics focus on complex interactions within biological syst
1717

1818
Why use OpenMS
1919
==============
20-
OpenMS is an open-source, C++ framework for analyzing large volumes of mass spectrometry data.
20+
OpenMS is an open-source, C++ framework hosted on `Github <https://github.com/OpenMS/OpenMS>` for analyzing large volumes of mass spectrometry data.
2121
It has been specially designed for analyzing high performance :term:`LC-MS` data but over recent times,
2222
has been extended to analyze data generated by other techniques.
2323

2424
.. note::
2525

2626
OpenMS in recent times has been expanded to support a wide variety of mass spectrometry experiments.
27-
To design your analysis solution, `contact the OpenMS team <https://openms.github.io/community/>`_ today.
27+
To design your analysis solution, `contact the OpenMS team <https://openms.de/communication/>`_ today.
2828

2929
To use OpenMS effectively, an understanding of :term:`liquid chromatography` (:term:`LC`) and
3030
mass spectrometry (MS) is required as many of the algorithms are based on these techniques. This

0 commit comments

Comments
 (0)