Skip to content

Commit a28c56a

Browse files
committed
Attempted path fix
1 parent e28177f commit a28c56a

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

docs/source/conf.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@
158158
linkcode_url = "https://github.com/Stanford-NavLab/gnss_lib_py/blob/" \
159159
+ linkcode_revision + "/{filepath}#L{linestart}-L{linestop}"
160160

161-
print(f'linkcode_revision: {linkcode_revision}')
162-
print(f'linkcode_revision: {main}')
163-
print(f'linkcode_revision: {head}')
164-
print(f'Root file path: {os.path.abspath(gnss_lib_py.__file__)}')
165-
print(f'Root directory: {dirname(gnss_lib_py.__file__)}')
161+
print(f'Root directory: {os.path.join(dirname(os.path.abspath(__file__)), "../..")}')
166162

167163

168164
def linkcode_resolve(domain, info):
@@ -232,9 +228,10 @@ def linkcode_resolve(domain, info):
232228
# of gnss_lib_py and the tests directory adjacent to it
233229

234230
print(f'filepath before: {filepath}')
235-
filepath = relpath(filepath, dirname(gnss_lib_py.__file__))
236-
filepath = os.path.join('gnss_lib_py', filepath)
237-
print(f'filepath after: {filepath}')
231+
root_glp_path = os.path.join(dirname(os.path.abspath(__file__)), '../..')
232+
filepath = relpath(filepath, root_glp_path)
233+
# filepath = os.path.join('gnss_lib_py', filepath)
234+
print(f'filepath after: {os.path.relpath(filepath)}')
238235

239236
if lineno:
240237
linestart = lineno

0 commit comments

Comments
 (0)