Skip to content

Commit

Permalink
Merge branch 'main' into quest_tile
Browse files Browse the repository at this point in the history
  • Loading branch information
RomiP committed Oct 2, 2024
2 parents 74c3feb + d0bc315 commit c441b9f
Show file tree
Hide file tree
Showing 78 changed files with 8,383 additions and 6,705 deletions.
35 changes: 35 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,41 @@
"contributions": [
"ideas"
]
},
{
"login": "cclauss",
"name": "Christian Clauss",
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"profile": "https://github.com/cclauss",
"contributions": [
"maintenance",
"review",
"tool"
]
},
{
"login": "jrenrut",
"name": "Jeremy Turner",
"avatar_url": "https://avatars.githubusercontent.com/u/42989238?v=4",
"profile": "https://github.com/jrenrut",
"contributions": [
"bug",
"code"
]
},
{
"login": "mfisher87",
"name": "Matt Fisher",
"avatar_url": "https://avatars.githubusercontent.com/u/3608264?v=4",
"profile": "https://mfisher87.github.io/",
"contributions": [
"bug",
"code",
"doc",
"maintenance",
"test",
"infra"
]
}
],
"contributorsPerLine": 7,
Expand Down
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
branch = True
source = icepyx
omit =
setup.py
doc/*
41 changes: 0 additions & 41 deletions .flake8

This file was deleted.

19 changes: 19 additions & 0 deletions .github/actions/install-icepyx/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Install icepyx'
description: 'Install icepyx and dev dependencies'

inputs:
python-version:
required: true

runs:
using: "composite"
steps:
- uses: "actions/setup-python@v5"
with:
python-version: "${{ inputs.python-version }}"

- name: "Install package and test dependencies"
shell: "bash"
run: |
python -m pip install .
python -m pip install -r requirements-dev.txt
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: monthly
2 changes: 1 addition & 1 deletion .github/workflows/get_pypi_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "traffic"

Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Integration test"
# NOTE: We're just running the tests that require earthdata login here; we
# don't distinguish between unit and integration tests yet.

on:
push:
branches:
- "main" # Releases
- "development" # Feature PR merges
pull_request:
branches:
- "main" # Release PRs
workflow_dispatch:
inputs:
ref:
description: "The ref to test"
type: "string"


jobs:
test:
name: "Integration test"
# Do not run on PRs from forks:
if: "${{ !github.event.pull_request.head.repo.fork }}"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
ref: "${{ inputs.ref }}"

- uses: "./.github/actions/install-icepyx"
with:
python-version: "3.12"

- name: "Run tests"
env:
EARTHDATA_PASSWORD: "${{ secrets.EARTHDATA_PASSWORD }}"
NSIDC_LOGIN: "${{ secrets.EARTHDATA_PASSWORD }}"
run: |
pytest icepyx/ --verbose --cov app \
icepyx/tests/test_behind_NSIDC_API_login.py \
icepyx/tests/test_auth.py
- name: "Upload coverage report"
uses: "codecov/[email protected]"
with:
token: "${{ secrets.CODECOV_TOKEN }}"
13 changes: 7 additions & 6 deletions .github/workflows/linter_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run black linter
uses: psf/black@stable
# use the flake8 linter to annotate improperly formatted code
# note linter arguments are supplied via the .flake8 config file
- name: Annotate PR after running flake8
uses: TrueBrain/actions-flake8@v2

# Use the Ruff linter to annotate code style / best-practice issues
# NOTE: More config provided in pyproject.toml
- name: Lint and annotate PR
uses: chartboost/ruff-action@v1
with:
args: "check . --output-format github"
6 changes: 3 additions & 3 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -42,7 +42,7 @@ jobs:
# Change setuptools-scm local_scheme to "no-local-version" so the
# local part of the version isn't included, making the version string
# compatible with PyPI.
sed --in-place "s/node-and-date/no-local-version/g" setup.py
sed --in-place "s/node-and-date/no-local-version/g" pyproject.toml
- name: Build source and wheel distributions
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/traffic_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "traffic"

# Calculates traffic and clones and stores in CSV file
- name: GitHub traffic
uses: sangonzal/repository-traffic-action@v0.1.4
uses: sangonzal/repository-traffic-action@v.0.1.6
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/uml_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: set up environment
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Unit test"
# NOTE: We're just skipping the tests requiring earthdata login here; we don't
# distinguish yet between unit and integration tests.

on:
pull_request:
push:
branches:
- "main"
- "development"


jobs:
test:
name: "Unit test (Python ${{ matrix.python-version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"] #NOTE: min and max Python versions supported by icepyx

steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0

- uses: "./.github/actions/install-icepyx"
with:
python-version: "${{ matrix.python-version }}"

- name: "Run tests"
run: |
pytest icepyx/ --verbose --cov app \
--ignore=icepyx/tests/test_behind_NSIDC_API_login.py \
--ignore=icepyx/tests/test_auth.py
- name: "Upload coverage report"
uses: "codecov/[email protected]"
with:
token: "${{ secrets.CODECOV_TOKEN }}"
44 changes: 34 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
repos:
- repo: https://github.com/psf/black
rev: 24.8.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: black
- id: check-toml
- id: check-yaml
- id: check-added-large-files
args: ["--maxkb=5000"]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: name-tests-test
args: ["--pytest-test-first"]
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: requirements-txt-fixer

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: check-added-large-files
args: ["--maxkb=5000"]
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: codespell
additional_dependencies:
- tomli

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
hooks:
- id: validate-pyproject

ci:
autoupdate_schedule: monthly
Expand Down
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ATTRIBUTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ to identify core issues and propose solutions to challenges around software cred
For software, current best practices (`e.g. <https://arxiv.org/pdf/2012.13117.pdf>`_) emphasize the importance of having a document
such as this one to describe an individual community's policies for credit, authorship, and attribution.
This document is an effort to describe icepyx's policies, with an awareness that they may change
to accomodate community growth, best practices, and feedback.
to accommodate community growth, best practices, and feedback.

We do not attempt to identify contribution levels through the number of commits made to the repository (e.g. ``git shortlog -sne``)
or active engagement on GitHub (e.g. through issues, discussions, and pull requests) and Discourse.
Expand Down
Loading

0 comments on commit c441b9f

Please sign in to comment.