Skip to content

Commit

Permalink
Merge branch 'main' into JOSS_paper
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker authored Mar 9, 2024
2 parents 4b186ff + 05faf2c commit 6706728
Show file tree
Hide file tree
Showing 16 changed files with 167 additions and 138 deletions.
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://github.com/mdtanker/polartoolkit/blob/main/docs/contribute.md).
👋 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).
# 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://github.com/mdtanker/polartoolkit/blob/main/docs/contribute.md).
Please make sure you read our [contributing guidelines](https://polartoolkit.readthedocs.io/en/latest/contributing.html).
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"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
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/test_env.yml
environment-file: env/testing_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.0.1
uses: codecov/codecov-action@v4.1.0
2 changes: 2 additions & 0 deletions .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ 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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ exclude: |
.github/ISSUE_TEMPLATE/bug_report.md|
.github/ISSUE_TEMPLATE/feature_request.md|
.github/config.yml|
.github/CONTRIBUTING.md|
CONTRIBUTING.md|
binder/environment.yml|
paper/paper.bib|
paper/paper.md|
templates/CHANGELOG.md.j2|
)$
repos:
Expand Down
36 changes: 28 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,34 @@
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 @@ -50,6 +74,7 @@ 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 @@ -67,8 +92,9 @@ 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)
### Other
### 💥 Breaking Changes
* force a major version bump.

BREAKING CHANGE: ([`cc2ecda`](https://github.com/mdtanker/polartoolkit/commit/cc2ecdaae48b4300ae6d41485076273fa612ce64))
Expand All @@ -87,6 +113,7 @@ 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 @@ -212,21 +239,14 @@ 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
File renamed without changes.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ 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 @@ -78,3 +81,13 @@ 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} ../.github/CONTRIBUTING.md
```{include} ../CONTRIBUTING.md
```
49 changes: 35 additions & 14 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,60 @@ 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 package
## 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.

### 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. ere I use mamba, but conda will work as well, just replace any
`mamba` with `conda`:
not with pip.

```{note}
`conda` and `mamba` are interchangeable
```

Create a new virtual environment:

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

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

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

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).
```{note}
to install the optional dependencies, use this instead:
`pip install polartoolkit[all]`
```

### Development version

Expand Down
52 changes: 0 additions & 52 deletions env/test_env.yml

This file was deleted.

8 changes: 8 additions & 0 deletions env/testing_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: testing_env
channels:
- conda-forge
dependencies:
- pygmt
- pip
- pip:
- ../.[test]
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ 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.0"
version = "0.3.1"
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.0"
__version__ = "0.3.1"
Loading

0 comments on commit 6706728

Please sign in to comment.