Skip to content

Commit

Permalink
Merge branch 'main' into issue425
Browse files Browse the repository at this point in the history
  • Loading branch information
kafitzgerald authored Nov 22, 2023
2 parents 6aa4994 + 9c38bd3 commit b5b9d22
Show file tree
Hide file tree
Showing 39 changed files with 2,682 additions and 1,368 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Request
about: Request a release for this package
title: '[Release]: <version-number>'
labels: release, high-priority
assignees: 'pilotchute'
assignees: 'anissa111'
---
## For Package Leader

Expand Down
13 changes: 9 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ apply to this PR, comment it out or delete it. -->
**General**
- [ ] Make an issue if one doesn't already exist
- [ ] Link the issue this PR resolves by adding `closes #XXX` to the PR description where XXX is the number of the issue.
- [ ] Add a brief summary of changes to `docs/release-notes.rst`
- [ ] Add a brief summary of changes to `docs/release-notes.rst` in a relevant section for the next unreleased release. Possible sections include: Documentation, New Features, Bug Fixes, Internal Changes, Breaking Changes/Deprecated
- [ ] Add appropriate labels to this PR
- [ ] Make your changes in a forked repository rather than directly in this repo
- [ ] Open this PR as a draft if it is not ready for review
- [ ] Convert this PR from a draft to a full PR before requesting reviewers
- [ ] Request `@NCAR/geocat` for reviews
- [ ] Passes `precommit`. To set up on your local, run `pre-commit install` from the top level of the repository. To manually run pre-commits, use `pre-commit run --all-files` and re-add any changed files before committing again and pushing.
- [ ] If needed, squash and merge PR commits into a single commit to clean up commit history

**Functionality**
- [ ] Function is in appropriate module file
Expand All @@ -25,7 +25,7 @@ apply to this PR, comment it out or delete it. -->
- [ ] Tests cover all possible logical paths in your function

