Skip to content

Commit 3e457cb

Browse files
committed
Co-authored-by: dionhaefner <[email protected]>
Co-authored-by: andrinr <[email protected]> Co-authored-by: nmheim <[email protected]> Co-authored-by: apaleyes <[email protected]>
0 parents  commit 3e457cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+7809
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tesseract_jax/_version.py export-subst

.github/BUG-REPORT.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Bug Report"
2+
description: Report a new bug encountered while using Tesseract-JAX.
3+
type: "Bug"
4+
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: "Description"
10+
description: Please describe your issue in as much detail as necessary. Include relevant information that you think will help us understand the problem.
11+
placeholder: |
12+
A clear and concise description of the bug and what you expected to happen.
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: reprod
18+
attributes:
19+
label: "Steps to reproduce"
20+
description: Please provide detailed steps for reproducing the issue. Include any code snippets or commands that you used when the issue occurred.
21+
placeholder: |
22+
```python
23+
from tesseract_jax import apply_tesseract
24+
...
25+
```
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: logs
31+
attributes:
32+
label: "Logs"
33+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
34+
render: bash
35+
validations:
36+
required: false
37+
38+
- type: dropdown
39+
id: os
40+
attributes:
41+
label: "OS"
42+
description: What is the impacted environment?
43+
multiple: true
44+
options:
45+
- Windows
46+
- Linux
47+
- Mac
48+
validations:
49+
required: true
50+
51+
- type: input
52+
id: tesseractVersion
53+
attributes:
54+
label: Tesseract + Tesseract-JAX version
55+
description: Paste the output of `tesseract --version` and `python -c "import tesseract_jax; print(tesseract_jax.__version__)"` here.
56+
validations:
57+
required: true

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
# global owners will be requested for
4+
# review when someone opens a pull request.
5+
* @dionhaefner @xalelax @apaleyes

.github/FEATURE-REQUEST.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Feature Request"
2+
description: Request a new feature.
3+
type: "Feature"
4+
5+
body:
6+
- type: textarea
7+
id: summary
8+
attributes:
9+
label: "Summary"
10+
description: Provide a brief summary of the requested feature.
11+
placeholder: |
12+
A clear and concise description of what the feature is.
13+
validations:
14+
required: true
15+
16+
- type: textarea
17+
id: neccesity
18+
attributes:
19+
label: "Why is this needed?"
20+
description: Provide an explanation of why this feature is needed. Who is it for? What problem does it solve? Why do none of the existing features solve this problem?
21+
placeholder: |
22+
A clear and concise description of what itch this feature scratches.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: basic_example
28+
attributes:
29+
label: "Usage example"
30+
description: Please describe how end users would interact with the proposed feature. Include any code snippets or output examples that you think will help us understand.
31+
placeholder: |
32+
```python
33+
>>> from tesseract_jax import myfeature
34+
>>> myfeature.do_something()
35+
<desired output>
36+
```
37+
validations:
38+
required: true

.github/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Talk to us
4+
url: https://si-tesseract.discourse.group/
5+
about: Support requests, inquiries, or general chatter related to Tesseracts.

.github/conventional-pr-linter.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- reopened
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
main:
16+
name: Validate PR title
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: amannn/action-semantic-pull-request@v5
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
types: |
24+
fix
25+
feat
26+
doc
27+
perf
28+
refactor
29+
test
30+
chore
31+
ci
32+
security
33+
scopes: |
34+
cli
35+
engine
36+
sdk
37+
example
38+
runtime
39+
deps
40+
requireScope: false

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
timezone: "America/New_York"
10+
open-pull-requests-limit: 10
11+
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"

