Skip to content

Commit ebdaeb3

Browse files
Merge pull request #8 from gregory-halverson-jpl/main
continuous integration
2 parents db7db74 + 253579a commit ebdaeb3

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.10"]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3 # This is already the latest version
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4 # This is also the latest version
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install .[dev] # Use dev to install pytest
31+
32+
- name: Run tests
33+
run: |
34+
pytest

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]
33

44
[project]
5-
name = "solar_apparent_time"
6-
version = "1.3.1"
5+
name = "solar-apparent-time"
6+
version = "1.3.2"
77
description = "methods to translate Python datetime between solar apparent time and Coordinate Universal Time (UTC)"
88
readme = "README.md"
99
authors = [
@@ -24,4 +24,4 @@ requires-python = ">=3.10"
2424
solar_apparent_time = ["*.txt"]
2525

2626
[project.urls]
27-
"Homepage" = "https://github.com/JPL-Evapotranspiration-Algorithms/solar_apparent_time"
27+
"Homepage" = "https://github.com/JPL-Evapotranspiration-Algorithms/solar-apparent-time"

tests/test_import_dependencies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
3+
# List of dependencies
4+
dependencies = [
5+
"numpy",
6+
"rasters",
7+
]
8+
9+
# Generate individual test functions for each dependency
10+
@pytest.mark.parametrize("dependency", dependencies)
11+
def test_dependency_import(dependency):
12+
__import__(dependency)

tests/test_import_sun_angles.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_import_solar_apparent_time():
2+
import solar_apparent_time

0 commit comments

Comments
 (0)