Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 28, 2023
1 parent 850b364 commit 415d964
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ help:
clean:
rm -r $(BUILDDIR)
rm -r md
rm -r $(SOURCEDIR)/_generated
rm -r $(SOURCEDIR)/_generated
2 changes: 1 addition & 1 deletion docs/markdown/spline_plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ gus.show(

This does not need to be only from 2D->3D but can also be from 1D->2D etc.

This is just the beginning of what you can do with the given plotting and creation capabilities in this library. Please look into the [examples folder](https://github.com/tataratat/splinepy/example) to see more capabilities.
This is just the beginning of what you can do with the given plotting and creation capabilities in this library. Please look into the [examples folder](https://github.com/tataratat/splinepy/example) to see more capabilities.
12 changes: 8 additions & 4 deletions docs/source/handle_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
# Path to this file.
file_path = os.path.abspath(os.path.dirname(__file__))
original_cwd = os.getcwd()
repo_root = str(
pathlib.Path(__file__).resolve()).split("docs")[0]
repo_root = str(pathlib.Path(__file__).resolve()).split("docs")[0]
os.chdir(repo_root)


def get_markdown_links(line: str) -> str:
"""Get the markdown links from a string.
Expand Down Expand Up @@ -139,8 +139,12 @@ def process_file(
elif not relative_links: # generate links to github repo
new_path = get_github_path_from(pathlib.Path(item[1]).resolve())
else: # generate relative links
common_sub_path, steps_back = get_common_parent(item[1], folder_to_save_to)
new_path = "../"*steps_back + str(pathlib.Path(item[1]).resolve().relative_to(common_sub_path))
common_sub_path, steps_back = get_common_parent(
item[1], folder_to_save_to
)
new_path = "../" * steps_back + str(
pathlib.Path(item[1]).resolve().relative_to(common_sub_path)
)
content = content.replace(item[1], str(new_path))

os.chdir(original_cwd)
Expand Down

0 comments on commit 415d964

Please sign in to comment.