diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ead3bce16..6f0666511 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,81 +1,86 @@ - name: ci - on: push: branches: - master - ci - pull_request: branches: - master - jobs: doctest-and-lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [ + "3.9", "3.10", "3.11", "3.12" + ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.6.15 - - - name: Install pinned dependencies + python-version: ${{ matrix.python-version }} + - name: Display Python version run: | - python -m pip install --upgrade pip - pip install astropy==3.0.1 docutils==0.17.1 matplotlib==3.3.0 numpy==1.15.4 pandas==1.0.0 pyflakes scipy==1.2.2 sphinx==1.7.2 spktype21 - - - name: Install Skyfield + python -c "import sys; print(sys.version)" + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install -r requirements.txt + - name: Build and install Skyfield run: | python setup.py sdist - pip install -e . - + pip install dist/* - name: Doctest run: | ./test-docs.sh - + grep " 0 failures in tests" ./documentation/_build/doctest/output.txt + grep " 0 failures in setup code" ./documentation/_build/doctest/output.txt + grep " 0 failures in cleanup code" ./documentation/_build/doctest/output.txt - name: Lint run: | pyflakes $(find skyfield/ -name '*.py') - test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python: [python2, python3] - + python-version: [ + "2.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" + ] steps: - - uses: actions/checkout@v2 - - - name: Install + - uses: actions/checkout@v4 + - if: ${{ matrix.python-version == '2.7' }} + name: Set up Python ${{ matrix.python-version }} run: | - sudo apt install -q -q python3-virtualenv virtualenv - virtualenv -p ${{matrix.python}} V - - - name: Build scripts + sudo apt install python2 + curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py + sudo python2 get-pip.py + - if: ${{ matrix.python-version != '2.7' }} + name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install and activate venv run: | - cat <<'EOF' > GITHUB_INSTALL.sh + sudo apt install -q -q python3-virtualenv virtualenv + virtualenv -p python${{matrix.python-version}} V source ./V/bin/activate - echo PATH is $PATH - which python - python --version - python -m pip install --upgrade pip - python setup.py sdist - python -m pip install dist/* + echo PATH=$PATH >> $GITHUB_ENV + - name: Display Python version + run: | + python -c "import sys; print(sys.version)" + - name: Install test dependencies + run: | + pip install --upgrade pip setuptools python -m pip install mock pandas python -m pip install https://github.com/brandon-rhodes/assay/archive/master.zip - EOF - cat <<'EOF' > GITHUB_TEST.sh - source ./V/bin/activate - cd ci && ../test-code.sh - EOF - - - name: Install + - name: Build and install Skyfield run: | - bash -e -x GITHUB_INSTALL.sh - - - name: Test + python setup.py sdist + pip install dist/* + - name: Run tests run: | - bash -e -x GITHUB_TEST.sh + ./test-code.sh diff --git a/documentation/_static/goce-reentry.png b/documentation/_static/goce-reentry.png index 6d6073921..0b3f858b8 100644 Binary files a/documentation/_static/goce-reentry.png and b/documentation/_static/goce-reentry.png differ diff --git a/documentation/_static/mars-elongation.png b/documentation/_static/mars-elongation.png index d47ff1e4f..57b70ac32 100644 Binary files a/documentation/_static/mars-elongation.png and b/documentation/_static/mars-elongation.png differ diff --git a/documentation/_static/mars-quadrature-undersampled.png b/documentation/_static/mars-quadrature-undersampled.png index 08336e150..b74c629ee 100644 Binary files a/documentation/_static/mars-quadrature-undersampled.png and b/documentation/_static/mars-quadrature-undersampled.png differ diff --git a/documentation/_static/mars-quadrature.png b/documentation/_static/mars-quadrature.png index cf7129797..52a78b984 100644 Binary files a/documentation/_static/mars-quadrature.png and b/documentation/_static/mars-quadrature.png differ diff --git a/documentation/_static/neowise-finder-chart.png b/documentation/_static/neowise-finder-chart.png index 24d95d4d2..dcd9ee49e 100644 Binary files a/documentation/_static/neowise-finder-chart.png and b/documentation/_static/neowise-finder-chart.png differ diff --git a/documentation/_static/venus-elongation-undersampled.png b/documentation/_static/venus-elongation-undersampled.png index b660e5add..9225e79bb 100644 Binary files a/documentation/_static/venus-elongation-undersampled.png and b/documentation/_static/venus-elongation-undersampled.png differ diff --git a/documentation/_static/venus-elongation.png b/documentation/_static/venus-elongation.png index c4a0d72cf..cb08dcb76 100644 Binary files a/documentation/_static/venus-elongation.png and b/documentation/_static/venus-elongation.png differ diff --git a/documentation/_static/venus_evening_chart.png b/documentation/_static/venus_evening_chart.png index a9c72fdd1..3295fa60a 100644 Binary files a/documentation/_static/venus_evening_chart.png and b/documentation/_static/venus_evening_chart.png differ diff --git a/documentation/bright_stars.png b/documentation/bright_stars.png index 5d96d638e..c5c9fec35 100644 Binary files a/documentation/bright_stars.png and b/documentation/bright_stars.png differ diff --git a/requirements.txt b/requirements.txt index 8be3282e5..1036e9da9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,23 @@ -astropy==3.2.2 -beautifulsoup4==4.6.0 -html5lib==1.0.1 -lxml==4.9.1 -mock==2.0.0 -numpy==1.15.4 -matplotlib==3.3.0 -pandas==1.0.0 -pyflakes==2.1.1 +# python>=3.9 +astropy==6.0.1 +beautifulsoup4==4.12.3 +html5lib==1.1.0 +lxml==5.3.0 +mock==5.1.0 +numpy==1.26.4 # breaks if upgraded to v2.0.0 due to repr changes +matplotlib==3.9.2 +pandas==2.2.2 +pyflakes==3.2.0 python-dateutil>=2.5.0 pytz -sphinx==1.7.2 +sphinx==2.4.5 # breaks if upgraded to v3.0.0 +jinja2==3.0.3 # breaks if upgraded to v3.1.0 due to deprecated functions +alabaster==0.7.13 # alabaster>=0.7.14 requiers sphinx>=3.4.0 +sphinxcontrib-applehelp==1.0.4 # sphinxcontrib-applehelp>=1.0.5 requires sphinx>=5.0.0 +sphinxcontrib-devhelp==1.0.2 # sphinxcontrib-devhelp>=1.0.3 requires sphinx>=5.0.0 +sphinxcontrib-htmlhelp==2.0.1 # sphinxcontrib-htmlhelp>=2.0.2 requires sphinx>=5.0.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 # sphinxcontrib-qthelp>=1.0.4 requires sphinx>=5.0.0 +sphinxcontrib-serializinghtml==1.1.5 # sphinxcontrib-serializinghtml>=1.1.6 requires sphinx>=5.0.0 spktype21 https://github.com/brandon-rhodes/assay/archive/master.zip diff --git a/setup.py b/setup.py index 81b4ae31e..094ea6185 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,6 @@ import os - -if 'SKYFIELD_USE_SETUPTOOLS' in os.environ: - import setuptools - print('Using setuptools version', setuptools.__version__) - -from distutils.core import setup -from distutils.command.sdist import sdist +from setuptools import setup +from setuptools.command.sdist import sdist import skyfield # safe, because __init__.py contains no import statements @@ -33,15 +28,13 @@ def make_distribution(self): 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Scientific/Engineering :: Astronomy', ], packages=[