Skip to content

Commit

Permalink
Add hatch configuration
Browse files Browse the repository at this point in the history
Used for development. CI will fail for using hatch
as we are installing projects/baselines/requirements.txt
which use mujoco-py and we don't have the build-time dependency
  • Loading branch information
ethanluoyc committed Oct 17, 2023
1 parent 3412bd0 commit a17e2ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 48 deletions.
19 changes: 19 additions & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[envs.default]
python = "3.9"
features = ["jax", "tf", "dev"]
pre-install-commands = [
"pip install -r projects/baselines/requirements.txt",
]
post-install-commands = [
"pip install -e projects/baselines",
]
[envs.default.scripts]
test = "CUDA_VISIBLE_DEVICES='' JAX_DISABLE_MOST_OPTIMIZATIONS=1 pytest -rf --durations=10 {args:corax}"
lint = [
"ruff .",
"black --check --diff .",
]
fmt = [
"ruff --fix .",
"black .",
]
47 changes: 0 additions & 47 deletions projects/baselines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,3 @@ name = "baselines"
version = "0.1.0"
authors = [{ name = "Yicheng Luo", email = "[email protected]" }]
requires-python = ">=3.9"

[tool.black]
line-length = 88
target-version = ['py39', 'py310']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.github
| \.venv
| docs
| third_party
| scratch
)/
'''

[tool.ruff]
line-length = 120
select = [
"E", # pycodestyle
"F", # pyflakes
"I",
]
ignore = ["E731"]
exclude = ["third_party", ".venv"]

[tool.ruff.extend-per-file-ignores]
"__init__.py" = ["F401"]

[tool.ruff.isort]
known-first-party = ["corax", "baselines"]
force-single-line = true
single-line-exclusions = ["typing"]

[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.pyright]
include = ["baselines"]
exclude = ["**/node_modules", "**/__pycache__"]

reportMissingImports = true
reportMissingTypeStubs = false

pythonVersion = "3.9"
pythonPlatform = "Linux"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ exclude = ["third_party", ".venv"]
"__init__.py" = ["F401"]

[tool.ruff.isort]
known-first-party = ["corax"]
known-first-party = ["corax", "baselines"]
force-single-line = true
single-line-exclusions = ["typing"]

Expand Down

0 comments on commit a17e2ff

Please sign in to comment.