Skip to content

Commit 6cb0f22

Browse files
committed
update doc
support Read the Docs
1 parent f5ff615 commit 6cb0f22

File tree

9 files changed

+316
-8
lines changed

9 files changed

+316
-8
lines changed

.gitignore

Lines changed: 157 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,160 @@ build/*
33
dist/*
44
*egg*/*
55
*stop*
6-
files.txt
6+
files.txt
7+
8+
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
9+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks
10+
11+
### JupyterNotebooks ###
12+
# gitignore template for Jupyter Notebooks
13+
# website: http://jupyter.org/
14+
15+
.ipynb_checkpoints
16+
*/.ipynb_checkpoints/*
17+
18+
# IPython
19+
profile_default/
20+
ipython_config.py
21+
22+
# Remove previous ipynb_checkpoints
23+
# git rm -r .ipynb_checkpoints/
24+
25+
### Python ###
26+
# Byte-compiled / optimized / DLL files
27+
__pycache__/
28+
*.py[cod]
29+
*$py.class
30+
31+
# C extensions
32+
*.so
33+
34+
# Distribution / packaging
35+
.Python
36+
build/
37+
develop-eggs/
38+
dist/
39+
downloads/
40+
eggs/
41+
.eggs/
42+
lib/
43+
lib64/
44+
parts/
45+
sdist/
46+
var/
47+
wheels/
48+
share/python-wheels/
49+
*.egg-info/
50+
.installed.cfg
51+
*.egg
52+
MANIFEST
53+
54+
# PyInstaller
55+
# Usually these files are written by a python script from a template
56+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
57+
*.manifest
58+
*.spec
59+
60+
# Installer logs
61+
pip-log.txt
62+
pip-delete-this-directory.txt
63+
64+
# Unit test / coverage reports
65+
htmlcov/
66+
.tox/
67+
.nox/
68+
.coverage
69+
.coverage.*
70+
.cache
71+
nosetests.xml
72+
coverage.xml
73+
*.cover
74+
*.py,cover
75+
.hypothesis/
76+
.pytest_cache/
77+
cover/
78+
79+
# Translations
80+
*.mo
81+
*.pot
82+
83+
# Django stuff:
84+
*.log
85+
local_settings.py
86+
db.sqlite3
87+
db.sqlite3-journal
88+
89+
# Flask stuff:
90+
instance/
91+
.webassets-cache
92+
93+
# Scrapy stuff:
94+
.scrapy
95+
96+
# Sphinx documentation
97+
docs/_build/
98+
99+
# PyBuilder
100+
.pybuilder/
101+
target/
102+
103+
# Jupyter Notebook
104+
105+
# IPython
106+
107+
# pyenv
108+
# For a library or package, you might want to ignore these files since the code is
109+
# intended to run in multiple environments; otherwise, check them in:
110+
# .python-version
111+
112+
# pipenv
113+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
114+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
115+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
116+
# install all needed dependencies.
117+
#Pipfile.lock
118+
119+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
120+
__pypackages__/
121+
122+
# Celery stuff
123+
celerybeat-schedule
124+
celerybeat.pid
125+
126+
# SageMath parsed files
127+
*.sage.py
128+
129+
# Environments
130+
.env
131+
.venv
132+
env/
133+
venv/
134+
ENV/
135+
env.bak/
136+
venv.bak/
137+
138+
# Spyder project settings
139+
.spyderproject
140+
.spyproject
141+
142+
# Rope project settings
143+
.ropeproject
144+
145+
# mkdocs documentation
146+
/site
147+
148+
# mypy
149+
.mypy_cache/
150+
.dmypy.json
151+
dmypy.json
152+
153+
# Pyre type checker
154+
.pyre/
155+
156+
# pytype static type analyzer
157+
.pytype/
158+
159+
# Cython debug symbols
160+
cython_debug/
161+
162+
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks

docs/API/index.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
13+
if "%1" == "" goto help
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.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
API
2+
===
3+
4+
.. autosummary::
5+
:toctree: generated
6+
7+
lumache

docs/source/conf.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
3+
# -- Project information
4+
5+
project = 'PyMIC'
6+
copyright = '2021, HiLab'
7+
author = 'HiLab'
8+
9+
release = '0.1'
10+
version = '0.1.0'
11+
12+
# -- General configuration
13+
14+
extensions = [
15+
'sphinx.ext.duration',
16+
'sphinx.ext.doctest',
17+
'sphinx.ext.autodoc',
18+
'sphinx.ext.autosummary',
19+
'sphinx.ext.intersphinx',
20+
]
21+
22+
intersphinx_mapping = {
23+
'python': ('https://docs.python.org/3/', None),
24+
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
25+
}
26+
intersphinx_disabled_domains = ['std']
27+
28+
templates_path = ['_templates']
29+
30+
# -- Options for HTML output
31+
32+
html_theme = 'sphinx_rtd_theme'
33+
34+
# -- Options for EPUB output
35+
epub_show_urls = 'footnote'

docs/source/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Welcome to PyMIC's documentation!
2+
===================================
3+
4+
PyMIC is a pytorch-based toolkit for medical image computing with annotation-efficient deep learning.
5+
PyMIC is developed to support learning with imperfect labels, including semi-supervised and weakly supervised learning, and learning with noisy annotations.
6+
7+
Check out the :doc:`usage` section for further information, including
8+
how to :ref:`installation` the project.
9+
10+
.. note::
11+
12+
This project is under active development.
13+
14+
Contents
15+
--------
16+
17+
.. toctree::
18+
19+
usage
20+
api

docs/source/usage.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Usage
2+
=====
3+
4+
.. _installation:
5+
6+
Installation
7+
------------
8+
9+
To use Lumache, first install it using pip:
10+
11+
.. code-block:: console
12+
13+
(.venv) $ pip install lumache
14+
15+
Creating recipes
16+
----------------
17+
18+
To retrieve a list of random ingredients,
19+
you can use the ``lumache.get_random_ingredients()`` function:
20+
21+
.. autofunction:: lumache.get_random_ingredients
22+
23+
The ``kind`` parameter should be either ``"meat"``, ``"fish"``,
24+
or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
25+
will raise an exception.
26+
27+
.. autoexception:: lumache.InvalidKindError
28+
29+
For example:
30+
31+
>>> import lumache
32+
>>> lumache.get_random_ingredients()
33+
['shells', 'gorgonzola', 'parsley']
34+

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[build-system]
2+
requires = ["flit_core >=3.2,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "PyMIC"
7+
authors = [{name = "Graziella", email = "graziella@lumache"}]
8+
dynamic = ["version", "description"]

0 commit comments

Comments
 (0)