Skip to content

Commit

Permalink
Merge branch 'main' into ahijevyc/neighborhood_filter
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzedwick authored Oct 1, 2024
2 parents 47b9cda + e40df10 commit f75db0d
Show file tree
Hide file tree
Showing 39 changed files with 1,356 additions and 1,481 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
python -m twine check dist/*
- name: Publish package to PyPI
uses: pypa/[email protected].1
uses: pypa/[email protected].2
with:
skip-existing: true
verbose: true
148 changes: 148 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Code of Conduct

## Our Pledge

We, as members, contributors, creators, stewards, and maintainers, i.e. all the
participants, of UXarray pledge to make participation in our software, system
or hardware project and community a safe, healthy, open, productive, welcoming,
diverse, inclusive, and harassment-free experience for everyone, regardless of
age, body size, visible or invisible disability, ethnicity, sex characteristics,
gender identity and expression, level of experience, education, socio-economic
status, nationality, personal appearance, race, caste, color, religion, or
sexual identity and orientation, as well as any other characteristic protected
under applicable US federal or state law.

All participants are required to abide by this Code of Conduct.

## Our Standards

Examples of behaviors that contribute to a positive environment for our community
include:

- Demonstrating empathy and kindness toward other people
- Being considerate and respectful of and collaborative with differing opinions,
viewpoints, and experiences
- Acknowledging the contributions of others
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community
- Respecting the rules and policies of the project and venue

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

- Public or private 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
- The use of sexualized language or imagery, and sexual attention or advances
of any kind
- 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
- Threatening or stalking anyone, including a participant
- Trolling, insulting or derogatory comments, and personal or political attacks
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies to all community spaces managed by UXarray whether
they be physical, online or face-to-face, and also applies when an individual is
officially representing the community in public spaces. This includes but is not
limited to project code, code repository, associated web pages, documentation,
mailing lists, project websites and wiki pages, issue tracker, meetings, telecons,
events, use of official email or 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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the the `@UXARRAY/uxarray-dev` GitHub handle as the community leaders
in this group can view and manage the reported content, and hence are responsible
for enforcement.

All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant Code of Conduct,
version 2.1][homepage], [version 2.1][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/UXARRAY/uxarray/e252a7669acc6a733bca14ac244bbf02e665dbb0/docs/_static/images/logos/uxarray_logo_h_light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/UXARRAY/uxarray/e252a7669acc6a733bca14ac244bbf02e665dbb0/docs/_static/images/logos/uxarray_logo_h_dark.svg">
<img alt="Shows a black logo in light color mode and a white one in dark color mode." src="https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png" width="450">
</picture>
<img src="https://github.com/UXARRAY/uxarray/raw/main/docs/_static/images/logos/uxarray_logo_h_dark.svg" data-canonical-src="https://github.com/UXARRAY/uxarray/raw/main/docs/_static/images/logos/uxarray_logo_h_dark.svg" width="450"/><br>


-----------------

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"setuptools_scm": [""],
"xarray": [""],
"netcdf4": [""],
"pip+git+https://github.com/philipc2/pyfma.git": [""]
"pip+pyfma": [""]
},


Expand Down
10 changes: 0 additions & 10 deletions benchmarks/face_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ def time_face_bounds(self, grid_path):
def peakmem_face_bounds(self, grid_path):
"""Peak memory usage obtain ``Grid.face_bounds."""
face_bounds = self.uxgrid.bounds

class Bounds:
def setup(self):
self.uxgrid = ux.open_grid(r"C:\Users\chmie\PycharmProjects\ncar-uxarray\uxarray-hongyu\benchmarks\oQU480.grid.nc")

def teardown(self):
del self.uxgrid

def time_bounds(self):
self.uxgrid.bounds
15 changes: 14 additions & 1 deletion benchmarks/mpas_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,20 @@ def time_nearest_neighbor_remapping(self):
def time_inverse_distance_weighted_remapping(self):
self.uxds_480["bottomDepth"].remap.inverse_distance_weighted(self.uxds_120.uxgrid)


class HoleEdgeIndices(DatasetBenchmark):
def time_construct_hole_edge_indices(self, resolution):
ux.grid.geometry._construct_hole_edge_indices(self.uxds.uxgrid.edge_face_connectivity)

class CheckNorm:
param_names = ['resolution']
params = ['480km', '120km']

def setup(self, resolution):
self.uxgrid = ux.open_grid(file_path_dict[resolution][0])

def teardown(self, resolution):
del self.uxgrid

def time_check_norm(self, resolution):
from uxarray.grid.validation import _check_normalization
_check_normalization(self.uxgrid)
1 change: 1 addition & 0 deletions ci/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies:
- scipy
- shapely
- spatialpandas
- geopandas
- xarray
- asv
- pip:
Expand Down
1 change: 1 addition & 0 deletions ci/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
- pandas
- geocat-datafiles
- spatialpandas
- geopandas
- pip:
- antimeridian
- git+https://github.com/philipc2/pyfma.git # fix until https://github.com/nschloe/pyfma/pull/17 is merged
1 change: 1 addition & 0 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- scipy
- shapely
- spatialpandas
- geopandas
- xarray
- asv
- pip:
Expand Down
1 change: 1 addition & 0 deletions ci/install-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ python -m pip install \
pandas \
scikit-learn \
scipy \
geopandas \
xarray

# install rest from source
Expand Down
9 changes: 7 additions & 2 deletions docs/internal_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,17 @@ SCRIP
io._scrip._encode_scrip


Shapefile
GeoPandas
---------
.. autosummary::
:toctree: generated/

io._shapefile._read_shpfile
io._geopandas._read_geodataframe
io._geopandas._read_geopandas
io._geopandas._encode_geopandas
io._geopandas._standardize_geopandas
io._geopandas._is_geopandas
io._geopandas._validate_minimum_geopandas

Vertices
--------
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies = [
"scipy",
"shapely",
"spatialpandas",
"geopandas",
"xarray",
]
# minimal dependencies end
Expand Down
15 changes: 15 additions & 0 deletions test/meshfiles/geojson/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
GeoJSON is a format for encoding a variety of geographic data structures, including points, lines, and polygons.

This repository contains "sample_chicago_buildings" GeoJSON file featuring a selection of buildings in Chicago. The file includes:

Number of polygons: 10
Polygon 1: 26 sides
Polygon 2: 36 sides
Polygon 3: 29 sides
Polygon 4: 10 sides
Polygon 5: 30 sides
Polygon 6: 8 sides
Polygon 7: 7 sides
Polygon 8: 9 sides
Polygon 9: 7 sides
Polygon 10: 19 sides
Loading

0 comments on commit f75db0d

Please sign in to comment.