Skip to content

Commit

Permalink
docs: update README.md with navigation links and remove redundant badges
Browse files Browse the repository at this point in the history
refactor(docs/conf.py): simplify path handling and use binary mode for reading pyproject.toml
  • Loading branch information
yxlao committed Dec 28, 2024
1 parent 430a429 commit 3d02dc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
</p>
<h1 align="center">CamTools: Camera Tools for Computer Vision</h1>

<p align="center">
<a href="https://camtools.readthedocs.io/"><strong>Docs</strong></a> | <a href="https://github.com/yxlao/camtools"><strong>Source Code</strong></a> | <a href="#installation"><strong>Installation</strong></a>
</p>


[![Formatter](https://github.com/yxlao/camtools/actions/workflows/formatter.yml/badge.svg)](https://github.com/yxlao/camtools/actions/workflows/formatter.yml)
[![Unit Test](https://github.com/yxlao/camtools/actions/workflows/unit_test.yml/badge.svg)](https://github.com/yxlao/camtools/actions/workflows/unit_test.yml)
[![PyPI](https://github.com/yxlao/camtools/actions/workflows/pypi.yml/badge.svg)](https://github.com/yxlao/camtools/actions/workflows/pypi.yml)
[![GitHub](https://img.shields.io/badge/GitHub-323940.svg?style=flat&logo=github&logoColor=959DA5)](https://github.com/yxlao/camtools)
[![Gitee](https://img.shields.io/badge/Gitee-323940.svg?style=flat&logo=gitee&logoColor=959DA5)](https://gitee.com/yxlao/camtools)
[![PyPI](https://img.shields.io/pypi/v/camtools?style=flat&label=PyPI&logo=PyPI&logoColor=959DA5&labelColor=323940&color=808080)](https://pypi.org/project/camtools)
[![Docs](https://readthedocs.org/projects/camtools/badge/?version=latest)](https://camtools.readthedocs.io/en/latest/?badge=latest)

Expand Down
7 changes: 2 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
import subprocess
import tomli

# Get script directory and workspace root
script_dir = os.path.dirname(os.path.abspath(__file__))
workspace_root = os.path.abspath(os.path.join(script_dir, ".."))
sys.path.insert(0, workspace_root)
sys.path.insert(0, os.path.abspath(".."))

# Read version from pyproject.toml
with open(os.path.join(workspace_root, "pyproject.toml"), "r", encoding="utf-8") as f:
with open("../pyproject.toml", "rb") as f:
pyproject = tomli.loads(f.read())
version = pyproject["project"]["version"]

Expand Down

0 comments on commit 3d02dc5

Please sign in to comment.