Hello community, here is the log from the commit of package python-photutils for openSUSE:Factory checked in at 2020-09-25 16:37:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-photutils (Old) and /work/SRC/openSUSE:Factory/.python-photutils.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-photutils" Fri Sep 25 16:37:00 2020 rev:10 rq:837400 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-photutils/python-photutils.changes 2020-09-23 18:48:14.053753733 +0200 +++ /work/SRC/openSUSE:Factory/.python-photutils.new.4249/python-photutils.changes 2020-09-25 16:37:41.924218639 +0200 @@ -1,0 +2,8 @@ +Fri Sep 25 11:41:40 UTC 2020 - Benjamin Greiner <c...@bnavigator.de> + +- Update to Version 1.0.1 + Bug Fixes + * photutils.psf + Fixed checks on oversampling factors. [#1086] + +------------------------------------------------------------------- Old: ---- photutils-1.0.0.tar.gz New: ---- photutils-1.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-photutils.spec ++++++ --- /var/tmp/diff_new_pack.ibgAXS/_old 2020-09-25 16:37:42.452219107 +0200 +++ /var/tmp/diff_new_pack.ibgAXS/_new 2020-09-25 16:37:42.452219107 +0200 @@ -19,7 +19,7 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-photutils -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: An Astropy package for photometry License: BSD-3-Clause ++++++ photutils-1.0.0.tar.gz -> photutils-1.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/CHANGES.rst new/photutils-1.0.1/CHANGES.rst --- old/photutils-1.0.0/CHANGES.rst 2020-09-23 03:18:06.000000000 +0200 +++ new/photutils-1.0.1/CHANGES.rst 2020-09-25 05:01:42.000000000 +0200 @@ -1,5 +1,16 @@ -1.0 (2020-09-22) ----------------- +1.0.1 (2020-09-24) +------------------ + +Bug Fixes +^^^^^^^^^ + +- ``photutils.psf`` + + - Fixed checks on ``oversampling`` factors. [#1086] + + +1.0.0 (2020-09-22) +------------------ General ^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/PKG-INFO new/photutils-1.0.1/PKG-INFO --- old/photutils-1.0.0/PKG-INFO 2020-09-23 03:48:35.553023800 +0200 +++ new/photutils-1.0.1/PKG-INFO 2020-09-25 05:31:27.511860600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: photutils -Version: 1.0.0 +Version: 1.0.1 Summary: An Astropy package for source detection and photometry Home-page: https://github.com/astropy/photutils Author: Photutils Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/docs/dev/releasing.rst new/photutils-1.0.1/docs/dev/releasing.rst --- old/photutils-1.0.0/docs/dev/releasing.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/photutils-1.0.1/docs/dev/releasing.rst 2020-09-25 04:25:59.000000000 +0200 @@ -0,0 +1,170 @@ +.. doctest-skip-all + +**************************** +Package Release Instructions +**************************** + +This document outlines the steps for releasing Photutils to PyPI. This +process currently requires admin-level access to the Photutils GitHub +repository, as it relies on the ability to commit to master directly. It +also requires a PyPI account with admin-level access for Photutils. + +These instructions assume the name of the git remote for the repo is +called ``upstream``. + +#. Ensure Travis-CI and any other continuous integration is passing + for the branch you are going to release. Also, ensure that Read the + Docs builds are passing. + +#. Locally run the tests using ``tox`` to do thorough tests in isolated + environments:: + + tox -e test-alldeps -- --remote-data=any + tox -e build_docs + tox -e linkcheck + +#. Update the ``CHANGES.rst`` file to make sure that all the changes are + listed and update the release date, which should currently be set to + ``unreleased``, to the current date in ``yyyy-mm-dd`` format. Then + commit the changes:: + + git add CHANGES.rst + git commit -m'Finalizing changelog for version <X.Y.Z version>' + +#. Remove any untracked files (WARNING: this will permanently remove any + files that have not been previously committed, so make sure that you + don't need to keep any of these files):: + + git clean -dfx + +#. Make sure the source distribution doesn't inherit limited permissions + from your default umask:: + + umask 0022 + chmod -R a+Xr . + +#. Update the package version number to the version you’re about to + release by creating an annotated git tag (optionally signing with the + ``-s`` option):: + + git tag -a <X.Y.Z version> -m'<X.Y.Z version>' + git show <X.Y.Z version> # show the tag + git tag # show all tags + +#. Check out the release commit:: + + git checkout <X.Y.Z version> + +#. Generate the source distribution tar file by first making sure the + `pep517 <https://pypi.org/project/pep517/>`_ package is installed and + up to date:: + + pip install pep517 --upgrade + + then creating the source distribution with:: + + python -m pep517.build --source . + +#. Run tests on the generated source distribution by going inside the + ``dist`` directory, expanding the tar file, going inside the expanded + directory, and running the tests with:: + + cd dist + tar xvfz <file>.tar.gz + cd <file> + tox -e test-alldeps -- --remote-data=any + tox -e build_docs + + Optionally, install and test the source distribution in a virtual + environment:: + + <install and activate virtual environment> + pip install -e .[all,test] + pytest --remote-data=any + + or:: + + <install and activate virtual environment> + pip install ./<file>.tar.gz[all,test] + cd <any-directory-outside-of-photutils-source> + python + >>> import photutils + >>> photutils.__version__ + >>> photutils.test(remote_data=True) + +#. Go back to the package root directory and remove the generated files + with:: + + git clean -dfx + +#. Generate the source distribution and upload it to PyPI:: + + python -m pep517.build --source . + twine check dist/* + twine upload dist/* + + Check that the entry on PyPI is correct, and that the tarfile is + present. + +#. Go back to the master branch:: + + git checkout master + +#. Push the released tag to the upstream repo:: + + git push upstream <X.Y.Z> + +#. Add a new section to ``CHANGES.rst`` for the next x.y.z version, + with a single entry ``No changes yet``, e.g.,:: + + x.y.z (unreleased) + ------------------ + + - No changes yet + + Then commit the changes and push to the upstream repo:: + + git add CHANGES.rst + git commit -m'Add version <x.y.z next_version> to the changelog' + git push upstream master + +#. Create a GitHub Release + (https://github.com/astropy/photutils/releases) by clicking on + "Draft a new release", select the tag of the released version, add + a release title with the released version, and add a description + of "See ```CHANGES.rst``` for release notes.". Then click "Publish + release". This step will trigger an automatic update of the package + on Zenodo (see below). + +#. Close the GitHub Milestone + (https://github.com/astropy/photutils/milestones) for the released + version and open a new Milestone for the next release. + +#. Go to Read the Docs + (https://readthedocs.org/projects/photutils/versions/) and check that + the "stable" docs correspond to the new released version. Deactivate + any older released versions (i.e., uncheck "Active"). + +#. Check that Zenodo is updated with the released version + (https://doi.org/10.5281/zenodo.596036). Zenodo is already configured + to automatically update with a new published GitHub Release (see + above). + +#. After the release, the conda-forge bot (``regro-cf-autotick-bot``) + will automatically create a pull request on + https://github.com/conda-forge/photutils-feedstock. The ``meta.yaml`` + recipe may need to be edited with updated dependencies. Modify (if + necessary), review, and merge the PR to create the conda-forge + package (https://anaconda.org/conda-forge/photutils). The Astropy + conda channel (https://anaconda.org/astropy/photutils) will + automatically mirror the package from conda-forge. + +#. Build wheels and upload them to PyPI. The + Photutils wheels are currently built using + https://github.com/larrybradley/photutils-wheel-forge. Once the + wheels have been built, they are uploaded as artifacts in Azure + Pipelines. Download the wheels from Azure Pipelines and upload them + to PyPI:: + + python get_wheels.py + twine upload wheelhouse/*.whl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/docs/index.rst new/photutils-1.0.1/docs/index.rst --- old/photutils-1.0.0/docs/index.rst 2020-09-23 03:18:06.000000000 +0200 +++ new/photutils-1.0.1/docs/index.rst 2020-09-25 04:25:59.000000000 +0200 @@ -7,6 +7,10 @@ h1 {display:none;} </style> +.. |br| raw:: html + + <div style="min-height:0.1em;"></div> + ********* Photutils ********* @@ -26,11 +30,14 @@ astronomical sources. It is an open source Python package and is licensed under a :ref:`3-clause BSD license <photutils_license>`. +|br| + .. Important:: If you use Photutils for a project that leads to a publication, whether directly or as a dependency of another package, please include an :doc:`acknowledgment and/or citation <citation>`. +|br| Getting Started =============== @@ -69,15 +76,27 @@ datasets.rst utils.rst + +Developer Documentation +======================= + +.. toctree:: + :maxdepth: 1 + + dev/releasing.rst + + .. toctree:: :hidden: test_function.rst +|br| + .. note:: Like much astronomy software, Photutils is an evolving package. The developers make an effort to maintain backwards compatibility, but at times the API may change if there is a benefit to doing so. If there are specific areas you think API stability is important, - please let us know as part of the development process! + please let us know as part of the development process. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/CITATION.rst new/photutils-1.0.1/photutils/CITATION.rst --- old/photutils-1.0.0/photutils/CITATION.rst 2020-09-22 06:24:35.000000000 +0200 +++ new/photutils-1.0.1/photutils/CITATION.rst 2020-09-25 04:26:17.000000000 +0200 @@ -13,29 +13,52 @@ where (Bradley et al. 20XX) is a citation to the `Zenodo record <https://doi.org/10.5281/zenodo.596036>`_ of the Photutils version -that was used. We also encourage citations in the main text wherever +that was used. We also encourage citations in the main text wherever appropriate. -For example, for Photutils v0.6 one would cite Bradley et al. 2019 -with the BibTeX entry (https://zenodo.org/record/2533376/export/hx): +All Photutils versions and citation formats can be found at +https://doi.org/10.5281/zenodo.596036. For example, for Photutils +v1.0.0 one would cite Bradley et al. 2020 with the BibTeX entry +(https://zenodo.org/record/4044744/export/hx): .. code-block:: text - @misc{Bradley_2019_2533376, - author = {Larry Bradley and Brigitta Sip{\H o}cz and Thomas Robitaille and - Erik Tollerud and Z\`e Vin{\'{\i}}cius and Christoph Deil and - Kyle Barbary and Hans Moritz G{\"u}nther and Mihai Cara and - Ivo Busko and Simon Conseil and Michael Droettboom and - Azalee Bostroem and E. M. Bray and Lars Andersen Bratholm and - Tom Wilson and Matt Craig and Geert Barentsen and - Sergio Pascual and Axel Donath and Johnny Greco and - Gabriel Perren and P. L. Lim and Wolfgang Kerzendorf}, - title = {astropy/photutils: v0.6}, - month = jan, - year = 2019, - doi = {10.5281/zenodo.2533376}, - url = {https://doi.org/10.5281/zenodo.2533376} - } - -All Photutils versions (and more citation formats) can be found at -https://doi.org/10.5281/zenodo.596036. + @software{larry_bradley_2020_4044744, + author = {Larry Bradley and + Brigitta Sipőcz and + Thomas Robitaille and + Erik Tollerud and + Zé Vinícius and + Christoph Deil and + Kyle Barbary and + Tom J Wilson and + Ivo Busko and + Hans Moritz Günther and + Mihai Cara and + Simon Conseil and + Azalee Bostroem and + Michael Droettboom and + E. M. Bray and + Lars Andersen Bratholm and + P. L. Lim and + Geert Barentsen and + Matt Craig and + Sergio Pascual and + Gabriel Perren and + Johnny Greco and + Axel Donath and + Miguel de Val-Borro and + Wolfgang Kerzendorf and + Yoonsoo P. Bach and + Benjamin Alan Weaver and + Francesco D'Eugenio and + Harrison Souchereau and + Leonardo Ferreira}, + title = {astropy/photutils: 1.0.0}, + month = sep, + year = 2020, + publisher = {Zenodo}, + version = {1.0.0}, + doi = {10.5281/zenodo.4044744}, + url = {https://doi.org/10.5281/zenodo.4044744} + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/__init__.py new/photutils-1.0.1/photutils/__init__.py --- old/photutils-1.0.0/photutils/__init__.py 2020-09-22 06:24:35.000000000 +0200 +++ new/photutils-1.0.1/photutils/__init__.py 2020-09-25 04:56:53.000000000 +0200 @@ -28,10 +28,10 @@ citation_file = os.path.join(os.path.dirname(__file__), 'CITATION.rst') with open(citation_file, 'r') as citation: - refs = citation.read().split('@misc')[1:] + refs = citation.read().split('@software')[1:] if len(refs) == 0: return '' - bibtexreference = "@misc{0}".format(refs[0]) + bibtexreference = "@software{0}".format(refs[0]) return bibtexreference diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/psf/models.py new/photutils-1.0.1/photutils/psf/models.py --- old/photutils-1.0.0/photutils/psf/models.py 2020-09-22 22:01:02.000000000 +0200 +++ new/photutils-1.0.1/photutils/psf/models.py 2020-09-25 02:08:19.000000000 +0200 @@ -108,7 +108,7 @@ the `compute_interpolator` method. See `compute_interpolator` for more details. - oversampling : float or tuple of two floats, optional + oversampling : int or tuple of two int, optional The oversampling factor(s) of the model in the ``x`` and ``y`` directions. If ``oversampling`` is a scalar it will be treated as being the same in both x and y; otherwise a tuple of two @@ -245,20 +245,25 @@ return self._oversampling def _set_oversampling(self, value): - """ - This is a private method because it's used in the initializer by - the ``oversampling`` - """ + value = np.atleast_1d(value) - try: - value = np.atleast_1d(value).astype(float) - if len(value) == 1: - value = np.repeat(value, 2) - except ValueError: - raise ValueError('Oversampling factors must be float') + if np.any(~np.isfinite(value)): + raise ValueError('Oversampling factor must be a finite value') if np.any(value <= 0): - raise ValueError('Oversampling factors must be greater than 0') + raise ValueError('Oversampling factor must be greater than 0') + + if len(value) == 1: + value = np.repeat(value, 2) + if len(value) != 2: + raise ValueError('Oversampling factor must have 1 or 2 ' + 'elements') + if value.ndim != 1: + raise ValueError('Oversampling factor must be 1D') + + value_int = value.astype(int) + if np.any(value_int != value): # e.g., 2.0 is OK, 2.1 is not + raise ValueError('Oversampling elements must be integers') self._oversampling = value @@ -490,6 +495,8 @@ xi = np.asarray(x) - x_0 yi = np.asarray(y) - y_0 + xi = xi.astype(float) + yi = yi.astype(float) xi += self._x_origin yi += self._y_origin @@ -601,18 +608,6 @@ "normalization constant. Normalization " "constant will be set to 1.", NonNormalizable) - def _set_oversampling(self, value): - try: - value = np.atleast_1d(value).astype(int) - if len(value) == 1: - value = np.repeat(value, 2) - except ValueError: - raise ValueError('Oversampling factor must be a scalar') - if np.any(value <= 0): - raise ValueError('Oversampling factor must be greater than 0') - - self._oversampling = value - def normalized_data(self): """ Overloaded dummy function that also returns self._data, as the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/psf/tests/test_epsf.py new/photutils-1.0.1/photutils/psf/tests/test_epsf.py --- old/photutils-1.0.0/photutils/psf/tests/test_epsf.py 2020-09-22 22:01:02.000000000 +0200 +++ new/photutils-1.0.1/photutils/psf/tests/test_epsf.py 2020-09-25 02:08:19.000000000 +0200 @@ -176,13 +176,14 @@ EPSFModel(data, flux=None) data[2, 2] = 1 - for oversampling in [np.NaN, 'a', -1, [-2, 4]]: + for oversampling in [-1, [-2, 4], (1, 4, 8), ((1, 2), (3, 4)), + np.ones((2, 2, 2)), 2.1, np.nan, (1, np.inf)]: with pytest.raises(ValueError): EPSFModel(data, oversampling=oversampling) - for origin in ['a', (1, 2, 3)]: - with pytest.raises(TypeError): - EPSFModel(data, origin=origin) + origin = (1, 2, 3) + with pytest.raises(TypeError): + EPSFModel(data, origin=origin) @pytest.mark.skipif('not HAS_SCIPY') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/psf/tests/test_models.py new/photutils-1.0.1/photutils/psf/tests/test_models.py --- old/photutils-1.0.0/photutils/psf/tests/test_models.py 2020-09-22 06:24:35.000000000 +0200 +++ new/photutils-1.0.1/photutils/psf/tests/test_models.py 2020-09-25 02:08:19.000000000 +0200 @@ -103,7 +103,7 @@ def test_oversampling_inputs(self): data = np.arange(30).reshape(5, 6) - for oversampling in [4, (3, 3), (3, 4), '1', ('1', '2')]: + for oversampling in [4, (3, 3), (3, 4)]: fim = FittableImageModel(data, oversampling=oversampling) if not hasattr(oversampling, '__len__'): _oversamp = float(oversampling) @@ -111,9 +111,10 @@ _oversamp = tuple(float(o) for o in oversampling) assert np.all(fim._oversampling == _oversamp) - for oversampling in ['a', ('b', 2), (-1, 3), -1]: + for oversampling in [-1, [-2, 4], (1, 4, 8), ((1, 2), (3, 4)), + np.ones((2, 2, 2)), 2.1, np.nan, (1, np.inf)]: with pytest.raises(ValueError): - fim = FittableImageModel(data, oversampling=oversampling) + FittableImageModel(data, oversampling=oversampling) class TestGriddedPSFModel: @@ -345,7 +346,7 @@ dict(xname='x_0', yname='y_0', fluxname=None, renormalize_psf=True), dict(xname='x_0', yname='y_0', fluxname=None, renormalize_psf=False), dict(xname=None, yname=None, fluxname=None, renormalize_psf=False) - ]) + ]) def test_prfadapter_integrates(self, adapterkwargs): from scipy.integrate import dblquad diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils/version.py new/photutils-1.0.1/photutils/version.py --- old/photutils-1.0.0/photutils/version.py 2020-09-23 03:48:34.000000000 +0200 +++ new/photutils-1.0.1/photutils/version.py 2020-09-25 05:31:26.000000000 +0200 @@ -5,4 +5,4 @@ from setuptools_scm import get_version version = get_version(root='..', relative_to=__file__) except Exception: - version = '1.0.0' + version = '1.0.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils.egg-info/PKG-INFO new/photutils-1.0.1/photutils.egg-info/PKG-INFO --- old/photutils-1.0.0/photutils.egg-info/PKG-INFO 2020-09-23 03:48:34.000000000 +0200 +++ new/photutils-1.0.1/photutils.egg-info/PKG-INFO 2020-09-25 05:31:26.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: photutils -Version: 1.0.0 +Version: 1.0.1 Summary: An Astropy package for source detection and photometry Home-page: https://github.com/astropy/photutils Author: Photutils Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/photutils-1.0.0/photutils.egg-info/SOURCES.txt new/photutils-1.0.1/photutils.egg-info/SOURCES.txt --- old/photutils-1.0.0/photutils.egg-info/SOURCES.txt 2020-09-23 03:48:35.000000000 +0200 +++ new/photutils-1.0.1/photutils.egg-info/SOURCES.txt 2020-09-25 05:31:27.000000000 +0200 @@ -62,6 +62,7 @@ docs/_templates/autosummary/base.rst docs/_templates/autosummary/class.rst docs/_templates/autosummary/module.rst +docs/dev/releasing.rst docs/psf_spec/background_estimator.rst docs/psf_spec/block_diagram.png docs/psf_spec/block_template.rst