diff --git a/.github/workflows/test_infsum.yml b/.github/workflows/test_infsum.yml deleted file mode 100644 index 989c965..0000000 --- a/.github/workflows/test_infsum.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: main code - -on: - push: - branches: - - '**' - pull_request: - branches: - - '**' - -jobs: - test: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ github.workspace }} - - strategy: - matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install pytest - pip install -r requirements.txt - - - name: Run tests - run: | - pytest tests.py diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..8e5c459 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: Tests and Coverage + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest pytest-cov + + - name: Run tests with coverage + run: | + pytest tests.py --cov=infsumpy --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + flags: unittests + name: codecov-coverage + diff --git a/README.md b/README.md index 173db7f..828b4dc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -------------------------------------------------------------------------------- ![PyPI](https://img.shields.io/pypi/v/InfSumPy?label=pypi%20package) -![versions](https://img.shields.io/pypi/pyversions/pybadges.svg) +[![codecov](https://codecov.io/github/wellington36/InfSumPy/graph/badge.svg?token=DHUQAFHCDL)](https://codecov.io/github/wellington36/InfSumPy) ![example workflow](https://github.com/wellington36/InfSumPy/actions/workflows/test_infsum.yml/badge.svg) InfSumPy is a Python package that evaluates infinite positive sums with guaranteed error. @@ -10,12 +10,6 @@ Using ratio and integral tests we evaluate series that pass these tests with con ## Instalation -Make sure you have the mpmath library installed: - -```bash -pip install mpmath -``` - To install the package, run the following command: ```bash diff --git a/coverage b/coverage new file mode 100644 index 0000000..99bf494 --- /dev/null +++ b/coverage @@ -0,0 +1,42 @@ +============================= test session starts ============================== +platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 +rootdir: /home/wellington/Documents/InfSumPy +plugins: cov-7.0.0, anyio-4.12.1 +collected 0 items + +============================ no tests ran in 0.01s ============================= +self._collectors: + + : /home/wellington/.local/bin/coverage:7 + main : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:1163 + command_line : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:853 + do_run : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:1039 + start : /home/wellington/.local/lib/python3.14/site-packages/coverage/control.py:702 + _init_for_start : /home/wellington/.local/lib/python3.14/site-packages/coverage/control.py:601 + __init__ : /home/wellington/.local/lib/python3.14/site-packages/coverage/collector.py:119 + + : /home/wellington/.local/bin/coverage:7 + main : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:1163 + command_line : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:853 + do_run : /home/wellington/.local/lib/python3.14/site-packages/coverage/cmdline.py:1042 + run : /home/wellington/.local/lib/python3.14/site-packages/coverage/execfile.py:213 + : /home/wellington/.local/lib/python3.14/site-packages/pytest/__main__.py:9 + console_main : /home/wellington/.local/lib/python3.14/site-packages/_pytest/config/__init__.py:223 + main : /home/wellington/.local/lib/python3.14/site-packages/_pytest/config/__init__.py:193 + _prepareconfig : /home/wellington/.local/lib/python3.14/site-packages/_pytest/config/__init__.py:361 + __call__ : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_hooks.py:512 + _hookexec : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_manager.py:120 + _multicall : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_callers.py:121 + pytest_cmdline_parse : /home/wellington/.local/lib/python3.14/site-packages/_pytest/config/__init__.py:1186 + parse : /home/wellington/.local/lib/python3.14/site-packages/_pytest/config/__init__.py:1556 + __call__ : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_hooks.py:512 + _hookexec : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_manager.py:120 + _multicall : /home/wellington/.local/lib/python3.14/site-packages/pluggy/_callers.py:121 + pytest_load_initial_conftests : /home/wellington/.local/lib/python3.14/site-packages/pytest_cov/plugin.py:200 + __init__ : /home/wellington/.local/lib/python3.14/site-packages/pytest_cov/plugin.py:250 + start : /home/wellington/.local/lib/python3.14/site-packages/pytest_cov/plugin.py:263 + ensure_topdir_wrapper : /home/wellington/.local/lib/python3.14/site-packages/pytest_cov/engine.py:55 + start : /home/wellington/.local/lib/python3.14/site-packages/pytest_cov/engine.py:284 + start : /home/wellington/.local/lib/python3.14/site-packages/coverage/control.py:702 + _init_for_start : /home/wellington/.local/lib/python3.14/site-packages/coverage/control.py:601 + __init__ : /home/wellington/.local/lib/python3.14/site-packages/coverage/collector.py:119