Skip to content

Commit bd733b6

Browse files
authored
Merge branch 'main' into polar_8
2 parents 2b498da + e7041c4 commit bd733b6

24 files changed

Lines changed: 511 additions & 1424 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
build-and-run:
1414
name: Build Sphinx Docs (${{ matrix.python-version }}, ${{ matrix.os }})
1515
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 60
1617
defaults:
1718
run:
1819
shell: bash -l {0}
@@ -21,22 +22,26 @@ jobs:
2122
fail-fast: false
2223
matrix:
2324
os: [ "ubuntu-latest"]
24-
python-version: [ "3.8", "3.9", "3.10" ]
25+
python-version: [ "3.9", "3.10", "3.11" ]
2526
include:
2627
- os: "macos-latest"
27-
python-version: "3.8"
28+
python-version: "3.9"
2829
- os: "macos-latest"
29-
python-version: "3.10"
30+
python-version: "3.11"
3031

3132
steps:
3233
- name: checkout
3334
uses: actions/checkout@v3
35+
- name: Set environment variables
36+
run: |
37+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
3438
- name: setup micromamba
3539
uses: mamba-org/setup-micromamba@v1
3640
with:
3741
environment-name: geocat-examples
3842
environment-file: conda_environment.yml
3943
cache-environment: true
44+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}"
4045
create-args: >-
4146
python=${{matrix.python-version}}
4247
- name: make html

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/docs/_build/
22
/docs/gallery/
3-
/docs/gallery-geocat-comp/
43
/Gallery/CSV/*.csv
54
*.ncl
65
.vscode/

CODE_OF_CONDUCT.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We, as contributors, creators, stewards, and maintainers (participants), of GeoCAT-examples pledge to make participation in our
6+
project and community a safe, productive, welcoming and inclusive experience for everyone. All participants are required
7+
to abide by this Code of Conduct. This includes respectful treatment of everyone regardless of age, body size, disability,
8+
ethnicity, gender identity or expression, level of experience, nationality, political affiliation, veteran status, pregnancy,
9+
genetic information, physical appearance, race, religion, or sexual orientation, as well as any other characteristic protected
10+
under applicable US federal or state law.
11+
12+
## Our Standards
13+
14+
Examples of behaviors that contribute to a positive environment include:
15+
16+
- All participants are treated with respect and consideration, valuing a diversity of views and opinions
17+
- Be considerate, respectful, and collaborative
18+
- Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
19+
- Acknowledging the contributions of others
20+
- Avoid personal attacks directed toward other participants
21+
- Be mindful of your surroundings and of your fellow participants
22+
- Alert project administrators if you notice a dangerous situation or someone in distress
23+
- Respect the rules and policies of the project and venue
24+
25+
Examples of unacceptable behavior include, but are not limited to:
26+
27+
- Harassment, intimidation, or discrimination in any form
28+
- Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested
29+
- Unwelcome sexual attention or advances
30+
- Personal attacks directed at other guests, members, participants, etc.
31+
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
32+
- Alarming, intimidating, threatening, or hostile comments or conduct
33+
- Inappropriate use of nudity and/or sexual images
34+
- Threatening or stalking anyone, including a participant
35+
- Other conduct which could reasonably be considered inappropriate in a professional setting
36+
37+
## Scope
38+
39+
This Code of Conduct applies to all spaces managed by GeoCAT whether they be physical, online or face-to-face.
40+
This includes project code, code repository, associated web pages, documentation, mailing lists, project websites
41+
and wiki pages, issue tracker, meetings, telecons, events, project social media accounts, and any other forums
42+
created by the project team which the community uses for communication. In addition, violations of this Code of
43+
Conduct outside these spaces may affect a person's ability to participate within them. Representation of a project
44+
may be further defined and clarified by project maintainers.
45+
46+
## Community Responsibilities
47+
48+
Everyone in the community is empowered to respond to people who are showing unacceptable behavior. They can talk to
49+
them privately or publicly. Anyone requested to stop unacceptable behavior is expected to comply immediately. If the
50+
behavior continues concerns may be brought to the project administrators or to any other party listed in the Reporting
51+
section below.
52+
53+
## Project Administrator Responsibilities
54+
55+
Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model
56+
appropriate behavior and provide support when people in the community point out inappropriate behavior. Project
57+
administrator(s) are normally the ones that would be tasked to carry out the actions in the Consequences section below.
58+
59+
## Reporting
60+
61+
Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action
62+
as outlined in the Consequences section below. However, making a report to a project administrator is not considered an
63+
‘official report’ to UCAR.
64+
65+
## Consequences
66+
67+
Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the
68+
circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits,
69+
email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently
70+
any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators
71+
also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well
72+
as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow
73+
its Harassment Reporting and Complaint Procedure.
74+
75+
## Attribution
76+
77+
This Code of Conduct was originally adapted from the Contributor Covenant, version 1.4. We then aligned it with the UCAR
78+
Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of Conduct. The UCAR Participant
79+
Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. The original version of this
80+
for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR website at
81+
[https://doi.org/10.5065/6w2c-a132](https://doi.org/10.5065/6w2c-a132). The date that it was adopted by this project was 2
82+
October 2023. When responding to complaints, UCAR HR and ODEI will do so based on the latest published version.

CONTRIBUTING.md

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1 @@
1-
Please first refer to [GeoCAT Contributor's Guide](https://geocat.ucar.edu/pages/contributing.html) for overall
2-
contribution guidelines (such as detailed description of GeoCAT structure, forking, repository cloning,
3-
branching, etc.). Once you determine that a function should be contributed under this repo, please refer to the
4-
following contribution guidelines:
5-
6-
7-
# Adding new plotting scripts to the Geocat-examples repo
8-
9-
1. Please check the followings to ensure that the example you are about to work on has not been ported yet:
10-
11-
- [GeoCAT-Examples Gallery](https://geocat-examples.readthedocs.io/en/latest/) or
12-
the `Gallery` as well as `GeoCAT-comp-examples` directories of this repo,
13-
14-
- The list of [Issues](https://github.com/NCAR/GeoCAT-examples/issues) for this repo to see if any of
15-
the existing to-do items are something you might be interested in working on.
16-
17-
- If so, please comment (or self-assign the issue if you have permissions to do so) indicating that
18-
you intend to work on it.
19-
20-
- Otherwise, you may create and self-assign an issue that describes need for the plot you are planning
21-
to contribute.
22-
23-
- For reference, NCL scripts can be seen as well: [NCL applications](http://ncl.ucar.edu/Applications/).
24-
25-
2. Determine if any critical computational functions are missing.
26-
27-
- If so, please submit a new issue (or comment on an existing issue) on this repository's GitHub page
28-
containing the script name and explanation of the need for computational function(s).
29-
30-
3. Determine if any data files needed by your script are available in the
31-
[GeoCAT-datafiles](https://github.com/NCAR/GeoCAT-datafiles) repo:
32-
33-
- If not,
34-
35-
- Submit a new issue (or comment on an existing issue) on this repository's GitHub page containing
36-
the name of the missing datafile(s), or
37-
38-
- Check [GeoCAT-datafiles contributing documentation](https://github.com/NCAR/geocat-datafiles/blob/contribuotr_updates/CONTRIBUTING.md)
39-
to see if you can contribute to the [GeoCAT-datafiles](https://github.com/NCAR/geocat-datafiles) by
40-
uploading your own file.
41-
42-
4. Create a new Python script:
43-
44-
- [template_script.py](https://github.com/NCAR/GeoCAT-examples/blob/master/template_script.py)
45-
(at the root of this repo) could be a great starting point for a new script, so you may want to
46-
consider copying that to `NCL_new_script_1.py` instead of starting from scratch.
47-
48-
- If this script originates from an NCL example, use the original NCL script's basename,
49-
but prepended with "NCL_". For example: `new_script_1.ncl` becomes `NCL_new_script_1.py`.
50-
51-
5. When you complete an example script, please try building the
52-
[Sphinx](https://www.sphinx-doc.org/en/master/)-generated documentation (i.e. html files)
53-
from this repo by running the following commands from within the `/docs` directory:
54-
55-
```bash
56-
make html
57-
```
58-
59-
- This is particularly important to see the final look of a plotting example on
60-
[GeoCAT-Examples Gallery](https://geocat-examples.readthedocs.io) as varying IDEs or local development set up of
61-
developers preferences would generate different plotting results from each other.
62-
63-
- Note: Please follow the [installation instructions](https://github.com/NCAR/geocat-examples/INSTALLATION.md)
64-
beforehand to ensure an accurate conda environment is installed and activated for GeoCAT-examples, including
65-
[Sphinx](https://www.sphinx-doc.org/en/master/).
66-
67-
- The generated HTML file can be viewed under `$GEOCAT_EXAMPLES/_build/html/gallery/` to ensure that
68-
any output (text or graphical) matches what you expected. The complete list of the plotting examples can be
69-
viewed by running the following command as well:
70-
71-
```bash
72-
open _build/html/gallery/index.html
73-
```
1+
The contributor's guide for GeoCAT-examples can be found in our [online documentation](https://geocat-examples.readthedocs.io/en/latest/contrib.html).

Gallery/Animations/NCL_animate_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ def animate(i):
9696
anim = animation.FuncAnimation(fig, animate, frames=30, interval=200)
9797

9898
# Uncomment this line to save the created animation
99-
anim.save('animate_1.gif', writer='pillow', fps=5)
99+
#anim.save('animate_1.gif', writer='pillow', fps=5)

Gallery/Topography/NCL_topo_1.py

Lines changed: 0 additions & 96 deletions
This file was deleted.

Gallery/Vectors/NCL_vector_3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@
4646

4747
# Generate axes using Cartopy projection
4848
ax = plt.axes(projection=ccrs.PlateCarree())
49-
z = gv.set_vector_density(ds, 0.017)
49+
z = gv.set_vector_density(ds, 10)
5050

5151
# Draw vector plot
5252
# Notes
5353

54-
# 1. We are using `set_vector_density` on line 47 as a replacement for NCL's vcMinDistanceF
54+
# 1. We are using the geocat-viz `set_vector_density` on line 47 as a replacement for NCL's vcMinDistanceF.
55+
# Note that it uses a minimum distance threshold specified as a integer in degrees rather than the NCL normalized device coordinates.
56+
#
5557
# 2. There is no matplotlib equivalent to "CurlyVector"
5658
Q = plt.quiver(z['lon'],
5759
z['lat'],

GeoCAT-comp-examples/README.rst

Lines changed: 0 additions & 22 deletions
This file was deleted.

GeoCAT-comp-examples/comp_only/README.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)