From 484ba7fa459f3e3f03463b9b3511262fab8cb18f Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 21:28:32 +0200 Subject: [PATCH 01/29] Create python-package-conda.yml --- .github/workflows/python-package-conda.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-package-conda.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml new file mode 100644 index 0000000..f358604 --- /dev/null +++ b/.github/workflows/python-package-conda.yml @@ -0,0 +1,34 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + conda install pytest + pytest From 2181079d37b1baf4c1a39c2ac08cc13509fd3ebb Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 21:39:59 +0200 Subject: [PATCH 02/29] add env file --- pystrometry/environment.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pystrometry/environment.yml diff --git a/pystrometry/environment.yml b/pystrometry/environment.yml new file mode 100644 index 0000000..f34751a --- /dev/null +++ b/pystrometry/environment.yml @@ -0,0 +1,13 @@ +name: pystrometry-environment +channels: + - conda-forge +dependencies: + - python == 3.9 + - numpy == 1.24.3 + - pip == 23.1.2 + - kepmodel == 1.0.6 + - pandas == 2.0.2 + - matplotlib == 3.7.1 + - astroquery == 0.4.6 + - astropy == 5.0.6 + \ No newline at end of file From a1ec12d873c9b46d9adadf5127b3310fd53dccf0 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 21:45:27 +0200 Subject: [PATCH 03/29] move file --- pystrometry/environment.yml => environment.yml | 1 - 1 file changed, 1 deletion(-) rename pystrometry/environment.yml => environment.yml (99%) diff --git a/pystrometry/environment.yml b/environment.yml similarity index 99% rename from pystrometry/environment.yml rename to environment.yml index f34751a..72970fe 100644 --- a/pystrometry/environment.yml +++ b/environment.yml @@ -10,4 +10,3 @@ dependencies: - matplotlib == 3.7.1 - astroquery == 0.4.6 - astropy == 5.0.6 - \ No newline at end of file From e9cbe95f539c2f1d2f70ae4f90fa49c4e3db8ed9 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:02:42 +0200 Subject: [PATCH 04/29] allow failure --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index f358604..998bc85 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -28,6 +28,7 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + continue-on-error: true - name: Test with pytest run: | conda install pytest From 4b80c7ad3e77a43ed70937d82b41f01c537327cf Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:15:24 +0200 Subject: [PATCH 05/29] add deps --- environment.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/environment.yml b/environment.yml index 72970fe..1cdc572 100644 --- a/environment.yml +++ b/environment.yml @@ -10,3 +10,6 @@ dependencies: - matplotlib == 3.7.1 - astroquery == 0.4.6 - astropy == 5.0.6 + - sympy + - linearfit + - scipy From ad901ddcb4bd62d447abc1a3d2715b9db5257102 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:20:42 +0200 Subject: [PATCH 06/29] add dep --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1cdc572..e7f44f8 100644 --- a/environment.yml +++ b/environment.yml @@ -11,5 +11,6 @@ dependencies: - astroquery == 0.4.6 - astropy == 5.0.6 - sympy - - linearfit - scipy +pip: + - linearfit From 2f21515cc234cdb922d60dd45ab83d4fc568e6c6 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:25:21 +0200 Subject: [PATCH 07/29] deps --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index e7f44f8..43c2598 100644 --- a/environment.yml +++ b/environment.yml @@ -12,5 +12,5 @@ dependencies: - astropy == 5.0.6 - sympy - scipy -pip: - - linearfit + - pip: + - linearfit From 90dbbde4a5234d52c88cb11aa89492a7cca1ac80 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:29:54 +0200 Subject: [PATCH 08/29] add deps --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 43c2598..d256a1a 100644 --- a/environment.yml +++ b/environment.yml @@ -12,5 +12,6 @@ dependencies: - astropy == 5.0.6 - sympy - scipy + - uncertainties - pip: - linearfit From b69f3efd32f438b42fb4b3200a76b94f5b558947 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Tue, 24 Sep 2024 22:35:31 +0200 Subject: [PATCH 09/29] specify test dir --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 998bc85..2ee56d5 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -32,4 +32,4 @@ jobs: - name: Test with pytest run: | conda install pytest - pytest + pytest pystrometry/tests From f8340eb307fd89636ba84b2304473ff6718c0604 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 16:12:47 +0200 Subject: [PATCH 10/29] add build --- .github/workflows/python-package-conda.yml | 29 ++++++++++++++++++++++ environment-3.9.yml | 17 +++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 environment-3.9.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 2ee56d5..2c2cc23 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -33,3 +33,32 @@ jobs: run: | conda install pytest pytest pystrometry/tests + + + build-linux-python-3.9: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Add conda to system path + run: | + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment-3.9.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + continue-on-error: true + - name: Test with pytest + run: | + conda install pytest + pytest pystrometry/tests diff --git a/environment-3.9.yml b/environment-3.9.yml new file mode 100644 index 0000000..69bbeff --- /dev/null +++ b/environment-3.9.yml @@ -0,0 +1,17 @@ +name: pystrometry-environment +channels: + - conda-forge +dependencies: + - python == 3.9 + - numpy + - pip + - kepmodel + - pandas + - matplotlib + - astroquery + - astropy + - sympy + - scipy + - uncertainties + - pip: + - linearfit From 67b61900a1341c776ad625bf6b601be330c0c28f Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 16:15:21 +0200 Subject: [PATCH 11/29] fix --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 2c2cc23..8aaf038 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -35,7 +35,7 @@ jobs: pytest pystrometry/tests - build-linux-python-3.9: + build-linux-python-3p9: runs-on: ubuntu-latest strategy: max-parallel: 5 From 1d9c8a319949fc04ac537b31ffd2bcecb4ec84ce Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 17:13:52 +0200 Subject: [PATCH 12/29] try eorkaround --- pystrometry/_astropy_init.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pystrometry/_astropy_init.py b/pystrometry/_astropy_init.py index 5371878..7d76498 100644 --- a/pystrometry/_astropy_init.py +++ b/pystrometry/_astropy_init.py @@ -26,10 +26,16 @@ if not _ASTROPY_SETUP_: # noqa import os from warnings import warn - from astropy.config.configuration import ( - update_default_config, - ConfigurationDefaultMissingError, - ConfigurationDefaultMissingWarning) + + try: + from astropy.config.configuration import ( + update_default_config, + ConfigurationDefaultMissingError, + ConfigurationDefaultMissingWarning) + except ImportError: + # Handle the case where update_default_config is not available + # update_default_config = None + pass # Create the test function for self test from astropy.tests.runner import TestRunner From 014f246c3ff7ab59624cc6976a5937274393bc37 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 22:12:28 +0200 Subject: [PATCH 13/29] remove files --- pystrometry/__init__.py | 6 +-- pystrometry/conftest.py | 57 ----------------------- pystrometry/example_mod.py | 77 ------------------------------- pystrometry/tests/test_example.py | 14 ------ 4 files changed, 3 insertions(+), 151 deletions(-) delete mode 100644 pystrometry/conftest.py delete mode 100644 pystrometry/example_mod.py delete mode 100644 pystrometry/tests/test_example.py diff --git a/pystrometry/__init__.py b/pystrometry/__init__.py index 33e7a5c..a2886c4 100644 --- a/pystrometry/__init__.py +++ b/pystrometry/__init__.py @@ -18,6 +18,6 @@ class UnsupportedPythonError(Exception): if sys.version_info < tuple((int(val) for val in __minimum_python_version__.split('.'))): raise UnsupportedPythonError("pystrometry does not support Python < {}".format(__minimum_python_version__)) -if not _ASTROPY_SETUP_: - # For egg_info test builds to pass, put package imports here. - from .example_mod import * +# if not _ASTROPY_SETUP_: +# # For egg_info test builds to pass, put package imports here. +# from .example_mod import * diff --git a/pystrometry/conftest.py b/pystrometry/conftest.py deleted file mode 100644 index ebab8a1..0000000 --- a/pystrometry/conftest.py +++ /dev/null @@ -1,57 +0,0 @@ -# This file is used to configure the behavior of pytest when using the Astropy -# test infrastructure. - -from astropy.version import version as astropy_version -if astropy_version < '3.0': - # With older versions of Astropy, we actually need to import the pytest - # plugins themselves in order to make them discoverable by pytest. - from astropy.tests.pytest_plugins import * -else: - # As of Astropy 3.0, the pytest plugins provided by Astropy are - # automatically made available when Astropy is installed. This means it's - # not necessary to import them here, but we still need to import global - # variables that are used for configuration. - from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS - -from astropy.tests.helper import enable_deprecations_as_exceptions - -## Uncomment the following line to treat all DeprecationWarnings as -## exceptions. For Astropy v2.0 or later, there are 2 additional keywords, -## as follow (although default should work for most cases). -## To ignore some packages that produce deprecation warnings on import -## (in addition to 'compiler', 'scipy', 'pygments', 'ipykernel', and -## 'setuptools'), add: -## modules_to_ignore_on_import=['module_1', 'module_2'] -## To ignore some specific deprecation warning messages for Python version -## MAJOR.MINOR or later, add: -## warnings_to_ignore_by_pyver={(MAJOR, MINOR): ['Message to ignore']} -# enable_deprecations_as_exceptions() - -## Uncomment and customize the following lines to add/remove entries from -## the list of packages for which version numbers are displayed when running -## the tests. Making it pass for KeyError is essential in some cases when -## the package uses other astropy affiliated packages. -# try: -# PYTEST_HEADER_MODULES['Astropy'] = 'astropy' -# PYTEST_HEADER_MODULES['scikit-image'] = 'skimage' -# del PYTEST_HEADER_MODULES['h5py'] -# except (NameError, KeyError): # NameError is needed to support Astropy < 1.0 -# pass - -## Uncomment the following lines to display the version number of the -## package rather than the version number of Astropy in the top line when -## running the tests. -# import os -# -## This is to figure out the package version, rather than -## using Astropy's -# try: -# from .version import version -# except ImportError: -# version = 'dev' -# -# try: -# packagename = os.path.basename(os.path.dirname(__file__)) -# TESTED_VERSIONS[packagename] = version -# except NameError: # Needed to support Astropy <= 1.0.0 -# pass diff --git a/pystrometry/example_mod.py b/pystrometry/example_mod.py deleted file mode 100644 index f6dd5e1..0000000 --- a/pystrometry/example_mod.py +++ /dev/null @@ -1,77 +0,0 @@ -def primes(imax): - """ - Returns prime numbers up to imax. - - Parameters - ---------- - imax: int - The number of primes to return. This should be less or equal to 10000. - - Returns - ------- - result: list - The list of prime numbers. - """ - - p = list(range(10000)) - result = [] - k = 0 - n = 2 - - if imax > 10000: - raise ValueError("imax should be <= 10000") - - while len(result) < imax: - i = 0 - while i < k and n % p[i] != 0: - i = i + 1 - if i == k: - p[k] = n - k = k + 1 - result.append(n) - if k > 10000: - break - n = n + 1 - - return result - - -def do_primes(n, usecython=False): - if usecython: - - raise Exception("This template does not have the example C code included.") - - else: - print('Using pure python primes') - return primes(n) - - -def main(args=None): - - from astropy.utils.compat import argparse - from time import time - - parser = argparse.ArgumentParser(description='Process some integers.') - parser.add_argument('-c', '--use-cython', dest='cy', action='store_true', - help='Use the Cython-based Prime number generator.') - parser.add_argument('-t', '--timing', dest='time', action='store_true', - help='Time the Fibonacci generator.') - parser.add_argument('-p', '--print', dest='prnt', action='store_true', - help='Print all of the Prime numbers.') - parser.add_argument('n', metavar='N', type=int, - help='Get Prime numbers up to this number.') - - res = parser.parse_args(args) - - pre = time() - primes = do_primes(res.n, res.cy) - post = time() - - print('Found {0} prime numbers'.format(len(primes))) - print('Largest prime: {0}'.format(primes[-1])) - - if res.time: - print('Running time: {0} s'.format(post - pre)) - - if res.prnt: - print('Primes: {0}'.format(primes)) diff --git a/pystrometry/tests/test_example.py b/pystrometry/tests/test_example.py deleted file mode 100644 index f43e8b8..0000000 --- a/pystrometry/tests/test_example.py +++ /dev/null @@ -1,14 +0,0 @@ - - - -def test_primes(): - from ..example_mod import primes - assert primes(10) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] - - -def test_deprecation(): - import warnings - warnings.warn( - "This is deprecated, but shouldn't raise an exception, unless " - "enable_deprecations_as_exceptions() called from conftest.py", - DeprecationWarning) From 09d452916f2cc983c9a57bad45f1396fc135cc10 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 22:19:45 +0200 Subject: [PATCH 14/29] add py3.11 pipeline --- .github/workflows/python-package-conda.yml | 29 +++++++++++++++++++++- pystrometry/environment-3.11.yml | 17 +++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pystrometry/environment-3.11.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 8aaf038..252497e 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -33,7 +33,6 @@ jobs: run: | conda install pytest pytest pystrometry/tests - build-linux-python-3p9: runs-on: ubuntu-latest @@ -62,3 +61,31 @@ jobs: run: | conda install pytest pytest pystrometry/tests + +build-linux-python-3p11: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: '3.11' + - name: Add conda to system path + run: | + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment-3.11.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + continue-on-error: true + - name: Test with pytest + run: | + conda install pytest + pytest pystrometry/tests diff --git a/pystrometry/environment-3.11.yml b/pystrometry/environment-3.11.yml new file mode 100644 index 0000000..29ee0b7 --- /dev/null +++ b/pystrometry/environment-3.11.yml @@ -0,0 +1,17 @@ +name: pystrometry-environment +channels: + - conda-forge +dependencies: + - python == 3.11 + - numpy + - pip + - kepmodel + - pandas + - matplotlib + - astroquery + - astropy + - sympy + - scipy + - uncertainties + - pip: + - linearfit From f5175ed1795e87e670fb136782bb59cd93b58fd3 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 22:21:17 +0200 Subject: [PATCH 15/29] fix indent --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 252497e..0ee4ee1 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -62,7 +62,7 @@ jobs: conda install pytest pytest pystrometry/tests -build-linux-python-3p11: + build-linux-python-3p11: runs-on: ubuntu-latest strategy: max-parallel: 5 From d452706e89637affd35fb1041e0c1db43777bd22 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 22:23:08 +0200 Subject: [PATCH 16/29] fix file location --- pystrometry/environment-3.11.yml => environment-3.11.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pystrometry/environment-3.11.yml => environment-3.11.yml (100%) diff --git a/pystrometry/environment-3.11.yml b/environment-3.11.yml similarity index 100% rename from pystrometry/environment-3.11.yml rename to environment-3.11.yml From aba330418ccfcc28500f355e702f2fb384229a69 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Wed, 25 Sep 2024 22:32:21 +0200 Subject: [PATCH 17/29] set solver --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 0ee4ee1..3a43bbe 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -78,6 +78,7 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | + conda config --set solver classic conda env update --file environment-3.11.yml --name base - name: Lint with flake8 run: | From e4cc9d8254a59b50c7c6327d252cb186b1a40f6b Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 09:56:06 +0200 Subject: [PATCH 18/29] add 3p10 build --- .github/workflows/python-package-conda.yml | 40 ++++++++++++++++++---- environment-3.10.yml | 17 +++++++++ 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 environment-3.10.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 3a43bbe..12c92d9 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -62,24 +62,23 @@ jobs: conda install pytest pytest pystrometry/tests - build-linux-python-3p11: + build-linux-python-3p10: runs-on: ubuntu-latest strategy: max-parallel: 5 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: '3.11' + python-version: '3.10' - name: Add conda to system path run: | echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda config --set solver classic - conda env update --file environment-3.11.yml --name base + conda env update --file environment-3.10.yml --name base - name: Lint with flake8 run: | conda install flake8 @@ -89,4 +88,33 @@ jobs: - name: Test with pytest run: | conda install pytest - pytest pystrometry/tests + pytest pystrometry/tests + +# build-linux-python-3p11: +# runs-on: ubuntu-latest +# strategy: +# max-parallel: 5 +# +# steps: +# - uses: actions/checkout@v4 +# - name: Set up Python 3.11 +# uses: actions/setup-python@v3 +# with: +# python-version: '3.11' +# - name: Add conda to system path +# run: | +# echo $CONDA/bin >> $GITHUB_PATH +# - name: Install dependencies +# run: | +# conda config --set solver classic +# conda env update --file environment-3.11.yml --name base +# - name: Lint with flake8 +# run: | +# conda install flake8 +# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics +# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics +# continue-on-error: true +# - name: Test with pytest +# run: | +# conda install pytest +# pytest pystrometry/tests diff --git a/environment-3.10.yml b/environment-3.10.yml new file mode 100644 index 0000000..d34307e --- /dev/null +++ b/environment-3.10.yml @@ -0,0 +1,17 @@ +name: pystrometry-environment +channels: + - conda-forge +dependencies: + - python == 3.10 + - numpy + - pip + - kepmodel + - pandas + - matplotlib + - astroquery + - astropy + - sympy + - scipy + - uncertainties + - pip: + - linearfit From e0f855def077141b47453c698fb1e6bf91a35a55 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 10:41:15 +0200 Subject: [PATCH 19/29] fix --- environment-3.10.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment-3.10.yml b/environment-3.10.yml index d34307e..a6dec96 100644 --- a/environment-3.10.yml +++ b/environment-3.10.yml @@ -2,7 +2,6 @@ name: pystrometry-environment channels: - conda-forge dependencies: - - python == 3.10 - numpy - pip - kepmodel From 6abb03167296db31d3d83d153cd2132a67955f06 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 12:31:11 +0200 Subject: [PATCH 20/29] fix --- .github/workflows/python-package-conda.yml | 3 ++- environment-3.10-pinned.yml | 17 +++++++++++++++++ environment.yml => environment-3.9-pinned.yml | 0 readthedocs.yml | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 environment-3.10-pinned.yml rename environment.yml => environment-3.9-pinned.yml (100%) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 12c92d9..f5b145d 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -20,7 +20,8 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment.yml --name base + conda env update --file environment-3.10-pinned.yml --name base +# conda env update --file environment-3.9-pinned.yml --name base - name: Lint with flake8 run: | conda install flake8 diff --git a/environment-3.10-pinned.yml b/environment-3.10-pinned.yml new file mode 100644 index 0000000..0b71367 --- /dev/null +++ b/environment-3.10-pinned.yml @@ -0,0 +1,17 @@ +name: pystrometry-environment +channels: + - conda-forge +dependencies: + - python == 3.10 + - numpy == 1.24.3 + - pip == 23.1.2 + - kepmodel == 1.0.6 + - pandas == 2.0.2 + - matplotlib == 3.7.1 + - astroquery == 0.4.6 + - astropy == 5.0.6 + - sympy + - scipy + - uncertainties + - pip: + - linearfit diff --git a/environment.yml b/environment-3.9-pinned.yml similarity index 100% rename from environment.yml rename to environment-3.9-pinned.yml diff --git a/readthedocs.yml b/readthedocs.yml index 47fe6ad..7f483e3 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,5 +1,5 @@ conda: - file: .rtd-environment.yml + file: .rtd-environment-3.9-pinned.yml python: setup_py_install: true From c1e9e78cf8b578b827f38aa42bdf031f29f16a66 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 22:28:01 +0200 Subject: [PATCH 21/29] try to fix --- .github/workflows/python-package-conda.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index f5b145d..8c7467d 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -3,7 +3,7 @@ name: Python Package using Conda on: [push] jobs: - build-linux: + build-linux-python-3p10: runs-on: ubuntu-latest strategy: max-parallel: 5 @@ -20,7 +20,8 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment-3.10-pinned.yml --name base + conda env update --file environment-3.10.yml --name base +# conda env update --file environment-3.10-pinned.yml --name base # conda env update --file environment-3.9-pinned.yml --name base - name: Lint with flake8 run: | @@ -63,7 +64,7 @@ jobs: conda install pytest pytest pystrometry/tests - build-linux-python-3p10: + build-linux-python-3p10-pinned: runs-on: ubuntu-latest strategy: max-parallel: 5 @@ -79,7 +80,8 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment-3.10.yml --name base +# conda env update --file environment-3.10.yml --name base + conda env update --file environment-3.10-pinned.yml --name base - name: Lint with flake8 run: | conda install flake8 From 208a2fe491fa10ca87eef310b83875c2abf13bbc Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 22:33:21 +0200 Subject: [PATCH 22/29] fix --- .github/workflows/python-package-conda.yml | 32 ---------------------- 1 file changed, 32 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 8c7467d..fafe226 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -21,8 +21,6 @@ jobs: - name: Install dependencies run: | conda env update --file environment-3.10.yml --name base -# conda env update --file environment-3.10-pinned.yml --name base -# conda env update --file environment-3.9-pinned.yml --name base - name: Lint with flake8 run: | conda install flake8 @@ -80,7 +78,6 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | -# conda env update --file environment-3.10.yml --name base conda env update --file environment-3.10-pinned.yml --name base - name: Lint with flake8 run: | @@ -92,32 +89,3 @@ jobs: run: | conda install pytest pytest pystrometry/tests - -# build-linux-python-3p11: -# runs-on: ubuntu-latest -# strategy: -# max-parallel: 5 -# -# steps: -# - uses: actions/checkout@v4 -# - name: Set up Python 3.11 -# uses: actions/setup-python@v3 -# with: -# python-version: '3.11' -# - name: Add conda to system path -# run: | -# echo $CONDA/bin >> $GITHUB_PATH -# - name: Install dependencies -# run: | -# conda config --set solver classic -# conda env update --file environment-3.11.yml --name base -# - name: Lint with flake8 -# run: | -# conda install flake8 -# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics -# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics -# continue-on-error: true -# - name: Test with pytest -# run: | -# conda install pytest -# pytest pystrometry/tests From 54b529f7d48dbf8d70f1b993cbd6ba54599c16e9 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 22:37:36 +0200 Subject: [PATCH 23/29] fix --- environment-3.10.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment-3.10.yml b/environment-3.10.yml index a6dec96..039af28 100644 --- a/environment-3.10.yml +++ b/environment-3.10.yml @@ -1,7 +1,8 @@ -name: pystrometry-environment +name: pystrometry-environment-3p10 channels: - conda-forge dependencies: + - python == 3.10 - numpy - pip - kepmodel From ff1effe4593fcaeccf1d623a1d43055c29202101 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 22:48:11 +0200 Subject: [PATCH 24/29] fix --- .github/workflows/python-package-conda.yml | 31 ---------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index fafe226..6cd30ba 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -3,37 +3,6 @@ name: Python Package using Conda on: [push] jobs: - build-linux-python-3p10: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda env update --file environment-3.10.yml --name base - - name: Lint with flake8 - run: | - conda install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - continue-on-error: true - - name: Test with pytest - run: | - conda install pytest - pytest pystrometry/tests - build-linux-python-3p9: runs-on: ubuntu-latest strategy: From 77ddb12256480076e1cf3448cf690895f6d3851b Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 23:01:30 +0200 Subject: [PATCH 25/29] fix --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 6cd30ba..df08f43 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -31,7 +31,7 @@ jobs: conda install pytest pytest pystrometry/tests - build-linux-python-3p10-pinned: + build-linux-python-3p10: runs-on: ubuntu-latest strategy: max-parallel: 5 @@ -47,7 +47,7 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment-3.10-pinned.yml --name base + conda env update --file environment-3.10.yml --name base - name: Lint with flake8 run: | conda install flake8 From 7efef0e2ef40ce47db0f64d04ad481ac7752fdf2 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 23:04:15 +0200 Subject: [PATCH 26/29] fix --- .github/workflows/python-package-conda.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index df08f43..dffd928 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -3,23 +3,23 @@ name: Python Package using Conda on: [push] jobs: - build-linux-python-3p9: + build-linux-python-3p10: runs-on: ubuntu-latest strategy: max-parallel: 5 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: '3.9' + python-version: '3.10' - name: Add conda to system path run: | echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment-3.9.yml --name base + conda env update --file environment-3.10.yml --name base - name: Lint with flake8 run: | conda install flake8 @@ -29,25 +29,25 @@ jobs: - name: Test with pytest run: | conda install pytest - pytest pystrometry/tests + pytest pystrometry/tests - build-linux-python-3p10: + build-linux-python-3p9: runs-on: ubuntu-latest strategy: max-parallel: 5 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: '3.9' - name: Add conda to system path run: | echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - conda env update --file environment-3.10.yml --name base + conda env update --file environment-3.9.yml --name base - name: Lint with flake8 run: | conda install flake8 @@ -57,4 +57,5 @@ jobs: - name: Test with pytest run: | conda install pytest - pytest pystrometry/tests + pytest pystrometry/tests + From e500482473949259e53af8d531b9d86160e6bf9a Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 23:07:38 +0200 Subject: [PATCH 27/29] another attempt --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index dffd928..2280664 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -28,6 +28,7 @@ jobs: continue-on-error: true - name: Test with pytest run: | + conda config --set solver classic conda install pytest pytest pystrometry/tests From ee9275b82f66cc5d17e879502a0fe8abefe96610 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Thu, 26 Sep 2024 23:09:57 +0200 Subject: [PATCH 28/29] add pinned --- .github/workflows/python-package-conda.yml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 2280664..bbda8ee 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -32,6 +32,35 @@ jobs: conda install pytest pytest pystrometry/tests + build-linux-python-3p10-pinned: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Add conda to system path + run: | + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment-3.10-pinned.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + continue-on-error: true + - name: Test with pytest + run: | + conda config --set solver classic + conda install pytest + pytest pystrometry/tests + build-linux-python-3p9: runs-on: ubuntu-latest strategy: From 9a3ac68718362e6efb2bcd0a4c408412c0843034 Mon Sep 17 00:00:00 2001 From: Johannes Sahlmann Date: Fri, 27 Sep 2024 08:29:26 +0200 Subject: [PATCH 29/29] bump version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 816a37d..02363a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,7 +43,7 @@ github_project = https://github.com/Johannes-Sahlmann/pystrometry install_requires = astropy, linearfit>=1.0.2, matplotlib, scipy, astroquery, sympy # version should be PEP440 compatible (https://www.python.org/dev/peps/pep-0440/) -version = 0.5.0 +version = 0.6.0 # Note: you will also need to change this in your package's __init__.py minimum_python_version = 3.7