Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 14 additions & 24 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the latest version of uv.
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install non-python build dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
Expand All @@ -47,52 +43,48 @@ jobs:
needs: test_repo
runs-on: macos-latest
steps:
- name: Setup Python 3.10 env
uses: actions/setup-python@v5
- name: Install Python 3.10 with uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
- name: Ensure latest pip, wheel & setuptools
run: python -m pip install -q --upgrade pip wheel setuptools
- uses: actions/checkout@v4
- name: Generate sdist
run: |
NLE_RELEASE_BUILD=1 python setup.py sdist
NLE_RELEASE_BUILD=1 uv build --sdist
- name: Install from sdist
run: |
SDISTNAME=$(ls dist/)
MODE="[all]"
pip install "dist/$SDISTNAME$MODE"
uv pip install "dist/$SDISTNAME$MODE"
- name: Run tests outside repo dir
run: |
REPONAME=$(basename $PWD)
pushd ..
python -m pytest --import-mode=append -svx $REPONAME/nle/tests
uv run pytest --import-mode=append -svx $REPONAME/nle/tests
popd
test_sdist_3_13:
name: Test sdist on MacOS w/ Py3.13
needs: test_repo
runs-on: macos-latest
steps:
- name: Setup Python 3.13 env
uses: actions/setup-python@v5
- name: Install Python 3.13 with uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.13
- name: Ensure latest pip, wheel & setuptools
run: python -m pip install -q --upgrade pip wheel setuptools
- uses: actions/checkout@v4
- name: Generate sdist
run: |
NLE_RELEASE_BUILD=1 python setup.py sdist
NLE_RELEASE_BUILD=1 uv build --sdist
- name: Install from sdist
run: |
SDISTNAME=$(ls dist/)
MODE="[all]"
pip install "dist/$SDISTNAME$MODE"
uv pip install "dist/$SDISTNAME$MODE"
- name: Run tests outside repo dir
run: |
REPONAME=$(basename $PWD)
pushd ..
python -m pytest --import-mode=append -svx $REPONAME/nle/tests
uv run pytest --import-mode=append -svx $REPONAME/nle/tests
popd
- name: Save sdist
if: ${{ always() }}
Expand Down Expand Up @@ -134,12 +126,10 @@ jobs:
needs: build_wheels
runs-on: ubuntu-latest
steps:
- name: Setup Python 3.13 env
uses: actions/setup-python@v5
- name: Install Python 3.13 with uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.13
- name: Ensure latest pip, wheel & setuptools
run: python -m pip install -q --upgrade pip wheel tools
- uses: actions/checkout@v4
- name: Get wheels artifacts
uses: actions/download-artifact@v4
Expand All @@ -150,12 +140,12 @@ jobs:
run: |
WHEELNAME=$(ls dist/*313*manylinux*x86_64*.whl)
MODE="[all]"
pip install "$WHEELNAME$MODE"
uv pip install "$WHEELNAME$MODE"
- name: Run tests outside repo dir
run: |
REPONAME=$(basename $PWD)
pushd ..
python -m pytest --import-mode=append -svx $REPONAME/nle/tests
uv run pytest --import-mode=append -svx $REPONAME/nle/tests
popd

# Use prereleases to test publish the artefacts to testpypi
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ nle-ttyplay = "nle.scripts.ttyplay:main"
nle-ttyplay2 = "nle.scripts.ttyplay2:main"
nle-read-tty = "nle.scripts.read_tty:main"

[dependency-groups]
dev = ["nle[dev]"]

[project.optional-dependencies]
agent = ["torch>=1.3.1"]
all = ["nle[agent]"]

[dependency-groups]
dev = [
"nle[agent]",
"pre-commit>=2.0.1",
"isort>=5.13.2",
"cmake_format>=0.6.10",
Expand All @@ -53,7 +54,6 @@ dev = [
"setuptools>=69.5.1",
"ruff==0.4.3",
]
all = ["nle[agent,dev]"]

[tool.black]
line-length = 88
Expand Down
47 changes: 18 additions & 29 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.