-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Instantiation, Linting and GitHub CI (#1)
* Instantiate backends * Add tox and CI * Update CI and README
- Loading branch information
Showing
29 changed files
with
818 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: tox | ||
|
||
on: [ | ||
push, | ||
pull_request, | ||
] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ | ||
ubuntu-latest, | ||
macos-latest, | ||
windows-latest, | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Install package | ||
run: pip install -e . | ||
|
||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [ | ||
"3.10", | ||
"3.12", | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
cache: "pip" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Run tox | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[MESSAGES CONTROL] | ||
disable=too-many-lines, | ||
too-many-locals, | ||
too-many-arguments, | ||
too-many-statements, | ||
too-few-public-methods, | ||
too-many-public-methods, | ||
too-many-instance-attributes, | ||
too-many-positional-arguments, | ||
line-too-long, # no bounded lines | ||
redefined-builtin, # catches __name__ | ||
duplicate-code, # catches __init__ | ||
unused-argument, # catches Gym.Env methods | ||
import-outside-toplevel, # for numerical libraries | ||
not-callable, # catches JAX JIT functions | ||
fixme | ||
|
||
[BASIC] | ||
attr-naming-style=any | ||
variable-naming-style=any | ||
argument-naming-style=any | ||
const-naming-style=UPPER_CASE | ||
method-naming-style=any | ||
function-naming-style=any | ||
class-naming-style=PascalCase | ||
class-attribute-naming-style=snake_case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
[build-system] | ||
requires = ["cython", "setuptools>=61", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
dynamic = ["version"] | ||
name = "quantrl" | ||
authors = [ | ||
{name = "Sampreet Kalita", email = "9553215+Sampreet@users.noreply.github.com"}, | ||
] | ||
maintainers = [ | ||
{name = "Sampreet Kalita", email = "9553215+Sampreet@users.noreply.github.com"}, | ||
] | ||
description = "Quantum Control with Reinforcement Learning" | ||
keywords = [ | ||
"quantum", | ||
"toolbox", | ||
"reinforcement learning", | ||
"python3", | ||
] | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"numpy<2.0.0", | ||
"scipy", | ||
"matplotlib", | ||
"tqdm", | ||
"pillow", | ||
"pandas", | ||
"gymnasium", | ||
"stable-baselines3", | ||
] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
|
||
[project.optional-dependencies] | ||
jax-cpu = [ | ||
"jax", | ||
"diffrax", | ||
] | ||
jax-gpu = [ | ||
"jax[cuda12]", | ||
"diffrax", | ||
] | ||
torch = [ | ||
"torch", | ||
"torchvision", | ||
"torchaudio", | ||
"torchdiffeq", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/sampreet/quantrl" | ||
Repository = "https://github.com/sampreet/quantrl" | ||
Issues = "https://github.com/sampreet/quantrl/issues" | ||
Changelog = "https://github.com/sampreet/quantrl/blob/master/CHANGELOG.md" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["quantrl"] | ||
namespaces = false | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "quantrl.__version__"} | ||
|
||
[tool.tox] | ||
legacy_tox_ini = """ | ||
[tox] | ||
requires = | ||
tox>=4 | ||
virtualenv>=20 | ||
env_list = | ||
lint | ||
[testenv:lint] | ||
description = run pylint under {base_python} | ||
deps = | ||
-r requirements_tox.txt | ||
commands = | ||
pylint quantrl | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""Module to initialize QuantRL.""" | ||
__version__ = "0.0.8" |
Oops, something went wrong.