Skip to content

Commit ebde8b8

Browse files
authored
Merge pull request #1 from roboflow/repo/initial-setup
feat(GTR): A barebones repository setup for GTR
2 parents d1ee007 + 8e4c3f3 commit ebde8b8

File tree

10 files changed

+202
-159
lines changed

10 files changed

+202
-159
lines changed

.github/workflows/build-docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- .github/workflows/build-docs.yml
8+
- gtr/**
9+
- mkdocs.yml
10+
- docs/**
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
16+
jobs:
17+
build-docs:
18+
name: Build Docs
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v4
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version-file: ".python-version"
31+
32+
- name: Cache
33+
uses: actions/cache@v4
34+
with:
35+
key: ${{ github.ref }}
36+
path: .cache
37+
38+
- name: Install the project
39+
run: |
40+
uv sync --all-extras --dev
41+
uv pip install -e ".[docs]"
42+
43+
- name: Build Docs
44+
run: uv run mkdocs gh-deploy --force

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
branches: main
5+
paths:
6+
- .github/workflows/test.yml
7+
- gtr/**
8+
- pyproject.toml
9+
- Makefile
10+
- .python-version
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version-file: ".python-version"
27+
28+
- name: Install the project
29+
run: |
30+
uv sync --all-extras --dev
31+
uv pip install -e .
32+
33+
- name: Link & Format Check
34+
run: make check_code_quality

.gitignore

Lines changed: 3 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -3,130 +3,6 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
build/
12-
develop-eggs/
13-
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
27-
MANIFEST
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
38-
39-
# Unit test / coverage reports
40-
htmlcov/
41-
.tox/
42-
.nox/
43-
.coverage
44-
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
*.py,cover
50-
.hypothesis/
51-
.pytest_cache/
52-
cover/
53-
54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
71-
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
.pybuilder/
76-
target/
77-
78-
# Jupyter Notebook
79-
.ipynb_checkpoints
80-
81-
# IPython
82-
profile_default/
83-
ipython_config.py
84-
85-
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
89-
90-
# pipenv
91-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94-
# install all needed dependencies.
95-
#Pipfile.lock
96-
97-
# UV
98-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
#uv.lock
102-
103-
# poetry
104-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105-
# This is especially recommended for binary packages to ensure reproducibility, and is more
106-
# commonly ignored for libraries.
107-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108-
#poetry.lock
109-
110-
# pdm
111-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112-
#pdm.lock
113-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114-
# in version control.
115-
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116-
.pdm.toml
117-
.pdm-python
118-
.pdm-build/
119-
120-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121-
__pypackages__/
122-
123-
# Celery stuff
124-
celerybeat-schedule
125-
celerybeat.pid
126-
127-
# SageMath parsed files
128-
*.sage.py
129-
1306
# Environments
1317
.env
1328
.venv
@@ -136,39 +12,8 @@ ENV/
13612
env.bak/
13713
venv.bak/
13814

139-
# Spyder project settings
140-
.spyderproject
141-
.spyproject
142-
143-
# Rope project settings
144-
.ropeproject
145-
146-
# mkdocs documentation
147-
/site
148-
149-
# mypy
150-
.mypy_cache/
151-
.dmypy.json
152-
dmypy.json
153-
154-
# Pyre type checker
155-
.pyre/
156-
157-
# pytype static type analyzer
158-
.pytype/
159-
160-
# Cython debug symbols
161-
cython_debug/
162-
163-
# PyCharm
164-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166-
# and can be added to the global gitignore or merged into this file. For a more nuclear
167-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168-
#.idea/
169-
170-
# Ruff stuff:
15+
# Ruff stuff
17116
.ruff_cache/
17217

173-
# PyPI configuration file
174-
.pypirc
18+
# uv stuff
19+
uv.lock

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.PHONY: style check_code_quality
2+
3+
export PYTHONPATH = .
4+
check_dirs := gtr
5+
6+
style:
7+
uv run ruff format $(check_dirs)
8+
uv run ruff check --select I --fix
9+
10+
link:
11+
uv run ruff check --fix
12+
13+
check_code_quality:
14+
uv run ruff check $(check_dirs)
15+
# check sort
16+
uv run ruff check -e
17+
uv run ruff check --select I -e
18+
19+
publish:
20+
uv build
21+
uv publish --token $UV_PUBLISH_TOKEN

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# GTR
1+
# trackers
2+
23
A unified library for object tracking

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GTR
2+
3+
A unified library for object tracking

gtr/__init__.py

Whitespace-only changes.

mkdocs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
site_name: trackers
2+
3+
theme:
4+
name: material
5+
palette:
6+
# Palette toggle for light mode
7+
- scheme: default
8+
toggle:
9+
icon: material/brightness-7
10+
name: Switch to dark mode
11+
# Palette toggle for dark mode
12+
- scheme: slate
13+
toggle:
14+
icon: material/brightness-4
15+
name: Switch to light mode
16+
features:
17+
- content.code.annotate
18+
- content.code.copy
19+
- content.code.select
20+
- content.tabs.link
21+
- content.tooltips
22+
- navigation.tracking
23+
24+
plugins:
25+
- mkdocstrings
26+
- search
27+
- minify
28+
- glightbox
29+
- mkdocs-jupyter:
30+
include_source: True
31+
32+
markdown_extensions:
33+
- attr_list
34+
- pymdownx.emoji:
35+
emoji_index: !!python/name:material.extensions.emoji.twemoji
36+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
37+
- pymdownx.arithmatex:
38+
generic: true
39+
- pymdownx.highlight:
40+
anchor_linenums: true
41+
line_spans: __span
42+
pygments_lang_class: true
43+
- pymdownx.tabbed:
44+
alternate_style: true
45+
- pymdownx.details
46+
- pymdownx.inlinehilite
47+
- pymdownx.snippets
48+
- pymdownx.superfences
49+
- admonition
50+
- attr_list
51+
- md_in_html
52+
53+
nav:
54+
- Home: 'index.md'
55+
56+
repo_url: https://github.com/roboflow/trackers

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[project]
2+
name = "trackers"
3+
version = "0.0.1"
4+
description = "A unified library for object tracking"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"supervision>=0.25.1",
9+
]
10+
11+
[project.optional-dependencies]
12+
dev = [
13+
"uv>=0.4.20",
14+
"pytest>=8.3.3",
15+
"isort>=5.13.2",
16+
"black>=24.10.0",
17+
"ruff>=0.6.9",
18+
]
19+
docs = [
20+
"mkdocs>=1.6.1",
21+
"mkdocstrings>=0.26.1",
22+
"mkdocstrings-python>=1.11.1",
23+
"mkdocs-material>=9.5.39",
24+
"mkdocs-minify-plugin>=0.8.0",
25+
"mkdocs-glightbox>=0.4.0",
26+
"mkdocs-jupyter>=0.25.0",
27+
"jupyter>=1.1.1",
28+
]
29+
30+
[build-system]
31+
requires = ["hatchling"]
32+
build-backend = "hatchling.build"
33+
34+
[tool.hatch.build.targets.wheel]
35+
packages = ["trackers"]
36+
37+
[tool.ruff]
38+
target-version = "py313"

0 commit comments

Comments
 (0)