Skip to content

Commit b38a203

Browse files
authored
fix images in oneart (#287)
* move ci to ubuntu-latest * switch from imagemagik to inkscape for svg conversion
1 parent 6033b85 commit b38a203

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+907
-418
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on: [push, pull_request]
66

77
jobs:
88
ci:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-python@v2

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Files: source/elements/oneVPL/source/snippets/*.c
5555
Copyright: 2020 Intel Corporation
5656
License: MIT
5757

58-
Files: source/elements/oneART/source/images/*.png source/elements/oneART/source/images/*.jpg source/elements/oneART/source/images/*.pdf source/elements/oneART/source/images/*.ico source/elements/oneART/source/images/*.fig
58+
Files: source/elements/oneART/source/images/*.png source/elements/oneART/source/images/*.jpg source/elements/oneART/source/images/*.pdf source/elements/oneART/source/images/*.ico source/elements/oneART/source/images/*.fig source/elements/oneART/source/images/*.ico source/elements/oneART/source/images/*.svg
5959
Copyright: 2020 Intel Corporation
6060
License: CC-BY-4.0
6161

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ sphinx-prompt
1717
sphinx_substitution_extensions
1818
sphinx_tabs
1919
sphinxcontrib-spelling
20+
sphinxcontrib-svg2pdfconverter
2021
graphviz
2122
lxml

scripts/oneapi.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,20 @@ def remove_elements(l, elements):
239239
return l
240240

241241

242+
@action
243+
def update_oneart(root, target=None):
244+
for component in ['embree', 'ospray']:
245+
copy(
246+
f'repos/{component}/doc/{component}-spec.rst',
247+
'source/elements/oneART/source',
248+
)
249+
for component in ['oidn', 'openvkl']:
250+
copy(
251+
f'repos/{component}/doc/tmp/{component}-spec.rst',
252+
'source/elements/oneART/source',
253+
)
254+
255+
242256
@action
243257
def sort_words(root, target=None):
244258
with open(join('source', 'spelling_wordlist.txt')) as fin:
@@ -259,6 +273,7 @@ def sort_words(root, target=None):
259273
'singlehtml': build,
260274
'prep': prep,
261275
'sort-words': sort_words,
276+
'update-oneart': update_oneart,
262277
}
263278

264279
dirs = [

source/conf/common_conf.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
from os.path import abspath, join
99

1010
import docutils
11+
from pygments import token
12+
from pygments.lexer import RegexLexer
13+
from sphinx.highlighting import lexers
1114

1215
# oneDAL uses custom API generator based on `breathe`.
1316
# Extend path to let Sphinx find `dalapi` module:
@@ -23,11 +26,12 @@
2326
'sphinx.ext.coverage',
2427
'sphinx.ext.mathjax',
2528
'sphinx.ext.ifconfig',
26-
'sphinx.ext.imgconverter',
29+
# 'sphinx.ext.imgconverter',
2730
'sphinx.ext.viewcode',
2831
'sphinx.ext.githubpages',
2932
'sphinx.ext.graphviz',
3033
'sphinxcontrib.spelling',
34+
'sphinxcontrib.inkscapeconverter',
3135
'sphinx-prompt',
3236
'sphinx_substitution_extensions',
3337
'breathe',
@@ -151,6 +155,23 @@ def supsub_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
151155
return [node], []
152156

153157

158+
class BCLLexer(RegexLexer):
159+
name = 'regexp'
160+
161+
tokens = {
162+
'root': [
163+
(r'MyKeyword', token.Keyword),
164+
(r'[a-zA-Z]', token.Name),
165+
(r'\s', token.Text),
166+
]
167+
}
168+
169+
170+
# oneart/oidn uses regexp code tag so make a faker lexer to avoid
171+
# warnings
172+
lexers['regexp'] = BCLLexer(startinline=True)
173+
174+
154175
def setup(app):
155176
app.add_role('supsub', supsub_role)
156177
add_custom_css = getattr(

source/conf/element_conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@
104104
# Grouping the document tree into LaTeX files. List of tuples
105105
# (source start file, target name, title,
106106
# author, documentclass [howto, manual, or own class]).
107+
pro = project.translate(project.maketrans(' ', '-')) # noqa: F821
108+
file_name = f'{pro}-spec.tex'
107109
latex_documents = [
108110
(
109111
master_doc,
110-
project + '-spec.tex', # noqa: F821
112+
file_name,
111113
project + u' Specification', # noqa: F821
112114
u'Intel',
113115
'manual',
135 KB
236 KB
291 KB
269 KB

0 commit comments

Comments
 (0)