From daac8bb3bdf79a5a6e89844f7d15374023b28bb5 Mon Sep 17 00:00:00 2001 From: guest400123064 Date: Fri, 11 Oct 2024 00:02:56 -0400 Subject: [PATCH] try test workflow --- .github/workflows/docs.yml | 8 +++---- .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- 3 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index af37de8..fff48d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,10 +30,10 @@ jobs: # ADJUST THIS: build your documentation into docs/. # We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. - run: | - pdoc src/ezgatr \ - -o docs \ - -t docs/theme \ - --docformat numpy + pdoc src/ezgatr \ + -o docs \ + -t docs/theme \ + --docformat numpy - uses: actions/upload-pages-artifact@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..73819a7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: test + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: test-${{ github.head_ref }} + cancel-in-progress: true + +env: + PYTHONUNBUFFERED: "1" + FORCE_COLOR: "1" + +jobs: + run: + name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ['3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + run: pip install --upgrade poetry + + - name: Run tests + run: | + poetry install --with dev + poetry run coverage run -m pytest + poetry run coverage combine + poetry run coverage xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: Guest400123064/ezgatr diff --git a/README.md b/README.md index 9ed32ff..5f54487 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,11 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Python 3.10](https://img.shields.io/badge/python-%203.10%20|%203.11%20|%203.12-blue.svg)](https://www.python.org/downloads/release/python-3100/) +[![test](https://github.com/Guest400123064/ezgatr/actions/workflows/test.yml/badge.svg)](https://github.com/Guest400123064/ezgatr/actions/workflows/test.yml) +[![codecov](https://codecov.io/gh/Guest400123064/ezgatr/graph/badge.svg?token=IGRIRBHZ3U)](https://codecov.io/gh/Guest400123064/ezgatr) ![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json) [![Website](https://img.shields.io/website?label=documentation&up_message=online&url=https%3A%2F%2Fguest400123064.github.io/ezgatr)](https://guest400123064.github.io/ezgatr/ezgatr.html) +[![Python 3.10](https://img.shields.io/badge/python-%203.10%20|%203.11%20|%203.12-blue.svg)](https://www.python.org/downloads/release/python-3100/) ## What is EzGATr? **EzGATr** (Easy Geometric Algebra Transformer) intends to be a simple-to-use and lightweight Python library for building 3D [Geometric Algebra Transformers (GATr)](https://arxiv.org/abs/2305.18415). It is a collection of operators, modules, utilities, etc. build on top of [PyTorch](https://pytorch.org/). In addition, EzGATr also seeks to bridge the gap between the mathematical formulations and corresponding implementations through extensive documentation and explanations to facilitate learning and potential future optimizations.