Skip to content

Commit 9eec8ce

Browse files
committed
Add GitHub Actions workflows and fix gitignore
- Add CI workflow for linting, testing, and building - Add documentation deployment workflow - Add PyPI publishing workflow - Fix gitignore to allow GitHub Actions workflows - Update README and version
1 parent a383c0c commit 9eec8ce

File tree

8 files changed

+748
-1
lines changed

8 files changed

+748
-1
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
assignees:
6+
- shashijagtap
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible.
12+
- type: input
13+
id: version
14+
attributes:
15+
label: Version
16+
description: What version of SuperQuantX are you running?
17+
placeholder: e.g., 0.1.0
18+
validations:
19+
required: true
20+
- type: dropdown
21+
id: backend
22+
attributes:
23+
label: Quantum Backend
24+
description: Which quantum backend are you using?
25+
options:
26+
- PennyLane
27+
- Qiskit
28+
- Cirq
29+
- AWS Braket
30+
- TKET
31+
- D-Wave Ocean
32+
- Multiple backends
33+
- Not applicable
34+
validations:
35+
required: true
36+
- type: input
37+
id: environment
38+
attributes:
39+
label: Environment
40+
description: What environment are you running in?
41+
placeholder: e.g., Python 3.11, macOS 13.1, Jupyter Notebook
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: what-happened
46+
attributes:
47+
label: What happened?
48+
description: A clear and concise description of what the bug is.
49+
placeholder: Tell us what you see!
50+
validations:
51+
required: true
52+
- type: textarea
53+
id: expected-behavior
54+
attributes:
55+
label: Expected behavior
56+
description: A clear and concise description of what you expected to happen.
57+
placeholder: What should have happened instead?
58+
validations:
59+
required: true
60+
- type: textarea
61+
id: reproduce
62+
attributes:
63+
label: Steps to reproduce
64+
description: Please provide detailed steps to reproduce the issue
65+
placeholder: |
66+
1. Import superquantx
67+
2. Create quantum circuit with...
68+
3. Execute with backend...
69+
4. See error
70+
validations:
71+
required: true
72+
- type: textarea
73+
id: code-sample
74+
attributes:
75+
label: Code sample
76+
description: Please provide a minimal code sample that reproduces the issue
77+
render: python
78+
placeholder: |
79+
import superquantx as sqx
80+
# Your code here
81+
validations:
82+
required: false
83+
- type: textarea
84+
id: error-message
85+
attributes:
86+
label: Error message/traceback
87+
description: If applicable, add the full error message or traceback
88+
render: text
89+
placeholder: Paste the full error message here
90+
validations:
91+
required: false
92+
- type: textarea
93+
id: additional-context
94+
attributes:
95+
label: Additional context
96+
description: Add any other context about the problem here (screenshots, logs, etc.)
97+
validations:
98+
required: false
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Feature Request
2+
description: Suggest an idea for SuperQuantX
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
assignees:
6+
- shashijagtap
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for suggesting a new feature! Please provide as much detail as possible.
12+
- type: dropdown
13+
id: feature-type
14+
attributes:
15+
label: Feature Type
16+
description: What type of feature are you requesting?
17+
options:
18+
- New quantum algorithm
19+
- Backend integration
20+
- API enhancement
21+
- Documentation improvement
22+
- Performance optimization
23+
- Developer tooling
24+
- Other
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: problem
29+
attributes:
30+
label: Problem statement
31+
description: Is your feature request related to a problem? Please describe.
32+
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: solution
37+
attributes:
38+
label: Proposed solution
39+
description: Describe the solution you'd like
40+
placeholder: A clear and concise description of what you want to happen.
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: alternatives
45+
attributes:
46+
label: Alternative solutions
47+
description: Describe alternatives you've considered
48+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
49+
validations:
50+
required: false
51+
- type: dropdown
52+
id: priority
53+
attributes:
54+
label: Priority
55+
description: How important is this feature to you?
56+
options:
57+
- Low - Nice to have
58+
- Medium - Would be helpful
59+
- High - Important for my work
60+
- Critical - Blocking my work
61+
validations:
62+
required: true
63+
- type: textarea
64+
id: use-case
65+
attributes:
66+
label: Use case
67+
description: Describe your specific use case
68+
placeholder: |
69+
Explain how you would use this feature in your quantum computing work.
70+
What problem does it solve for you?
71+
validations:
72+
required: true
73+
- type: textarea
74+
id: additional-context
75+
attributes:
76+
label: Additional context
77+
description: Add any other context, screenshots, research papers, or examples about the feature request here.
78+
validations:
79+
required: false
80+
- type: checkboxes
81+
id: contribution
82+
attributes:
83+
label: Contribution
84+
description: Would you be willing to help implement this feature?
85+
options:
86+
- label: I would be willing to submit a PR for this feature
87+
- label: I can help with testing
88+
- label: I can help with documentation
89+
- label: I can provide domain expertise

