Hello community,
here is the log from the commit of package python-hepunits for openSUSE:Factory
checked in at 2020-11-03 15:16:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hepunits (Old)
and /work/SRC/openSUSE:Factory/.python-hepunits.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hepunits"
Tue Nov 3 15:16:17 2020 rev:2 rq:845474 version:2.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hepunits/python-hepunits.changes
2020-08-12 10:36:58.676305574 +0200
+++
/work/SRC/openSUSE:Factory/.python-hepunits.new.3463/python-hepunits.changes
2020-11-03 15:16:40.192046059 +0100
@@ -1,0 +2,10 @@
+Sat Oct 31 14:33:27 UTC 2020 - Atri Bhattacharya <[email protected]>
+
+- Update to version 2.0.1:
+ * Support for Python 3.9 added.
+- Changes from version 2.0.0:
+ * Physical constants taken from the PDG 2020 review for what
+ concerns exact constants (i.e. no uncertainty).
+ * Several sub-units introduced.
+
+-------------------------------------------------------------------
Old:
----
hepunits-1.2.0.tar.gz
New:
----
hepunits-2.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-hepunits.spec ++++++
--- /var/tmp/diff_new_pack.6j0vHW/_old 2020-11-03 15:16:41.064046898 +0100
+++ /var/tmp/diff_new_pack.6j0vHW/_new 2020-11-03 15:16:41.068046902 +0100
@@ -19,7 +19,7 @@
%global modname hepunits
Name: python-hepunits
-Version: 1.2.0
+Version: 2.0.1
Release: 0
Summary: Units and constants in the HEP system of units
License: BSD-3-Clause
++++++ hepunits-1.2.0.tar.gz -> hepunits-2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/.github/workflows/main.yml
new/hepunits-2.0.1/.github/workflows/main.yml
--- old/hepunits-1.2.0/.github/workflows/main.yml 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/.github/workflows/main.yml 2020-10-31
00:02:32.000000000 +0100
@@ -15,13 +15,11 @@
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- - name: set PY
- run: echo "::set-env name=PY::$(python -c 'import hashlib,
sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- - uses: actions/cache@v1
+ - uses: pre-commit/[email protected]
+ - name: Check manifest
+ uses: pre-commit/[email protected]
with:
- path: ~/.cache/pre-commit
- key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml')
}}
- - uses: pre-commit/[email protected]
+ extra_args: --hook-stage manual check-manifest
checks:
runs-on: ubuntu-latest
@@ -31,8 +29,9 @@
python-version:
- 2.7
- 3.5
- - 3.6
- 3.8
+ - 3.9
+
name: Check Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/.pre-commit-config.yaml
new/hepunits-2.0.1/.pre-commit-config.yaml
--- old/hepunits-1.2.0/.pre-commit-config.yaml 2020-05-20 17:38:27.000000000
+0200
+++ new/hepunits-2.0.1/.pre-commit-config.yaml 2020-10-31 00:02:32.000000000
+0100
@@ -1,25 +1,41 @@
repos:
- repo: https://github.com/psf/black
- rev: 19.10b0
+ rev: 20.8b1
hooks:
- id: black
+
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v2.5.0
+ rev: v3.2.0
hooks:
- - id: check-added-large-files
+ - id: debug-statements
+ - id: end-of-file-fixer
+ - id: fix-encoding-pragma
- id: mixed-line-ending
+ - id: requirements-txt-fixer
- id: trailing-whitespace
- - id: check-merge-conflict
+ - id: check-added-large-files
- id: check-case-conflict
+ - id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
+
- repo: https://github.com/mgedmin/check-manifest
- rev: "0.39"
+ rev: "0.42"
hooks:
- id: check-manifest
+ additional_dependencies: [setuptools_scm, toml]
+ stages: [manual]
+
+- repo: https://github.com/pycqa/flake8
+ rev: 3.8.3
+ hooks:
+ - id: flake8
+ exclude: docs/conf.py
+ additional_dependencies: [flake8-bugbear, flake8-print]
+
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v0.770
+ rev: v0.782
hooks:
- id: mypy
args: [--strict]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/PKG-INFO new/hepunits-2.0.1/PKG-INFO
--- old/hepunits-1.2.0/PKG-INFO 2020-05-20 17:38:35.852873600 +0200
+++ new/hepunits-2.0.1/PKG-INFO 2020-10-31 00:02:35.160874800 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hepunits
-Version: 1.2.0
+Version: 2.0.1
Summary: Units and constants in the HEP system of units
Home-page: https://github.com/scikit-hep/hepunits
Author: Eduardo Rodrigues
@@ -65,6 +65,9 @@
but augments it with handy definitions, changing the basic length and
time units.
+ Note that many units are now *exact*, such as the speed of light in
vacuum.
+ The package is in agreement with the values in the 2020 Particle Data
Group review.
+
.. _CLHEP: http://proj-clhep.web.cern.ch/proj-clhep/
.. _SI: http://www.physics.nist.gov/cuu/Units/index.html
@@ -142,6 +145,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/README.rst
new/hepunits-2.0.1/README.rst
--- old/hepunits-1.2.0/README.rst 2020-05-20 17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/README.rst 2020-10-31 00:02:32.000000000 +0100
@@ -55,6 +55,9 @@
but augments it with handy definitions, changing the basic length and time
units.
+Note that many units are now *exact*, such as the speed of light in vacuum.
+The package is in agreement with the values in the 2020 Particle Data Group
review.
+
.. _CLHEP: http://proj-clhep.web.cern.ch/proj-clhep/
.. _SI: http://www.physics.nist.gov/cuu/Units/index.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/azure-pipelines.yml
new/hepunits-2.0.1/azure-pipelines.yml
--- old/hepunits-1.2.0/azure-pipelines.yml 2020-05-20 17:38:27.000000000
+0200
+++ new/hepunits-2.0.1/azure-pipelines.yml 2020-10-31 00:02:32.000000000
+0100
@@ -14,6 +14,8 @@
python.version: '2.7'
Python38:
python.version: '3.8'
+ Python39:
+ python.version: '3.9'
steps:
- task: UsePythonVersion@0
@@ -34,4 +36,3 @@
- script: |
python -m pytest tests/ --cov hepunits --cov-report html
--napoleon-docstrings
displayName: 'pytest'
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/setup.cfg new/hepunits-2.0.1/setup.cfg
--- old/hepunits-1.2.0/setup.cfg 2020-05-20 17:38:35.852873600 +0200
+++ new/hepunits-2.0.1/setup.cfg 2020-10-31 00:02:35.164874800 +0100
@@ -25,6 +25,7 @@
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
Development Status :: 5 - Production/Stable
[options]
@@ -70,6 +71,11 @@
[mypy-hepunits.version]
ignore_missing_imports = True
+[flake8]
+max-complexity = 12
+ignore = E203, E231, E501, E722, W503, F401, F403, F405
+select = C,E,F,W,B,B9,T
+
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/setup.py new/hepunits-2.0.1/setup.py
--- old/hepunits-1.2.0/setup.py 2020-05-20 17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/setup.py 2020-10-31 00:02:32.000000000 +0100
@@ -1,6 +1,15 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
from setuptools import setup
+# Setup will not be able to find the version if these packages are missing
+#
+# > Remember, setup.py does not run when installing from a wheel, so only
+# > required to make one
+
+import setuptools_scm # noqa: F401
+import toml # noqa: F401
+
setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/__init__.py
new/hepunits-2.0.1/src/hepunits/__init__.py
--- old/hepunits-1.2.0/src/hepunits/__init__.py 2020-05-20 17:38:27.000000000
+0200
+++ new/hepunits-2.0.1/src/hepunits/__init__.py 2020-10-31 00:02:32.000000000
+0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
# Convenient access to the version number
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/constants/__init__.py
new/hepunits-2.0.1/src/hepunits/constants/__init__.py
--- old/hepunits-1.2.0/src/hepunits/constants/__init__.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits/constants/__init__.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
This module `hepunits.constants` contains 2 sorts of constants:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/constants/constants.py
new/hepunits-2.0.1/src/hepunits/constants/constants.py
--- old/hepunits-1.2.0/src/hepunits/constants/constants.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits/constants/constants.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
Physical and other handy constants
@@ -28,7 +29,7 @@
# Physical constants
# -----------------------------------------------------------------------------
-# Speed of light in vacuum
+# Speed of light in vacuum (exact value, taken from PDG 2020)
c_light = 299792458 * m / s
c_light_sq = c_light * c_light
@@ -36,12 +37,15 @@
eminus = -eplus # electron charge
e_sq = eplus * eplus
-# Avogadro constant (taken from CODATA)
-Avogadro = 6.022140857e23 / mole
+# Avogadro constant (exact value, taken from PDG 2020)
+Avogadro = 6.02214076e23 / mole
+
+# Planck constant (exact value, taken from PDG 2020)
+h_Planck = 6.62607015e-34 * joule * s
-# Planck constant (taken from CODATA)
-h_Planck = 6.626070040e-34 * joule * s
hbar_Planck = h_Planck / two_pi
hbar = hbar_Planck
+
hbarc = hbar_Planck * c_light
+
hbarc_sq = hbarc * hbarc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/units/__init__.py
new/hepunits-2.0.1/src/hepunits/units/__init__.py
--- old/hepunits-1.2.0/src/hepunits/units/__init__.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits/units/__init__.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,9 +1,12 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
+
"""
-Subpackage for the HEP System of Units, (derived) physical units
-and commonly-used unit prefixes.
+Subpackage for the HEP System of Units, (derived) physical units and
+commonly-used unit prefixes.
-The HEP System of Units is the set of basic units originally defined by the
CLHEP project.
+The HEP System of Units is the set of basic units originally defined by the
+CLHEP project.
"""
from .prefixes import *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/units/prefixes.py
new/hepunits-2.0.1/src/hepunits/units/prefixes.py
--- old/hepunits-1.2.0/src/hepunits/units/prefixes.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits/units/prefixes.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
********************
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/units/units.py
new/hepunits-2.0.1/src/hepunits/units/units.py
--- old/hepunits-1.2.0/src/hepunits/units/units.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits/units/units.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,10 +1,13 @@
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
+
"""
*************************
Module of HEP basic units
*************************
-In HEP the System of Units consists of the basic units originally defined by
the [CLHEP]_ project:
+In HEP the System of Units consists of the basic units originally defined by
+the [CLHEP]_ project:
=================== ================== ====
Quantity Name Unit
@@ -34,7 +37,8 @@
Luminous intensity candela cd
=================== ======== ====
-but augments it with handy definitions, changing the basic length and time
units.
+but augments it with handy definitions, changing the basic length and time
+units.
This module also defines an extensive set of derived units.
@@ -122,12 +126,14 @@
attobarn = _pre.atto * barn
mb = millibarn
+ub = microbarn
nb = nanobarn
pb = picobarn
fb = femtobarn
ab = attobarn
invmb = 1.0 / millibarn
+invub = 1.0 / microbarn
invnb = 1.0 / nanobarn
invpb = 1.0 / picobarn
invfb = 1.0 / femtobarn
@@ -151,6 +157,7 @@
s = second
ms = millisecond
+us = microsecond
ps = picosecond
fs = femtosecond
# shortcut "as = attosecond" not possible since "as" is a reserved word ;-)
@@ -246,7 +253,8 @@
# --------------------------------------------------------------------
# Positron charge [Coulomb]
-e_SI = 1.6021766208e-19 # taken from CODATA
+e_SI = 1.602176634e-19 # exact value, taken from PDG 2020
+
# Electric charge [Q]
# --------------------------------------------------------------------
@@ -264,7 +272,7 @@
# Energy [E]
# ----------
-joule = electronvolt / e_SI # joule = 6.24150 e+12 * MeV
+joule = electronvolt / e_SI # joule = 6.24151e+12 * MeV
J = joule
@@ -346,17 +354,43 @@
# Activity [T^-1]
becquerel = 1.0 / second
+kilobecquerel = _pre.kilo * becquerel
+megabecquerel = _pre.mega * becquerel
+gigabecquerel = _pre.giga * becquerel
+
Bq = becquerel
+kBq = kilobecquerel
+MBq = megabecquerel
+GBq = gigabecquerel
+
curie = 3.7e10 * becquerel
+millicurie = _pre.milli * curie
+microcurie = _pre.micro * curie
+nanocurie = _pre.nano * curie
+
Ci = curie
+mCi = millicurie
+uCi = microcurie
+nCi = nanocurie
+
# Absorbed dose [L^2][T^-2]
gray = joule / kilogram
+megagray = _pre.mega * gray
+kilogray = _pre.kilo * gray
+milligray = _pre.milli * gray
+microgray = _pre.micro * gray
+
Gy = gray
+MGy = megagray
+kGy = kilogray
+mGy = milligray
+uGy = microgray
+
# Dose equivalent
sievert = joule / kilogram
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits/version.py
new/hepunits-2.0.1/src/hepunits/version.py
--- old/hepunits-1.2.0/src/hepunits/version.py 2020-05-20 17:38:34.000000000
+0200
+++ new/hepunits-2.0.1/src/hepunits/version.py 2020-10-31 00:02:35.000000000
+0100
@@ -1,4 +1,4 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.2.0'
+version = '2.0.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/src/hepunits.egg-info/PKG-INFO
new/hepunits-2.0.1/src/hepunits.egg-info/PKG-INFO
--- old/hepunits-1.2.0/src/hepunits.egg-info/PKG-INFO 2020-05-20
17:38:34.000000000 +0200
+++ new/hepunits-2.0.1/src/hepunits.egg-info/PKG-INFO 2020-10-31
00:02:35.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hepunits
-Version: 1.2.0
+Version: 2.0.1
Summary: Units and constants in the HEP system of units
Home-page: https://github.com/scikit-hep/hepunits
Author: Eduardo Rodrigues
@@ -65,6 +65,9 @@
but augments it with handy definitions, changing the basic length and
time units.
+ Note that many units are now *exact*, such as the speed of light in
vacuum.
+ The package is in agreement with the values in the 2020 Particle Data
Group review.
+
.. _CLHEP: http://proj-clhep.web.cern.ch/proj-clhep/
.. _SI: http://www.physics.nist.gov/cuu/Units/index.html
@@ -142,6 +145,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/tests/constants/test_constants.py
new/hepunits-2.0.1/tests/constants/test_constants.py
--- old/hepunits-1.2.0/tests/constants/test_constants.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/tests/constants/test_constants.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
Tests for the hepunits.constants.constants module.
@@ -12,7 +13,7 @@
def test_constants():
assert pi_sq == two_pi * half_pi
- assert Avogadro == 6.022140857e23
+ assert Avogadro == 6.02214076e23
assert c_light / (m / s) == 299792458
assert hbarc_sq / c_light_sq == approx((h_Planck / two_pi) ** 2)
assert hbar / (eV * s) == hbar / 1.0e3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/tests/units/test_prefixes.py
new/hepunits-2.0.1/tests/units/test_prefixes.py
--- old/hepunits-1.2.0/tests/units/test_prefixes.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/tests/units/test_prefixes.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
Tests for the hepunits.units.prefixes module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hepunits-1.2.0/tests/units/test_units.py
new/hepunits-2.0.1/tests/units/test_units.py
--- old/hepunits-1.2.0/tests/units/test_units.py 2020-05-20
17:38:27.000000000 +0200
+++ new/hepunits-2.0.1/tests/units/test_units.py 2020-10-31
00:02:32.000000000 +0100
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license, see LICENSE.
"""
Tests for the hepunits.units.units module.