Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docstrings and test coverage #56

Merged
merged 42 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f0be15c
Miscellaneous
ghiggi May 21, 2024
edd435b
Miscellaneous
ghiggi May 21, 2024
f9fe627
Add markdown linter precommit
ghiggi May 21, 2024
71875d9
Add madforhooks precommit
ghiggi May 21, 2024
fcfa1ff
add pyupgrade precommit
ghiggi May 21, 2024
6104794
Add nbstripout precommit
ghiggi May 21, 2024
eea01c0
Add nbQa precommit
ghiggi May 21, 2024
b590a29
YAML formatting
ghiggi May 21, 2024
d044fee
Add rst precommit checks
ghiggi May 21, 2024
9b4182c
Add prettier precommit
ghiggi May 21, 2024
964d684
Move rgb plot argument to plot_kwargs
ghiggi May 21, 2024
2f1d97e
Refactor code order
ghiggi May 21, 2024
65ead33
Fix pcolormesh cartopy issue
ghiggi May 22, 2024
2330085
Improve test coverage plots
ghiggi May 22, 2024
ce4b8fb
Add initial new code for bucket partitioning
ghiggi May 24, 2024
aab47ea
Add code and test for bucket writers and routines
ghiggi May 27, 2024
efe5064
Add code and test for bucket writers and routines
ghiggi May 27, 2024
66d34b3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 27, 2024
fca2b85
Update bucket to_xarray utility for multindexing
ghiggi May 28, 2024
380a235
Update readme
ghiggi May 28, 2024
f609ef5
Add tests for bucket readers
ghiggi May 29, 2024
b5f8128
Add tests for bucket readers
ghiggi May 29, 2024
f3684d4
Finalize readers and filters
ghiggi May 29, 2024
053113c
Intermediate partitioning class refactor
ghiggi May 30, 2024
f6c1859
Add refactor bucket reader interface
ghiggi May 30, 2024
281e56b
Add TilePartitioning
ghiggi May 31, 2024
9b468ce
Generalize add_labels, add_centroids and to_xarray methods
ghiggi May 31, 2024
22431de
Add fixes for windows
ghiggi Jun 1, 2024
ec78ed9
Fix bucket tests
ghiggi Jun 1, 2024
1dd4bf7
Debug windows CI
ghiggi Jun 1, 2024
bd78ec9
Fix windows buckets tests
ghiggi Jun 1, 2024
402e572
Rename partitioning names argument to levels
ghiggi Jun 1, 2024
5c95643
Rename partitioning_order to order
ghiggi Jun 1, 2024
decef44
Rename partitioning_flavor to flavor
ghiggi Jun 1, 2024
3ffde2c
Remove xbin and ybin attrs in XYPartitioning
ghiggi Jun 1, 2024
0faf7c1
Add partitioning query_vertices methods
ghiggi Jun 1, 2024
433172c
Update encoding chunksizes and preferred_chunks when transposing
ghiggi Jun 1, 2024
fb3f1f3
Fix bug in remap_numeric_array
ghiggi Jun 1, 2024
5446358
Set quality variable as coordinate
ghiggi Jun 2, 2024
ae0fe1f
Refactor plot_image
ghiggi Jun 2, 2024
7f73aef
Add new test data
ghiggi Jun 2, 2024
5c2d168
Refactor and improve visualization
ghiggi Jun 2, 2024
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
6 changes: 3 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
source =
gpm
omit =
*dev*
*docs*
*tutorials*
gpm/bucket/*
gpm/cli/*
gpm/encoding/*
gpm/etc/*
gpm/retrieval/*
gpm/retrievals/*
gpm/visualization/animation.py
gpm/utils/pyresample.py
gpm/_version.py

[report]
Expand Down
100 changes: 50 additions & 50 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
---
name: 🐞 Bug Report
description: File a bug/issue
title: "[BUG] <title>"
labels: [bug, triage]
assignees: ghiggi
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **Python**: 3.8.2
value: |
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **Python**: 3.8.2
value: |
- OS:
- python:
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!

Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
blank_issues_enabled: false
10 changes: 5 additions & 5 deletions .github/dependabot.yml → .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yaml-file
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: github-actions # See documentation for possible values
directory: / # Location of package manifests
schedule:
interval: "monthly"
interval: monthly
67 changes: 31 additions & 36 deletions .github/workflows/lint.yml → .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
name: Lint
on: [push, pull_request, workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Ruff
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: ruff --all-files

- name: Black
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: black --all-files

- name: blackdoc
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: blackdoc --all-files

- name: codespell
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: codespell --all-files
---
name: Lint
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Ruff
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: ruff --all-files
- name: Black
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: black --all-files
- name: blackdoc
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: blackdoc --all-files
- name: codespell
if: success() || failure()
uses: pre-commit/[email protected]
with:
extra_args: codespell --all-files
Original file line number Diff line number Diff line change
@@ -1,56 +1,48 @@
name: Package Release to PyPI
on:
push:
tags:
- "v*"

jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install pypa/build
run: >-
python -m
pip install build

- name: Build a binary wheel
run: >-
python -m build

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Get Asset name
if: success() || failure()
run: |
export PKG=$(ls dist/ | grep tar)
set -- $PKG
echo "asset_name=$1" >> $GITHUB_ENV

- name: Create GitHub Release
if: success() || failure()
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref }}
tag_name: ${{ github.ref }}
files: |
dist/${{ env.asset_name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
---
name: Package Release to PyPI
on:
push:
tags: [v*]
jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install pypa/build
run: >-
python -m
pip install build
- name: Build a binary wheel
run: >-
python -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Get Asset name
if: success() || failure()
run: |
export PKG=$(ls dist/ | grep tar)
set -- $PKG
echo "asset_name=$1" >> $GITHUB_ENV
- name: Create GitHub Release
if: success() || failure()
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref }}
tag_name: ${{ github.ref }}
files: |
dist/${{ env.asset_name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
Loading
Loading