diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 00000000..0f24aa20 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,43 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e . + python -m pip install pytest pytest-cov numpy + - name: Test source code and docs + run: | + pytest --cov . --cov-report xml +# - name: Upload coverage reports to Codecov +# uses: codecov/codecov-action@v3 +# with: +# token: ${{ secrets.CODECOV_TOKEN }} +# flags: ${{ matrix.python-version }} +# files: coverage.xml +# fail_ci_if_error: true +# verbose: true diff --git a/.gitignore b/.gitignore index 528c423b..ab117d57 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ uncertainties.egg-info/ .cache # vim temporary files .*.swp + +coverage.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9d94f43a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Config file for automatic testing at travis-ci.org -language: python -# Workaround for being able to use Python 3.7 (2019-03) -sudo: required -os: linux -dist: xenial - -jobs: - include: - - python: "2.7" - env: DEPS="numpy nose" - # As of 2018-10, Travis has installation problems with the DEPS below, so Python 3.3 is not tested anymore: - #- python: "3.3" - # env: DEPS="numpy nose" - - python: "3.4" - env: DEPS="numpy nose" - - python: "3.5" - env: DEPS="numpy nose" - - python: "3.6" - env: DEPS="numpy nose" - - python: "3.7" - env: DEPS="numpy nose" - - python: "3.8" - env: DEPS="numpy nose" - - python: "3.9" - env: DEPS="numpy nose" - -before_install: - - pip install setuptools --upgrade - - pip install pip --upgrade - - pip install $DEPS - - pip install codecov - -script: - - python setup.py egg_info - - python setup.py nosetests -sv --with-coverage - # Generate documentation - #- cd doc - #- make html - -after_success: - - codecov diff --git a/README.rst b/README.rst index 9ae816e5..d2deeebd 100644 --- a/README.rst +++ b/README.rst @@ -10,13 +10,11 @@ uncertainties :target: https://pepy.tech/project/uncertainties .. image:: https://codecov.io/gh/lebigot/uncertainties/branch/master/graph/badge.svg :target: https://codecov.io/gh/lebigot/uncertainties/ -.. image:: https://travis-ci.com/lebigot/uncertainties.svg?branch=master - :target: https://travis-ci.com/lebigot/uncertainties -.. image:: https://ci.appveyor.com/api/projects/status/j5238244myqx0a0r?svg=true - :target: https://ci.appveyor.com/project/lebigot/uncertainties +.. image:: https://img.shields.io/github/actions/workflow/status/lmfit/uncertainties/python-package.yml?logo=github%20actions + :target: https://github.com/lmfit/uncertainties/blob/main/.github/workflows/python-package.yml **Call for maintainers**: if you want this project to keep living and are ready to maintain it (pull requests management, issue resolution…), please contact me! I am ready to share my knowledge of the code logic by participating in discussions (notably around pull requests and issues). - + This is the ``uncertainties`` Python package, which performs **transparent calculations with uncertainties** (aka "error propagation"): diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c9adde86..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Adapted from https://github.com/bsmurphy/PyKrige/blob/master/appveyor.yml -build: false - -environment: - global: - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd" - matrix: - - PYTHON_VERSION: 2.7 - PYTHON_ARCH: "64" - MINICONDA: C:\Miniconda-x64 - - PYTHON_VERSION: 3.5 - PYTHON_ARCH: "64" - MINICONDA: C:\Miniconda3-x64 - - PYTHON_VERSION: 3.6 - PYTHON_ARCH: "64" - MINICONDA: C:\Miniconda3-x64 - - PYTHON_VERSION: 3.7 - PYTHON_ARCH: "64" - MINICONDA: C:\Miniconda3-x64 - - PYTHON_VERSION: 3.8 - PYTHON_ARCH: "64" - MINICONDA: C:\Miniconda3-x64 - # - PYTHON_VERSION: 3.9 - # PYTHON_ARCH: "64" - # MINICONDA: C:\Miniconda3-x64 - # Not running the tests on 32 bit Python at the moment - # as AppVeyor is just too slow - #- PYTHON_VERSION: 2.7 - # PYTHON_ARCH: "32" - # MINICONDA: C:\Miniconda - #- PYTHON_VERSION: 3.5 - # PYTHON_ARCH: "32" - # MINICONDA: C:\Miniconda3 - -init: - - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH% %MINICONDA%" - -install: - - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - # Set paths correctly (https://github.com/conda/conda/issues/8865#issuecomment-508865446): - - "call %MINICONDA%\\Scripts\\activate" - - conda init cmd.exe - - conda info -a - # Create a conda virtual environement - - "conda create -n uncty-env numpy nose python=%PYTHON_VERSION%" - - activate uncty-env - - - -test_script: - - "cd C:\\projects\\uncertainties" - - activate uncty-env # Activate the virtual environment - - python setup.py egg_info - - python setup.py nosetests -sv