Skip to content

Commit f63ffde

Browse files
committedSep 10, 2020
add release notes and update contact info (icesat2py#115)
* update contact info in documentation * set up and populate changelog docs, including auto-population of contributor list * add contributors directive
1 parent 2f45663 commit f63ffde

16 files changed

+587
-37
lines changed
 

‎.mailmap

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Jessica Scheick <jbscheick@gmail.com>
2+
Jessica Scheick <jbscheick@gmail.com> JessicaS11 <jessica.scheick@maine.edu>
3+
Jessica Scheick <jbscheick@gmail.com> Jessica <JessicaS11@users.noreply.github.com>
4+
5+
Zheng Liu <liuzheng@zheng-pc.apl.washington.edu>
6+
Zheng Liu <liuzheng@zheng-pc.apl.washington.edu> liuzheng-arctic <liuzheng.atmos@gmail.com>
7+
8+
Raphael Hagen <Raphael@Raphaels-MacBook-Pro-2.local> raphael <norlandrhagen@gmail.com>
9+
Fernando Perez <Fernando.Perez@berkeley.edu>
10+
Shashank Bhushan <sbaglapl@uw.edu>
11+
Anthony Arendt <arendta@uw.edu>
12+
Scott Henderson <scottyh@uw.edu>
13+
Wei Ji <weiji.leong@vuw.ac.nz>
14+
Tom Johnson <thomas.johnson.17@ucl.ac.uk>
15+
Bruce Wallin <bruce.wallin@nsidc.org> <35819999+wallinb@users.noreply.github.com>
16+
Tyler Sutterley <tsutterl@uw.edu>
17+
Amy Steiker <47193922+asteiker@users.noreply.github.com> asteiker <amy.steiker@nsidc.org>
18+
David Shean <dshean@users.noreply.github.com>
19+
Anna Valentine <65192768+annavalentine@users.noreply.github.com>
20+
Bidhyananda Yadav <bidhya@ufl.edu>
21+
Friedrich Knuth <knuth@uw.edu>
22+

‎doc/source/community/contact.rst

+19-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22
Contact Us
33
==========
44

5-
Working with ICESat-2 data and have ideas you want to share?
6-
Have a great suggestion or recommendation of something you'd like to see
7-
implemented and want to find out if others would like that tool too?
8-
Come join the conversation at: https://discourse.pangeo.io/.
9-
Search for "icesat-2" under the "science" topic to find us.
5+
The best way to contact us depends on what information you're looking for.
6+
7+
* Need help installing, running, or using `icepyx`? Add a new topic to ask for help on `Discourse <https://discourse.pangeo.io/c/science/icesat-2/16>`_ (after reviewing the documentation and existing topics, of course, to see if they answer your question!) or attend one of our regular virtual meetings (details below).
8+
* Found a bug or have a feature request? Post an issue on `GitHub <https://github.com/icesat2py/icepyx/issues>`_!
9+
* Have an idea you'd like to discuss? Start a conversation on `Discourse <https://discourse.pangeo.io/c/science/icesat-2/16>`_ or attend one of our regular virtual meetings (details below).
10+
* Want to get involved? Do one or more of the above, or reach out to one of the dev team members individually. We're excited to hear your thoughts and provide help!
11+
12+
13+
Regular Meeting Schedule
14+
------------------------
15+
Our team (developers, users, scientists, educators) meets regularly via Zoom to provide support, troubleshoot issues, and plan development.
16+
We meet on:
17+
18+
* the second Tuesday of the month at 4pm GMT (12pm Eastern, 9am Pacific)
19+
* the fourth Monday of the month at 8pm GMT (4pm Eastern, 1pm Pacific)
20+
21+
Additional information about logging in to the meetings can be found on `this Discourse post <https://discourse.pangeo.io/t/icepyx-team-meetings/722/2?u=jessicas11>`_.
22+
23+
Absolutely NO previous software development experience is necessary to attend any meeting. Think of them more like coffee hour mixed with office hours than a conference call. We look forward to seeing you there!

‎doc/source/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import sys
1515

1616
sys.path.insert(0, os.path.abspath("../.."))
17+
sys.path.insert(0, os.path.abspath("../sphinxext"))
1718
import datetime
1819

1920
import icepyx
@@ -37,7 +38,9 @@
3738
"numpydoc",
3839
"nbsphinx",
3940
"recommonmark",
41+
"contributors", # custom extension, from pandas
4042
]
43+
4144
source_suffix = {
4245
".rst": "restructuredtext",
4346
".txt": "markdown",

‎doc/source/dev-notebooks/ICESat-2_DAAC_DataAccess_working.ipynb

+19-30
Large diffs are not rendered by default.

‎doc/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ icepyx is both a software library and a community composed of ICESat-2 data user
2525

2626
.. user_guide/Gallery
2727
user_guide/documentation/icepyx
28+
user_guide/changelog/index
2829

2930
.. toctree::
3031
:maxdepth: 2
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _release:
2+
3+
icepyx ChangeLog
4+
================
5+
6+
This is the list of changes made to icepyx in between each release. Full details can be found in the `commit logs <https://github.com/icesat2py/icepyx/commits>`_.
7+
8+
Latest Release (Version 0.3.0)
9+
------------------------------
10+
11+
.. toctree::
12+
:maxdepth: 2
13+
14+
v0.3.0
15+
16+
Version 0.2-alpha
17+
-----------------
18+
19+
.. toctree::
20+
:maxdepth: 2
21+
22+
v0.2-alpha
23+
24+
Version 0.1-alpha
25+
-----------------
26+
27+
.. toctree::
28+
:maxdepth: 2
29+
30+
v0.1-alpha
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.. _whatsnew_030:
2+
3+
What's new in 0.3.0-alpha (?? DATE ??)
4+
-----------------------------------
5+
6+
These are the changes in icepyx 0.3.0-alpha See :ref:`release` for a full changelog
7+
including other versions of icepyx.
8+
9+
10+
New Features
11+
~~~~~~~~~~~~
12+
13+
-
14+
-
15+
16+
Bug fixes
17+
~~~~~~~~~
18+
19+
-
20+
-
21+
22+
23+
Deprecations
24+
~~~~~~~~~~~~
25+
26+
-
27+
-
28+
29+
30+
Maintenance
31+
^^^^^^^^^^^
32+
33+
-
34+
-
35+
36+
37+
Documentation
38+
^^^^^^^^^^^^^
39+
40+
-
41+
-
42+
43+
44+
Other
45+
^^^^^
46+
-
47+
-
48+
49+
50+
Contributors
51+
~~~~~~~~~~~~
52+
53+
.. contributors:: v0.3.0..v0.3.1|HEAD
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.. _whatsnew_010:
2+
3+
What's new in v0.1-alpha (7 April 2020)
4+
--------------------------------------
5+
6+
This was the first official "release" of icepyx, after it had been in development since Fall 2019.
7+
8+
This changelog captures the general features of icepyx functionality at the time of this initial release, rather than providing a detailed account of all development steps and changes that were made.
9+
10+
11+
12+
13+
Features
14+
~~~~~~~~
15+
16+
- Functionality to query and order data from NSIDC using their built-in API and NASA's CMR API
17+
- Visualization of input spatial parameters
18+
- Enable subsetting using NSIDC subsetter
19+
- Variable and variable path viewing and manipulation
20+
- Set up continuous integration testing with Travis
21+
22+
23+
Bug fixes
24+
~~~~~~~~~
25+
26+
- No known bugs at release
27+
28+
29+
Deprecations
30+
~~~~~~~~~~~~
31+
32+
- is2class became icesat2data
33+
34+
35+
Documentation
36+
^^^^^^^^^^^^^
37+
38+
- Example usage notebooks
39+
- using `icepyx` to access ICESat-2 data
40+
- subsetting using the NSIDC subsetter
41+
- comparing ATLAS altimeter and DEM data in Colombia
42+
- Generate documentation using Sphinx and automate building/updating to ReadtheDocs
43+
44+
45+
Other
46+
^^^^^
47+
- Develop attribution and contribution guidelines
48+
- Provide ICESat-2 Resources Guide
49+
50+
51+
Contributors
52+
~~~~~~~~~~~~
53+
54+
.. contributors:: 12ba33d..v0.1-alpha
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.. _whatsnew_020:
2+
3+
What's new in v0.2-alpha (6 May 2020)
4+
-----------------------------------
5+
6+
These are the changes in pandas v0.2-alpha See :ref:`release` for a full changelog
7+
including other versions of icepyx.
8+
9+
10+
New Features
11+
~~~~~~~~~~~~
12+
13+
- Ongoing work to refactor the icesat2data class into a more pythonic, modular structure
14+
15+
- Create `Earthdata` login class object and call as an attribute of an icesat2data object
16+
- Move API (NSIDC and CMR) formatting functions to a separate module, `APIformatting`
17+
- Create ICESat-2 reference function module, `is2ref`
18+
- Create `Granules` class to get/order/download granules and call as an attribute of the icesat2data object
19+
- Create `Variables` class to interface with ICESat-2 nested variables
20+
- Create `Parameters` class for managing API inputs within `APIformatting` module
21+
22+
- allow installation with pip and git
23+
24+
Bug fixes
25+
~~~~~~~~~
26+
27+
- Polygon handling will now put polygon coordinates into the correct order for submitting to CMR API
28+
29+
30+
Deprecations
31+
~~~~~~~~~~~~
32+
33+
- icesat2data class was refactored - access to some functionality changed
34+
35+
36+
Maintenance
37+
^^^^^^^^^^^
38+
39+
- Update examples to work with refactored code
40+
- Update and expand tests for refactored code
41+
42+
43+
Documentation
44+
^^^^^^^^^^^^^
45+
46+
- Generate and include a UML diagram
47+
- Update documentation to reflect refactored code
48+
49+
- Separate into icesat2data API and component classes
50+
51+
52+
Contributors
53+
~~~~~~~~~~~~
54+
55+
.. contributors:: v0.1-alpha..v0.2-alpha
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _whatsnew_030:
2+
3+
What's new in v0.3.0 (?? August 2020)
4+
-----------------------------------
5+
6+
This is a summary of the changes in icepyx v0.3.0. See :ref:`release` for a full changelog
7+
including other versions of icepyx. Note that during this time period we transitioned to master + development branches, with mandatory squash commits to the development branch from working branches in order to simplify the git history.
8+
9+
10+
New Features
11+
~~~~~~~~~~~~
12+
13+
- allow data querying using tracks and cycles
14+
- transition to use of `query` class object
15+
- add Black pre-commit hook and flake8 for code formatting and style consistency
16+
- created a development branch, enabling master to be the stable release branch
17+
- add icepyx release to PyPI, thereby enabling non-dev installs with pip
18+
- add code coverage badge for testing
19+
- enable alternative Earthdata authentication with netrc
20+
- automatically unzip downloaded files into a single directory
21+
- save order IDs and enable restart of download for previously ordered data
22+
- option to suppress order status emails from NSIDC
23+
- display variables in a dictionary format
24+
- overall, the variables class was overhauled: generalized, improved, and tested
25+
26+
Bug fixes
27+
~~~~~~~~~
28+
29+
- update bounding box assertions to allow crossing dateline
30+
- add try/except for gaierror
31+
- automatically order polygon vertices properly for submission to CMR and NSIDC APIs
32+
- fix index error due to NSIDC metadata changes
33+
- skip straight to variable subsetting without needing to manually run data search first
34+
35+
36+
Deprecations
37+
~~~~~~~~~~~~
38+
39+
- `icesat2data` class is deprecated. The existing functionality to search and obtain data has been migrated to the `query` class. A new class will be created for subsequent steps of working with data.
40+
- inclusive flag for `variable.append` and `variable.remove` methods has been removed
41+
42+
43+
Maintenance
44+
^^^^^^^^^^^
45+
46+
- add PyPI building to Travis for new releases
47+
- update class architecture diagram and add to documentation page
48+
- refactor test suite into multiple modules
49+
50+
51+
Documentation
52+
^^^^^^^^^^^^^
53+
54+
- update and improve installation instructions (especially for Windows users)
55+
- review and update all docstrings (including examples)
56+
- move examples to top level directory for easy finding (and make development notebooks harder to find)
57+
- create subsetting workflow example Jupyter noteobok
58+
- improve explanations in introductory example notebook
59+
- reorganized documentation structure to be more intuitive (and categorized)
60+
61+
62+
Contributors
63+
~~~~~~~~~~~~
64+
65+
.. contributors:: v0.2-alpha..v0.3.0a|HEAD

‎doc/source/user_guide/documentation/icepyx.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
icepyx API Reference
2-
====================
1+
icepyx Documentation (API Reference)
2+
====================================
33

44

55

‎doc/sphinxext/announce.py

+205
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
#!/usr/bin/env python3
2+
# -*- encoding:utf-8 -*-
3+
"""
4+
Script to generate contributor and pull request lists
5+
6+
This script generates contributor and pull request lists for release
7+
announcements using Github v3 protocol. Use requires an authentication token in
8+
order to have sufficient bandwidth, you can get one following the directions at
9+
`<https://help.github.com/articles/creating-an-access-token-for-command-line-use/>_
10+
Don't add any scope, as the default is read access to public information. The
11+
token may be stored in an environment variable as you only get one chance to
12+
see it.
13+
14+
Usage::
15+
16+
$ ./scripts/announce.py <token> <revision range>
17+
18+
The output is utf8 rst.
19+
20+
Custom extension from the Pandas library: https://github.com/pandas-dev/pandas/blob/1.1.x/doc/sphinxext/announce.py
21+
Copied 10 August 2020 and subsequently modified.
22+
Specifically, get_authors was adjusted to check for a .mailmap file and use the git through the command line in order to utilize it if present. Using a mailmap file is currently not possible in gitpython (from git import Repo), and the recommended solution is to bring in the mailmap file yourself and use it to modify the author list (i.e. replicate the functionality that already exists in git). This felt a bit out of time-scope for right now. Alternatively, the git-fame library (imported as gitfame) uses the mailmap file and compiles statistics, but the python wrapper for this command line tool was taking forever. So, I've reverted to using os.system to use git behind the scenes instead.
23+
24+
Dependencies
25+
------------
26+
27+
- gitpython
28+
- pygithub
29+
30+
Some code was copied from scipy `tools/gh_lists.py` and `tools/authors.py`.
31+
32+
Examples
33+
--------
34+
35+
From the bash command line with $GITHUB token.
36+
37+
$ ./scripts/announce.py $GITHUB v1.11.0..v1.11.1 > announce.rst
38+
39+
"""
40+
import codecs
41+
import os
42+
import re
43+
import textwrap
44+
45+
from git import Repo
46+
47+
UTF8Writer = codecs.getwriter("utf8")
48+
this_repo = Repo(os.path.join(os.path.dirname(__file__), "..", ".."))
49+
50+
author_msg = """\
51+
A total of %d people contributed to this release. People with a
52+
"+" by their names contributed for the first time.
53+
"""
54+
55+
pull_request_msg = """\
56+
A total of %d pull requests were merged for this release.
57+
"""
58+
59+
60+
def get_authors(revision_range):
61+
pat = "^.*\\t(.*)$"
62+
lst_release, cur_release = [r.strip() for r in revision_range.split("..")]
63+
64+
if "|" in cur_release:
65+
# e.g. v1.0.1|HEAD
66+
maybe_tag, head = cur_release.split("|")
67+
assert head == "HEAD"
68+
if maybe_tag in this_repo.tags:
69+
cur_release = maybe_tag
70+
else:
71+
cur_release = head
72+
revision_range = f"{lst_release}..{cur_release}"
73+
74+
# authors, in current release and previous to current release.
75+
# We need two passes over the log for cur and prev, one to get the
76+
# "Co-authored by" commits, which come from backports by the bot,
77+
# and one for regular commits.
78+
if ".mailmap" in os.listdir(this_repo.git.working_dir):
79+
80+
xpr = re.compile(r"Co-authored-by: (?P<name>[^<]+) ")
81+
82+
gitcur = list(os.popen("git shortlog -s " + revision_range).readlines())
83+
cur = []
84+
for n in gitcur:
85+
n = re.search(r".*?\t(.*)\n.*", n).group(1)
86+
cur.append(n)
87+
cur = set(cur)
88+
89+
gitpre = list(os.popen("git shortlog -s " + lst_release).readlines())
90+
pre = []
91+
for n in gitpre:
92+
n = re.search(r".*?\t(.*)\n.*", n).group(1)
93+
pre.append(n)
94+
pre = set(pre)
95+
96+
else:
97+
98+
xpr = re.compile(r"Co-authored-by: (?P<name>[^<]+) ")
99+
cur = set(
100+
xpr.findall(
101+
this_repo.git.log("--grep=Co-authored", "--pretty=%b", revision_range)
102+
)
103+
)
104+
cur |= set(re.findall(pat, this_repo.git.shortlog("-se", revision_range), re.M))
105+
106+
pre = set(
107+
xpr.findall(
108+
this_repo.git.log("--grep=Co-authored", "--pretty=%b", lst_release)
109+
)
110+
)
111+
pre |= set(re.findall(pat, this_repo.git.shortlog("-se", lst_release), re.M))
112+
113+
# Homu is the author of auto merges, clean him out.
114+
# cur.discard("Homu")
115+
# pre.discard("Homu")
116+
117+
# Append '+' to new authors.
118+
authors = [s + " +" for s in cur - pre] + [s for s in cur & pre]
119+
authors.sort()
120+
return authors
121+
122+
123+
def get_pull_requests(repo, revision_range):
124+
prnums = []
125+
126+
# From regular merges
127+
merges = this_repo.git.log("--oneline", "--merges", revision_range)
128+
issues = re.findall("Merge pull request \\#(\\d*)", merges)
129+
prnums.extend(int(s) for s in issues)
130+
131+
# From Homu merges (Auto merges)
132+
issues = re.findall("Auto merge of \\#(\\d*)", merges)
133+
prnums.extend(int(s) for s in issues)
134+
135+
# From fast forward squash-merges
136+
commits = this_repo.git.log(
137+
"--oneline", "--no-merges", "--first-parent", revision_range
138+
)
139+
issues = re.findall("^.*\\(\\#(\\d+)\\)$", commits, re.M)
140+
prnums.extend(int(s) for s in issues)
141+
142+
# get PR data from github repo
143+
prnums.sort()
144+
prs = [repo.get_pull(n) for n in prnums]
145+
return prs
146+
147+
148+
def build_components(revision_range, heading="Contributors"):
149+
lst_release, cur_release = [r.strip() for r in revision_range.split("..")]
150+
authors = get_authors(revision_range)
151+
152+
return {
153+
"heading": heading,
154+
"author_message": author_msg % len(authors),
155+
"authors": authors,
156+
}
157+
158+
159+
def build_string(revision_range, heading="Contributors"):
160+
components = build_components(revision_range, heading=heading)
161+
components["uline"] = "=" * len(components["heading"])
162+
components["authors"] = "* " + "\n* ".join(components["authors"])
163+
164+
# Don't change this to an fstring. It breaks the formatting.
165+
tpl = textwrap.dedent(
166+
"""\
167+
{heading}
168+
{uline}
169+
170+
{author_message}
171+
{authors}"""
172+
).format(**components)
173+
return tpl
174+
175+
176+
def main(revision_range):
177+
# document authors
178+
text = build_string(revision_range)
179+
print(text)
180+
181+
182+
if __name__ == "__main__":
183+
from argparse import ArgumentParser
184+
185+
parser = ArgumentParser(description="Generate author lists for release")
186+
parser.add_argument("revision_range", help="<revision>..<revision>")
187+
args = parser.parse_args()
188+
main(args.revision_range)
189+
190+
191+
"""
192+
Early attempts at implementing use of mailmap within this script:
193+
194+
cur = re.compile('|'.join(map(re.escape, ['<*>'])))
195+
# ------------
196+
with open(os.path.join(os.path.dirname('[fill in here]'), "[repo_name]/.mailmap")) as f:
197+
l = [line.rstrip('\n') for line in f]
198+
199+
m={}
200+
for line in l:
201+
try:
202+
m.update(dict(line.split('> ')))
203+
except ValueError:
204+
m.update({line:''})
205+
"""

‎doc/sphinxext/contributors.py

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""Sphinx extension for listing code contributors to a release.
2+
3+
Custom extension from the Pandas library: https://github.com/pandas-dev/pandas/blob/1.1.x/doc/sphinxext/contributors.py
4+
Copied 10 August 2020.
5+
6+
Usage::
7+
.. contributors:: v0.23.0..v0.23.1
8+
This will be replaced with a message indicating the number of
9+
code contributors and commits, and then list each contributor
10+
individually. For development versions (before a tag is available)
11+
use::
12+
.. contributors:: v0.23.0..v0.23.1|HEAD
13+
While the v0.23.1 tag does not exist, that will use the HEAD of the
14+
branch as the end of the revision range.
15+
"""
16+
from announce import build_components
17+
from docutils import nodes
18+
from docutils.parsers.rst import Directive
19+
import git
20+
21+
22+
class ContributorsDirective(Directive):
23+
required_arguments = 1
24+
name = "contributors"
25+
26+
def run(self):
27+
range_ = self.arguments[0]
28+
if range_.endswith("x..HEAD"):
29+
return [nodes.paragraph(), nodes.bullet_list()]
30+
try:
31+
components = build_components(range_)
32+
except git.GitCommandError as exc:
33+
return [
34+
self.state.document.reporter.warning(
35+
f"Cannot find contributors for range {repr(range_)}: {exc}",
36+
line=self.lineno,
37+
)
38+
]
39+
else:
40+
message = nodes.paragraph()
41+
message += nodes.Text(components["author_message"])
42+
43+
listnode = nodes.bullet_list()
44+
45+
for author in components["authors"]:
46+
para = nodes.paragraph()
47+
para += nodes.Text(author)
48+
listnode += nodes.list_item("", para)
49+
50+
return [message, listnode]
51+
52+
53+
def setup(app):
54+
app.add_directive("contributors", ContributorsDirective)
55+
56+
return {"version": "0.1", "parallel_read_safe": True, "parallel_write_safe": True}

‎requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
codecov
2+
pre_commit
23
pytest>=4.6
34
pytest-cov

‎requirements-docs.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
gitpython
12
nbsphinx
23
numpydoc
4+
pygithub
35
-r requirements.txt

0 commit comments

Comments
 (0)
Please sign in to comment.