diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 40ff40f..4045daa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -12,6 +12,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,8 +25,9 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - - Container: [e.g. `nvcr.io/nvidia/pytorch:25.04-py3`] - - Bare metal: [e.g. Ubuntu 22.04, PyTorch v2.0.6, CUDA 12.6, etc.] + +- Container: [e.g. `nvcr.io/nvidia/pytorch:25.04-py3`] +- Bare metal: [e.g. Ubuntu 22.04, PyTorch v2.0.6, CUDA 12.6, etc.] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..03feab3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pre-commit + + - name: Install pre-commit hooks + run: | + pre-commit install + + - name: Run lint + run: | + pre-commit run --all-files diff --git a/README.md b/README.md index 061e1b2..ebe873b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # cuHPX - GPU-Accelerated utilities for data on HEALPix grids +[![img](https://github.com/NVlabs/cuHPX/actions/workflows/ci.yaml/badge.svg)](https://github.com/NVlabs/cuHPX/actions/workflows/ci.yaml) +[![license][cuhpx_license_img]][cuhpx_license_url] +[![format][cuhpx_format_img]][cuhpx_format_url] +[![ruff][cuhpx_ruff_img]][cuhpx_ruff_url] + cuHPX is a library for performing transformations and analysis on HEALPix using the GPU. Currently, it supports data shuffling between the RING/NESTED layout and the flat index layout used in the earth-2 grid. Other features include @@ -121,3 +126,13 @@ python3 test/harmonic_transform_test.py python3 test/differentiability_test.py python3 test/regridding_test.py ``` + + + +[cuhpx_license_img]: https://img.shields.io/badge/License-Apache%202.0-green?style=flat-square +[cuhpx_format_img]: https://img.shields.io/badge/Code%20Style-Black-black?style=flat-square +[cuhpx_ruff_img]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square + +[cuhpx_license_url]: ./LICENSE +[cuhpx_format_url]: https://github.com/psf/black +[cuhpx_ruff_url]: https://github.com/astral-sh/ruff diff --git a/cuhpx/hpx_sht.py b/cuhpx/hpx_sht.py index 2a2f041..bb77bb2 100644 --- a/cuhpx/hpx_sht.py +++ b/cuhpx/hpx_sht.py @@ -642,7 +642,7 @@ def backward(ctx, grad_output): class SHTCUDA(nn.Module): - def __init__(self, nside, lmax=None, mmax=None, quad_weights="ring", norm = "ortho", csphase=True): + def __init__(self, nside, lmax=None, mmax=None, quad_weights="ring", norm="ortho", csphase=True): super().__init__() self.nside = nside @@ -693,7 +693,7 @@ def forward(self, x): class iSHTCUDA(nn.Module): - def __init__(self, nside, lmax=None, mmax=None, quad_weights="ring", norm = "ortho", csphase=True): + def __init__(self, nside, lmax=None, mmax=None, quad_weights="ring", norm="ortho", csphase=True): super().__init__() self.nside = nside