-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated config files and added pre commit hooks
(cherry picked from commit 28712e6)
- Loading branch information
1 parent
eaa3a9d
commit c0f620b
Showing
11 changed files
with
114 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
|
||
default_language_version: | ||
python: python3.9 | ||
|
||
default_stages: [pre-commit, pre-push] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py39-plus | ||
|
||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.2.1 | ||
hooks: | ||
- id: autoflake | ||
args: [--in-place, --remove-all-unused-imports, --remove-unused-variables, --remove-duplicate-keys, --recursive] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: local | ||
hooks: | ||
- id: coverage | ||
name: coverage | ||
entry: coverage run -m unittest discover tests | ||
language: system | ||
pass_filenames: false | ||
always_run: true | ||
verbose: true | ||
stages: [manual] # pre-push |
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "mpcrl" | ||
version = "1.1.8rc5" | ||
authors = [ | ||
{ name="Filippo Airaldi", email="[email protected]" }, | ||
] | ||
|
@@ -13,12 +12,16 @@ readme = "README.md" | |
requires-python = ">=3.9" | ||
license = { text = "MIT" } | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Scientific/Engineering :: Mathematics" | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
] | ||
dependencies = [ | ||
"typing_extensions >= 4.5.0", | ||
|
@@ -27,15 +30,63 @@ dependencies = [ | |
"scipy >= 1.11.0", | ||
"gymnasium >= 0.28.1", | ||
] | ||
keywords = [ | ||
"reinforcement-learning", | ||
"model-predictive-control", | ||
"optimization", | ||
"casadi", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/FilippoAiraldi/mpc-reinforcement-learning" | ||
"Bug Tracker" = "https://github.com/FilippoAiraldi/mpc-reinforcement-learning/issues" | ||
|
||
[tool.setuptools] | ||
license-files = [ | ||
"LICENSE", | ||
] | ||
license-files = ["LICENSE"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "mpcrl.__version__"} | ||
|
||
[tool.black] | ||
target-version = ["py39", "py310", "py311"] | ||
color = true | ||
|
||
[tool.isort] | ||
profile = "black" | ||
py_version = 39 | ||
|
||
[tool.mypy] | ||
python_version = "3.9" | ||
plugins = ["numpy.typing.mypy_plugin"] | ||
exclude = ["tests"] | ||
|
||
[[tool.mypy.overrides]] | ||
module = [ | ||
"casadi.*", | ||
"csnlp.*", | ||
"matplotlib.*", | ||
"parameterized.*", | ||
"scipy.*", | ||
"mpcrl.*", | ||
] | ||
ignore_missing_imports = true | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
omit = [ | ||
"tests/*", | ||
"examples/*", | ||
"*/csnlp/*", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
"def __repr__", | ||
"def __str__", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"if __name__ == .__main__.:", | ||
"@(abc\\.)?abstractmethod", | ||
] | ||
sort = "miss" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
coverage==7.1.0 | ||
parameterized==0.8.1 | ||
coverage[toml]>=7.3.2 | ||
parameterized>=0.9.0 | ||
--find-links https://download.pytorch.org/whl/torch_stable.html | ||
torch==2.1.0+cpu | ||
torch>=2.1.0+cpu |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
__version__ = "1.1.8" | ||
|
||
__all__ = [ | ||
"Agent", | ||
"ExperienceReplay", | ||
|