Skip to content

Commit bdda390

Browse files
Alan-eMartinCopilotdoctorperceptron
authored
SC-96248 | Python version update for qml v2 (#1520)
## Summary This pull request contains the following changes: - Removes unnecessary dependencies from `pyproject.toml` and leaves only the required QML CLI and build dependencies, and removes makefile - Removes an unused function to sync requirements in poetry. - Add a v1 deprecation warning workflow, to remind author/contributors to migrate demonstrations from `demonstrations/` to `demonstrations_v2` directory. **Automation and Maintenance:** - Added a new GitHub Actions workflow (`.github/workflows/v1-deprecation-warning.yml`) that checks for changes in the deprecated `demonstrations/` directory and comments on pull requests to guide contributors to use `demonstrations_v2/` instead. **Dependency and Build Configuration:** - Updated dependency version pinning in `dependencies/constraints-stable.txt` to use wildcard patch versions (e.g., `pennylane==0.42.*`) for more flexible stable builds. - Removed the Sphinx documentation `Makefile`, simplifying the build process and reducing duplication with other build scripts. - Updated Python version requirements in `pyproject.toml` to allow any version >=3.10.0 and <3.13.0, and reorganized/cleaned up the TOML structure for clarity and maintainability. - Removed the `[tool.poetry.group.executable-dependencies.dependencies]` section from `pyproject.toml`, consolidating dependency management. - Removed the top-level `constraints.txt` file, centralizing dependency constraints elsewhere. - Cleaned up and uncommented dependency blocks in `dependencies/constraints-dev.txt` to reflect the current development pipeline. **Codebase Cleanup:** - Removed a large commented-out block in `lib/qml/lib/demo.py` related to the development install procedure, streamlining the function. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Paul Finlay <50180049+doctorperceptron@users.noreply.github.com>
1 parent e2696ea commit bdda390

11 files changed

Lines changed: 873 additions & 8257 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: V1 Deprecation Warning Check
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
10+
jobs:
11+
check-directory:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
demonstrations-v1-changes-detected: ${{ steps.determine-changes.outputs.demonstrations-v1-changes-detected }}
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Check for deprecated directory changes
22+
id: check
23+
uses: tj-actions/changed-files@v46
24+
with:
25+
files: 'demonstrations/**'
26+
token: ${{ secrets.github_token }}
27+
28+
- name: Determine if changes were made
29+
id: determine-changes
30+
run: |
31+
any_changed="${{ steps.check.outputs.any_changed }}"
32+
any_added="${{ steps.check.outputs.added_files_count }}"
33+
34+
if [[ "$any_changed" == "true" || "$any_added" -ne 0 ]]; then
35+
echo "Changes detected in the demonstrations directory."
36+
echo "demonstrations-v1-changes-detected=true" >> $GITHUB_OUTPUT
37+
38+
else
39+
echo "No changes detected in the demonstrations directory."
40+
echo "demonstrations-v1-changes-detected=false" >> $GITHUB_OUTPUT
41+
fi
42+
43+
44+
- name: Comment on PR
45+
if: steps.determine-changes.outputs.demonstrations-v1-changes-detected == 'true'
46+
uses: XanaduAI/cloud-actions/create-and-update-pull-request-comment@main
47+
with:
48+
github_token: ${{ secrets.github_token }}
49+
comment_uid: v1-deprecation-warning
50+
pull_request_number: ${{ github.event.pull_request.number }}
51+
comment_body: |
52+
### ⚠️ Deprecation Warning ⚠️
53+
You are modifying files in the \`demonstrations/\` directory. This directory is no longer in use.
54+
55+
Please add or move your files to \`demonstrations_v2/\`, and use the following [format](./CONTRIBUTING.md#manually-creating-a-demo):
56+
57+
\`\`\`
58+
your_demo_name/
59+
- demo.py
60+
- metadata.json
61+
- requirements.in (optional)
62+
\`\`\`
63+
64+
For additional information, please refer to the [contributing guidelines](./CONTRIBUTING.md)
File renamed without changes.

Makefile

Lines changed: 0 additions & 89 deletions
This file was deleted.

constraints.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

demonstrations/gbs.metadata.json

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)