Skip to content

Commit ccc9e77

Browse files
authored
Initial commit
0 parents  commit ccc9e77

36 files changed

+1228
-0
lines changed

.devcontainer/devcontainer.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hostRequirements": {
3+
"cpus": 4,
4+
"memory": "16gb",
5+
"storage": "32gb"
6+
},
7+
"name": "Python Development Container",
8+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
9+
"features": {
10+
"ghcr.io/devcontainers/features/python": {
11+
"version": "3.10"
12+
}
13+
},
14+
"postCreateCommand": "bash .github/setup.sh"
15+
}
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "\U0001F41B Bug Report"
2+
description: Submit a bug report to help us improve
3+
title: "[BUG]: "
4+
projects:
5+
- "project-name"
6+
labels:
7+
- bug
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this bug report!
13+
Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/project-name/issues) before submitting a new one.
14+
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Description
19+
description: A clear and concise description of what the bug is.
20+
placeholder: |
21+
When I try to...
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: reproduction
27+
attributes:
28+
label: Reproduction
29+
description: |
30+
Provide a numbered list of steps that one can follow to reproduce this behavior.
31+
placeholder: |
32+
Steps to reproduce the behavior:
33+
1.
34+
2.
35+
3.
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: logs
41+
attributes:
42+
label: Relevant log output
43+
description: |
44+
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
45+
render: shell
46+
validations:
47+
required: false
48+
49+
- type: textarea
50+
id: expected-behavior
51+
attributes:
52+
label: Expected behavior
53+
description: A clear description of what you would expect to happen.
54+
placeholder: "I would expect to..."
55+
validations:
56+
required: true
57+
58+
- type: textarea
59+
id: system-info
60+
attributes:
61+
label: System Info
62+
description: Please share your system info with us.
63+
placeholder: |
64+
- OS: [e.g., macOS Sonoma]
65+
- Project-name version: [e.g. commit SHA]
66+
validations:
67+
required: true
68+
69+
- type: checkboxes
70+
id: search
71+
attributes:
72+
label: Have you searched for similar issues before submitting this one?
73+
options:
74+
- label: Yes, I have searched for similar issues
75+
required: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "\U0001F680 Feature Request"
2+
description: Suggest an idea for this project
3+
title: "[FEATURE]: "
4+
projects:
5+
- "Project-name"
6+
labels:
7+
- enhancement
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this form!
13+
Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/project-name/issues) before submitting a new one.
14+
15+
- type: textarea
16+
id: motivation
17+
attributes:
18+
label: Motivation
19+
description: |
20+
A clear and concise description of the proposal and why this is important.
21+
placeholder: |
22+
I'm always frustrated when...
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Alternatives
30+
description: |
31+
A clear and concise description of any alternative solutions or features you've considered.
32+
placeholder: |
33+
I've considered...
34+
validations:
35+
required: false
36+
37+
- type: textarea
38+
id: contribution
39+
attributes:
40+
label: Contribution
41+
description: |
42+
Is there any way that you could help, e.g. by submitting a PR?
43+
Make sure to read the [contribution guidelines](https://github.com/mozilla-ai/project-name/blob/main/CONTRIBUTING.md).
44+
placeholder: |
45+
I could help by...
46+
validations:
47+
required: false
48+
49+
- type: checkboxes
50+
id: search
51+
attributes:
52+
label: Have you searched for similar issues before submitting this one?
53+
options:
54+
- label: Yes, I have searched for similar issues
55+
required: true

.github/pull_request_template.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# What's changing
2+
3+
Provide a clear and concise description of the content changes you're proposing. List all the
4+
changes you are making to the content.
5+
6+
> If this PR is related to an issue or closes one, please link it here.
7+
8+
Refs #...
9+
Closes #...
10+
11+
# How to test it
12+
13+
Steps to test the changes:
14+
15+
1.
16+
2.
17+
3.
18+
19+
# Additional notes for reviewers
20+
21+
Anything you'd like to add to help the reviewer understand the changes you're proposing.
22+
23+
# I already...
24+
25+
- [ ] Tested the changes in a working environment to ensure they work as expected
26+
- [ ] Added some tests for any new functionality
27+
- [ ] Updated the documentation (both comments in code and under `/docs`)

.github/setup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
2+
python -m pip install -e .
3+
python -m pip install --upgrade streamlit

.github/workflows/docs.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- mkdocs.yml
8+
- 'docs/**'
9+
- 'src/**'
10+
pull_request:
11+
paths:
12+
- mkdocs.yml
13+
- 'docs/**'
14+
- 'src/**'
15+
workflow_dispatch:
16+
17+
jobs:
18+
docs:
19+
permissions:
20+
contents: write
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out the repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.10'
32+
cache: "pip"
33+
34+
- name: Configure git
35+
run: |
36+
git config user.name 'github-actions[bot]'
37+
git config user.email 'github-actions[bot]@users.noreply.github.com'
38+
39+
- name: Install requirements
40+
run: pip install -e '.[docs]'
41+
42+
- name: Build docs
43+
if: github.event_name == 'pull_request'
44+
run: mkdocs build -s
45+
46+
- name: Publish docs
47+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
48+
run: mkdocs gh-deploy

.github/workflows/lint.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
run-linter:
11+
timeout-minutes: 30
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out the repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Install pre-commit
24+
run: pip install pre-commit
25+
26+
- uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pre-commit/
29+
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
30+
31+
- name: pre-commit
32+
run: pre-commit run --all-files

.github/workflows/package.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Create and publish a Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags:
8+
- 'v*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Log in to DockerHub
19+
uses: docker/login-action@v3
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
24+
- name: Extract metadata (tags, labels) for Docker
25+
id: meta
26+
uses: docker/metadata-action@v5
27+
with:
28+
images: mzdotai/blueprint
29+
flavor: |
30+
latest=auto
31+
32+
- name: Build and push Docker image
33+
id: push
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: .
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
environment: pypi
11+
permissions:
12+
contents: read
13+
id-token: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out the repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.10'
25+
26+
- name: Upgrade pip
27+
run: |
28+
pip install --upgrade pip
29+
pip --version
30+
31+
- name: Install
32+
run: python -m pip install build setuptools
33+
34+
- name: Build package
35+
run: python -m build
36+
37+
- name: Upload package
38+
if: github.event_name == 'release'
39+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
pull_request:
10+
paths:
11+
- 'src/**'
12+
- 'tests/**'
13+
workflow_dispatch:
14+
15+
jobs:
16+
run-tests:
17+
timeout-minutes: 30
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Check out the repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.10'
28+
cache: "pip"
29+
30+
- name: Install
31+
run: pip install -e '.[tests]'
32+
33+
- name: Run tests
34+
run: pytest -v tests

0 commit comments

Comments
 (0)