Skip to content

Commit

Permalink
Merge branch 'master' into pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgsavage authored Mar 9, 2024
2 parents c3cbbaa + 1857e87 commit e829224
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 108 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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:
name: Tests
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
#
results:
# This step aggregates the results from all the tests and allows us to
# require only this single job to pass for a PR to be merged rather than
# requiring each job in the matrix separately.
# See https://github.com/orgs/community/discussions/26822?sort=old#discussioncomment-8285141
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [build]
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ uncertainties.egg-info/
.cache
# vim temporary files
.*.swp

coverage.xml
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

23 changes: 16 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@ 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"):

>>> from uncertainties import ufloat
>>> from uncertainties.umath import * # sin(), etc.
>>> x = ufloat(1, 0.1) # x = 1+/-0.1
>>> print 2*x
>>> print(2*x)
2.00+/-0.20
>>> sin(2*x) # In a Python shell, "print" is optional
0.9092974268256817+/-0.08322936730942848
Expand Down Expand Up @@ -59,4 +57,15 @@ License <LICENSE.txt>`_.
Voluntary donations
-------------------
If you find this open-source software useful (e.g. in saving you time or helping you produce
something valuable), please consider `donating $10 or more <https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=4TK7KNDTEDT4S>`_ to help contribute to the maintenance of the package.
something valuable), please consider `donating $10 or more <https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=4TK7KNDTEDT4S>`_.

History
-------

..
Note from Eric Lebigot: I would like the origin of the package to
remain documented for its whole life. Thanks!
This package was created back around 2009 by `Eric O. LEBIGOT <https://github.com/lebigot>`_.

Ownership of the package was taken over by the `lmfit GitHub organization <https://github.com/lmfit>`_ in 2024.
59 changes: 0 additions & 59 deletions appveyor.yml

This file was deleted.

0 comments on commit e829224

Please sign in to comment.