diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..289e2e4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: [ push ] + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e .[test] + + - name: Run tests + run: | + pip install pytest pytest-cov + pytest . --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..324b169 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: release + +on: + release: + types: [published] + +jobs: + publish: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build release distributions + run: | + # NOTE: put your own distribution build steps here. + python -m pip install build + python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + environment: + name: pypi + url: https://pypi.org/p/Fair-Mango + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v5 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@6f7e8d9c0b1a2c3d4e5f6a7b8c9d0e1f2a3b4c5d diff --git a/pyproject.toml b/pyproject.toml index ebb9fa6..95fdb63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,8 @@ build-backend = "setuptools.build_meta" name = "fair-mango" dynamic = ["version"] dependencies = [ - "numpy>=1.19.5", - "pandas~=1.5", + "numpy", + "pandas", "scikit-learn>=1.1.3", ] requires-python = ">=3.10" @@ -44,6 +44,14 @@ Changelog = "https://github.com/datategy/Fair-Mango/blob/main/CHANGELOG.md" dev = [ "twine", ] +old-pandas = [ + "pandas<2.2.0", + "numpy<2.0", +] +new-pandas = [ + "pandas>=2.2.0", + "numpy>=2.0", +] [tool.setuptools.dynamic] version = {attr = "fair_mango.__version__"}