.github/workflows/ci.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
PYTHON_VERSION: "3.11"
11+
12+
jobs:
13+
lint:
14+
name: Code Quality
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
25+
- name: Install UV
26+
uses: astral-sh/setup-uv@v3
27+
with:
28+
version: "latest"
29+
30+
- name: Install dependencies
31+
run: |
32+
uv sync --extra dev
33+
uv pip install .
34+
35+
- name: Run ruff linter
36+
run: uv run ruff check .
37+
38+
- name: Run ruff formatter
39+
run: uv run ruff format --check .
40+
41+
- name: Run black formatter check
42+
run: uv run black --check .
43+
44+
- name: Run mypy type checker
45+
run: uv run mypy src/superquantx --ignore-missing-imports
46+
47+
test:
48+
name: Test Suite
49+
runs-on: ${{ matrix.os }}
50+
strategy:
51+
matrix:
52+
os: [ubuntu-latest, windows-latest, macos-latest]
53+
python-version: ["3.10", "3.11", "3.12"]
54+
fail-fast: false
55+
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v4
59+
60+
- name: Set up Python ${{ matrix.python-version }}
61+
uses: actions/setup-python@v4
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
65+
- name: Install UV
66+
uses: astral-sh/setup-uv@v3
67+
with:
68+
version: "latest"
69+
70+
- name: Install dependencies
71+
run: |
72+
uv sync --extra dev
73+
uv pip install .
74+
75+
- name: Run unit tests
76+
run: uv run pytest tests/unit/ -v --cov=superquantx --cov-report=xml --cov-report=term-missing
77+
78+
- name: Run integration tests (no hardware)
79+
run: uv run pytest tests/integration/ -v -m "not quantum_hardware"
80+
81+
- name: Upload coverage to Codecov
82+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
83+
uses: codecov/codecov-action@v3
84+
with:
85+
token: ${{ secrets.CODECOV_TOKEN }}
86+
file: ./coverage.xml
87+
flags: unittests
88+
name: codecov-umbrella
89+
90+
build:
91+
name: Build Package
92+
runs-on: ubuntu-latest
93+
needs: [lint, test]
94+
steps:
95+
- name: Checkout code
96+
uses: actions/checkout@v4
97+
98+
- name: Set up Python
99+
uses: actions/setup-python@v4
100+
with:
101+
python-version: ${{ env.PYTHON_VERSION }}
102+
103+
- name: Install UV
104+
uses: astral-sh/setup-uv@v3
105+
with:
106+
version: "latest"
107+
108+
- name: Install build dependencies
109+
run: |
110+
uv sync --extra dev
111+
uv pip install build twine
112+
113+
- name: Build package
114+
run: uv run python -m build
115+
116+
- name: Check package
117+
run: uv run twine check dist/*
118+
119+
- name: Upload build artifacts
120+
uses: actions/upload-artifact@v3
121+
with:
122+
name: dist
123+
path: dist/
124+
125+
security:
126+
name: Security Scan
127+
runs-on: ubuntu-latest
128+
steps:
129+
- name: Checkout code
130+
uses: actions/checkout@v4
131+
132+
- name: Set up Python
133+
uses: actions/setup-python@v4
134+
with:
135+
python-version: ${{ env.PYTHON_VERSION }}
136+
137+
- name: Install UV
138+
uses: astral-sh/setup-uv@v3
139+
with:
140+
version: "latest"
141+
142+
- name: Install dependencies
143+
run: |
144+
uv sync --extra dev
145+
uv pip install safety bandit[toml]
146+
147+
- name: Run safety check
148+
run: uv run safety check
149+
150+
- name: Run bandit security linter
151+
run: uv run bandit -r src/ --skip B101

0 commit comments

Comments
 (0)