158158linkcode_url = "https://github.com/Stanford-NavLab/gnss_lib_py/blob/" \
159159 + linkcode_revision + "/{filepath}#L{linestart}-L{linestop}"
160160
161- print (f'Root directory: { os .path .join (dirname (os .path .abspath (__file__ )), "../.." )} ' )
162161
163162
164163def linkcode_resolve (domain , info ):
@@ -183,9 +182,6 @@ def linkcode_resolve(domain, info):
183182 submod = sys .modules .get (modname )
184183 if submod is None :
185184 return None
186- # print('modname:', modname)
187- # print('fullname:', fullname)
188- # print(f"submod:{submod}")
189185
190186 obj = submod
191187 for part in fullname .split ('.' ):
@@ -223,15 +219,10 @@ def linkcode_resolve(domain, info):
223219 except Exception :
224220 lineno = ""
225221 # The following line of code first finds the relative path from
226- # the location of gnss_lib_py.__init__.py and then adds gnss_lib_py
227- # to the beginning to give the path of that file from the root folder
228- # of gnss_lib_py and the tests directory adjacent to it
222+ # the location of conf.py and then goes up to the root directory
229223
230- print (f'filepath before: { filepath } ' )
231224 root_glp_path = os .path .join (dirname (os .path .abspath (__file__ )), '../..' )
232225 filepath = relpath (filepath , root_glp_path )
233- # filepath = os.path.join('gnss_lib_py', filepath)
234- print (f'filepath after: { os .path .relpath (filepath )} ' )
235226
236227 if lineno :
237228 linestart = lineno
0 commit comments