From 7d7cd3b4fbc59e42f908f6474ad472c2291fc7f4 Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" <40366263+mathematicalmichael@users.noreply.github.com> Date: Sun, 21 Jan 2024 23:01:43 -0700 Subject: [PATCH] actions updates, experiments with 3.12 (#72) * experiment with 3.12 * loosen pandas for 3.12 * build updates * rename, try new build --- .github/workflows/build.yml | 27 +++++++++++++++------------ .github/workflows/main.yml | 20 ++++++++++---------- setup.cfg | 4 ++-- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d551a7..cef4b53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: builds on: push: - branches: [ main ] + branches: [main] paths: - "src/**.py" - "tests/**.py" @@ -10,7 +10,7 @@ on: - "setup.cfg" - ".github/workflows/build.yml" pull_request: - branches-ignore: '**docker**' + branches-ignore: ["**docker**"] paths: - "src/**.py" - "tests/**.py" @@ -18,23 +18,23 @@ on: - "setup.cfg" - ".github/workflows/build.yml" schedule: - - cron: "0 0 1 * *" + - cron: "0 0 1 * *" jobs: build: - name: Test build process + name: packaging strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} @@ -44,7 +44,7 @@ jobs: pip install --upgrade wheel setuptools setuptools_scm - name: Inspect version info - run: | + run: | python setup.py --version git describe --dirty --tags --long --match "*[0-9]*" @@ -57,12 +57,15 @@ jobs: run: | pip install -e . pip uninstall -y mud - + - name: Test build run: | python setup.py sdist bdist_wheel - pip uninstall -y mud + - name: New build + run: | + pip install build + python -m build --sdist --wheel style: name: Enforce style @@ -72,12 +75,12 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 1 - name: setup - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbbfaff..153963c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ on: - "setup.cfg" - ".github/workflows/main.yml" pull_request: - branches-ignore: "**docker**" + branches-ignore: ["**docker**"] paths: - "src/**.py" - "tests/**.py" @@ -22,19 +22,19 @@ on: jobs: unit-tests: - name: Run unit tests + name: pytest strategy: matrix: - python-version: ["3.7", "3.10", "3.11"] + python-version: ["3.7", "3.10", "3.11", "3.12"] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} @@ -47,25 +47,25 @@ jobs: run: pytest - name: Upload coverage to coveralls.io - if: ${{ matrix.python-version }} == 3.9 + if: ${{ matrix.python-version }} == 3.10 run: coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} integration-tests: - name: Run integration tests + name: cli examples strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10", "3.12"] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} diff --git a/setup.cfg b/setup.cfg index 30551d0..7efdeb6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ package_dir = # Add here dependencies of your project (semicolon/line-separated), e.g. install_requires = importlib-metadata; python_version<"3.10" - numpy>=1.20,<1.25 + numpy>=1.20,<1.27 scipy>=1.2,<2.0 matplotlib>=1.0,<4.0 scikit-learn>=1.0,<2.0 @@ -67,7 +67,7 @@ examples = click tqdm prettytable - pandas>=1.2,<2.0 + pandas>=1.2,<3.0 wget