Skip to content

Commit

Permalink
reformat all code using the pre-commit ci (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaS11 authored Jan 31, 2024
1 parent 6c187bd commit 3830cf4
Show file tree
Hide file tree
Showing 58 changed files with 6,281 additions and 6,285 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
branch = True
source = icepyx
omit =
omit =
setup.py
test/*
doc/*
6 changes: 3 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
#GOAL: max_line_length = 79 or 99
max_line_length = 99
per-file-ignores =
per-file-ignores =
# too many leading '#' for block comment
*/tests/*:E266
# line too long (several test strs)
Expand All @@ -12,7 +12,7 @@ per-file-ignores =
doc/source/conf.py:E402

# GOAL: remove these ignores
ignore =
ignore =
# line too long
E501
# comparison syntax
Expand All @@ -38,4 +38,4 @@ ignore =

# GOAL:
# syntax check doctests in docstrings
# doctests = True
# doctests = True
2 changes: 1 addition & 1 deletion .github/workflows/binder-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
steps:
- uses: manics/action-binderbadge@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/get_pypi_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
author_name: learn2phoenix
message: "Pypi stats auto-update"
add: "./doc/source/tracking/pypistats/*"
# add: "./pypistats/*"
# add: "./pypistats/*"
4 changes: 2 additions & 2 deletions .github/workflows/linter_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run black linter
uses: psf/black@stable
uses: psf/black@stable
# use the flake8 linter to annotate improperly formatted code
# note linter arguments are supplied via the .flake8 config file
- name: Annotate PR after running flake8
uses: TrueBrain/actions-flake8@v2

12 changes: 6 additions & 6 deletions .github/workflows/traffic_action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# temporarily store GitHub traffic data
# from: https://github.com/marketplace/actions/repository-traffic
on:
schedule:
schedule:
# runs once a week on sunday
- cron: "55 23 * * 0"
# Trigger manually at https://github.com/icesat2py/icepyx/actions/workflows/publish_to_pypi.yml
Expand All @@ -20,19 +20,19 @@ jobs:
- uses: actions/checkout@v3
with:
ref: "traffic"

# Calculates traffic and clones and stores in CSV file
- name: GitHub traffic
- name: GitHub traffic
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}

# Custom steps to move files to another dir and format plot
- name: Move files
run: |
pip install matplotlib pandas
python ./doc/source/tracking/traffic/traffic_data_mgmt.py
# Commits files to repository
- name: Commit changes
uses: EndBug/add-and-commit@v9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/uml_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: |
pip install -U pip
pip install -r requirements.txt
pip install icepyx pylint
pip install icepyx pylint
sudo apt-get install graphviz
- name: run pyreverse
run: |
Expand Down
1 change: 0 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ David Shean <[email protected]>
Anna Valentine <[email protected]>
Bidhyananda Yadav <[email protected]>
Friedrich Knuth <[email protected]>

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
- curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
- gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
- shasum -a 256 -c codecov.SHA256SUM
- shasum -a 256 -c codecov.SHA256SUM
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN}
- stage: behind Earthdata
Expand Down
46 changes: 23 additions & 23 deletions ATTRIBUTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Recognizing Contributions
=========================

We are extremely grateful to everyone who has contributed to the success of the icepyx community and software.
This document outlines our goals to give appropriate attribution to all contributors to icepyx in ways that are fair and diverse and supportive of professional goals.
This document outlines our goals to give appropriate attribution to all contributors to icepyx in ways that are fair and diverse and supportive of professional goals.
We define *contributions* broadly as:

Efforts towards achieving icepyx's goals, including (1) writing code, tests, or documentation,
Expand All @@ -21,11 +21,11 @@ We recognize contributions in the following ways.
Contributors List
-----------------

This project follows the `all-contributors <https://github.com/all-contributors/all-contributors>`_ specification.
This project follows the `all-contributors <https://github.com/all-contributors/all-contributors>`_ specification.
When you contribute to icepyx for the first time or in a new way, you or a maintainer can use the `All Contributors bot
to open a PR <https://allcontributors.org/docs/en/bot/usage>`_` to recognize your contribution.
Comment on an existing PR with `@all-contributors please add @<username> for <contributions>`.
This will add you (or your new contribution type) to the ``CONTRIBUTORS.rst`` file located in the top level directory;
This will add you (or your new contribution type) to the ``CONTRIBUTORS.rst`` file located in the top level directory;
the file is packaged and distributed with icepyx, so each release has a record of contributors and their contribution types.


Expand All @@ -41,8 +41,8 @@ If the user's full name is not available on GitHub, their GitHub handle is used.
Example Workflows
-----------------

Many of the example workflows included within icepyx were developed by individuals or small teams for educational or research purposes.
We encourage example developers to provide proper recognition for these efforts both within the notebook itself and
Many of the example workflows included within icepyx were developed by individuals or small teams for educational or research purposes.
We encourage example developers to provide proper recognition for these efforts both within the notebook itself and
by adding contributors to the `Contributors List`_ for attribution as describered herein.


Expand All @@ -58,7 +58,7 @@ we collectively represent the icepyx authors in citations (including Zenodo rele

As described above, a complete list of contributors and their contribution types is available via the `Contributors List`_.

** A note about releases <v0.6.4: Prior version releases adhere to authorship guidelines in place at the time,
** A note about releases <v0.6.4: Prior version releases adhere to authorship guidelines in place at the time,
listing individual contributors who had manually added their names to `CONTRIBUTORS.rst`.
Authorship order was alphebetical by last name, except in cases where
a substantial contribution was made by one or more contributors to a given release. **
Expand All @@ -67,25 +67,25 @@ As described above, a complete list of contributors and their contribution types
Peer-Reviewed Publications (Papers)
-----------------------------------

We will occasionally prepare manuscripts describing our software and its uses for submission to peer-reviewed journals.
These efforts are typically "in addition to" contributions made directly to icepyx (community or repository) and
We will occasionally prepare manuscripts describing our software and its uses for submission to peer-reviewed journals.
These efforts are typically "in addition to" contributions made directly to icepyx (community or repository) and
thus may have specific author lists.
To be eligible for authorship on a peer-reviewed publication, contributors must:

1. Contribute to the development (including code, documentation, and examples) of icepyx.
1. Contribute to the development (including code, documentation, and examples) of icepyx.
Substantial non-code contributions may constitute eligibility for authorship.
2. Contribute ideas, participate in authorship discussions (see next paragraph), write, read, and review the manuscript

2. Contribute ideas, participate in authorship discussions (see next paragraph), write, read, and review the manuscript
in a timely manner, and provide feedback (acknowledgement of review is sufficient, but we'd prefer more).

Author order will be determined based on co-author discussion, led by the publication preparation leader, ideally during the initial
planning stages of manuscript preparation (i.e. as soon as an idea matures into a potential manuscript and before writing begins).
Authorship will continue to be evaluated throughout the manuscript preparation process.
Discussions will consider authorship norms (e.g. How does author order convey participation and prestige?
How critical is first authorship to career advancement for each member of the team?
Do an individual's contributions meet authorship criteria or are they more suited to acknowledgements?).
Author order determination may also consider metrics such as the number of commits since the last major release
with an associated paper (``git shortlog vX.0.0...HEAD -sne``), contributions that do not have associated commits,
Author order will be determined based on co-author discussion, led by the publication preparation leader, ideally during the initial
planning stages of manuscript preparation (i.e. as soon as an idea matures into a potential manuscript and before writing begins).
Authorship will continue to be evaluated throughout the manuscript preparation process.
Discussions will consider authorship norms (e.g. How does author order convey participation and prestige?
How critical is first authorship to career advancement for each member of the team?
Do an individual's contributions meet authorship criteria or are they more suited to acknowledgements?).
Author order determination may also consider metrics such as the number of commits since the last major release
with an associated paper (``git shortlog vX.0.0...HEAD -sne``), contributions that do not have associated commits,
and contributions to the preparation of the manuscript.


Expand All @@ -94,20 +94,20 @@ Motivation and References

Concepts and models of attribution, credit, contribution, and authorship can vary across time, application, and communities.
`FORCE11 <https://force11.org/>`_ has an entire `Attribution Working Group <https://force11.org/groups/attribution-working-group/>`_ dedicated to working on attribution for research products.
`URSSI <https://urssi.us/>`_ hosted a workshop in 2019 (`report <https://urssi.us/blog/2019/03/24/report-from-urssi-workshop-on-software-credit-citation-and-metrics/>`_)
`URSSI <https://urssi.us/>`_ hosted a workshop in 2019 (`report <https://urssi.us/blog/2019/03/24/report-from-urssi-workshop-on-software-credit-citation-and-metrics/>`_)
to identify core issues and propose solutions to challenges around software credit.
For software, current best practices (`e.g. <https://arxiv.org/pdf/2012.13117.pdf>`_) emphasize the importance of having a document
such as this one to describe an individual community's policies for credit, authorship, and attribution.
This document is an effort to describe icepyx's policies, with an awareness that they may change
This document is an effort to describe icepyx's policies, with an awareness that they may change
to accomodate community growth, best practices, and feedback.

We do not attempt to identify contribution levels through the number of commits made to the repository (e.g. ``git shortlog -sne``)
or active engagement on GitHub (e.g. through issues, discussions, and pull requests) and Discourse.
The latter is difficult to quantify, and the use of squash merges into the development branch can mask the relative complexity
The latter is difficult to quantify, and the use of squash merges into the development branch can mask the relative complexity
of various contributions and does not necessarily capture significant conceptual contributions.


Copyright notice: Preparation of this document and our credit policies was inspired in part by these `authorship guidelines <https://github.com/fatiando/contributing/blob/master/AUTHORSHIP.md>`_ provided by `Fatiando a Terra <https://github.com/fatiando>`_
Copyright notice: Preparation of this document and our credit policies was inspired in part by these `authorship guidelines <https://github.com/fatiando/contributing/blob/master/AUTHORSHIP.md>`_ provided by `Fatiando a Terra <https://github.com/fatiando>`_
and `The Turing Way <https://the-turing-way.netlify.app/community-handbook/acknowledgement/acknowledgement-members.html>`_.
We encourage potential contributors to consider the resources provided by the `NASA High Mountain Asia Team (HiMAT) <https://highmountainasia.github.io/team-collaboration/authorship/>`_
and established or emerging best practices in their community.
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ license: BSD-3-Clause
identifiers:
- description: "All archived versions of icepyx."
type: doi
value: 10.5281/zenodo.7729175
value: 10.5281/zenodo.7729175
14 changes: 7 additions & 7 deletions CITATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icepyx
------

This community and software is developed with the goal of supporting science applications.
Thus, our contributors (including those who have developed the packages used within icepyx)
Thus, our contributors (including those who have developed the packages used within icepyx)
and maintainers justify their efforts and demonstrate the impact of their work through citations.

If you have used icepyx in your work, please consider citing our library.
Expand All @@ -30,16 +30,16 @@ A bibtex version for users working in Latex::
publisher = {Zenodo},
url = "https://github.com/icesat2py/icepyx",
}

For more information on the "icepyx Developers", please see our `Attribution Guidelines <https://icepyx.readthedocs.io/en/latest/contributing/attribution_link.html>`_.
See our docs for a `full list of contributors <https://icepyx.readthedocs.io/en/latest/contributing/contributors_link.html>`_ and their contribution types.

icepyx Dependencies
-------------------
If you have used one of the included packages to extend your data analysis capabilities within icepyx,
please consider additionally citing that work, because it represents an independent software contribution to the open-source community.
`SciPy <https://www.scipy.org/index.html>`_ provides a `helpful resource <https://www.scipy.org/citing.html>`_ for citing
packages within the SciPy ecosystem (including Matplotlib, NumPy, pandas, and SciPy).
If you have used one of the included packages to extend your data analysis capabilities within icepyx,
please consider additionally citing that work, because it represents an independent software contribution to the open-source community.
`SciPy <https://www.scipy.org/index.html>`_ provides a `helpful resource <https://www.scipy.org/citing.html>`_ for citing
packages within the SciPy ecosystem (including Matplotlib, NumPy, pandas, and SciPy).
Links to citation information for other commonly used packages are below.

- `fiona <https://github.com/Toblerity/Fiona/blob/master/CITATION.txt>`_
Expand All @@ -52,4 +52,4 @@ Links to citation information for other commonly used packages are below.
ICESat-2 Data
-------------
ICESat-2 data citation depends on the exact dataset used.
Citation information for each data product can be found through the `NSIDC website <https://nsidc.org/data/icesat-2/data-sets>`_.
Citation information for each data product can be found through the `NSIDC website <https://nsidc.org/data/icesat-2/data-sets>`_.
2 changes: 1 addition & 1 deletion CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Thanks goes to these wonderful people (`emoji key <https://allcontributors.org/d
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Current development version (development branch): |Docs Status dev| |Travis dev
.. |GitHub license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
:target: https://opensource.org/licenses/BSD-3-Clause

.. |Conda install| image:: https://anaconda.org/conda-forge/icepyx/badges/version.svg
.. |Conda install| image:: https://anaconda.org/conda-forge/icepyx/badges/version.svg
:target: https://anaconda.org/conda-forge/icepyx

.. |Pypi install| image:: https://badge.fury.io/py/icepyx.svg
Expand Down Expand Up @@ -43,17 +43,17 @@ Current development version (development branch): |Docs Status dev| |Travis dev

.. |Code Coverage dev| image:: https://codecov.io/gh/icesat2py/icepyx/branch/development/graph/badge.svg
:target: https://codecov.io/gh/icesat2py/icepyx


Origin and Purpose
------------------
icepyx is both a software library and a community composed of ICESat-2 data users, developers, and the scientific community. We are working together to develop a shared library of resources - including existing resources, new code, tutorials, and use-cases/examples - that simplify the process of querying, obtaining, analyzing, and manipulating ICESat-2 datasets to enable scientific discovery.

icepyx aims to provide a clearinghouse for code, functionality to improve interoperability, documentation, examples, and educational resources that tackle disciplinary research questions while minimizing the amount of repeated effort across groups utilizing similar datasets. icepyx also hopes to foster collaboration, open-science, and reproducible workflows by integrating and sharing resources.

Many of the underlying tools from which icepyx was developed began as Jupyter Notebooks developed for and during the cryosphere-themed ICESat-2 Hackweek at the University of Washington in June 2019 or as scripts written and used by the ICESat-2 Science Team members.
Originally called icesat2py, the project combined and generalized these scripts into a unified framework, adding examples, documentation, and testing where necessary and making them accessible for everyone.
icepyx is now a domain-agnostic, standalone software package and community (under the broader `icesat2py GitHub organization <https://github.com/icesat2py>`_) that continues to build functionality for obtaining and working with ICESat-2 data products locally and in the cloud.
Many of the underlying tools from which icepyx was developed began as Jupyter Notebooks developed for and during the cryosphere-themed ICESat-2 Hackweek at the University of Washington in June 2019 or as scripts written and used by the ICESat-2 Science Team members.
Originally called icesat2py, the project combined and generalized these scripts into a unified framework, adding examples, documentation, and testing where necessary and making them accessible for everyone.
icepyx is now a domain-agnostic, standalone software package and community (under the broader `icesat2py GitHub organization <https://github.com/icesat2py>`_) that continues to build functionality for obtaining and working with ICESat-2 data products locally and in the cloud.
It also improves interoperability for ICESat-2 datasets with other open-source tools.

.. _`zipped file`: https://github.com/icesat2py/icepyx/archive/main.zip
Expand All @@ -65,7 +65,7 @@ Installation
The simplest way to install icepyx is by using the
`conda <https://docs.conda.io/projects/conda/en/latest/user-guide/index.html>`__
package manager. |Conda install|

conda install icepyx

Alternatively, you can also install icepyx using `pip <https://pip.pypa.io/en/stable/>`__. |Pypi install|
Expand Down Expand Up @@ -120,7 +120,7 @@ Please note that this project is released with a Contributor Code of Conduct. By

.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
:target: code_of_conduct.md

Research notice
~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion code_of_conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcem

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

Loading

0 comments on commit 3830cf4

Please sign in to comment.