##// END OF EJS Templates
feat(docs): new docs build logic...
super-admin -
r5193:1e179e1f default
parent child Browse files
Show More
@@ -0,0 +1,5 b''
1 FROM sphinxdoc/sphinx
2
3 WORKDIR /project
4 ADD requirements_docs.txt /project
5 RUN pip3 install -r requirements_docs.txt
@@ -0,0 +1,117 b''
1 <!doctype html>
2 <html class="no-js"{% if language is not none %} lang="{{ language }}"{% endif %} data-content_root="{{ content_root }}">
3 <head>
4 <!-- Google Tag Manager -->
5 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
6 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
7 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
8 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
9 })(window,document,'script','dataLayer','GTM-M2TSG36B');</script>
10 <!-- End Google Tag Manager -->
11
12 {%- block site_meta -%}
13 <meta charset="utf-8"/>
14 <meta name="viewport" content="width=device-width,initial-scale=1"/>
15 <meta name="color-scheme" content="light dark">
16
17 {%- if metatags %}{{ metatags }}{% endif -%}
18
19 {%- block linktags %}
20 {%- if hasdoc('about') -%}
21 <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
22 {%- endif -%}
23 {%- if hasdoc('genindex') -%}
24 <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
25 {%- endif -%}
26 {%- if hasdoc('search') -%}
27 <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
28 {%- endif -%}
29 {%- if hasdoc('copyright') -%}
30 <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
31 {%- endif -%}
32 {%- if next -%}
33 <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
34 {%- endif -%}
35 {%- if prev -%}
36 <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
37 {%- endif -%}
38 {#- rel="canonical" (set by html_baseurl) -#}
39 {%- if pageurl %}
40 <link rel="canonical" href="{{ pageurl|e }}" />
41 {%- endif %}
42 {%- endblock linktags %}
43
44 {# Favicon #}
45 {%- if favicon_url -%}
46 <link rel="shortcut icon" href="{{ favicon_url }}"/>
47 {%- endif -%}
48
49 <!-- Generated with Sphinx {{ sphinx_version }} and Furo {{ furo_version }} -->
50
51 {%- endblock site_meta -%}
52
53 {#- Site title -#}
54 {%- block htmltitle -%}
55 {% if not docstitle %}
56 <title>{{ title|striptags|e }}</title>
57 {% elif pagename == master_doc %}
58 <title>{{ docstitle|striptags|e }}</title>
59 {% else %}
60 <title>{{ title|striptags|e }} - {{ docstitle|striptags|e }}</title>
61 {% endif %}
62 {%- endblock -%}
63
64 {%- block styles -%}
65
66 {# Custom stylesheets #}
67 {%- block regular_styles -%}
68 {%- for css in css_files -%}
69 {% if css|attr("filename") -%}
70 {{ css_tag(css) }}
71 {%- else -%}
72 <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
73 {%- endif %}
74 {% endfor -%}
75 {%- endblock regular_styles -%}
76
77 {#- Theme-related stylesheets -#}
78 {%- block theme_styles %}
79 {% include "partials/_head_css_variables.html" with context %}
80 {%- endblock -%}
81
82 {%- block extra_styles %}
83 {%- endblock -%}
84
85 {%- endblock styles -%}
86
87 {#- Custom front matter #}
88 {%- block extrahead -%}{%- endblock -%}
89 </head>
90 <body>
91 <!-- Google Tag Manager (noscript) -->
92 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M2TSG36B"
93 height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
94 <!-- End Google Tag Manager (noscript) -->
95
96 {% block body %}
97 <script>
98 document.body.dataset.theme = localStorage.getItem("theme") || "auto";
99 </script>
100 {% endblock %}
101
102 {%- block scripts -%}
103
104 {# Custom JS #}
105 {%- block regular_scripts -%}
106 {% for path in script_files -%}
107 {{ js_tag(path) }}
108 {% endfor -%}
109 {%- endblock regular_scripts -%}
110
111 {# Theme-related JavaScript code #}
112 {%- block theme_scripts -%}
113 {%- endblock -%}
114
115 {%- endblock scripts -%}
116 </body>
117 </html> No newline at end of file
@@ -0,0 +1,204 b''
1 {% extends "base.html" %}
2
3 {% block body -%}
4 {{ super() }}
5 {% include "partials/icons.html" %}
6
7 <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
8 <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
9 <label class="overlay sidebar-overlay" for="__navigation">
10 <div class="visually-hidden">Hide navigation sidebar</div>
11 </label>
12 <label class="overlay toc-overlay" for="__toc">
13 <div class="visually-hidden">Hide table of contents sidebar</div>
14 </label>
15
16 {% if theme_announcement -%}
17 <div class="announcement">
18 <aside class="announcement-content">
19 {% block announcement %} {{ theme_announcement }} {% endblock announcement %}
20 </aside>
21 </div>
22 {%- endif %}
23
24 <div class="page">
25 <header class="mobile-header">
26 <div class="header-left">
27 <label class="nav-overlay-icon" for="__navigation">
28 <div class="visually-hidden">Toggle site navigation sidebar</div>
29 <i class="icon"><svg><use href="#svg-menu"></use></svg></i>
30 </label>
31 </div>
32 <div class="header-center">
33 <a href="{{ pathto(master_doc) }}"><div class="brand">{{ docstitle if docstitle else project }}</div></a>
34 </div>
35 <div class="header-right">
36 <div class="theme-toggle-container theme-toggle-header">
37 <button class="theme-toggle">
38 <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
39 <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
40 <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
41 <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
42 </button>
43 </div>
44 <label class="toc-overlay-icon toc-header-icon{% if furo_hide_toc %} no-toc{% endif %}" for="__toc">
45 <div class="visually-hidden">Toggle table of contents sidebar</div>
46 <i class="icon"><svg><use href="#svg-toc"></use></svg></i>
47 </label>
48 </div>
49 </header>
50 <aside class="sidebar-drawer">
51 <div class="sidebar-container">
52 {% block left_sidebar %}
53 <div class="sidebar-sticky">
54 {%- for sidebar_section in sidebars %}
55 {%- include sidebar_section %}
56 {%- endfor %}
57 </div>
58 {% endblock left_sidebar %}
59 </div>
60 </aside>
61 <div class="main">
62 <div class="content">
63 <div class="article-container">
64 <a href="#" class="back-to-top muted-link">
65 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
66 <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
67 </svg>
68 <span>{% trans %}Back to top{% endtrans %}</span>
69 </a>
70 <div class="content-icon-container">
71 {% if theme_top_of_page_button == "edit" -%}
72 {%- include "components/edit-this-page.html" with context -%}
73 {%- elif theme_top_of_page_button != None -%}
74 {{ warning("Got an unsupported value for 'top_of_page_button'") }}
75 {%- endif -%}
76 {#- Theme toggle -#}
77 <div class="theme-toggle-container theme-toggle-content">
78 <button class="theme-toggle">
79 <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
80 <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
81 <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
82 <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
83 </button>
84 </div>
85 <label class="toc-overlay-icon toc-content-icon{% if furo_hide_toc %} no-toc{% endif %}" for="__toc">
86 <div class="visually-hidden">Toggle table of contents sidebar</div>
87 <i class="icon"><svg><use href="#svg-toc"></use></svg></i>
88 </label>
89 </div>
90 <article role="main">
91 {% block content %}{{ body }}{% endblock %}
92 </article>
93 </div>
94 <footer>
95 {% block footer %}
96 <div class="related-pages">
97 {% if next -%}
98 <a class="next-page" href="{{ next.link }}">
99 <div class="page-info">
100 <div class="context">
101 <span>{{ _("Next") }}</span>
102 </div>
103 <div class="title">{{ next.title }}</div>
104 </div>
105 <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
106 </a>
107 {%- endif %}
108 {% if prev -%}
109 <a class="prev-page" href="{{ prev.link }}">
110 <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
111 <div class="page-info">
112 <div class="context">
113 <span>{{ _("Previous") }}</span>
114 </div>
115 {% if prev.link == pathto(master_doc) %}
116 <div class="title">{{ _("Home") }}</div>
117 {% else %}
118 <div class="title">{{ prev.title }}</div>
119 {% endif %}
120 </div>
121 </a>
122 {%- endif %}
123 </div>
124 <div class="bottom-of-page">
125 <div class="left-details">
126 {%- if show_copyright %}
127 <div class="copyright">
128 {%- if hasdoc('copyright') %}
129 {% trans path=pathto('copyright'), copyright=copyright|e -%}
130 <a href="{{ path }}">Copyright</a> &#169; {{ copyright }}
131 {%- endtrans %}
132 {%- else %}
133 {% trans copyright=copyright|e -%}
134 Copyright &#169; {{ copyright }}
135 {%- endtrans %}
136 {%- endif %}
137 </div>
138 {%- endif %}
139
140 {%- if show_sphinx -%}
141 {% trans %}<a href="https://www.sphinx-doc.org/">Sphinx</a> and {% endtrans -%}
142 <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
143 {% endif -%}
144 {%- if last_updated -%}
145 <div class="last-updated">
146 {% trans last_updated=last_updated|e -%}
147 Last updated on {{ last_updated }}
148 {%- endtrans -%}
149 </div>
150
151 <div style="border-top: 0">
152 Got documentation defects and suggestions? <a href="https://community.rhodecode.com">Submit docs issues</a>
153 </div>
154
155 {%- endif %}
156 </div>
157 <div class="right-details">
158 {% if theme_footer_icons or READTHEDOCS -%}
159 <div class="icons">
160 {% if theme_footer_icons -%}
161 {% for icon_dict in theme_footer_icons -%}
162 <a class="muted-link {{ icon_dict.class }}" href="{{ icon_dict.url }}" aria-label="{{ icon_dict.name }}">
163 {{- icon_dict.html -}}
164 </a>
165 {% endfor %}
166 {%- else -%}
167 {#- Show Read the Docs project -#}
168 {%- if READTHEDOCS and slug -%}
169 <a class="muted-link" href="https://readthedocs.org/projects/{{ slug }}" aria-label="On Read the Docs">
170 <svg x="0px" y="0px" viewBox="-125 217 360 360" xml:space="preserve">
171 <path fill="currentColor" d="M39.2,391.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3 c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2 c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,391.3,40.4,391.1,39.2,391.3z M39.2,353.6c-4.2,0.6-7.1,4.4-6.5,8.5 c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4 c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,353.6,40.4,353.4,39.2,353.6z M39.2,315.9 c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8 c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6c-30.1-2.4-46.5-7.9-46.5-7.9 C41.7,315.9,40.4,315.8,39.2,315.9z M39.2,278.3c-4.2,0.6-7.1,4.4-6.5,8.5c0.4,3,2.6,5.5,5.5,6.3c0,0,18.5,6.1,50,8.7 c25.3,2.1,54-1.8,54-1.8c4.2-0.1,7.5-3.6,7.4-7.8c-0.1-4.2-3.6-7.5-7.8-7.4c-0.5,0-1,0.1-1.5,0.2c0,0-28.1,3.5-50.9,1.6 c-30.1-2.4-46.5-7.9-46.5-7.9C41.7,278.2,40.4,278.1,39.2,278.3z M-13.6,238.5c-39.6,0.3-54.3,12.5-54.3,12.5v295.7 c0,0,14.4-12.4,60.8-10.5s55.9,18.2,112.9,19.3s71.3-8.8,71.3-8.8l0.8-301.4c0,0-25.6,7.3-75.6,7.7c-49.9,0.4-61.9-12.7-107.7-14.2 C-8.2,238.6-10.9,238.5-13.6,238.5z M19.5,257.8c0,0,24,7.9,68.3,10.1c37.5,1.9,75-3.7,75-3.7v267.9c0,0-19,10-66.5,6.6 C59.5,536.1,19,522.1,19,522.1L19.5,257.8z M-3.6,264.8c4.2,0,7.7,3.4,7.7,7.7c0,4.2-3.4,7.7-7.7,7.7c0,0-12.4,0.1-20,0.8 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,0,0,0,0c0,0,11.3-6,27-7.5 C-16,264.9-3.6,264.8-3.6,264.8z M-11,302.6c4.2-0.1,7.4,0,7.4,0c4.2,0.5,7.2,4.3,6.7,8.5c-0.4,3.5-3.2,6.3-6.7,6.7 c0,0-12.4,0.1-20,0.8c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5 C-20.5,302.9-15.2,302.7-11,302.6z M-3.6,340.2c4.2,0,7.7,3.4,7.7,7.7s-3.4,7.7-7.7,7.7c0,0-12.4-0.1-20,0.7 c-12.7,1.3-21.4,5.9-21.4,5.9c-3.7,2-8.4,0.5-10.3-3.2c-2-3.7-0.5-8.4,3.2-10.3c0,0,11.3-6,27-7.5C-16,340.1-3.6,340.2-3.6,340.2z" />
172 </svg>
173 </a>
174 {%- endif -%}
175 {%- endif %}
176 </div>
177 {%- endif %}
178 </div>
179 </div>
180 {% endblock footer %}
181 </footer>
182 </div>
183 <aside class="toc-drawer{% if furo_hide_toc %} no-toc{% endif %}">
184 {% block right_sidebar %}
185 {% if not furo_hide_toc %}
186 <div class="toc-sticky toc-scroll">
187 <div class="toc-title-container">
188 <span class="toc-title">
189 {{ _("On this page") }}
190 </span>
191 </div>
192 <div class="toc-tree-container">
193 <div class="toc-tree">
194 {{ toc }}
195 </div>
196 </div>
197 </div>
198 {% endif %}
199 {% endblock right_sidebar %}
200 </aside>
201 </div>
202 </div>
203
204 {%- endblock %}
@@ -1,189 +1,189 b''
1 # required for pushd to work..
1 # required for pushd to work..
2 SHELL = /bin/bash
2 SHELL = /bin/bash
3
3
4
4
5 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
5 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
6 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
6 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
7
7
8 NODE_PATH=./node_modules
8 NODE_PATH=./node_modules
9 WEBPACK=./node_binaries/webpack
9 WEBPACK=./node_binaries/webpack
10 GRUNT=./node_binaries/grunt
10 GRUNT=./node_binaries/grunt
11
11
12 .PHONY: clean
12 .PHONY: clean
13 ## Cleanup compiled and cache py files
13 ## Cleanup compiled and cache py files
14 clean:
14 clean:
15 make test-clean
15 make test-clean
16 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
16 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
17 find . -type d -name "build" -prune -exec rm -rf '{}' ';'
17 find . -type d -name "build" -prune -exec rm -rf '{}' ';'
18
18
19
19
20 .PHONY: test
20 .PHONY: test
21 ## run test-clean and tests
21 ## run test-clean and tests
22 test:
22 test:
23 make test-clean
23 make test-clean
24 make test-only
24 make test-only
25
25
26
26
27 .PHONY: test-clean
27 .PHONY: test-clean
28 ## run test-clean and tests
28 ## run test-clean and tests
29 test-clean:
29 test-clean:
30 rm -rf coverage.xml htmlcov junit.xml pylint.log result
30 rm -rf coverage.xml htmlcov junit.xml pylint.log result
31 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
31 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
32 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
32 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
33
33
34
34
35 .PHONY: test-only
35 .PHONY: test-only
36 ## Run tests only without cleanup
36 ## Run tests only without cleanup
37 test-only:
37 test-only:
38 PYTHONHASHSEED=random \
38 PYTHONHASHSEED=random \
39 py.test -x -vv -r xw -p no:sugar \
39 py.test -x -vv -r xw -p no:sugar \
40 --cov-report=term-missing --cov-report=html \
40 --cov-report=term-missing --cov-report=html \
41 --cov=rhodecode rhodecode
41 --cov=rhodecode rhodecode
42
42
43
43
44 .PHONY: test-only-mysql
44 .PHONY: test-only-mysql
45 ## run tests against mysql
45 ## run tests against mysql
46 test-only-mysql:
46 test-only-mysql:
47 PYTHONHASHSEED=random \
47 PYTHONHASHSEED=random \
48 py.test -x -vv -r xw -p no:sugar \
48 py.test -x -vv -r xw -p no:sugar \
49 --cov-report=term-missing --cov-report=html \
49 --cov-report=term-missing --cov-report=html \
50 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
50 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
51 --cov=rhodecode rhodecode
51 --cov=rhodecode rhodecode
52
52
53
53
54 .PHONY: test-only-postgres
54 .PHONY: test-only-postgres
55 ## run tests against postgres
55 ## run tests against postgres
56 test-only-postgres:
56 test-only-postgres:
57 PYTHONHASHSEED=random \
57 PYTHONHASHSEED=random \
58 py.test -x -vv -r xw -p no:sugar \
58 py.test -x -vv -r xw -p no:sugar \
59 --cov-report=term-missing --cov-report=html \
59 --cov-report=term-missing --cov-report=html \
60 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
60 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
61 --cov=rhodecode rhodecode
61 --cov=rhodecode rhodecode
62
62
63 .PHONY: ruff-check
63 .PHONY: ruff-check
64 ## run a ruff analysis
64 ## run a ruff analysis
65 ruff-check:
65 ruff-check:
66 ruff check --ignore F401 --ignore I001 --ignore E402 --ignore E501 --ignore F841 --exclude rhodecode/lib/dbmigrate --exclude .eggs --exclude .dev .
66 ruff check --ignore F401 --ignore I001 --ignore E402 --ignore E501 --ignore F841 --exclude rhodecode/lib/dbmigrate --exclude .eggs --exclude .dev .
67
67
68
68
69 .PHONY: docs
69 .PHONY: docs
70 ## build docs
70 ## build docs
71 docs:
71 docs:
72 (cd docs; nix-build default.nix -o result; make clean html)
72 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean html)
73
73
74
74
75 .PHONY: docs-clean
75 .PHONY: docs-clean
76 ## Cleanup docs
76 ## Cleanup docs
77 docs-clean:
77 docs-clean:
78 (cd docs; make clean)
78 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean)
79
79
80
80
81 .PHONY: docs-cleanup
81 .PHONY: docs-cleanup
82 ## Cleanup docs
82 ## Cleanup docs
83 docs-cleanup:
83 docs-cleanup:
84 (cd docs; make cleanup)
84 (cd docs; docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make cleanup)
85
85
86
86
87 .PHONY: web-build
87 .PHONY: web-build
88 ## Build JS packages static/js
88 ## Build JS packages static/js
89 # https://hub.docker.com/r/huli/grunt
89 # https://hub.docker.com/r/huli/grunt
90 web-build:
90 web-build:
91 NODE_PATH=$(NODE_PATH) $(GRUNT)
91 NODE_PATH=$(NODE_PATH) $(GRUNT)
92
92
93 # check required files
93 # check required files
94 STATIC_CHECK="/robots.txt /502.html \
94 STATIC_CHECK="/robots.txt /502.html \
95 /js/scripts.min.js /js/rhodecode-components.js \
95 /js/scripts.min.js /js/rhodecode-components.js \
96 /css/style.css /css/style-polymer.css /css/style-ipython.css"
96 /css/style.css /css/style-polymer.css /css/style-ipython.css"
97
97
98 for file in $STATIC_CHECK;
98 for file in $STATIC_CHECK;
99 do
99 do
100 if [ ! -f rhodecode/public/$file ]; then
100 if [ ! -f rhodecode/public/$file ]; then
101 echo "Missing $file expected after web-build"
101 echo "Missing $file expected after web-build"
102 exit 1
102 exit 1
103 fi
103 fi
104 done
104 done
105
105
106 .PHONY: pip-packages
106 .PHONY: pip-packages
107 ## Show outdated packages
107 ## Show outdated packages
108 pip-packages:
108 pip-packages:
109 python ${OUTDATED_PACKAGES}
109 python ${OUTDATED_PACKAGES}
110
110
111
111
112 .PHONY: build
112 .PHONY: build
113 ## Build sdist/egg
113 ## Build sdist/egg
114 build:
114 build:
115 python -m build
115 python -m build
116
116
117
117
118 .PHONY: dev-sh
118 .PHONY: dev-sh
119 ## make dev-sh
119 ## make dev-sh
120 dev-sh:
120 dev-sh:
121 sudo apt-get update
121 sudo apt-get update
122 sudo apt-get install -y zsh
122 sudo apt-get install -y zsh
123 curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
123 curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
124 PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b %# ' zsh
124 PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b %# ' zsh
125
125
126 .PHONY: dev-env
126 .PHONY: dev-env
127 ## make dev-env based on the requirements files and install develop of packages
127 ## make dev-env based on the requirements files and install develop of packages
128 ## Cleanup: pip freeze | grep -v "^-e" | grep -v "@" | xargs pip uninstall -y
128 ## Cleanup: pip freeze | grep -v "^-e" | grep -v "@" | xargs pip uninstall -y
129 dev-env:
129 dev-env:
130 pip install build virtualenv
130 pip install build virtualenv
131 pushd ../rhodecode-vcsserver/ && make dev-env && popd
131 pushd ../rhodecode-vcsserver/ && make dev-env && popd
132 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
132 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
133 pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
133 pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_rc_tools.txt -r requirements_test.txt -r requirements_debug.txt
134 pip install -e .
134 pip install -e .
135
135
136
136
137 .PHONY: dev-srv
137 .PHONY: dev-srv
138 ## run develop server instance, docker exec -it $(docker ps -q --filter 'name=dev-enterprise-ce') /bin/bash
138 ## run develop server instance, docker exec -it $(docker ps -q --filter 'name=dev-enterprise-ce') /bin/bash
139 dev-srv:
139 dev-srv:
140 pserve --reload .dev/dev.ini
140 pserve --reload .dev/dev.ini
141
141
142
142
143 .PHONY: dev-srv-g
143 .PHONY: dev-srv-g
144 ## run gunicorn multi process workers
144 ## run gunicorn multi process workers
145 dev-srv-g:
145 dev-srv-g:
146 gunicorn --workers=2 --paste .dev/dev.ini --bind=0.0.0.0:10020 --config=.dev/gunicorn_config.py
146 gunicorn --workers=2 --paste .dev/dev.ini --bind=0.0.0.0:10020 --config=.dev/gunicorn_config.py
147
147
148
148
149 # Default command on calling make
149 # Default command on calling make
150 .DEFAULT_GOAL := show-help
150 .DEFAULT_GOAL := show-help
151
151
152 .PHONY: show-help
152 .PHONY: show-help
153 show-help:
153 show-help:
154 @echo "$$(tput bold)Available rules:$$(tput sgr0)"
154 @echo "$$(tput bold)Available rules:$$(tput sgr0)"
155 @echo
155 @echo
156 @sed -n -e "/^## / { \
156 @sed -n -e "/^## / { \
157 h; \
157 h; \
158 s/.*//; \
158 s/.*//; \
159 :doc" \
159 :doc" \
160 -e "H; \
160 -e "H; \
161 n; \
161 n; \
162 s/^## //; \
162 s/^## //; \
163 t doc" \
163 t doc" \
164 -e "s/:.*//; \
164 -e "s/:.*//; \
165 G; \
165 G; \
166 s/\\n## /---/; \
166 s/\\n## /---/; \
167 s/\\n/ /g; \
167 s/\\n/ /g; \
168 p; \
168 p; \
169 }" ${MAKEFILE_LIST} \
169 }" ${MAKEFILE_LIST} \
170 | LC_ALL='C' sort --ignore-case \
170 | LC_ALL='C' sort --ignore-case \
171 | awk -F '---' \
171 | awk -F '---' \
172 -v ncol=$$(tput cols) \
172 -v ncol=$$(tput cols) \
173 -v indent=19 \
173 -v indent=19 \
174 -v col_on="$$(tput setaf 6)" \
174 -v col_on="$$(tput setaf 6)" \
175 -v col_off="$$(tput sgr0)" \
175 -v col_off="$$(tput sgr0)" \
176 '{ \
176 '{ \
177 printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
177 printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
178 n = split($$2, words, " "); \
178 n = split($$2, words, " "); \
179 line_length = ncol - indent; \
179 line_length = ncol - indent; \
180 for (i = 1; i <= n; i++) { \
180 for (i = 1; i <= n; i++) { \
181 line_length -= length(words[i]) + 1; \
181 line_length -= length(words[i]) + 1; \
182 if (line_length <= 0) { \
182 if (line_length <= 0) { \
183 line_length = ncol - indent - length(words[i]) - 1; \
183 line_length = ncol - indent - length(words[i]) - 1; \
184 printf "\n%*s ", -indent, " "; \
184 printf "\n%*s ", -indent, " "; \
185 } \
185 } \
186 printf "%s ", words[i]; \
186 printf "%s ", words[i]; \
187 } \
187 } \
188 printf "\n"; \
188 printf "\n"; \
189 }'
189 }'
@@ -1,9 +1,6 b''
1 # generating packages
1 ## BUILD
2 nix-shell pkgs/shell-generate.nix
2 # cd docs
3 cd docs
3 # docker build --tag sphinx-doc-build-rc .
4 pip2nix generate
5
4
6 # building the docs
5 # Build Docs
7 cd docs
6 # docker run --rm -v $(PWD):/project --workdir=/project/docs sphinx-doc-build-rc make clean html No newline at end of file
8 nix-build default.nix -o result
9 make clean html
@@ -1,183 +1,183 b''
1 # Makefile for Sphinx documentation
1 # Makefile for Sphinx documentation
2 #
2 #
3
3
4 # You can set these variables from the command line.
4 # You can set these variables from the command line.
5 SPHINXOPTS =
5 SPHINXOPTS ?=
6 SPHINXBUILD = ./result/bin/sphinx-build
6 SPHINXBUILD ?= sphinx-build
7 PAPER =
7 SOURCEDIR = source
8 BUILDDIR = _build
8 BUILDDIR = _build
9
9
10 # User-friendly check for sphinx-build
10 # User-friendly check for sphinx-build
11 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
11 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12 $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
12 $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13 endif
13 endif
14
14
15 # Internal variables.
15 # Internal variables.
16 PAPEROPT_a4 = -D latex_paper_size=a4
16 PAPEROPT_a4 = -D latex_paper_size=a4
17 PAPEROPT_letter = -D latex_paper_size=letter
17 PAPEROPT_letter = -D latex_paper_size=letter
18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19 # the i18n builder cannot share the environment and doctrees with the others
19 # the i18n builder cannot share the environment and doctrees with the others
20 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
20 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21
21
22 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
22 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23
23
24 help:
24 help:
25 @echo "Please use \`make <target>' where <target> is one of"
25 @echo "Please use \`make <target>' where <target> is one of"
26 @echo " html to make standalone HTML files"
26 @echo " html to make standalone HTML files"
27 @echo " dirhtml to make HTML files named index.html in directories"
27 @echo " dirhtml to make HTML files named index.html in directories"
28 @echo " singlehtml to make a single large HTML file"
28 @echo " singlehtml to make a single large HTML file"
29 @echo " pickle to make pickle files"
29 @echo " pickle to make pickle files"
30 @echo " json to make JSON files"
30 @echo " json to make JSON files"
31 @echo " htmlhelp to make HTML files and a HTML help project"
31 @echo " htmlhelp to make HTML files and a HTML help project"
32 @echo " qthelp to make HTML files and a qthelp project"
32 @echo " qthelp to make HTML files and a qthelp project"
33 @echo " devhelp to make HTML files and a Devhelp project"
33 @echo " devhelp to make HTML files and a Devhelp project"
34 @echo " epub to make an epub"
34 @echo " epub to make an epub"
35 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
35 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36 @echo " latexpdf to make LaTeX files and run them through pdflatex"
36 @echo " latexpdf to make LaTeX files and run them through pdflatex"
37 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
37 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38 @echo " text to make text files"
38 @echo " text to make text files"
39 @echo " man to make manual pages"
39 @echo " man to make manual pages"
40 @echo " texinfo to make Texinfo files"
40 @echo " texinfo to make Texinfo files"
41 @echo " info to make Texinfo files and run them through makeinfo"
41 @echo " info to make Texinfo files and run them through makeinfo"
42 @echo " gettext to make PO message catalogs"
42 @echo " gettext to make PO message catalogs"
43 @echo " changes to make an overview of all changed/added/deprecated items"
43 @echo " changes to make an overview of all changed/added/deprecated items"
44 @echo " xml to make Docutils-native XML files"
44 @echo " xml to make Docutils-native XML files"
45 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
45 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46 @echo " linkcheck to check all external links for integrity"
46 @echo " linkcheck to check all external links for integrity"
47 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
47 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48
48
49 clean:
49 clean:
50 rm -rf $(BUILDDIR)/*
50 rm -rf $(BUILDDIR)/*
51
51
52 cleanup:
52 cleanup:
53 @echo "cleaning build dir"
53 @echo "cleaning build dir"
54 rm -rf $(BUILDDIR)/*
54 rm -rf $(BUILDDIR)/*
55 @echo "cleaning result symlink"
55 @echo "cleaning result symlink"
56 rm -v result
56 rm -v result
57
57
58 html:
58 html:
59 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
59 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
60 @echo
60 @echo
61 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
61 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
62
62
63 dirhtml:
63 dirhtml:
64 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
64 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
65 @echo
65 @echo
66 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
66 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
67
67
68 singlehtml:
68 singlehtml:
69 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
69 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
70 @echo
70 @echo
71 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
71 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
72
72
73 pickle:
73 pickle:
74 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
74 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
75 @echo
75 @echo
76 @echo "Build finished; now you can process the pickle files."
76 @echo "Build finished; now you can process the pickle files."
77
77
78 json:
78 json:
79 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
79 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
80 @echo
80 @echo
81 @echo "Build finished; now you can process the JSON files."
81 @echo "Build finished; now you can process the JSON files."
82
82
83 htmlhelp:
83 htmlhelp:
84 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
84 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
85 @echo
85 @echo
86 @echo "Build finished; now you can run HTML Help Workshop with the" \
86 @echo "Build finished; now you can run HTML Help Workshop with the" \
87 ".hhp project file in $(BUILDDIR)/htmlhelp."
87 ".hhp project file in $(BUILDDIR)/htmlhelp."
88
88
89 qthelp:
89 qthelp:
90 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
90 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
91 @echo
91 @echo
92 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
92 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
93 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
93 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
94 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/RhodeCodeInstaller.qhcp"
94 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/RhodeCodeInstaller.qhcp"
95 @echo "To view the help file:"
95 @echo "To view the help file:"
96 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/RhodeCodeInstaller.qhc"
96 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/RhodeCodeInstaller.qhc"
97
97
98 devhelp:
98 devhelp:
99 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
99 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
100 @echo
100 @echo
101 @echo "Build finished."
101 @echo "Build finished."
102 @echo "To view the help file:"
102 @echo "To view the help file:"
103 @echo "# mkdir -p $$HOME/.local/share/devhelp/RhodeCodeInstaller"
103 @echo "# mkdir -p $$HOME/.local/share/devhelp/RhodeCodeInstaller"
104 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/RhodeCodeInstaller"
104 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/RhodeCodeInstaller"
105 @echo "# devhelp"
105 @echo "# devhelp"
106
106
107 epub:
107 epub:
108 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
108 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
109 @echo
109 @echo
110 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
110 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
111
111
112 latex:
112 latex:
113 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
113 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
114 @echo
114 @echo
115 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
115 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
116 @echo "Run \`make' in that directory to run these through (pdf)latex" \
116 @echo "Run \`make' in that directory to run these through (pdf)latex" \
117 "(use \`make latexpdf' here to do that automatically)."
117 "(use \`make latexpdf' here to do that automatically)."
118
118
119 latexpdf:
119 latexpdf:
120 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
120 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
121 @echo "Running LaTeX files through pdflatex..."
121 @echo "Running LaTeX files through pdflatex..."
122 $(MAKE) -C $(BUILDDIR)/latex all-pdf
122 $(MAKE) -C $(BUILDDIR)/latex all-pdf
123 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
123 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
124
124
125 latexpdfja:
125 latexpdfja:
126 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
126 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
127 @echo "Running LaTeX files through platex and dvipdfmx..."
127 @echo "Running LaTeX files through platex and dvipdfmx..."
128 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
128 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
129 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
129 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
130
130
131 text:
131 text:
132 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
132 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
133 @echo
133 @echo
134 @echo "Build finished. The text files are in $(BUILDDIR)/text."
134 @echo "Build finished. The text files are in $(BUILDDIR)/text."
135
135
136 man:
136 man:
137 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
137 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
138 @echo
138 @echo
139 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
139 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
140
140
141 texinfo:
141 texinfo:
142 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
142 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
143 @echo
143 @echo
144 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
144 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
145 @echo "Run \`make' in that directory to run these through makeinfo" \
145 @echo "Run \`make' in that directory to run these through makeinfo" \
146 "(use \`make info' here to do that automatically)."
146 "(use \`make info' here to do that automatically)."
147
147
148 info:
148 info:
149 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
149 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
150 @echo "Running Texinfo files through makeinfo..."
150 @echo "Running Texinfo files through makeinfo..."
151 make -C $(BUILDDIR)/texinfo info
151 make -C $(BUILDDIR)/texinfo info
152 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
152 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
153
153
154 gettext:
154 gettext:
155 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
155 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
156 @echo
156 @echo
157 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
157 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
158
158
159 changes:
159 changes:
160 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
160 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
161 @echo
161 @echo
162 @echo "The overview file is in $(BUILDDIR)/changes."
162 @echo "The overview file is in $(BUILDDIR)/changes."
163
163
164 linkcheck:
164 linkcheck:
165 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
165 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
166 @echo
166 @echo
167 @echo "Link check complete; look for any errors in the above output " \
167 @echo "Link check complete; look for any errors in the above output " \
168 "or in $(BUILDDIR)/linkcheck/output.txt."
168 "or in $(BUILDDIR)/linkcheck/output.txt."
169
169
170 doctest:
170 doctest:
171 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
171 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
172 @echo "Testing of doctests in the sources finished, look at the " \
172 @echo "Testing of doctests in the sources finished, look at the " \
173 "results in $(BUILDDIR)/doctest/output.txt."
173 "results in $(BUILDDIR)/doctest/output.txt."
174
174
175 xml:
175 xml:
176 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
176 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
177 @echo
177 @echo
178 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
178 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
179
179
180 pseudoxml:
180 pseudoxml:
181 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
181 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
182 @echo
182 @echo
183 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
183 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
@@ -1,151 +1,151 b''
1 .. _rhodecode-reset-ref:
1 .. _rhodecode-reset-ref:
2
2
3 Settings Management
3 Settings Management
4 -------------------
4 -------------------
5
5
6 All |RCE| settings can be set from the user interface, but in the event that
6 All |RCE| settings can be set from the user interface, but in the event that
7 it somehow becomes unavailable you can use ``ishell`` inside your |RCE|
7 it somehow becomes unavailable you can use ``ishell`` inside your |RCE|
8 ``virtualenv`` to carry out emergency measures.
8 ``virtualenv`` to carry out emergency measures.
9
9
10 .. warning::
10 .. warning::
11
11
12 Logging into the |RCE| database with ``iShell`` should only be done by an
12 Logging into the |RCE| database with ``iShell`` should only be done by an
13 experienced and knowledgeable database administrator.
13 experienced and knowledgeable database administrator.
14
14
15
15
16 Reset Admin Account Privileges
16 Reset Admin Account Privileges
17 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
19 If you accidentally remove your admin privileges from the admin account you
19 If you accidentally remove your admin privileges from the admin account you
20 can restore them using ``ishell``. Use the following example to reset your
20 can restore them using ``ishell``. Use the following example to reset your
21 account permissions.
21 account permissions.
22
22
23 .. code-block:: bash
23 .. code-block:: bash
24
24
25 # Open iShell from the terminal
25 # Open iShell from the terminal
26 $ rccontrol ishell enterprise-1
26 $ rccontrol ishell enterprise-1
27
27
28 .. code-block:: mysql
28 .. code-block:: python
29
29
30 # Use this example to change user permissions
30 # Use this example to change user permissions
31 In [1]: adminuser = User.get_by_username('username')
31 In [1]: adminuser = User.get_by_username('username')
32 In [2]: adminuser.admin = True
32 In [2]: adminuser.admin = True
33 In [3]: Session().add(adminuser);Session().commit()
33 In [3]: Session().add(adminuser);Session().commit()
34 In [4]: exit()
34 In [4]: exit()
35
35
36
36
37 Set to read global ``.hgrc`` file
37 Set to read global ``.hgrc`` file
38 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
39
40 By default, |RCE| does not read global ``hgrc`` files in
40 By default, |RCE| does not read global ``hgrc`` files in
41 ``/etc/mercurial/hgrc`` or ``/etc/mercurial/hgrc.d`` because it
41 ``/etc/mercurial/hgrc`` or ``/etc/mercurial/hgrc.d`` because it
42 can lead to issues. This is set in the ``rhodecode_ui`` table for which
42 can lead to issues. This is set in the ``rhodecode_ui`` table for which
43 there is no UI. If you need to edit this you can
43 there is no UI. If you need to edit this you can
44 manually change the settings using SQL statements with ``ishell``. Use the
44 manually change the settings using SQL statements with ``ishell``. Use the
45 following example to make changes to this table.
45 following example to make changes to this table.
46
46
47 .. code-block:: bash
47 .. code-block:: bash
48
48
49 # Open iShell from the terminal
49 # Open iShell from the terminal
50 $ rccontrol ishell enterprise-1
50 $ rccontrol ishell enterprise-1
51
51
52 .. code-block:: mysql
52 .. code-block:: python
53
53
54 # Use this example to enable global .hgrc access
54 # Use this example to enable global .hgrc access
55 In [1]: new_option = RhodeCodeUi()
55 In [1]: new_option = RhodeCodeUi()
56 In [2]: new_option.ui_section='web'
56 In [2]: new_option.ui_section='web'
57 In [3]: new_option.ui_key='allow_push'
57 In [3]: new_option.ui_key='allow_push'
58 In [4]: new_option.ui_value='*'
58 In [4]: new_option.ui_value='*'
59 In [5]: Session().add(new_option);Session().commit()
59 In [5]: Session().add(new_option);Session().commit()
60 In [6]: exit()
60 In [6]: exit()
61
61
62
62
63 Manually Reset Password
63 Manually Reset Password
64 ^^^^^^^^^^^^^^^^^^^^^^^
64 ^^^^^^^^^^^^^^^^^^^^^^^
65
65
66 If you need to manually reset a user password, use the following steps.
66 If you need to manually reset a user password, use the following steps.
67
67
68 1. Navigate to your |RCE| install location.
68 1. Navigate to your |RCE| install location.
69 2. Run the interactive ``ishell`` prompt.
69 2. Run the interactive ``ishell`` prompt.
70 3. Set a new password.
70 3. Set a new password.
71
71
72 Use the following code example to carry out these steps.
72 Use the following code example to carry out these steps.
73
73
74 .. code-block:: bash
74 .. code-block:: bash
75
75
76 # starts the ishell interactive prompt
76 # starts the ishell interactive prompt
77 $ rccontrol ishell enterprise-1
77 $ rccontrol ishell enterprise-1
78
78
79 .. code-block:: mysql
79 .. code-block:: python
80
80
81 In [1]: from rhodecode.lib.auth import generate_auth_token
81 In [1]: from rhodecode.lib.auth import generate_auth_token
82 In [2]: from rhodecode.lib.auth import get_crypt_password
82 In [2]: from rhodecode.lib.auth import get_crypt_password
83 # Enter the user name whose password you wish to change
83 # Enter the user name whose password you wish to change
84 In [3]: my_user = 'USERNAME'
84 In [3]: my_user = 'USERNAME'
85 In [4]: u = User.get_by_username(my_user)
85 In [4]: u = User.get_by_username(my_user)
86 # If this fails then the user does not exist
86 # If this fails then the user does not exist
87 In [5]: u.auth_token = generate_auth_token(my_user)
87 In [5]: u.auth_token = generate_auth_token(my_user)
88 # Set the new password
88 # Set the new password
89 In [6]: u.password = get_crypt_password('PASSWORD')
89 In [6]: u.password = get_crypt_password('PASSWORD')
90 In [7]: Session().add(u);Session().commit()
90 In [7]: Session().add(u);Session().commit()
91 In [8]: exit()
91 In [8]: exit()
92
92
93
93
94 Change user details
94 Change user details
95 ^^^^^^^^^^^^^^^^^^^
95 ^^^^^^^^^^^^^^^^^^^
96
96
97 If you need to manually change some of users details, use the following steps.
97 If you need to manually change some of users details, use the following steps.
98
98
99 1. Navigate to your |RCE| install location.
99 1. Navigate to your |RCE| install location.
100 2. Run the interactive ``ishell`` prompt.
100 2. Run the interactive ``ishell`` prompt.
101 3. Set a new arguments for users.
101 3. Set a new arguments for users.
102
102
103 Use the following code example to carry out these steps.
103 Use the following code example to carry out these steps.
104
104
105 .. code-block:: bash
105 .. code-block:: bash
106
106
107 # starts the ishell interactive prompt
107 # starts the ishell interactive prompt
108 $ rccontrol ishell enterprise-1
108 $ rccontrol ishell enterprise-1
109
109
110 .. code-block:: mysql
110 .. code-block:: python
111
111
112 # Use this example to change email and username of LDAP user
112 # Use this example to change email and username of LDAP user
113 In [1]: my_user = User.get_by_username('some_username')
113 In [1]: my_user = User.get_by_username('some_username')
114 In [2]: my_user.email = 'new_email@foobar.com'
114 In [2]: my_user.email = 'new_email@foobar.com'
115 In [3]: my_user.username = 'SomeUser'
115 In [3]: my_user.username = 'SomeUser'
116 In [4]: Session().add(my_user);Session().commit()
116 In [4]: Session().add(my_user);Session().commit()
117 In [5]: exit()
117 In [5]: exit()
118
118
119
119
120 Change user login type
120 Change user login type
121 ^^^^^^^^^^^^^^^^^^^^^^
121 ^^^^^^^^^^^^^^^^^^^^^^
122
122
123 Sometimes it's required to change account type from RhodeCode to LDAP or
123 Sometimes it's required to change account type from RhodeCode to LDAP or
124 other external authentication type.
124 other external authentication type.
125 If you need to manually change the method of login, use the following steps.
125 If you need to manually change the method of login, use the following steps.
126
126
127 1. Navigate to your |RCE| install location.
127 1. Navigate to your |RCE| install location.
128 2. Run the interactive ``ishell`` prompt.
128 2. Run the interactive ``ishell`` prompt.
129 3. Set a new arguments for users.
129 3. Set a new arguments for users.
130
130
131 Use the following code example to carry out these steps.
131 Use the following code example to carry out these steps.
132 Available values for new_extern_type can be found when browsing available
132 Available values for new_extern_type can be found when browsing available
133 authentication types in RhodeCode admin interface for authentication.
133 authentication types in RhodeCode admin interface for authentication.
134 Use the text which is shown after '#' sign, eg.
134 Use the text which is shown after '#' sign, eg.
135 ` LDAP (egg:rhodecode-enterprise-ce#ldap)` it's type is 'ldap'
135 ` LDAP (egg:rhodecode-enterprise-ce#ldap)` it's type is 'ldap'
136
136
137 .. code-block:: bash
137 .. code-block:: bash
138
138
139 # starts the ishell interactive prompt
139 # starts the ishell interactive prompt
140 $ rccontrol ishell enterprise-1
140 $ rccontrol ishell enterprise-1
141
141
142 .. code-block:: mysql
142 .. code-block:: python
143
143
144 # Use this example to change users from authentication
144 # Use this example to change users from authentication
145 # using rhodecode internal to ldap
145 # using rhodecode internal to ldap
146 In [1]: new_extern_type = 'ldap'
146 In [1]: new_extern_type = 'ldap'
147 In [2]: my_user = User.get_by_username('some_username')
147 In [2]: my_user = User.get_by_username('some_username')
148 In [3]: my_user.extern_type = new_extern_type
148 In [3]: my_user.extern_type = new_extern_type
149 In [4]: my_user.extern_name = new_extern_type
149 In [4]: my_user.extern_name = new_extern_type
150 In [5]: Session().add(my_user);Session().commit()
150 In [5]: Session().add(my_user);Session().commit()
151 In [6]: exit()
151 In [6]: exit()
@@ -1,210 +1,209 b''
1 .. _api:
1 .. _api:
2
2
3 API Documentation
3 API Documentation
4 =================
4 =================
5
5
6 The |RCE| API uses a single scheme for calling all API methods. The API is
6 The |RCE| API uses a single scheme for calling all API methods. The API is
7 implemented with JSON protocol in both directions. To send API requests to
7 implemented with JSON protocol in both directions. To send API requests to
8 your instance of |RCE|, use the following URL format
8 your instance of |RCE|, use the following URL format
9 ``<your_server>/_admin``
9 ``<your_server>/_admin``
10
10
11 .. note::
11 .. note::
12
12
13 To use the API, you should configure the :file:`~/.rhoderc` file with
13 To use the API, you should configure the :file:`~/.rhoderc` file with
14 access details per instance. For more information, see
14 access details per instance. For more information, see
15 :ref:`config-rhoderc`.
15 :ref:`config-rhoderc`.
16
16
17
17
18 API ACCESS FOR WEB VIEWS
18 API ACCESS FOR WEB VIEWS
19 ------------------------
19 ------------------------
20
20
21 API access can also be turned on for each web view in |RCE| that is
21 API access can also be turned on for each web view in |RCE| that is
22 decorated with a `@LoginRequired` decorator. To enable API access, change
22 decorated with a `@LoginRequired` decorator. To enable API access, change
23 the standard login decorator to `@LoginRequired(api_access=True)`.
23 the standard login decorator to `@LoginRequired(api_access=True)`.
24
24
25 From |RCE| version 1.7.0 you can configure a white list
25 From |RCE| version 1.7.0 you can configure a white list
26 of views that have API access enabled by default. To enable these,
26 of views that have API access enabled by default. To enable these,
27 edit the |RCE| configuration ``.ini`` file. The default location is:
27 edit the |RCE| configuration ``.ini`` file. The default location is:
28
28
29 * |RCE| Pre-2.2.7 :file:`root/rhodecode/data/production.ini`
29 * |RCE| Pre-2.2.7 :file:`root/rhodecode/data/production.ini`
30 * |RCE| 3.0 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
30 * |RCE| 3.0 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
31
31
32 To configure the white list, edit this section of the file. In this
32 To configure the white list, edit this section of the file. In this
33 configuration example, API access is granted to the patch/diff raw file and
33 configuration example, API access is granted to the patch/diff raw file and
34 archive.
34 archive.
35
35
36 .. code-block:: ini
36 .. code-block:: ini
37
37
38 ## List of controllers (using glob syntax) that AUTH TOKENS could be used for access.
38 ## List of controllers (using glob syntax) that AUTH TOKENS could be used for access.
39 ## Adding ?auth_token = <token> to the url authenticates this request as if it
39 ## Adding ?auth_token = <token> to the url authenticates this request as if it
40 ## came from the the logged in user who own this authentication token.
40 ## came from the the logged in user who own this authentication token.
41 ##
41 ##
42 ## Syntax is <ControllerClass>:<function_pattern>.
42 ## Syntax is <ControllerClass>:<function_pattern>.
43 ## The list should be "," separated and on a single line.
43 ## The list should be "," separated and on a single line.
44 ##
44 ##
45 api_access_controllers_whitelist = RepoCommitsView:repo_commit_raw,RepoCommitsView:repo_commit_patch,RepoCommitsView:repo_commit_download
45 api_access_controllers_whitelist = RepoCommitsView:repo_commit_raw,RepoCommitsView:repo_commit_patch,RepoCommitsView:repo_commit_download
46
46
47 After this change, a |RCE| view can be accessed without login by adding a
47 After this change, a |RCE| view can be accessed without login by adding a
48 GET parameter ``?auth_token=<auth_token>`` to a url. For example to
48 GET parameter ``?auth_token=<auth_token>`` to a url. For example to
49 access the raw diff.
49 access the raw diff.
50
50
51 .. code-block:: html
51 .. code-block:: html
52
52
53 http://<server>/<repo>/changeset-diff/<sha>?auth_token=<auth_token>
53 http://<server>/<repo>/changeset-diff/<sha>?auth_token=<auth_token>
54
54
55 By default this is only enabled on RSS/ATOM feed views. Exposing raw diffs is a
55 By default this is only enabled on RSS/ATOM feed views. Exposing raw diffs is a
56 good way to integrate with 3rd party services like code review, or build farms
56 good way to integrate with 3rd party services like code review, or build farms
57 that could download archives.
57 that could download archives.
58
58
59 API ACCESS
59 API ACCESS
60 ----------
60 ----------
61
61
62 All clients are required to send JSON-RPC spec JSON data.
62 All clients are required to send JSON-RPC spec JSON data.
63
63
64 .. code-block:: bash
64 .. code-block:: bash
65
65
66 {
66 {
67 "id:"<id>",
67 "id:"<id>",
68 "auth_token":"<auth_token>",
68 "auth_token":"<auth_token>",
69 "method":"<method_name>",
69 "method":"<method_name>",
70 "args":{"<arg_key>":"<arg_val>"}
70 "args":{"<arg_key>":"<arg_val>"}
71 }
71 }
72
72
73 Example call for auto pulling from remote repositories using curl:
73 Example call for auto pulling from remote repositories using curl:
74
74
75 .. code-block:: bash
75 .. code-block:: bash
76
76
77 curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,
77 curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,
78 "auth_token":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull", "args":{"repoid":"CPython"}}'
78 "auth_token":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull", "args":{"repoid":"CPython"}}'
79
79
80 Provide those parameters:
80 Provide those parameters:
81 - **id** A value of any type, which is used to match the response with the
81 - **id** A value of any type, which is used to match the response with the
82 request that it is replying to.
82 request that it is replying to.
83 - **auth_token** for access and permission validation.
83 - **auth_token** for access and permission validation.
84 - **method** is name of method to call
84 - **method** is name of method to call
85 - **args** is an ``key:value`` list of arguments to pass to method
85 - **args** is an ``key:value`` list of arguments to pass to method
86
86
87 .. note::
87 .. note::
88
88
89 To get your |authtoken|, from the |RCE| interface,
89 To get your |authtoken|, from the |RCE| interface,
90 go to:
90 go to:
91 :menuselection:`username --> My account --> Auth tokens`
91 :menuselection:`username --> My account --> Auth tokens`
92
92
93 For security reasons you should always create a dedicated |authtoken| for
93 For security reasons you should always create a dedicated |authtoken| for
94 API use only.
94 API use only.
95
95
96
96
97 The |RCE| API will always return a JSON-RPC response:
97 The |RCE| API will always return a JSON-RPC response:
98
98
99 .. code-block:: bash
99 .. code-block:: bash
100
100
101 {
101 {
102 "id": <id>, # matching id sent by request
102 "id": <id>, # matching id sent by request
103 "result": "<result>"|null, # JSON formatted result, null if any errors
103 "result": "<result>"|null, # JSON formatted result, null if any errors
104 "error": "null"|<error_message> # JSON formatted error (if any)
104 "error": "null"|<error_message> # JSON formatted error (if any)
105 }
105 }
106
106
107 All responses from API will be with `HTTP/1.0 200 OK` status code.
107 All responses from API will be with `HTTP/1.0 200 OK` status code.
108 If there is an error when calling the API, the *error* key will contain a
108 If there is an error when calling the API, the *error* key will contain a
109 failure description and the *result* will be `null`.
109 failure description and the *result* will be `null`.
110
110
111 API CLIENT
111 API CLIENT
112 ----------
112 ----------
113
113
114 To install the |RCE| API, see :ref:`install-tools`. To configure the API per
114 To install the |RCE| API, see :ref:`install-tools`. To configure the API per
115 instance, see the :ref:`rc-tools` section as you need to configure a
115 instance, see the :ref:`rc-tools` section as you need to configure a
116 :file:`~/.rhoderc` file with your |authtokens|.
116 :file:`~/.rhoderc` file with your |authtokens|.
117
117
118 Once you have set up your instance API access, use the following examples to
118 Once you have set up your instance API access, use the following examples to
119 get started.
119 get started.
120
120
121 .. code-block:: bash
121 .. code-block:: bash
122
122
123 # Getting the 'rhodecode' repository
123 # Getting the 'rhodecode' repository
124 # from a RhodeCode Enterprise instance
124 # from a RhodeCode Enterprise instance
125 rhodecode-api --instance-name=enterprise-1 get_repo repoid:rhodecode
125 rhodecode-api --instance-name=enterprise-1 get_repo repoid:rhodecode
126
126
127 Calling method get_repo => http://127.0.0.1:5000
127 Calling method get_repo => http://127.0.0.1:5000
128 Server response
128 Server response
129 {
129 {
130 <json data>
130 <json data>
131 }
131 }
132
132
133 # Creating a new mercurial repository called 'brand-new'
133 # Creating a new mercurial repository called 'brand-new'
134 # with a description 'Repo-description'
134 # with a description 'Repo-description'
135 rhodecode-api --instance-name=enterprise-1 create_repo repo_name:brand-new repo_type:hg description:Repo-description
135 rhodecode-api --instance-name=enterprise-1 create_repo repo_name:brand-new repo_type:hg description:Repo-description
136 {
136 {
137 "error": null,
137 "error": null,
138 "id": 1110,
138 "id": 1110,
139 "result": {
139 "result": {
140 "msg": "Created new repository `brand-new`",
140 "msg": "Created new repository `brand-new`",
141 "success": true,
141 "success": true,
142 "task": null
142 "task": null
143 }
143 }
144 }
144 }
145
145
146 A broken example, what not to do.
146 A broken example, what not to do.
147
147
148 .. code-block:: bash
148 .. code-block:: bash
149
149
150 # A call missing the required arguments
150 # A call missing the required arguments
151 # and not specifying the instance
151 # and not specifying the instance
152 rhodecode-api get_repo
152 rhodecode-api get_repo
153
153
154 Calling method get_repo => http://127.0.0.1:5000
154 Calling method get_repo => http://127.0.0.1:5000
155 Server response
155 Server response
156 "Missing non optional `repoid` arg in JSON DATA"
156 "Missing non optional `repoid` arg in JSON DATA"
157
157
158 You can specify pure JSON using the ``--format`` parameter.
158 You can specify pure JSON using the ``--format`` parameter.
159
159
160 .. code-block:: bash
160 .. code-block:: bash
161
161
162 rhodecode-api --format=json get_repo repoid:rhodecode
162 rhodecode-api --format=json get_repo repoid:rhodecode
163
163
164 In such case only output that this function shows is pure JSON, we can use that
164 In such case only output that this function shows is pure JSON, we can use that
165 and pipe output to some json formatter.
165 and pipe output to some json formatter.
166
166
167 If output is in pure JSON format, you can pipe output to a JSON formatter.
167 If output is in pure JSON format, you can pipe output to a JSON formatter.
168
168
169 .. code-block:: bash
169 .. code-block:: bash
170
170
171 rhodecode-api --instance-name=enterprise-1 --format=json get_repo repoid:rhodecode | python -m json.tool
171 rhodecode-api --instance-name=enterprise-1 --format=json get_repo repoid:rhodecode | python -m json.tool
172
172
173 API METHODS
173 API METHODS
174 -----------
174 -----------
175
175
176 Each method by default required following arguments.
176 Each method by default required following arguments.
177
177
178 .. code-block:: bash
178 .. code-block:: bash
179
179
180 id : "<id_for_response>"
180 id : "<id_for_response>"
181 auth_token : "<auth_token>"
181 auth_token : "<auth_token>"
182 method : "<method name>"
182 method : "<method name>"
183 args : {}
183 args : {}
184
184
185 Use each **param** from docs and put it in args, Optional parameters
185 Use each **param** from docs and put it in args, Optional parameters
186 are not required in args.
186 are not required in args.
187
187
188 .. code-block:: bash
188 .. code-block:: bash
189
189
190 args: {"repoid": "rhodecode"}
190 args: {"repoid": "rhodecode"}
191
191
192 .. Note: From this point on things are generated by the script in
192 .. Note: From this point on things are generated by the script in
193 `scripts/fabfile.py`. To change things below, update the docstrings in the
193 `scripts/fabfile.py`. To change things below, update the docstrings in the
194 ApiController.
194 ApiController.
195
195
196 .. --- API DEFS MARKER ---
196 .. --- API DEFS MARKER ---
197 .. toctree::
197 .. toctree::
198
198
199 methods/repo-methods
199 methods/repo-methods
200 methods/store-methods
200 methods/store-methods
201 methods/license-methods
201 methods/license-methods
202 methods/deprecated-methods
202 methods/deprecated-methods
203 methods/gist-methods
203 methods/gist-methods
204 methods/pull-request-methods
204 methods/pull-request-methods
205 methods/repo-methods
206 methods/repo-group-methods
205 methods/repo-group-methods
207 methods/search-methods
206 methods/search-methods
208 methods/server-methods
207 methods/server-methods
209 methods/user-methods
208 methods/user-methods
210 methods/user-group-methods
209 methods/user-group-methods
@@ -1,311 +1,347 b''
1
1 # Configuration file for the Sphinx documentation builder.
2 #
3 # RhodeCode Enterprise documentation build configuration file, created by
4 # sphinx-quickstart on Tue Nov 4 11:48:37 2014.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
2 #
9 # Note that not all possible configuration values are present in this
3 # For the full list of built-in configuration values, see the documentation:
10 # autogenerated file.
4 # https://www.sphinx-doc.org/en/master/usage/configuration.html
11 #
5
12 # All configuration values have a default; values that are commented out
6 # -- Project information -----------------------------------------------------
13 # serve to show the default.
7 # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
14
8
9 import os
15 import sys
10 import sys
16 import os
17 import datetime
11 import datetime
18 import sphinx_rtd_theme
12
13 # sphinx injects tags magically during build, we re-define it here to make linters happy
14 tags = tags # noqa
19
15
20 # If extensions (or modules to document with autodoc) are in another directory,
16 # If extensions (or modules to document with autodoc) are in another directory,
21 # add these directories to sys.path here. If the directory is relative to the
17 # add these directories to sys.path here. If the directory is relative to the
22 # documentation root, use os.path.abspath to make it absolute, like shown here.
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
23 sys.path.insert(0, os.path.abspath('.'))
19 sys.path.insert(0, os.path.abspath("."))
24 import common
20
21
22 def _get_version():
23 with open("../rhodecode/VERSION") as f:
24 return f.read().strip()
25
26
27 now = datetime.datetime.today()
28
29 # The full project version, used as the replacement for |release| and e.g. in the HTML templates.
30 # For example, for the Python documentation, this may be something like 2.6.0rc1.
31 # If you don’t need the separation provided between version and release, just set them both to the same value.
32 release = _get_version()
33
34 # The major project version, used as the replacement for |version|.
35 # For example, for the Python documentation, this may be something like 2.6.
36 version = ".".join(release.split(".", 2)[:2]) # First two parts of release
37
38
39 # General information about the project.
40 project = "RhodeCode Enterprise"
41 copyright = f"2010-{now.year}, RhodeCode GmbH"
42 author = "RhodeCode GmbH"
25
43
26 # -- General configuration ------------------------------------------------
44 # -- General configuration ------------------------------------------------
27
45
28 # If your documentation needs a minimal Sphinx version, state it here.
46 # If your documentation needs a minimal Sphinx version, state it here.
29 #needs_sphinx = '1.0'
47 # needs_sphinx = '1.0'
30
48
31 # Add any Sphinx extension module names here, as strings. They can be
49 # Add any Sphinx extension module names here, as strings. They can be
32 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33 # ones.
51 # ones.
34 extensions = [
52 extensions = [
35 'sphinx.ext.autodoc',
53 "sphinx.ext.autodoc",
36 'sphinx.ext.intersphinx',
54 "sphinx.ext.intersphinx",
37 'sphinx.ext.todo',
55 "sphinx.ext.todo",
38 'sphinx.ext.imgmath'
56 "sphinx.ext.imgmath",
39 ]
57 ]
40
58
41 intersphinx_mapping = {
59 intersphinx_mapping = {
42 'enterprise': ('https://docs.rhodecode.com/RhodeCode-Enterprise/', None),
60 "enterprise": ("https://docs.rhodecode.com/RhodeCode-Enterprise/", None),
43 'control': ('https://docs.rhodecode.com/RhodeCode-Control/', None),
61 "rcstack": ("https://docs.rhodecode.com/rcstack/", None),
62 "control": ("https://docs.rhodecode.com/RhodeCode-Control/", None),
44 }
63 }
45
64
46 # Add any paths that contain templates here, relative to this directory.
65 # Add any paths that contain templates here, relative to this directory.
47 templates_path = ['_templates']
66 templates_path = ["_templates"]
48
67
49 # The suffix of source filenames.
68 # The suffix of source filenames.
50 source_suffix = '.rst'
69 source_suffix = ".rst"
51
70
52 # The encoding of source files.
71 # The encoding of source files.
53 #source_encoding = 'utf-8-sig'
72 # source_encoding = 'utf-8-sig'
54
73
55 # The master toctree document.
74 # The master toctree document.
56 master_doc = 'index'
75 master_doc = "index"
57
76
58 # The version info for the project you're documenting, acts as replacement for
77 # The version info for the project you're documenting, acts as replacement for
59 # |version| and |release|, also used in various other places throughout the
78 # |version| and |release|, also used in various other places throughout the
60 # built documents.
79 # built documents.
61
80
62
81
63 def _get_version():
64 with open('../rhodecode/VERSION') as f:
65 return f.read().strip()
66
67
68 # The full version, including alpha/beta/rc tags.
69 release = _get_version()
70 # The short X.Y version.
71 version = '.'.join(release.split('.', 2)[:2]) # First two parts of release
72
73 # General information about the project.
74 project = u'RhodeCode Enterprise %s ' % _get_version()
75 copyright = u'2010-{now.year}, RhodeCode GmbH'.format(
76 now=datetime.datetime.today())
77
78
79 # The language for content autogenerated by Sphinx. Refer to documentation
82 # The language for content autogenerated by Sphinx. Refer to documentation
80 # for a list of supported languages.
83 # for a list of supported languages.
81 #language = None
84 # language = None
82
85
83 rst_epilog = common.rst_epilog + """
86 rst_epilog = """
84 .. |async| replace:: asynchronous
87 .. |async| replace:: asynchronous
88 .. |AE| replace:: Appenlight
89 .. |authtoken| replace:: Authentication Token
90 .. |authtokens| replace:: **Auth Tokens**
91 .. |RCCEshort| replace:: Community
92 .. |RCEEshort| replace:: Enterprise
93 .. |git| replace:: Git
94 .. |hg| replace:: Mercurial
95 .. |svn| replace:: Subversion
96 .. |LDAP| replace:: LDAP / Active Directory
97 .. |os| replace:: operating system
98 .. |OS| replace:: Operating System
99 .. |PY| replace:: Python
100 .. |pr| replace:: pull request
101 .. |prs| replace:: pull requests
102 .. |psf| replace:: Python Software Foundation
103 .. |repo| replace:: repository
104 .. |repos| replace:: repositories
105 .. |RCC| replace:: RhodeCode Control
106 .. |RCE| replace:: RhodeCode Enterprise
107 .. |RCCE| replace:: RhodeCode Community
108 .. |RCEE| replace:: RhodeCode Enterprise
109 .. |RCX| replace:: RhodeCode Extensions
110 .. |RCT| replace:: RhodeCode Tools
111 .. |RCEBOLD| replace:: **RhodeCode Enterprise**
112 .. |RCEITALICS| replace:: `RhodeCode Enterprise`
113 .. |RNS| replace:: Release Notes
85 """
114 """
86
115
87 # There are two options for replacing |today|: either, you set today to some
116 # There are two options for replacing |today|: either, you set today to some
88 # non-false value, then it is used:
117 # non-false value, then it is used:
89 #today = ''
118 # today = ''
90 # Else, today_fmt is used as the format for a strftime call.
119 # Else, today_fmt is used as the format for a strftime call.
91 #today_fmt = '%B %d, %Y'
120 # today_fmt = '%B %d, %Y'
92
121
93 # List of patterns, relative to source directory, that match files and
122 # List of patterns, relative to source directory, that match files and
94 # directories to ignore when looking for source files.
123 # directories to ignore when looking for source files.
95 exclude_patterns = [
124 exclude_patterns = [
96 # Special directories
125 # Special directories
97 '_build',
126 "_build",
98 'result',
127 "result",
99
100 # Other RST files
128 # Other RST files
101 'admin/rhodecode-backup.rst',
129 "admin/rhodecode-backup.rst",
102 'issue-trackers/redmine.rst',
130 "issue-trackers/redmine.rst",
103 'known-issues/error-msg-guide.rst',
131 "known-issues/error-msg-guide.rst",
104 'tutorials/docs-build.rst',
132 "tutorials/docs-build.rst",
105 'integrations/example-ext.py',
133 "integrations/example-ext.py",
106 'collaboration/supported-workflows.rst',
134 "collaboration/supported-workflows.rst",
107 ]
135 ]
108
136
109
137
110 # The reST default role (used for this markup: `text`) to use for all
138 # The reST default role (used for this markup: `text`) to use for all
111 # documents.
139 # documents.
112 #default_role = None
140 # default_role = None
113
141
114 # If true, '()' will be appended to :func: etc. cross-reference text.
142 # If true, '()' will be appended to :func: etc. cross-reference text.
115 #add_function_parentheses = True
143 # add_function_parentheses = True
116
144
117 # If true, the current module name will be prepended to all description
145 # If true, the current module name will be prepended to all description
118 # unit titles (such as .. function::).
146 # unit titles (such as .. function::).
119 #add_module_names = True
147 # add_module_names = True
120
148
121 # If true, sectionauthor and moduleauthor directives will be shown in the
149 # If true, sectionauthor and moduleauthor directives will be shown in the
122 # output. They are ignored by default.
150 # output. They are ignored by default.
123 #show_authors = False
151 # show_authors = False
124
152
125 # The name of the Pygments (syntax highlighting) style to use.
153 # The name of the Pygments (syntax highlighting) style to use.
126 pygments_style = 'sphinx'
154 pygments_style = "sphinx"
127
155
128 # A list of ignored prefixes for module index sorting.
156 # A list of ignored prefixes for module index sorting.
129 #modindex_common_prefix = []
157 # modindex_common_prefix = []
130
158
131 # If true, keep warnings as "system message" paragraphs in the built documents.
159 # If true, keep warnings as "system message" paragraphs in the built documents.
132 keep_warnings = tags.has("dev")
160 keep_warnings = tags.has("dev")
133
161
134
162
135 # -- Options for HTML output ----------------------------------------------
163 # -- Options for HTML output ----------------------------------------------
136
164
137 # The theme to use for HTML and HTML Help pages. See the documentation for
165 # The theme to use for HTML and HTML Help pages. See the documentation for
138 # a list of builtin themes.
166 # a list of builtin themes.
139 #html_theme = 'rctheme'
167 html_theme = "furo"
140 html_theme = 'sphinx_rtd_theme'
141
168
142 # Theme options are theme-specific and customize the look and feel of a theme
169 # Theme options are theme-specific and customize the look and feel of a theme
143 # further. For a list of options available for each theme, see the
170 # further. For a list of options available for each theme, see the
144 # documentation.
171 # documentation.
145 #html_theme_options = {}
172 # html_theme_options = {}
146 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
173
147
174
148 # Add any paths that contain custom themes here, relative to this directory.
175 # Add any paths that contain custom themes here, relative to this directory.
149 #html_theme_path = []
176 # html_theme_path = []
150
177
151 # The name for this set of Sphinx documents. If None, it defaults to
178 # The name for this set of Sphinx documents. If None, it defaults to
152 # "<project> v<release> documentation".
179 # "<project> v<release> documentation".
153 #html_title = None
180 # html_title = None
154
181
155 # A shorter title for the navigation bar. Default is the same as html_title.
182 # A shorter title for the navigation bar. Default is the same as html_title.
156 #html_short_title = None
183 # html_short_title = None
157
184
158 # The name of an image file (relative to this directory) to place at the top
185 # The name of an image file (relative to this directory) to place at the top
159 # of the sidebar.
186 # of the sidebar.
160 #html_logo = None
187 # html_logo = None
161 html_sidebars = {
188
162 '**': ['globaltoc.html'],
189
163 }
190 #html_sidebars = {
191 # "**": ["globaltoc.html"],
192 #}
164
193
165 # The name of an image file (within the static path) to use as favicon of the
194 # The name of an image file (within the static path) to use as favicon of the
166 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
195 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
167 # pixels large.
196 # pixels large.
168 html_favicon = 'images/favicon.ico'
197 html_favicon = "images/favicon.ico"
169
198
170 # Add any paths that contain custom static files (such as style sheets) here,
199 # Add any paths that contain custom static files (such as style sheets) here,
171 # relative to this directory. They are copied after the builtin static files,
200 # relative to this directory. They are copied after the builtin static files,
172 # so a file named "default.css" will overwrite the builtin "default.css".
201 # so a file named "default.css" will overwrite the builtin "default.css".
173 html_static_path = ['static/css/add.css']
202 html_static_path = ["static/css/add.css"]
174
203
175 # Add any extra paths that contain custom files (such as robots.txt or
204 # Add any extra paths that contain custom files (such as robots.txt or
176 # .htaccess) here, relative to this directory. These files are copied
205 # .htaccess) here, relative to this directory. These files are copied
177 # directly to the root of the documentation.
206 # directly to the root of the documentation.
178 #html_extra_path = []
207 # html_extra_path = []
179
208
180 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
209 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
181 # using the given strftime format.
210 # using the given strftime format.
182 #html_last_updated_fmt = '%b %d, %Y'
211 html_last_updated_fmt = " %H:%m %b %d, %Y"
183
212
184 # If true, SmartyPants will be used to convert quotes and dashes to
213 # If true, SmartyPants will be used to convert quotes and dashes to
185 # typographically correct entities.
214 # typographically correct entities.
186 #html_use_smartypants = True
215 # html_use_smartypants = True
187
216
188 # Custom sidebar templates, maps document names to template names.
217 # Custom sidebar templates, maps document names to template names.
189 #html_sidebars = {}
218 # html_sidebars = {}
190
219
191 # Additional templates that should be rendered to pages, maps page names to
220 # Additional templates that should be rendered to pages, maps page names to
192 # template names.
221 # template names.
193 #html_additional_pages = {}
222 # html_additional_pages = {}
194
223
195 # If false, no module index is generated.
224 # If false, no module index is generated.
196 #html_domain_indices = True
225 # html_domain_indices = True
197
226
198 # If false, no index is generated.
227 # If false, no index is generated.
199 #html_use_index = True
228 # html_use_index = True
200
229
201 # If true, the index is split into individual pages for each letter.
230 # If true, the index is split into individual pages for each letter.
202 #html_split_index = False
231 # html_split_index = False
203
232
204 # If true, links to the reST sources are added to the pages.
233 # If true, links to the reST sources are added to the pages.
205 #html_show_sourcelink = True
234 # html_show_sourcelink = True
206
235
207 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
236 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
208 #html_show_sphinx = True
237 html_show_sphinx = False
209
238
210 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
239 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
211 #html_show_copyright = True
240 # html_show_copyright = True
212
241
213 # If true, an OpenSearch description file will be output, and all pages will
242 # If true, an OpenSearch description file will be output, and all pages will
214 # contain a <link> tag referring to it. The value of this option must be the
243 # contain a <link> tag referring to it. The value of this option must be the
215 # base URL from which the finished HTML is served.
244 # base URL from which the finished HTML is served.
216 #html_use_opensearch = ''
245 # html_use_opensearch = ''
217
246
218 # This is the file name suffix for HTML files (e.g. ".xhtml").
247 # This is the file name suffix for HTML files (e.g. ".xhtml").
219 #html_file_suffix = None
248 # html_file_suffix = None
220
249
221 # Output file base name for HTML help builder.
250 # Output file base name for HTML help builder.
222 htmlhelp_basename = 'rhodecode-enterprise'
251 htmlhelp_basename = "rhodecode-enterprise"
223
252
224
253
225 # -- Options for LaTeX output ---------------------------------------------
254 # -- Options for LaTeX output ---------------------------------------------
226
255
227 latex_elements = {
256 latex_elements = {
228 'classoptions': ',oneside',
257 "classoptions": ",oneside",
229 'babel': '\\usepackage[english]{babel}',
258 "babel": "\\usepackage[english]{babel}",
230
259 # The paper size ('letterpaper' or 'a4paper').
231 # The paper size ('letterpaper' or 'a4paper').
260 #'papersize': 'letterpaper',
232 #'papersize': 'letterpaper',
261 # The font size ('10pt', '11pt' or '12pt').
233
262 #'pointsize': '10pt',
234 # The font size ('10pt', '11pt' or '12pt').
263 # Additional stuff for the LaTeX preamble.
235 #'pointsize': '10pt',
264 #'preamble': '',
236
237 # Additional stuff for the LaTeX preamble.
238 #'preamble': '',
239 }
265 }
240
266
241 # Grouping the document tree into LaTeX files. List of tuples
267 # Grouping the document tree into LaTeX files. List of tuples
242 # (source start file, target name, title,
268 # (source start file, target name, title,
243 # author, documentclass [howto, manual, or own class]).
269 # author, documentclass [howto, manual, or own class]).
244 latex_documents = [
270 latex_documents = [
245 ('index', 'RhodeCodeEnterprise.tex', u'RhodeCode Enterprise',
271 (
246 u'RhodeCode GmbH', 'manual'),
272 "index",
273 "RhodeCodeEnterprise.tex",
274 "RhodeCode Enterprise",
275 "RhodeCode GmbH",
276 "manual",
277 ),
247 ]
278 ]
248
279
249 # The name of an image file (relative to this directory) to place at the top of
280 # The name of an image file (relative to this directory) to place at the top of
250 # the title page.
281 # the title page.
251 #latex_logo = None
282 # latex_logo = None
252
283
253 # For "manual" documents, if this is true, then toplevel headings are parts,
284 # For "manual" documents, if this is true, then toplevel headings are parts,
254 # not chapters.
285 # not chapters.
255 #latex_use_parts = False
286 # latex_use_parts = False
256
287
257 # If true, show page references after internal links.
288 # If true, show page references after internal links.
258 latex_show_pagerefs = True
289 latex_show_pagerefs = True
259
290
260 # If true, show URL addresses after external links.
291 # If true, show URL addresses after external links.
261 latex_show_urls = 'footnote'
292 latex_show_urls = "footnote"
262
293
263 # Documents to append as an appendix to all manuals.
294 # Documents to append as an appendix to all manuals.
264 #latex_appendices = []
295 # latex_appendices = []
265
296
266 # If false, no module index is generated.
297 # If false, no module index is generated.
267 #latex_domain_indices = True
298 # latex_domain_indices = True
268
299
269 # Mode for literal blocks wider than the frame. Can be
300 # Mode for literal blocks wider than the frame. Can be
270 # overflow, shrink or truncate
301 # overflow, shrink or truncate
271 pdf_fit_mode = "truncate"
302 pdf_fit_mode = "truncate"
272
303
273
304
274 # -- Options for manual page output ---------------------------------------
305 # -- Options for manual page output ---------------------------------------
275
306
276 # One entry per manual page. List of tuples
307 # One entry per manual page. List of tuples
277 # (source start file, name, description, authors, manual section).
308 # (source start file, name, description, authors, manual section).
278 man_pages = [
309 man_pages = [
279 ('index', 'rhodecodeenterprise', u'RhodeCode Enterprise',
310 ("index", "rhodecodeenterprise", "RhodeCode Enterprise", ["RhodeCode GmbH"], 1)
280 [u'RhodeCode GmbH'], 1)
281 ]
311 ]
282
312
283 # If true, show URL addresses after external links.
313 # If true, show URL addresses after external links.
284 #man_show_urls = False
314 # man_show_urls = False
285
315
286
316
287 # -- Options for Texinfo output -------------------------------------------
317 # -- Options for Texinfo output -------------------------------------------
288
318
289 # Grouping the document tree into Texinfo files. List of tuples
319 # Grouping the document tree into Texinfo files. List of tuples
290 # (source start file, target name, title, author,
320 # (source start file, target name, title, author,
291 # dir menu entry, description, category)
321 # dir menu entry, description, category)
292 texinfo_documents = [
322 texinfo_documents = [
293 ('index', 'RhodeCodeEnterprise', u'RhodeCode Enterprise',
323 (
294 u'RhodeCode Docs Team', 'RhodeCodeEnterprise', 'RhodeCode Docs Project',
324 "index",
295 'Miscellaneous'),
325 "RhodeCodeEnterprise",
326 "RhodeCode Enterprise",
327 "RhodeCode Docs Team",
328 "RhodeCodeEnterprise",
329 "RhodeCode Docs Project",
330 "Miscellaneous",
331 ),
296 ]
332 ]
297
333
298 # Documents to append as an appendix to all manuals.
334 # Documents to append as an appendix to all manuals.
299 #texinfo_appendices = []
335 # texinfo_appendices = []
300
336
301 # If false, no module index is generated.
337 # If false, no module index is generated.
302 #texinfo_domain_indices = True
338 # texinfo_domain_indices = True
303
339
304 # How to display URL addresses: 'footnote', 'no', or 'inline'.
340 # How to display URL addresses: 'footnote', 'no', or 'inline'.
305 #texinfo_show_urls = 'footnote'
341 # texinfo_show_urls = 'footnote'
306
342
307 # If true, do not generate a @detailmenu in the "Top" node's menu.
343 # If true, do not generate a @detailmenu in the "Top" node's menu.
308 #texinfo_no_detailmenu = False
344 # texinfo_no_detailmenu = False
309
345
310 # We want to see todo notes in case of a pre-release build of the documentation
346 # We want to see todo notes in case of a pre-release build of the documentation
311 todo_include_todos = tags.has("dev")
347 todo_include_todos = tags.has("dev")
@@ -1,7 +1,11 b''
1 sphinx==1.8.2
1 sphinx==7.2.6
2 six==1.11.0
2
3 sphinx_rtd_theme==0.4.1
3 furo==2023.9.10
4 docutils==0.16.0
4 sphinx-press-theme==0.8.0
5 pygments==2.3.0
5 sphinx-rtd-theme==1.3.0
6 markupsafe==1.0.0
6
7 jinja2==2.9.6
7 pygments==2.16.1
8
9 docutils<0.19
10 markupsafe==2.1.3
11 jinja2==3.1.2
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now