**Documentation**
- [ ] Docstrings have been added to all new functions ([Documentation Standards](https://geocat.ucar.edu/pages/contributing.html#422-documentation))
- [ ] Docstrings have been added to all new functions ([Documentation Standards](https://geocat-comp.readthedocs.io/en/stable/contrib.html#docstrings))
- [ ] Docstrings have updated with any function changes
- [ ] Internal functions have a preceding underscore (`_`) and have been added to `docs/internal_api/index.rst`
- [ ] User facing functions have been added to `docs/user_api/index.rst` under their module
Expand All @@ -41,7 +41,7 @@ apply to this PR, comment it out or delete it. -->
Thank you so much for your PR! To help us review your contribution, please
consider the following points:
- A development guide is available at https://geocat.ucar.edu/pages/contributing.html.
- A development guide is available at https://geocat-comp.readthedocs.io/en/stable/contrib.html
- Fork this repository and open the PR from your fork. Do not directly work on
the NCAR/geocat-comp repository.
Expand All @@ -54,6 +54,11 @@ consider the following points:
in detail (Why is this change required? What problem does it solve?) and
link to any relevant issues.
- The summary in `docs/release-notes.rst` should be written as " 'Summary of changes'
by `FirstName LastName`_ in (:pr:`PR#`) ". For first time contributors, add your new
name and GitHub link to bottom of `docs/release-notes.rst` as _`FirstName LastName`
:https://github.com/githubUsername
**PR Etiquette Reminders**
- This PR should be listed as a draft PR until you are ready to request reviewers
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/asv-benchmarking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: ASV Benchmarking

on:
push:
branches:
- main
workflow_dispatch:

jobs:
benchmark:
runs-on: ubuntu-latest
env:
CONDA_ENV_FILE: ./build_envs/asv-bench.yml
ASV_DIR: ./benchmarks

steps:
- name: Checkout geocat-comp
uses: actions/checkout@v4
with:
repository: NCAR/geocat-comp
fetch-depth: 0
- name: Checkout geocat-comp-asv
uses: actions/checkout@v4
with:
repository: NCAR/geocat-comp-asv
persist-credentials: false
fetch-depth: 0
ref: main
path: geocat-comp-asv
- name: Set environment variables
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./build_envs/asv-bench.yml
environment-name: asv-bench
cache-environment: true
cache-environment-key: "benchmark-${{runner.os}}-${{runner.arch}}-${{env.TODAY}}"

- name: Copy existing results
run: |
if [ -d "geocat-comp-asv/results" ]; then
cp -r geocat-comp-asv/results benchmarks/
fi
- name: Run benchmarks
shell: bash -l {0}
id: benchmark
run: |
cd benchmarks
asv machine --machine GH-Actions --os ubuntu-latest --arch x64 --cpu "2-core unknown" --ram 7GB
asv run v2023.02.0..main --skip-existing --parallel || true
- name: Commit and push benchmark results
run: |
if [ -d "geocat-comp-asv/results" ]; then
rm -r geocat-comp-asv/results
fi
cp -r benchmarks/results/ geocat-comp-asv/
cd geocat-comp-asv
git config --local user.email "[email protected]"
git config --local user.name "anissa111"
git add results
git commit -m "[🤖] Update benchmark results"
- name: Push to geocat-comp-asv
if: github.ref == 'refs/heads/main' && github.repository == 'NCAR/geocat-comp'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.COMP_ASV_PAT }}
branch: main
force: true
repository: NCAR/geocat-comp-asv
directory: geocat-comp-asv
6 changes: 3 additions & 3 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest"]
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: conda_setup
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: conda_setup
Expand All @@ -43,25 +43,28 @@ jobs:

- name: Install geocat-comp
run: |
python -m pip install . --no-deps
python -m pip install --no-deps -e .
- name: conda list
run: |
conda list
- name: Run Namespace Tests
run: |
python -m pytest test
- name: Run Tests
run: python -m pytest test -v
--cov=./geocat/comp
--cov-report=xml
--junitxml=pytest.xml

- name: Run Coverage Tests
run: |
python -m pytest test -v --cov=./geocat/comp --cov-report=xml
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: Test results for ${{ runner.os }}-${{ matrix.python-version }}
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
Expand All @@ -73,7 +76,7 @@ jobs:
shell: bash -l {0}
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: conda_setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.6.1
- uses: actions/checkout@v4
- uses: actions/setup-python@v4.7.1
- uses: pre-commit/[email protected]
10 changes: 5 additions & 5 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
if: github.repository == 'NCAR/geocat-comp'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.1
with:
python-version: '3.10'
- name: Install dependencies
Expand All @@ -29,9 +29,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.1
with:
python-version: '3.10'
- name: Install dependencies
Expand All @@ -47,7 +47,7 @@ jobs:
python -m twine check dist/*
- name: Publish package to PyPI
uses: pypa/[email protected].6
uses: pypa/[email protected].10
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upstream-dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:

steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: conda_setup
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,9 @@ test/dask-worker-space/
.vscode/
generated/
docs/notebook-examples.txt

# asv environments
.asv
benchmarks/env
benchmarks/results
benchmarks/html
54 changes: 54 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Code of Conduct

## Our Pledge

We, as contributors, creators, stewards, and maintainers (participants), of GeoCAT-comp pledge to make participation in our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone. All participants are required to abide by this Code of Conduct. This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression, level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race, religion, or sexual orientation, as well as any other characteristic protected under applicable US federal or state law.

## Our Standards

Examples of behaviors that contribute to a positive environment include:

- All participants are treated with respect and consideration, valuing a diversity of views and opinions
- Be considerate, respectful, and collaborative
- Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
- Acknowledging the contributions of others
- Avoid personal attacks directed toward other participants
- Be mindful of your surroundings and of your fellow participants
- Alert project administrators if you notice a dangerous situation or someone in distress
- Respect the rules and policies of the project and venue

Examples of unacceptable behavior include, but are not limited to:

- Harassment, intimidation, or discrimination in any form
- Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested
- Unwelcome sexual attention or advances
- Personal attacks directed at other guests, members, participants, etc.
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
- Alarming, intimidating, threatening, or hostile comments or conduct
- Inappropriate use of nudity and/or sexual images
- Threatening or stalking anyone, including a participant
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Scope

This Code of Conduct applies to all spaces managed by GeoCAT-comp whether they be physical, online or face-to-face. This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages, issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the community uses for communication. In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them. Representation of a project may be further defined and clarified by project maintainers.

## Community Responsibilities

Everyone in the community is empowered to respond to people who are showing unacceptable behavior. They can talk to them privately or publicly. Anyone requested to stop unacceptable behavior is expected to comply immediately. If the behavior continues concerns may be brought to the project administrators or to any other party listed in the Reporting section below.

## Project Administrator Responsibilities

Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate behavior and provide support when people in the community point out inappropriate behavior. Project administrator(s) are normally the ones that would be tasked to carry out the actions in the Consequences section below.

## Reporting

Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as outlined in the Consequences section below. However, making a report to a project administrator is not considered an ‘official report’ to UCAR.

## Consequences

Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure.

## Attribution

This Code of Conduct was originally adapted from the Contributor Covenant, version 1.4. We then aligned it with the UCAR Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of Conduct. The UCAR Participant Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. The original version of this for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR website at [https://doi.org/10.5065/6w2c-a132](https://doi.org/10.5065/6w2c-a132). The date that it was adopted by this project was 11 September 2023. When responding to complaints, UCAR HR and ODEI will do so based on the latest published version. Therefore, any project-specific changes should follow the Process for Changes section above.
Loading

0 comments on commit b5b9d22

Please sign in to comment.