Skip to content

Commit

Permalink
Merge pull request #64 from yasserfarouk/touv
Browse files Browse the repository at this point in the history
Touv
  • Loading branch information
yasserfarouk authored Nov 15, 2024
2 parents 2886164 + ea62b1e commit ba10616
Show file tree
Hide file tree
Showing 303 changed files with 293 additions and 326 deletions.
80 changes: 39 additions & 41 deletions .github/workflows/SlowCI.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
name: SlowCI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 360
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
- uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "15"
- name: "Install dependencies"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
negmas genius-setup
- name: "running genius bridge"
run: "java -jar $HOME/negmas/files/geniusbridge.jar --silent --no-logs &"
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "python -W ignore -m pytest negmas tests/optional || python -W ignore -m pytest --last-failed ."
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 360
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: "actions/checkout@v4"
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install -e "."
- name: "Activate the project"
run: source .venv/bin/activate
- name: "Install Jupyter Kernel"
run: uv run -m ipykernel install --user --name=negmas
- name: "Install Genius Bridge"
run: uv run negmas genius-setup
- uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "15"
- name: "running genius bridge"
run: "java -jar $HOME/negmas/files/geniusbridge.jar --silent --no-logs &"
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_SLOW_TEST=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "uv run pytest src/negmas tests || uv run pytest --last-failed src/negmas tests"
38 changes: 0 additions & 38 deletions .github/workflows/coverage.yml

This file was deleted.

53 changes: 29 additions & 24 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
name: Documentation
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
docs:
name: "Build Documentation"
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: "actions/checkout@v4"
- uses: r-lib/actions/setup-pandoc@v1
- uses: "actions/setup-python@v5"
with:
python-version: "3.12"
- name: "Install documentation requirements"
run: |
ulimit -n 50000
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m pip install -e .
- name: "Create documentation"
run: sh make_docs.sh
working-directory: ./docs
docs:
name: "Build Documentation"
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: "actions/checkout@v4"
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Setup Python
run: uv python install
- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install -e "."
- name: "Activate the project"
run: source .venv/bin/activate
- uses: "actions/checkout@v4"
- uses: r-lib/actions/setup-pandoc@v1
- name: "Install documentation requirements"
run: |
ulimit -n 50000
uv pip install -r docs/requirements.txt
- name: "Create documentation"
run: sh make_docs.sh
working-directory: ./docs
81 changes: 35 additions & 46 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
name: PyPI
on: push
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "15"
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "Check long_description"
run: "python -m twine check dist/*"
- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypitesttoken }}
repository_url: https://test.pypi.org/legacy/
- name: "Run all tests"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
# negmas genius-setup
# export NEGMAS_IGNORE_TEST_NOTEBOOKS=False; python -W ignore -m pytest negmas tests
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypiapitoken }}
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: "ubuntu-latest"
timeout-minutes: 60
steps:
- uses: "actions/checkout@v4"
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Setup Python
run: uv python install
- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install -e "."
- name: "Activate the project"
run: source .venv/bin/activate
- name: "Build package"
run: uv build
- name: "Check long_description"
run: "uv run twine check dist/*"
- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypitesttoken }}
repository_url: https://test.pypi.org/legacy/
- name: Run tests
run: "uv run pytest src/negmas tests/core || uv run pytest --last-failed src/negmas tests/core"
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypiapitoken }}
105 changes: 35 additions & 70 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,38 @@
name: CI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 180
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
ulimit -n 50000
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel pytest
python -m pip install --upgrade virtualenv
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "python -W ignore -m pytest negmas tests/core || python -W ignore -m pytest --last-failed ."
package:
name: "Build & verify package"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.12"
- name: "Install pep517 and twine"
run: "python -m pip install --upgrade pip setuptools wheel pytest twine"
- name: "Build package"
run: "python setup.py sdist bdist_wheel"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
install-dev:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
name: "Verify dev env"
runs-on: "${{ matrix.os }}"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.12"
- name: "Install in dev mode"
run: |
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r docs/requirements.txt
python -m ipykernel install --user --name=negmas
python -m pip install -e .
- name: "Import package"
run: "python -c 'import negmas; print(negmas.__version__)'"
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
timeout-minutes: 180
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: "actions/checkout@v4"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install -e "."
- name: "Activate the project"
run: source .venv/bin/activate
- name: "Install Jupyter Kernel"
run: uv run -m ipykernel install --user --name=negmas
- name: "Install Genius Bridge"
run: uv run negmas genius-setup
- name: "Setting up environment"
run: |
export NEGMAS_IGNORE_TEST_NOTEBOOKS=True
export NEGMAS_FASTRUN=True
- name: "Run pytest for ${{ matrix.python-version }}"
run: "uv run pytest src/negmas tests/core || uv run pytest --last-failed src/negmas tests/core"
Loading

0 comments on commit ba10616

Please sign in to comment.