forked from google/temporian
-
Notifications
You must be signed in to change notification settings - Fork 0
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 google#358 from google/docs-contributing-section
add contributing section to docs
- Loading branch information
Showing
9 changed files
with
109 additions
and
72 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
Generates a docs/contributing.md on the fly from the CONTRIBUTING.md and fixes some of the links. | ||
Source: https://github.com/tryolabs/norfair/blob/master/docs/gen_index.py | ||
""" | ||
|
||
import re | ||
|
||
import mkdocs_gen_files | ||
|
||
# read CONTRIBUTING on the root of the repo | ||
with open("CONTRIBUTING.md", "r", encoding="utf-8") as f: | ||
content = f.read() | ||
|
||
# fix links to relative paths under temporian/, benchmark/, docs/ and tools/ | ||
for dir in ["temporian", "benchmark", "docs", "tools"]: | ||
content = re.sub( | ||
rf"\({dir}\/([\w\/-]+)", | ||
rf"(https://github.com/google/temporian/blob/main/{dir}/\1", | ||
content, | ||
) | ||
|
||
# write the file | ||
with mkdocs_gen_files.open("contributing.md", "w") as fd: # | ||
print(content, file=fd) |
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.