Skip to content

Commit

Permalink
Merge pull request #67 from Proteobench/add_more_formats
Browse files Browse the repository at this point in the history
Added Proline and Custom formats, as well as a first documentation
  • Loading branch information
RobbinBouwmeester authored Sep 9, 2023
2 parents 5a45b64 + 3516c09 commit 76f2394
Show file tree
Hide file tree
Showing 35 changed files with 1,018 additions and 564 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Deploy Documentation

on:
push:
branches:
- main # Adjust to your default branch

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x # Use the appropriate Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt # Adjust path if needed
- name: Build documentation
run: |
cd docs
make html # Or your Sphinx build command
env:
READTHEDOCS: 'True'

- name: Deploy to Read the Docs
uses: readthedocs/github-action@master
with:
sphinx-version: latest # Use the appropriate version

7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {"source.organizeImports": true},
"editor.rulers": [88]
"editor.rulers": [
88
],
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "black",
"python.formatting.provider": "none",
"python.testing.unittestArgs": [
"-v",
"-s",
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
[TODO]

See **Contributing** for installation instructions


## Documenation

You find the documentation in docs/_build/html
1 change: 1 addition & 0 deletions Results_Module2_quant_DDA
Submodule Results_Module2_quant_DDA added at bcd177
435 changes: 0 additions & 435 deletions docs/LICENSE.txt

This file was deleted.

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 changes: 0 additions & 14 deletions docs/_static/css/custom.css

This file was deleted.

18 changes: 0 additions & 18 deletions docs/_templates/custom-module-template.rst

This file was deleted.

12 changes: 0 additions & 12 deletions docs/api.rst

This file was deleted.

6 changes: 5 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.. mdinclude:: ../CHANGELOG.md
=================
Change log
=================

TODO
73 changes: 31 additions & 42 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,55 +1,44 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from proteobench import __version__
project = "ProteoBench"
copyright = "2023, EuBIC-MS"
author = "EuBIC-MS"
description = "A Python-base platform for benchmarking data analysis in proteomics."

project = 'ProteoBench'
author = 'EuBIC-MS'
release = __version__
github_project_url = "https://github.com/proteobench/proteobench/"
github_doc_root = "https://github.com/proteobench/proteobench/tree/main/docs/"
# Add source folder to path for autodoc
sys.path.insert(0, os.path.abspath(".."))

extensions = [
'sphinx.ext.autodoc',
"sphinx.ext.autosectionlabel",
'sphinx.ext.autosummary',
"sphinx.ext.napoleon",
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
"sphinx_rtd_theme",
'sphinx_autodoc_typehints',
"sphinx_mdinclude",
]
source_suffix = [".rst", ".md"]
master_doc = "index"
# Add path for documentation including the main project path

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ('https://numpy.org/doc/stable/', None),
"pandas": ('https://pandas.pydata.org/docs/', None),
}
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

autosummary_generate = True
autoclass_content = "both"
html_show_sourcelink = False
autodoc_inherit_docstrings = True
set_type_checking_flag = True
add_module_names = False
extensions = []

templates_path = ['_templates']
exclude_patterns = ["_build"]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]

autodoc_member_order = "bysource"
autoclass_content = "init"
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

def setup(app):
config = {
"enable_eval_rst": True,
}
extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.todo",
"sphinx.ext.githubpages",
]
1 change: 0 additions & 1 deletion docs/contributing.rst

This file was deleted.

44 changes: 34 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
.. mdinclude:: ../README.md
.. ProteoBench documentation master file, created by
sphinx-quickstart on Fri Jun 16 09:58:17 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome
=======================================

.. toctree::
:hidden:
:includehidden:
:glob:
:maxdepth: 2

About<self>
Reference<_autosummary/proteobench>
Changelog<changelog>
Contributing<contributing>
:maxdepth: 1

user_guide/index
changelog
proteobench/modules
webinterface/webinterface

Project Overview
------------------

The ProteoBench project is divided into two main parts:

Modules for Data Processing and Reporting
-----------------------------------------
These :doc:`proteobench/modules` process the data and generate reports.

Web Interface for Result Visualization
--------------------------------------
The :doc:`webinterface/webinterface` displays the results and allows comparison with publicly available data.


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
29 changes: 29 additions & 0 deletions docs/proteobench/dda_quant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
DDA_Quant
======================================

Module for quantitative DDA data
---------------------------------

.. autosummary::
:toctree: DDA_Quant

.. automodule:: proteobench.modules.dda_quant.parse_settings
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.dda_quant.parse
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.dda_quant.module
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.dda_quant.datapoint
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.dda_quant.plot
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/proteobench/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Modules
===========================

The different modules correpond to code to read the different input files and
to create the benchmarking metrics for visualization and comparison in the :doc:`../webinterface/webinterface`

.. toctree::
:maxdepth: 1

dda_id
dda_quant
dia_id
dia_quant
metaproteomics
template
.. proteobench.modules.rescoring


The template module contains all needed files to create a new module. It is
recommended to copy the template module and rename it to the new module name.

29 changes: 29 additions & 0 deletions docs/proteobench/template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Template
======================================

Template for module
---------------------------------

.. autosummary::
:toctree: template

.. automodule:: proteobench.modules.template.parse_settings
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.template.parse
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.template.module
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.template.datapoint
:members:
:undoc-members:
:show-inheritance:
.. automodule:: proteobench.modules.template.plot
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 76f2394

Please sign in to comment.