.github/pull_request_template.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!--
2+
Please use a PR title that conforms to *conventional commits*: "<commit_type>: Describe your change"; for example: "fix: prevent race condition". Some other commit types are: fix, feat, ci, doc, refactor...
3+
For a full list of commit types visit https://www.conventionalcommits.org/en/v1.0.0-beta.2/
4+
-->
5+
6+
#### Relevant issue or PR
7+
<!-- If the changes resolve an issue or follow some other PR, link to them here. Only link something if it is directly relevant. -->
8+
9+
#### Description of changes
10+
<!-- Add a high-level description of changes, focusing on the *what* and *why*. -->
11+
12+
#### Testing done
13+
<!-- Describe how the changes were tested; e.g., "CI passes", "Tested manually in stagingrepo#123", screenshots of a terminal session that verify the changes, or any other evidence of testing the changes. -->
14+
15+
#### License
16+
17+
- [ ] By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license](https://pasteurlabs.github.io/tesseract-jax/LICENSE).
18+
- [ ] I sign the Developer Certificate of Origin below by adding my name and email address to the `Signed-off-by` line.
19+
20+
<details>
21+
<summary><b>Developer Certificate of Origin</b></summary>
22+
23+
```text
24+
Developer Certificate of Origin
25+
Version 1.1
26+
27+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
28+
29+
Everyone is permitted to copy and distribute verbatim copies of this
30+
license document, but changing it is not allowed.
31+
32+
33+
Developer's Certificate of Origin 1.1
34+
35+
By making a contribution to this project, I certify that:
36+
37+
(a) The contribution was created in whole or in part by me and I
38+
have the right to submit it under the open source license
39+
indicated in the file; or
40+
41+
(b) The contribution is based upon previous work that, to the best
42+
of my knowledge, is covered under an appropriate open source
43+
license and I have the right under that license to submit that
44+
work with modifications, whether created in whole or in part
45+
by me, under the same open source license (unless I am
46+
permitted to submit under a different license), as indicated
47+
in the file; or
48+
49+
(c) The contribution was provided directly to me by some other
50+
person who certified (a), (b) or (c) and I have not modified
51+
it.
52+
53+
(d) I understand and agree that this project and the contribution
54+
are public and that a record of the contribution (including all
55+
personal information I submit with it, including my sign-off) is
56+
maintained indefinitely and may be redistributed consistent with
57+
this project or the open source license(s) involved.
58+
```
59+
60+
</details>
61+
62+
Signed-off-by: [YOUR NAME] <[YOUR EMAIL]>

.github/workflows/build_docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build documentation
2+
3+
on:
4+
# run on PRs for validation
5+
pull_request:
6+
7+
# this is used by deploy_pages.yml to do docs build on main
8+
workflow_call:
9+
inputs:
10+
artifact_name:
11+
description: "Name of the artifact to upload"
12+
required: false
13+
type: string
14+
15+
jobs:
16+
test-docs:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Set up Git repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install system requirements
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y pandoc
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v5
30+
with:
31+
enable-cache: true
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version-file: "pyproject.toml"
37+
38+
- name: Restore UV environment
39+
run: cp production.uv.lock uv.lock
40+
41+
- name: Install doc requirements
42+
run: |
43+
uv sync --extra docs --frozen
44+
45+
- name: Build docs
46+
working-directory: docs
47+
run: |
48+
export SPHINXOPTS="-W" # treat warnings as errors
49+
uv run --no-sync make html
50+
51+
- name: Upload HTML files
52+
uses: actions/upload-artifact@v4
53+
if: ${{ inputs.artifact_name }}
54+
with:
55+
name: ${{ inputs.artifact_name }}
56+
path: docs/build/html
57+
if-no-files-found: error
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Bump UV lockfile
2+
3+
on:
4+
workflow_dispatch: # Allows manual trigger
5+
6+
schedule:
7+
- cron: '0 0 * * 1' # 12AM only on Mondays
8+
9+
jobs:
10+
bump-lockfile:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Set up Git repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
19+
with:
20+
enable-cache: true
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version-file: "pyproject.toml"
26+
27+
- name: Update lockfile
28+
run: |
29+
mv production.uv.lock uv.lock
30+
uv lock --upgrade
31+
mv uv.lock production.uv.lock
32+
33+
- name: Generate new requirements.txt
34+
run : |
35+
pip install pre-commit
36+
pre-commit run update-requirements --all-files || true
37+
38+
- name: Detect if changes were made
39+
id: git-diff
40+
run: |
41+
changes=false
42+
git diff --exit-code || changes=true
43+
echo "update_done=$changes" >> $GITHUB_OUTPUT
44+
45+
- name: Create Pull Request
46+
if: steps.git-diff.outputs.update_done == 'true'
47+
uses: peter-evans/create-pull-request@v7
48+
with:
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
commit-message: Update dependencies
51+
title: 📦 Update dependencies
52+
branch: _bot/update-deps
53+
draft: false
54+
base: main
55+
body: |
56+
This PR updates the lockfile to the latest versions of the dependencies.
57+
Please review the changes and merge when ready.
58+
59+
To trigger CI checks, please close and reopen this PR.

0 commit comments

Comments
 (0)