From 32829d51f5c15f75405381cd07de93a49da38d8d Mon Sep 17 00:00:00 2001 From: Guillem DB Date: Fri, 30 Aug 2024 16:44:07 +0200 Subject: [PATCH] Temporary disable pypi upload --- .github/workflows/push.yml | 95 ++++++++++++++++++++------------------ Makefile | 4 +- pyproject.toml | 2 +- 3 files changed, 53 insertions(+), 48 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c2068c9..e98ad17 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -139,6 +139,7 @@ jobs: set -x rye install bump2version rye install twine + rye install uv - name: Create unique version for test.pypi run: | @@ -154,32 +155,34 @@ jobs: rye build --clean twine check dist/* - - name: Publish package to TestPyPI - env: - TEST_PYPI_PASS: ${{ secrets.TEST_PYPI_PASS }} - if: "'$TEST_PYPI_PASS' != ''" - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_PASS }} - repository-url: https://test.pypi.org/legacy/ - skip-existing: true +# - name: Publish package to TestPyPI +# env: +# TEST_PYPI_PASS: ${{ secrets.TEST_PYPI_PASS }} +# if: "'$TEST_PYPI_PASS' != ''" +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# password: ${{ secrets.TEST_PYPI_PASS }} +# repository-url: https://test.pypi.org/legacy/ +# skip-existing: true - name: Install dependencies run: | set -x - sudo apt-get install -y xvfb python-opengl ffmpeg + sudo apt-get install -y xvfb sudo MUJOCO_PATH=/home/runner/.mujoco/ make install-envs - rye lock - pip install uv - ROM_PASSWORD=${{ secrets.ROM_PASSWORD }} make import-roms - uv pip install --no-cache --system -r requirements.lock + rye lock --all-features + uv pip install -r requirements.lock uv pip install dist/*.whl + ROM_PASSWORD=${{ secrets.ROM_PASSWORD }} uv run import_retro_roms.py + - name: Test package run: | set -x rm -rf $PROJECT_DIR - xvfb-run -s "-screen 0 1400x900x24" rye run test + find . -name "*.pyc" -delete + PYVIRTUALDISPLAY_DISPLAYFD=0 SKIP_CLASSIC_CONTROL=1 xvfb-run -s "-screen 0 1400x900x24" uv run pytest -n auto -s -o log_cli=true -o log_cli_level=info tests + PYVIRTUALDISPLAY_DISPLAYFD=0 xvfb-run -s "-screen 0 1400x900x24" uv run pytest -s -o log_cli=true -o log_cli_level=info tests/control/test_classic_control.py bump-version: name: Bump package version @@ -214,34 +217,34 @@ jobs: login: "${{ env.bot_name }}" token: "${{ secrets.BOT_AUTH_TOKEN }}" - release-package: - name: Release PyPI package - env: - PYPI_PASS: ${{ secrets.PYPI_PASS }} - if: "contains(github.event.head_commit.message, 'Bump version') && github.ref == 'refs/heads/master' && '$PYPI_PASS' != ''" - runs-on: ubuntu-20.04 - steps: - - name: actions/checkout - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v3 - with: - python-version: 3.8 - - name: Install dependencies - run: | - set -x - python -m pip install -U pip - python -m pip install -U setuptools twine wheel - - - name: Build package - run: | - set -x - python setup.py --version - python setup.py bdist_wheel sdist --format=gztar - twine check dist/* - - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.PYPI_PASS }} +# release-package: +# name: Release PyPI package +# env: +# PYPI_PASS: ${{ secrets.PYPI_PASS }} +# if: "contains(github.event.head_commit.message, 'Bump version') && github.ref == 'refs/heads/master' && '$PYPI_PASS' != ''" +# runs-on: ubuntu-20.04 +# steps: +# - name: actions/checkout +# uses: actions/checkout@v3 +# - name: Set up Python 3.8 +# uses: actions/setup-python@v3 +# with: +# python-version: 3.8 +# - name: Install dependencies +# run: | +# set -x +# python -m pip install -U pip +# python -m pip install -U setuptools twine wheel +# +# - name: Build package +# run: | +# set -x +# python setup.py --version +# python setup.py bdist_wheel sdist --format=gztar +# twine check dist/* +# +# - name: Publish package to PyPI +# uses: pypa/gh-action-pypi-publish@master +# with: +# user: __token__ +# password: ${{ secrets.PYPI_PASS }} diff --git a/Makefile b/Makefile index 2922306..109f390 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,9 @@ doctest: .PHONY: test test: - xvfb-run -s "-screen 0 1400x900x24" make test-parallel test-ray + find . -name "*.pyc" -delete + PYVIRTUALDISPLAY_DISPLAYFD=0 SKIP_CLASSIC_CONTROL=1 xvfb-run -s "-screen 0 1400x900x24" pytest -n auto -s -o log_cli=true -o log_cli_level=info tests + PYVIRTUALDISPLAY_DISPLAYFD=0 xvfb-run -s "-screen 0 1400x900x24" pytest -s -o log_cli=true -o log_cli_level=info tests/control/test_classic_control.py .PHONY: run-codecov-test run-codecov-test: diff --git a/pyproject.toml b/pyproject.toml index 5983b9f..6037216 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ nes = [ ] classic-control = ["gymnasium[classic_control]>=0.29.1, == 0.*", "pygame>=2.6.0"] ray = ["ray>=2.35.0"] -dm_control = ["dm-control>=1.0.22"]#, "gym @ git+https://github.com/FragileTech/gym.git"] +dm_control = ["dm-control>=1.0.22", "gym @ git+https://github.com/FragileTech/gym.git"] retro = ["stable_retro"] jupyter = ["jupyterlab>=3.2.0"] box_2d = ["box2d-py==2.3.5"]