Skip to content

Commit

Permalink
prep pre-alpha (#34)
Browse files Browse the repository at this point in the history
* prepare pre-alpha release

* don't run workflows on draft PRs

* update deps

* fix format workflow
  • Loading branch information
ryanhill1 authored Oct 15, 2024
1 parent 6f3dca7 commit 3019c1e
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Docs
on:
pull_request:
branches: ['main']
types: [opened, reopened, ready_for_review, synchronize]
push:
branches: ['main']
workflow_dispatch:

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: Format
on:
pull_request:
branches: ['main']
types: [opened, reopened, ready_for_review, synchronize]
workflow_dispatch:

jobs:
check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand All @@ -21,8 +23,8 @@ jobs:
python3 -m pip install isort 'black[jupyter]' pylint ruff pylint qbraid-cli
- name: Check isort, ruff, headers
run: |
ruff check qbraid_algorithms examples tests tools
isort --check-only qbraid_algorithms tests tools
black --check qbraid_algorithms tests tools examples --line-length 100
pylint qbraid_algorithms tests tools examples --disable=W0108,W0511,W0401,R0902,E0401 --ignore=qbraid_algorithms/_version.py
qbraid admin headers qbraid_algorithms tests tools --type gpl
ruff check qbraid_algorithms examples tests bin
isort --check-only qbraid_algorithms tests bin
black --check qbraid_algorithms tests bin examples --line-length 100
pylint qbraid_algorithms tests bin examples --disable=W0108,W0511,W0401,R0902,E0401 --ignore=qbraid_algorithms/_version.py
qbraid admin headers qbraid_algorithms tests bin --type gpl
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: CI
on:
pull_request:
branches: ['main']
types: [opened, reopened, ready_for_review, synchronize]
push:
branches: ['main']
workflow_dispatch:

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -35,6 +37,7 @@ jobs:
path: dist/*.whl

test:
if: github.event.pull_request.draft == false
needs: build
runs-on: ${{ matrix.os }}
strategy:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
pypi-publish:
name: Build pre-release dist & upload to PyPI
runs-on: ubuntu-latest
environment: publish
environment: release
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install build dependencies
run: python -m pip install -U pip wheel build toml-cli qbraid-core
Expand All @@ -27,7 +27,7 @@ jobs:
export PRE_RELEASE_VERSION=$(python tools/stamp_pre_release.py)
[[ "$PRE_RELEASE_VERSION" =~ .*(-a\.|-b\.|-rc\.).* ]] && echo "Deploying pre-release version '$PRE_RELEASE_VERSION'" || (echo "not pre-release version"; exit 0)
out_dir="${PWD}/dist"
tools/create_dev_build.sh $PRE_RELEASE_VERSION "${out_dir}"
bin/create_dev_build.sh $PRE_RELEASE_VERSION "${out_dir}"
echo "dir=$out_dir" >> $GITHUB_OUTPUT
- name: Publish package to PyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
pypi-publish:
name: Build dist & upload to PyPI
runs-on: ubuntu-latest
environment: publish
environment: release
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pip install isort ruff qbraid-cli
Run the following and make changes as needed to satisfy format checks:

```bash
isort qbraid_algorithms tests tools
ruff format qbraid_algorithms examples tests tools
qbraid admin headers qbraid_algorithms tests tools --type=gpl --fix
isort qbraid_algorithms tests bin
ruff format qbraid_algorithms examples tests bin
qbraid admin headers qbraid_algorithms tests bin --type=gpl --fix
```
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
<a href="https://pypi.org/project/qbraid-algorithms/">
<img src="https://img.shields.io/pypi/pyversions/qbraid-algorithms.svg?color=blue" alt="PyPI version"/>
</a>
<!-- <a href="https://pepy.tech/project/qbraid-algorithms">
<img src="https://static.pepy.tech/badge/qbraid-algorithms" alt="Downloads"/>
</a> -->
<a href="https://www.gnu.org/licenses/gpl-3.0.html">
<img src="https://img.shields.io/github/license/qBraid/qbraid.svg" alt="License"/>
</a>
Expand All @@ -30,14 +27,14 @@ Python package for building, simulating, and benchmarking hybrid quantum-classic

## Installation

qbraid-algorithms requires Python 3.9 or greater, and can be installed with pip as follows:
qbraid-algorithms requires Python 3.10 or greater, and can be installed with pip as follows:

```bash
pip install qbraid-algorithms
```

| :warning: This project is actively being developed and is not yet available for installation. |
|:---------------------------|
>[!WARNING]
> **This project is "pre-alpha", and is not yet stable or fully realized. Use with caution, as the API and functionality are subject to significant changes.**
### Install from source

Expand All @@ -55,18 +52,20 @@ pip3 install .
You can view the version of qbraid-algorithms you have installed within a Python shell as follows:

```python
In [1]: import qbraid_algorithms
import qbraid_algorithms

In [2]: qbraid_algorithms.__version__
qbraid_algorithms.__version__
```

## Community

**We are actively looking for new contributors!**

- Interested in contributing code, or making a PR? See
[CONTRIBUTING.md](CONTRIBUTING.md)
- For feature requests and bug reports: [Submit an issue](https://github.com/qBraid/qbraid-algorithms/issues)
- For discussions and/or specific questions about qBraid services, [join our discord community](https://discord.gg/TPBU2sa8Et)
- For questions that are more suited for a forum, post to [Stack Overflow](https://stackoverflow.com/) with the [`qbraid`](https://stackoverflow.com/questions/tagged/qbraid) tag.
- For questions that are more suited for a forum, post to [Stack Exchange](https://quantumcomputing.stackexchange.com/) with the [`qbraid`](https://quantumcomputing.stackexchange.com/questions/tagged/qbraid) tag.
- By participating, you are expected to uphold our [code of conduct](CODE_OF_CONDUCT).

## Acknowledgements
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 13 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
[build-system]
requires = ["setuptools >= 61.0", "setuptools_scm"]
requires = ["setuptools>=61.0", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "qbraid-algorithms"
version = "0.1.0-alpha"
version = "0.0.0"
authors = [{name = "qBraid Development Team"}, {email = "[email protected]"}]
description = "Python package for building, simulating, and benchmarking hybrid quantum-classical algorithms."
readme = "README.md"
requires-python = ">=3.10"
keywords = ["qbraid", "quantum", "algorithms", "qml"]
license = {text = "GNU General Public License v3.0"}
classifiers = [
"Development Status :: 3 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics"
"Topic :: Scientific/Engineering :: Physics",
"Typing :: Typed",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
dependencies = ["torch>=2.3,<3.0", "numpy>=1.17,<2.2", "scipy>=1.13.1,<1.15", "bloqade>=0.15.12,<0.16", "scikit-learn>=1.5.0,<1.6.0"]
dependencies = ["torch>=2.3,<3.0", "numpy>=1.17,<2.2", "scipy>=1.13.1,<1.15.0", "bloqade>=0.15.12,<0.16", "scikit-learn>=1.5.0,<1.6.0"]

[project.urls]
Homepage = "https://github.com/qBraid/qbraid-algorithms"
Expand All @@ -37,7 +44,7 @@ Discord = "https://discord.gg/TPBU2sa8Et"
visualization = ["matplotlib"]
test = ["pytest", "pytest-cov"]
lint = ["isort", "ruff", "qbraid-cli"]
docs = ["sphinx>=7.4,<8.2", "sphinx-autodoc-typehints>=1.24,<2.6", "sphinx-rtd-theme~=3.0.1", "docutils<0.22", "sphinx-copybutton"]
docs = ["sphinx>=7.4,<8.2", "sphinx-autodoc-typehints>=1.24,<2.6", "sphinx-rtd-theme>=2.0.0,<3.0.2", "docutils<0.22", "sphinx-copybutton"]

[tool.setuptools_scm]
write_to = "qbraid_algorithms/_version.py"
Expand Down
2 changes: 1 addition & 1 deletion qbraid_algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Injected in _version.py during the build process.
from ._version import __version__ # type: ignore
except ImportError:
__version__ = ""
__version__ = "dev"


__all__ = ["datasets", "esn", "qrc"]

0 comments on commit 3019c1e

Please sign in to comment.