Skip to content

Commit

Permalink
feat(docs): update README template
Browse files Browse the repository at this point in the history
1. Include current shuttle name (instead of hard coded "Tiny Tapeout 03p5")
2. Include the git repo URL / commit hash
  • Loading branch information
urish committed Oct 17, 2023
1 parent 300a179 commit 1c969fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
25 changes: 3 additions & 22 deletions docs/README_init.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
[![tinytapeout](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/gds.yaml/badge.svg)](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/gds.yaml)
[![verification](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/verification.yaml/badge.svg)](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/verification.yaml)
[![tt_datasheet](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/tt_datasheet.yaml/badge.svg)](https://github.com/tinytapeout/tinytapeout-03/actions/workflows/tt_datasheet.yaml)
[![gl_verification](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/gl_verification.yaml/badge.svg)](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/gl_verification.yaml)
[![formal](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/formal.yaml/badge.svg)](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/formal.yaml)
[![sta](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/sta.yaml/badge.svg)](https://github.com/TinyTapeout/tinytapeout-03/actions/workflows/sta.yaml)
# {name}

# TinyTapeout 03.5
This repository contains the GDS file for the [{name}](https://tinytapeout.com) project. It was generated from {git_repo}@{git_commit}.

* Visit https://tinytapeout.com for more information on the project and how to get involved.
* Read [INFO](INFO.md) for how the project is built and technical project notes.
* Read [Verification](VERIFICATION.md) for how we verify the project.

# Datasheet

[PDF Download](datasheet.pdf).

For the most recent automatic build, click the tt_datasheet badge above, then download the PDF artifact.

# GDS layout of all projects

![tiny tapeout](pics/tinytapeout_numbered.png)

# Project Index
## Project Index

14 changes: 10 additions & 4 deletions documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ def __init__(self, config: Config, projects, args):
# stuff related to docs
def build_index(self):
logging.info("building doc index")
with open(os.path.join(self.script_dir, "docs", "README_init.md")) as fh:
readme = fh.read()
repo = git.Repo(".")
readme = self.load_doc_template("README_init.md")
with open("README.md", "w") as fh:
fh.write(readme)
fh.write(
readme.format(
name=self.config["name"],
git_repo=get_first_remote(repo),
git_commit=repo.head.commit.hexsha,
)
)
fh.write("| Address | Author | Title | Type | Git Repo |\n")
fh.write("| ------- | ------ | ------| -----| ---------|\n")
self.projects.sort(key=lambda x: x.mux_address)
Expand All @@ -51,7 +57,7 @@ def dump_json(self):
fh.write(json.dumps(designs, indent=4))
logging.info(f"wrote json to {self.args.dump_json}")

def load_doc_template(self, name):
def load_doc_template(self, name: str) -> str:
root = os.path.join(self.script_dir, "docs")
doc_path = os.path.join(root, name)
image_root = os.path.relpath(os.path.dirname(doc_path), ".")
Expand Down

0 comments on commit 1c969fe

Please sign in to comment.