Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ jobs:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v1
uses: actions/cache@v4
env:
# Increase this value to reset cache if ci/environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test_env_glidertools # Defined in ci/environment*.yml
auto-update-conda: false
python-version: ${{ matrix.python-version }}
environment-file: ci/environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
conda-remove-defaults: "true"
- name: Set up conda environment
shell: bash -l {0}
run: |
Expand All @@ -45,7 +46,7 @@ jobs:
run: |
pytest -n auto --cov=./ --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.11"
- name: Run pre-commit
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.1
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
if: github.repository == 'GliderToolsCommunity/GliderTools'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Check git status
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
python -m twine check dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
7 changes: 6 additions & 1 deletion tests/test_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def test_sunrise_sunset():
]
lat = -35, 45, 80
lon = 0, 0, 0
sunrise, sunset = sunset_sunrise(time, lat, lon)
try:
sunrise, sunset = sunset_sunrise(time, lat, lon)
except (OSError, ImportError) as e:
pytest.skip(
f"Skipping test because skyfield could not download ephemeris data: {e}"
)

# Three entries, there should be three outputs
assert len(sunrise) == len(lat)
Expand Down