18
18
import re
19
19
import sys
20
20
import datetime
21
- sys .path .append ('..' )
21
+
22
+ sys .path .append (".." )
22
23
23
24
# -- Project information -----------------------------------------------------
24
25
25
- project = 'Segmentation Models'
26
- copyright = '{}, Pavel Iakubovskii' .format (datetime .datetime .now ().year )
27
- author = 'Pavel Iakubovskii'
26
+ project = "Segmentation Models"
27
+ copyright = "{}, Pavel Iakubovskii" .format (datetime .datetime .now ().year )
28
+ author = "Pavel Iakubovskii"
29
+
28
30
29
31
def get_version ():
30
- sys .path .append (' ../segmentation_models_pytorch' )
32
+ sys .path .append (" ../segmentation_models_pytorch" )
31
33
from __version__ import __version__ as version
34
+
32
35
sys .path .pop (- 1 )
33
36
return version
34
37
38
+
35
39
version = get_version ()
36
40
37
41
# -- General configuration ---------------------------------------------------
@@ -41,16 +45,16 @@ def get_version():
41
45
# ones.
42
46
43
47
extensions = [
44
- ' sphinx.ext.autodoc' ,
45
- ' sphinx.ext.coverage' ,
46
- ' sphinx.ext.napoleon' ,
47
- ' sphinx.ext.viewcode' ,
48
- ' sphinx.ext.mathjax' ,
49
- ' autodocsumm' ,
48
+ " sphinx.ext.autodoc" ,
49
+ " sphinx.ext.coverage" ,
50
+ " sphinx.ext.napoleon" ,
51
+ " sphinx.ext.viewcode" ,
52
+ " sphinx.ext.mathjax" ,
53
+ " autodocsumm" ,
50
54
]
51
55
52
56
# Add any paths that contain templates here, relative to this directory.
53
- templates_path = [' _templates' ]
57
+ templates_path = [" _templates" ]
54
58
55
59
# List of patterns, relative to source directory, that match files and
56
60
# directories to ignore when looking for source files.
@@ -65,12 +69,14 @@ def get_version():
65
69
#
66
70
67
71
import sphinx_rtd_theme
72
+
68
73
html_theme = "sphinx_rtd_theme"
69
74
html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
70
75
71
76
# import karma_sphinx_theme
72
77
# html_theme = "karma_sphinx_theme"
73
78
import faculty_sphinx_theme
79
+
74
80
html_theme = "faculty_sphinx_theme"
75
81
76
82
# import catalyst_sphinx_theme
@@ -82,7 +88,7 @@ def get_version():
82
88
# Add any paths that contain custom static files (such as style sheets) here,
83
89
# relative to this directory. They are copied after the builtin static files,
84
90
# so a file named "default.css" will overwrite the builtin "default.css".
85
- html_static_path = [' _static' ]
91
+ html_static_path = [" _static" ]
86
92
87
93
# -- Extension configuration -------------------------------------------------
88
94
@@ -92,37 +98,40 @@ def get_version():
92
98
napoleon_numpy_docstring = False
93
99
94
100
autodoc_mock_imports = [
95
- ' torch' ,
96
- ' tqdm' ,
97
- ' numpy' ,
98
- ' timm' ,
99
- ' cv2' ,
100
- ' PIL' ,
101
- ' pretrainedmodels' ,
102
- ' torchvision' ,
103
- ' efficientnet-pytorch' ,
104
- ' segmentation_models_pytorch.encoders' ,
105
- ' segmentation_models_pytorch.utils' ,
101
+ " torch" ,
102
+ " tqdm" ,
103
+ " numpy" ,
104
+ " timm" ,
105
+ " cv2" ,
106
+ " PIL" ,
107
+ " pretrainedmodels" ,
108
+ " torchvision" ,
109
+ " efficientnet-pytorch" ,
110
+ " segmentation_models_pytorch.encoders" ,
111
+ " segmentation_models_pytorch.utils" ,
106
112
# 'segmentation_models_pytorch.base',
107
113
]
108
114
109
- autoclass_content = ' both'
110
- autodoc_typehints = ' description'
115
+ autoclass_content = " both"
116
+ autodoc_typehints = " description"
111
117
112
118
# --- Work around to make autoclass signatures not (*args, **kwargs) ----------
113
119
114
- class FakeSignature ():
120
+
121
+ class FakeSignature :
115
122
def __getattribute__ (self , * args ):
116
123
raise ValueError
117
124
125
+
118
126
def f (app , obj , bound_method ):
119
127
if "__new__" in obj .__name__ :
120
128
obj .__signature__ = FakeSignature ()
121
129
130
+
122
131
def setup (app ):
123
- app .connect (' autodoc-before-process-signature' , f )
132
+ app .connect (" autodoc-before-process-signature" , f )
124
133
125
134
126
135
# Custom configuration --------------------------------------------------------
127
136
128
- autodoc_member_order = ' bysource'
137
+ autodoc_member_order = " bysource"
0 commit comments