-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from ryanharvey1/landing-page
Autogenerate README.md as landing page
- Loading branch information
Showing
12 changed files
with
427 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: neuro_py CI | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy docs | ||
name: Docs | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""Examples copying utility function.""" | ||
|
||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
EXAMPLES_DIRECTORY_PATH = Path("tutorials") | ||
|
||
|
||
def write_file(file_path: Path) -> None: | ||
""" | ||
Copies file from examples directory into mkdocs scope. | ||
Args: | ||
file_path (Path): Current file path. | ||
""" | ||
root_path = file_path.relative_to(".") | ||
print(f"Copying {root_path} file to {root_path}") | ||
with root_path.open("rb") as src, mkdocs_gen_files.open(root_path, "wb") as dst: | ||
dst.write(src.read()) | ||
|
||
|
||
banned_directories = [ | ||
"cache", | ||
"files", | ||
"example_files", | ||
"__pycache__", | ||
"lightning_logs", | ||
] | ||
banned_extensions = [".pbf", ".parquet", ".json", ".geojson", ".pt"] | ||
for i in EXAMPLES_DIRECTORY_PATH.glob("**/*"): | ||
if i.is_file(): | ||
should_copy = True | ||
for banned_extension in banned_extensions: | ||
if banned_extension in i.suffixes: | ||
should_copy = False | ||
break | ||
|
||
for banned_directory in banned_directories: | ||
if banned_directory in i.parts: | ||
should_copy = False | ||
break | ||
|
||
if should_copy: | ||
write_file(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
# neuro-py | ||
<!-- <style> | ||
/* Hide sidebar on homepage */ | ||
.md-sidebar { | ||
display: none; | ||
} | ||
</style> --> | ||
|
||
{% include-markdown "../README.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.