From 56dd3c2baee35bf11c44e797a11a6941c077dff3 Mon Sep 17 00:00:00 2001 From: zombie-einstein <13398815+zombie-einstein@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:16:51 +0100 Subject: [PATCH 1/3] Add README badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7ead531..0073a6f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # JAX-Tqdm +[![PyPi version](https://pypip.in/v/$REPO/badge.png)](https://crate.io/packages/$REPO/) +[![PyPi downloads](https://pypip.in/d/$REPO/badge.png)](https://crate.io/packages/$REPO/) + Add a [tqdm](https://github.com/tqdm/tqdm) progress bar to your JAX scans and loops. ## Installation From 96ac155d252f09317f6eb709f441c13d4d8608f7 Mon Sep 17 00:00:00 2001 From: zombie-einstein <13398815+zombie-einstein@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:27:39 +0100 Subject: [PATCH 2/3] Fix badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0073a6f..1d10a37 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # JAX-Tqdm -[![PyPi version](https://pypip.in/v/$REPO/badge.png)](https://crate.io/packages/$REPO/) -[![PyPi downloads](https://pypip.in/d/$REPO/badge.png)](https://crate.io/packages/$REPO/) - Add a [tqdm](https://github.com/tqdm/tqdm) progress bar to your JAX scans and loops. +![PyPI - Version](https://img.shields.io/pypi/v/jax-tqdm) +![PyPI - Downloads](https://img.shields.io/pypi/dm/jax-tqdm) + ## Installation Install with pip: From 89849f387d357ba38e21345a7588ad2379ac9fbc Mon Sep 17 00:00:00 2001 From: zombie-einstein <13398815+zombie-einstein@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:45:21 +0100 Subject: [PATCH 3/3] Consolidate pre-merge workflows --- .github/workflows/build-package.yaml | 26 ------------ .github/workflows/code-formatting.yaml | 19 --------- .github/workflows/pre-merge.yaml | 56 ++++++++++++++++++++++++++ .github/workflows/run-tests.yaml | 19 --------- 4 files changed, 56 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/build-package.yaml delete mode 100644 .github/workflows/code-formatting.yaml create mode 100644 .github/workflows/pre-merge.yaml delete mode 100644 .github/workflows/run-tests.yaml diff --git a/.github/workflows/build-package.yaml b/.github/workflows/build-package.yaml deleted file mode 100644 index 2db1b0c..0000000 --- a/.github/workflows/build-package.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: build-package -run-name: ${{ github.actor }} build package -on: [pull_request] -jobs: - build-package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - uses: snok/install-poetry@v1 - with: - version: 1.2.2 - virtualenvs-create: false - installer-parallel: true - - run: poetry install - - run: poetry build - - run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV - - run: ls dist -# TODO: Use upload to test build before release -# - name: Upload whl -# uses: actions/upload-artifact@v3 -# with: -# name: build-whl -# path: dist/jax_tqdm-${{env.VERSION}}-py3-none-any.whl diff --git a/.github/workflows/code-formatting.yaml b/.github/workflows/code-formatting.yaml deleted file mode 100644 index eaede71..0000000 --- a/.github/workflows/code-formatting.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: code-formatting -run-name: ${{ github.actor }} code format checks -on: [pull_request] -jobs: - run-pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - uses: snok/install-poetry@v1 - with: - version: 1.2.2 - virtualenvs-create: false - installer-parallel: true - - run: poetry install - - run: pre-commit install - - run: task lint diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml new file mode 100644 index 0000000..0759b44 --- /dev/null +++ b/.github/workflows/pre-merge.yaml @@ -0,0 +1,56 @@ +name: pre-merge +run-name: ${{ github.actor }} pre-merge checks +on: [pull_request] + +jobs: + run-tests: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - uses: snok/install-poetry@v1 + with: + version: 1.5.1 + virtualenvs-create: false + installer-parallel: true + - run: poetry install + - run: pip install --upgrade "jax[cpu]" + - run: pytest -vvs + + run-linting: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - uses: snok/install-poetry@v1 + with: + version: 1.5.1 + virtualenvs-create: false + installer-parallel: true + - run: poetry install + - run: pre-commit install + - run: task lint + + build-package: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - uses: snok/install-poetry@v1 + with: + version: 1.5.1 + virtualenvs-create: false + installer-parallel: true + - run: poetry install + - run: poetry build + - run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV + - run: ls dist diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml deleted file mode 100644 index 2e7b1a1..0000000 --- a/.github/workflows/run-tests.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: run-tests -run-name: ${{ github.actor }} run tests -on: [pull_request] -jobs: - run-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - uses: snok/install-poetry@v1 - with: - version: 1.2.2 - virtualenvs-create: false - installer-parallel: true - - run: poetry install - - run: pip install --upgrade "jax[cpu]" - - run: pytest -vvs