Skip to content

Commit 5bbd921

Browse files
amitnGiniAppsEyal-Danieli
authored andcommitted
Update Python & Sphinx (mlrun#859)
* update Sphinx version * update python to 3.10 and Sphinx 8.1 * upgrade setup-python from v3 to v4 * update python version
1 parent 92f9a04 commit 5bbd921

File tree

5 files changed

+33
-23
lines changed

5 files changed

+33
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ jobs:
6767
uses: actions/checkout@v3
6868
with:
6969
path: functions
70-
# Install python 3.9
71-
- name: Install python 3.9
72-
uses: actions/setup-python@v3
70+
# Install python 3.10.17
71+
- name: Install python 3.10.17
72+
uses: actions/setup-python@v4
7373
with:
74-
python-version: 3.9
74+
python-version: 3.10.17
7575
# Install dependencies
7676
- uses: actions/cache@v3
7777
id: cache

.github/workflows/test-all.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
shell: bash
1515
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
1616
id: myref
17-
17+
1818
- uses: actions/checkout@v4
1919
- id: set-matrix
2020
# This is very hacky, but it goes like that:
@@ -66,11 +66,11 @@ jobs:
6666
uses: actions/checkout@v4
6767
with:
6868
path: functions
69-
# Install python 3.9
70-
- name: Install python 3.9
71-
uses: actions/setup-python@v3
69+
# Install python 3.10.17
70+
- name: Install python 3.10.17
71+
uses: actions/setup-python@v4
7272
with:
73-
python-version: 3.9
73+
python-version: 3.10.17
7474
# Install dependencies
7575
- uses: actions/cache@v3
7676
id: cache
@@ -99,7 +99,7 @@ jobs:
9999
runs-on: ubuntu-latest
100100
needs: run_monorepo_tests
101101
continue-on-error: false
102-
102+
103103
steps:
104104
- name: Get the current branch name
105105
shell: bash
@@ -114,10 +114,10 @@ jobs:
114114
with:
115115
repository: mlrun/marketplace
116116
path: marketplace
117-
- name: Install python 3.9
118-
uses: actions/setup-python@v3
117+
- name: Install python 3.10.17
118+
uses: actions/setup-python@v4
119119
with:
120-
python-version: 3.9
120+
python-version: 3.10.17
121121
- name: Install requirements
122122
run: |
123123
cd functions

cli/marketplace/_static/css/custom.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ html:root {
4343
display: none !important;
4444
}
4545

46-
.bd-header-article,
47-
.article-header-buttons,
48-
.article-header-buttons .dropdown{
49-
height: 100%;
50-
align-items: center;
51-
}
52-
5346
.bd-header-article {
5447
position: relative;
5548
box-shadow: none !important;

cli/marketplace/conf.template

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import re
1515
import sys
16+
import os
1617

1718
sys.path.insert(0, "{{sphinx_docs_target}}")
1819

@@ -28,7 +29,7 @@ master_doc = "index"
2829
# The short X.Y version
2930
version = "{{version}}"
3031
release = "{{release}}"
31-
32+
master_doc = "index"
3233

3334
# -- General configuration ---------------------------------------------------
3435

@@ -72,6 +73,8 @@ source_suffix = {
7273
".md": "myst-nb",
7374
}
7475

76+
# If you want to mock imports during autodoc
77+
autodoc_mock_imports = [{{mock_imports}}]
7578

7679
# -- Options for HTML output -------------------------------------------------
7780

@@ -101,8 +104,13 @@ html_theme_options = {
101104
"launch_buttons": {},
102105
"default_mode": "light",
103106
"switcher": False,
107+
"search_bar_text": "",
108+
"search_bar_position": "none",
104109
}
105110

111+
# Prevents generation of searchindex.js
112+
html_search = False
113+
106114
html_title = "{{html_title}}"
107115
html_logo = "{{html_logo}}"
108116
html_favicon = "{{html_favicon}}"
@@ -125,3 +133,12 @@ def copy_doc(src, dest, title=""):
125133
changed = True
126134
out.write(line)
127135
{% endraw %}
136+
137+
# -- Post-build cleanup ------------------------------------------------------
138+
def remove_searchtools(app, exception):
139+
searchtools_path = os.path.join(app.outdir, '_static', 'searchtools.js')
140+
if os.path.exists(searchtools_path):
141+
os.remove(searchtools_path)
142+
143+
def setup(app):
144+
app.connect("build-finished", remove_searchtools)

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pipenv
66
myst_nb
77
black~=22.0
88
isort~=5.7
9-
sphinx==7.2.6
10-
sphinx-book-theme==1.1.2
9+
sphinx~=8.1.0
10+
sphinx-book-theme~=1.1.3
1111
sphinx-togglebutton==0.3.2
1212
sphinxcontrib-applehelp==1.0.8
1313
sphinxcontrib-devhelp==1.0.6

0 commit comments

Comments
 (0)