Skip to content

Commit

Permalink
chore: Revert a bunch of commits
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Mar 24, 2024
1 parent 25f23c4 commit 3c21eb9
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 174 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

# Comment to be posted to on first time issues
newIssueWelcomeComment: >
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our [contributing guidelines](https://polartoolkit.readthedocs.io/en/latest/contributing.html).
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our [contributing guidelines](https://github.com/mdtanker/polartoolkit/blob/main/docs/contribute.md).
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome

# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
💖 Thanks for opening this pull request! 💖
Please make sure you read our [contributing guidelines](https://polartoolkit.readthedocs.io/en/latest/contributing.html).
Please make sure you read our [contributing guidelines](https://github.com/mdtanker/polartoolkit/blob/main/docs/contribute.md).
A few things to keep in mind:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# run all of them to catch failures in different combinations.
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

env:
Expand All @@ -73,7 +73,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: polartoolkit
environment-file: env/testing_env.yml
environment-file: env/test_env.yml
python-version: ${{ matrix.python-version }}
channels: conda-forge,nodefaults
channel-priority: strict
Expand All @@ -83,18 +83,18 @@ jobs:
use-mamba: true
auto-activate-base: false

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: mamba list

# Install the package in editable mode
- name: Install local package
run: pip install -e .

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: mamba list

- name: Run the tests
run: >-
pytest -m "not earthdata and not issue" -ra --cov --cov-report=xml
--cov-report=term --durations=20
- name: Upload coverage report
uses: codecov/codecov-action@v4.1.0
uses: codecov/codecov-action@v4.0.1
2 changes: 0 additions & 2 deletions .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ jobs:
with:
fetch-depth: 0
token: ${{secrets.PAT}}
- name: git pull
run: git pull origin main --rebase

# use semantic-release
- id: semantic-release
Expand Down
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ exclude: |
.github/ISSUE_TEMPLATE/bug_report.md|
.github/ISSUE_TEMPLATE/feature_request.md|
.github/config.yml|
CONTRIBUTING.md|
.github/CONTRIBUTING.md|
binder/environment.yml|
<<<<<<< HEAD
paper/paper.bib|
paper/paper.md|
=======
templates/CHANGELOG.md.j2|
>>>>>>> 3fffd15 (chore: add ignores to pre-commit)
)$
repos:
Expand Down
36 changes: 8 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,10 @@
Automatically updated by
[python-semantic-release](https://python-semantic-release.readthedocs.io/en/latest/)
with commit parsing of [angular commits](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits).

## Unreleased
### 📦️ Build
### 🧰 Chores / Maintenance
* fix semantic release action ([`6b12799`](https://github.com/mdtanker/polartoolkit/commit/6b12799d984917e9e4693bf8003c6869fc7f350d))


## v0.3.1 (2024-02-22)
### 📦️ Build
* extend support to python 3.12 ([`f68def9`](https://github.com/mdtanker/polartoolkit/commit/f68def9b1156f020d4e222bf27279293eddda51f))
### 🧰 Chores / Maintenance
* remove shen-2018 hash ([`fbefe40`](https://github.com/mdtanker/polartoolkit/commit/fbefe4031c2b241fdde5b6375bc16b504ec6b9ac))
* fix test ghf ([`c7c66f6`](https://github.com/mdtanker/polartoolkit/commit/c7c66f60fce00b50524abc6eca01238f40b932e1))
* update changelog template ([`e4bd1d9`](https://github.com/mdtanker/polartoolkit/commit/e4bd1d923fb635ac2c9724a9c8babbe3cd9a4660))
* reduce sig figs for test_ghf ([`393aadc`](https://github.com/mdtanker/polartoolkit/commit/393aadc4394bc0da73d4eb38e1318bc04f374636))
* list packages after installing local for test GHA ([`51250b4`](https://github.com/mdtanker/polartoolkit/commit/51250b4dfa2a8c59380fe16d5f00e68edf453e2d))
* update testing_env and add make command ([`4ee6945`](https://github.com/mdtanker/polartoolkit/commit/4ee6945f06c39447a6447f3563898c867696fb5c))
* add hashes to all fetch calls ([`91eb9a8`](https://github.com/mdtanker/polartoolkit/commit/91eb9a83fcdd247b7a55491b0654ae5734c46fed))
* move contributing file ([`05dff10`](https://github.com/mdtanker/polartoolkit/commit/05dff10fb72fa82a4e24ecf6e47a73d40cdc9c63))
* add test_fetch make command ([`2a0adb3`](https://github.com/mdtanker/polartoolkit/commit/2a0adb30cdc669b602d6b0f5cdc402b3f5306872))
* add ignores to pre-commit ([`3fffd15`](https://github.com/mdtanker/polartoolkit/commit/3fffd15defb6de572e2f8caa1e0380a760ac74dd))
* fix changelog template spacing ([`cabc14a`](https://github.com/mdtanker/polartoolkit/commit/cabc14a644d10bf7eafe26c223a5542e17f10bf4))
### 📖 Documentation
* update install instructions ([`70faf04`](https://github.com/mdtanker/polartoolkit/commit/70faf0485d1157dda42e3f40ca462d89d87fafad))
* fix links to contrib guide ([`5c6af8d`](https://github.com/mdtanker/polartoolkit/commit/5c6af8de8ab984fa645f868ba23eadd492f0d4b7))
### 🐛 Bug Fixes
* increase timeout for shen-2018 moho fetch ([`8d9e183`](https://github.com/mdtanker/polartoolkit/commit/8d9e183de4aca1cc985a4824414b3107c50905e6))
* delete tmp.nc file in fetch call ([`ee16bdc`](https://github.com/mdtanker/polartoolkit/commit/ee16bdc10f000d1d05cabc889890548fd2f72dbe))

## v0.3.0 (2024-02-18)
### 📦️ Build
Expand Down Expand Up @@ -74,7 +50,6 @@ with commit parsing of [angular commits](https://github.com/angular/angular.js/b
* formatting ([`0b294a1`](https://github.com/mdtanker/polartoolkit/commit/0b294a18d71d909bcbbd398dc0634b548faf7165))
* fix style errors ([`639ba42`](https://github.com/mdtanker/polartoolkit/commit/639ba42c996db46125b5889e5ae35e09217296d7))
* fix indent ([`efee6d7`](https://github.com/mdtanker/polartoolkit/commit/efee6d702e7db92b5f32d4136be2b0b18eeaf54a))

## v0.2.1 (2024-01-29)
### 📦️ Build
* add antarctic_plots package for import warning ([`bb4c134`](https://github.com/mdtanker/polartoolkit/commit/bb4c134b6e78377d426781ef1f601a5ba171000b))
Expand All @@ -92,9 +67,8 @@ with commit parsing of [angular commits](https://github.com/angular/angular.js/b
* spelling and formatting ([`a7347ba`](https://github.com/mdtanker/polartoolkit/commit/a7347ba6ca94185414ac3d0a0eec1bb1ef095bfb))
* spelling mistakes ([`4c29294`](https://github.com/mdtanker/polartoolkit/commit/4c2929402b66903b2ddc0688333b932c44bba978))
* ignore binder env file in pre-commit ([`9aa1c30`](https://github.com/mdtanker/polartoolkit/commit/9aa1c309352965131c40b3d88c4e16afbcdf48a6))

## v0.2.0 (2024-01-26)
### 💥 Breaking Changes
### Other
* force a major version bump.

BREAKING CHANGE: ([`cc2ecda`](https://github.com/mdtanker/polartoolkit/commit/cc2ecdaae48b4300ae6d41485076273fa612ce64))
Expand All @@ -113,7 +87,6 @@ BREAKING CHANGE: ([`cc2ecda`](https://github.com/mdtanker/polartoolkit/commit/cc
* fix changelog template ([`31083e3`](https://github.com/mdtanker/polartoolkit/commit/31083e3d729cd4fb17f2149665610c5ba7fcd2c0))
### ✏️ Formatting
* formatting ([`d15fe92`](https://github.com/mdtanker/polartoolkit/commit/d15fe924d6097c64b410e4a0802b63774e17074e))

## v0.1.0 (2023-12-10)
### 📦️ Build
* fix path to docs ([`4bbbd96`](https://github.com/mdtanker/polartoolkit/commit/4bbbd9639a75a50305e28c8102afdda58b774534))
Expand Down Expand Up @@ -239,14 +212,21 @@ increments filename variabls since they change type, and standardizes the format
* formatting ([`f9f82f8`](https://github.com/mdtanker/polartoolkit/commit/f9f82f8201e08212e61c431a9259075884f1b4c5))
### Other
* ([`90302ba`](https://github.com/mdtanker/polartoolkit/commit/90302ba4e059c6688dad9468c42cb38c62ad6540))

* ([`12a5299`](https://github.com/mdtanker/polartoolkit/commit/12a5299d590c3ce16e797fd3efd18ea8e7b2234c))

* ([`c962e56`](https://github.com/mdtanker/polartoolkit/commit/c962e56ca0eca300b9f45bd4104861cd9fdf67dd))

* ([`95ad63c`](https://github.com/mdtanker/polartoolkit/commit/95ad63c9af3c9b305fdbc97c984ac6bee952c3bf))

* ([`30ea5aa`](https://github.com/mdtanker/polartoolkit/commit/30ea5aaea6cf599299e0cc7253eaf136b1e54a59))

* ([`d8c821e`](https://github.com/mdtanker/polartoolkit/commit/d8c821ee79f146bc74171ae358a331815ba1ac7d))

* ([`f1249f0`](https://github.com/mdtanker/polartoolkit/commit/f1249f0d7cb848f489bd25f8364d1693e704f886))



> **Note:**
>🚨
Everything above this point was generated automatically by Python Semantic Release.
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ remove:
test:
pytest -m "not earthdata and not issue and not fetch"

test_fetch:
pytest -s -m fetch #-rp

format:
ruff format $(STYLE_CHECK_FILES)

Expand Down Expand Up @@ -81,13 +78,3 @@ RTD_env:
sed -i '$$d' env/RTD_env.yml
# add pip and install local package
sed -i '$$a\ - pip\n - pip:\n - ../.[docs]' env/RTD_env.yml

# create testing yml
testing_env:
mamba remove --name testing_env --all --yes
mamba create --name testing_env --yes --force pygmt
mamba env export --name testing_env --no-builds --from-history > env/testing_env.yml
# delete last line
sed -i '$$d' env/testing_env.yml
# add pip and install local package
sed -i '$$a\ - pip\n - pip:\n - ../.[test]' env/testing_env.yml
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```{include} ../CONTRIBUTING.md
```{include} ../.github/CONTRIBUTING.md
```
49 changes: 14 additions & 35 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,60 +10,39 @@ gives full access the the package in an online environment.
This Binder environment can also be accessed by clicking the Binder icon in any
of the `gallery` or `tutorial` examples.

## Install Python

Before installing _PolarToolkit_, ensure you have Python downloaded. If you
don't, I recommend setting up Python with Miniforge. See the install
instructions [here](https://github.com/conda-forge/miniforge).

## Install _PolarToolkit_ Locally

There are 3 main ways to install `polartoolkit`. We show them here in order of
simplest to hardest.
## Install package

### Conda / Mamba

The easiest way to install this package and it's dependencies is with conda or
mamba into a new virtual environment:

```
mamba create --name polartoolkit --yes --force polartoolkit
```
mamba create --name polartoolkit --yes --force polartoolkit

Activate the environment:

```
conda activate polartoolkit
```
conda activate polartoolkit

### Pip

Instead, you can use pip to install `polartoolkit`, but first you need to
install a few dependencies with conda. This is because `PyGMT` `GeoPandas`, and
Instead, you can use pip to install polartoolkit, but first you need to install
a few dependencies with conda. This is because `PyGMT` `GeoPandas`, and
`Cartopy` all rely on C packages, which can only be install with conda/mamba and
not with pip.

```{note}
`conda` and `mamba` are interchangeable
```
not with pip. ere I use mamba, but conda will work as well, just replace any
`mamba` with `conda`:

Create a new virtual environment:

```
mamba create --name polartoolkit --yes --force pygmt geopandas cartopy
```
mamba create --name polartoolkit --yes --force pygmt geopandas cartopy

activate the environment and use `pip` to install `polartoolkit`:
Pip install polartoolkit

```
mamba activate polartoolkit
pip install polartoolkit
```
mamba activate polartoolkit
pip install polartoolkit

```{note}
to install the optional dependencies, use this instead:
`pip install polartoolkit[all]`
```
If you don't have Python set up on your computer, I recommend setting up python
with Miniconda. See the install instructions
[here](https://conda.io/projects/conda/en/latest/user-guide/install/index.html).

### Development version

Expand Down
52 changes: 52 additions & 0 deletions env/test_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Requirements for running the GitHub Action: test
# only need run-time dependencies
name: polartoolkit
channels:
- conda-forge
- defaults
dependencies:
- python>=3.9
- pip
# Run-time
- pandas
- openpyxl
- pooch
- tqdm
- verde>=1.8.0
- xarray
- netcdf4
- h5netcdf
- harmonica>=0.6.0
- pyproj
- matplotlib
- pyogrio
- rioxarray
- scipy
- numpy
- pygmt
- geopandas
- zarr
- python-dotenv
- nptyping
# interavtive
- geoviews
- cartopy
- ipyleaflet
- ipython
# viz
- seaborn
# test
- pytest>=6
- pytest-cov>=3
- deepdiff
# docs
- sphinx>=4.0
- myst-parser
- sphinx-copybutton
- sphinx-autodoc-typehints
- sphinx-book-theme>=0.3
- sphinx-design
- nbsphinx
- nbconvert
- pip:
- ../.
8 changes: 0 additions & 8 deletions env/testing_env.yml

This file was deleted.

8 changes: 4 additions & 4 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Additionally, `PolarToolkit` provides an easy means for exploring datasets with

# Statement of need
<!-- clearly illustrates the research purpose of the software and places it in the context of related work. -->
A common workflow for a geospatial scientist might be: navigate to an online repository and download a dataset, place this downloaded file in a local folder on their computer, perform some preprocessing steps, such a re-projecting, or interpolating the data, possibly using tools like GMT [@wesselgeneric2019], perform their scientific analysis on the data, and then create a map with this data using a graphical user interface (GUI) application such as QGIS [@qgisdevelopmentteamqgis2024].
A common workflow for a geospatial scientist might be; navigate to a online repository and download a dataset, place this downloaded file in a local folder on their computer, perform some preprocessing steps, such a re-projecting, or interpolating the data, possibly using tools like GMT [@wesselgeneric2019], perform their scientific analysis on the data, and then create a map with this data using a graphical user interface (GUI) application such as QGIS [@qgisdevelopmentteamqgis2024].
These workflows typically require many separate tools (i.e. internet browser, file browser, spatial analysis software, and mapping software), and are often manually repeated many times throughout a manuscript revision process, and throughout the career of the scientist.

`PolarToolkit` aims to consolidate this workflow to be entirely contained within Python, making it both easier and faster to perform all these steps.
Scripting workflows like this has several advantages: 1) it decreases the chance of human errors, for example using an old-version of the downloaded data or accidentally altering a pre-processing steps, such as referencing a raster of elevation data to the geoid instead of the ellipsoid, and 2) it allows entire workflows to be shared easily between collaborators with a single python file or Jupyter Notebook.
Although a popular and well-designed similar package exists [Antarctic Mapping Tools, @greeneantarctic2017], PolarToolkit is unique in its open-access without the need for a paid MatLab license.
Scripting workflows like this has several advantages; 1) it decreases the chance of human errors, for example using an old-version of the downloaded data or accidentally altering a pre-processing steps, such as referencing a raster of elevation data to the geoid instead of the ellipsoid, and 2) it allows entire workflows to be shared easily between collaborators with a single python file or Jupyter Notebook.
Although a popular and well-designed similar package exists [Antarctic Mapping Tools, @greeneantarctic2017], PolarToolkit is unique in it's open-access without the need for a paid MatLab license.

Written in easy-to-learn Python, and utilizing common geospatial data structures, `PolarToolkit` is designed to be familiar to use for experienced Python users, while also being approachable for beginner coders.
It is built upon several open-source packages, such a [Pooch](https://www.fatiando.org/pooch/latest/) for data downloading [@uiedapooch2020], [PyGMT](https://www.pygmt.org/latest/) for creating figures [@uiedapygmt2021], and [xarray](https://docs.xarray.dev/en/stable/) and [verde](https://www.fatiando.org/verde/latest/) for geospatial data processing [@hoyerxarray2017; @uiedaverde2018].
Expand Down Expand Up @@ -285,4 +285,4 @@ fig.show()
|fig.show() | |
|``` | |
+--------------------------------------+-------------------------+
-->
-->
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
readme = "README.md"
version = "0.3.1"
version = "0.3.0"
license = {file = "LICENSE"}

keywords = ["cryosphere", "antarctica", "arctic", "greenland", "maps", "plotting", "pygmt", "cross-section"]
Expand Down
2 changes: 1 addition & 1 deletion src/polartoolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

from __future__ import annotations

__version__ = "0.3.1"
__version__ = "0.3.0"
Loading

0 comments on commit 3c21eb9

Please sign in to comment.