Skip to content

Commit

Permalink
Update build scripts (#3)
Browse files Browse the repository at this point in the history
Setting up automated releases to pypi via hatch
  • Loading branch information
RedTachyon authored Jan 17, 2024
1 parent e45c275 commit 40c6a87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
11 changes: 4 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ shfmt:
- mkdir -p ${PIP_CACHE_DIR}
- python -m venv .venv
- source .venv/bin/activate
- pip install -r requirements.txt
- pip install -e .
- pip install --upgrade pip
- pip install -e .[dev]
cache:
- paths:
- .cache/pip
Expand All @@ -49,10 +49,7 @@ build_sdist:
extends: .base
stage: build
script:
- echo "to be implemented"
# TODO
# - python -m build
# - twine check dist/*
- hatch build
artifacts:
expire_in: 1 week
paths:
Expand All @@ -65,6 +62,6 @@ publish_to_pypi:
needs:
- build_sdist
script:
- python -m twine upload dist/* --non-interactive -u $PYPI_USERNAME -p $PYPI_PASSWORD
- hatch publish -u __token__ -a $PYPI_TOKEN
rules:
- if: $CI_COMMIT_TAG
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ readme = "README.md"
license = ""

dependencies = [
"cogment[generate]>=2.0.0,<3.0.0",
"grpcio>=1.44",
"PyYAML~=6.0.1",
"cogment[generate]>=2.10.1,<3.0.0",
"grpcio>=1.48",
"grpcio-tools>=1.48",
"PyYAML>=5.0",
"starlette>=0.21.0",
"uvicorn>=0.17.6",
"Gymnasium[classic_control]~=0.29",
"PettingZoo~=1.23.1",
"numpy",
"opencv-python>=4.8",
"fastapi>=0.105",
"fastapi>=0.103",
"pillow>=9.0",
]

Expand All @@ -41,21 +42,20 @@ all = [
"pytest-asyncio",
"coltra>=0.2.1",
"torch",
"Grid2Op==1.9.6",
"lightsim2grid",
"numba==0.56.4",
"matplotlib",
"wandb>=0.13.9",
"hatch>=1.9.1",
"ruff>=0.1.7",
"jupyter>=1.0.0",
"jupyterlab>=3.5.3",
]
dev = [
"pytest >=7.1.3",
"pytest>=7.1.3",
"pytest-asyncio",
"ruff>=0.1.7",
"jupyter>=1.0.0",
"jupyterlab>=3.5.3",
"hatch>=1.7.0"
]
coltra = ["coltra>=0.2.1", "torch", "wandb>=0.13.9"]
grid2op = ["Grid2Op==1.9.6", "lightsim2grid", "numba==0.56.4"]

[project.urls]
Homepage = "https://cogment.ai/lab"
Expand Down

0 comments on commit 40c6a87

Please sign in to comment.