Skip to content

Commit 7f8b8ac

Browse files
authored
Merge pull request #1 from earthobservations/dev
Add first version of quadrantic
2 parents 8792866 + 95d062a commit 7f8b8ac

18 files changed

+2008
-3
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
github: ["gutzbenj"]
3+
patreon: "earthobservations"
4+
custom: ['paypal.me/BenjaminGutzmann']

.github/codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 75%
6+
7+
patch:
8+
default:
9+
target: 75%

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "monthly"
12+
versioning-strategy: lockfile-only

.github/workflows/coverage.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Coverage
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
name: Check code coverage
11+
steps:
12+
- name: Acquire sources
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.10"
19+
architecture: x64
20+
21+
- name: Setup Poetry
22+
uses: snok/install-poetry@v1
23+
with:
24+
virtualenvs-create: true
25+
virtualenvs-in-project: true
26+
27+
- name: Get Poetry cache directory
28+
id: poetry-cache-dir
29+
run: |
30+
echo "::set-output name=dir::$(poetry config cache-dir)"
31+
32+
- name: Apply cache
33+
id: poetry-cache-flag
34+
uses: actions/cache@v2
35+
env:
36+
# Increase this value to reset cache if `poetry.lock` has not changed.
37+
CACHE_NUMBER: 1
38+
with:
39+
path: ${{ steps.poetry-cache-dir.outputs.dir }}
40+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}
41+
42+
- name: Install library
43+
run: poetry install
44+
45+
- name: Generate coverage report
46+
run: |
47+
poetry run pytest --cov=quadrantic tests/
48+
poetry run coverage xml
49+
50+
- name: Upload coverage to Codecov
51+
uses: codecov/codecov-action@v3
52+
with:
53+
file: ./coverage.xml
54+
flags: unittests
55+
env_vars: OS,PYTHON
56+
name: codecov-umbrella
57+
fail_ci_if_error: false

.github/workflows/linter.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Linter
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
name: Code style checks
11+
steps:
12+
- name: Acquire sources
13+
uses: actions/checkout@v2
14+
- name: Setup Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
18+
architecture: x64
19+
20+
- name: Setup Poetry
21+
uses: snok/install-poetry@v1
22+
with:
23+
virtualenvs-create: true
24+
virtualenvs-in-project: true
25+
26+
- name: Get Poetry cache directory
27+
id: poetry-cache-dir
28+
run: |
29+
echo "::set-output name=dir::$(poetry config cache-dir)"
30+
31+
- name: Apply cache
32+
id: poetry-cache-flag
33+
uses: actions/cache@v2
34+
env:
35+
# Increase this value to reset cache if `poetry.lock` has not changed.
36+
CACHE_NUMBER: 1
37+
with:
38+
path: ${{ steps.poetry-cache-dir.outputs.dir }}
39+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}
40+
41+
- name: Install library
42+
run: poetry install --no-root
43+
44+
- name: Run lint on code
45+
run: poetry run poe lint

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [ published ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
with:
12+
python-version: "3.10"
13+
architecture: x64
14+
15+
- name: Setup Poetry
16+
uses: snok/install-poetry@v1
17+
with:
18+
virtualenvs-create: true
19+
virtualenvs-in-project: true
20+
21+
- name: Get Poetry cache directory
22+
id: poetry-cache-dir
23+
run: |
24+
echo "::set-output name=dir::$(poetry config cache-dir)"
25+
26+
- name: Apply cache
27+
id: poetry-cache-flag
28+
uses: actions/cache@v2
29+
env:
30+
# Increase this value to reset cache if `poetry.lock` has not changed.
31+
CACHE_NUMBER: 1
32+
with:
33+
path: ${{ steps.poetry-cache-dir.outputs.dir }}
34+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}
35+
36+
- name: Install library
37+
run: poetry install
38+
39+
- name: Build
40+
run: poetry build
41+
42+
- name: Publish
43+
run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
tests:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
python-version: ["3.8", "3.9", "3.10"]
14+
env:
15+
OS: ${{ matrix.os }}
16+
PYTHON: ${{ matrix.python-version }}
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }}
23+
steps:
24+
25+
- name: Acquire sources
26+
uses: actions/checkout@v2
27+
28+
- name: Setup Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
architecture: x64
33+
34+
- name: Setup Poetry
35+
uses: snok/install-poetry@v1
36+
with:
37+
virtualenvs-create: true
38+
virtualenvs-in-project: true
39+
40+
- name: Apply cache
41+
id: poetry-cache-flag
42+
uses: actions/cache@v2
43+
env:
44+
# Increase this value to reset cache if `poetry.lock` has not changed.
45+
CACHE_NUMBER: 2
46+
with:
47+
path: .venv
48+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-${{ env.CACHE_NUMBER }}
49+
50+
- name: Install dependencies
51+
run: poetry install
52+
if: steps.poetry-cache-flag.outputs.cache-hit != 'true'
53+
54+
- name: Test
55+
run: poetry run poe test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/.idea
2+
/.pytest_cache
3+
14
# Byte-compiled / optimized / DLL files
25
__pycache__/
36
*.py[cod]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 earthobservations
3+
Copyright (C) 2022 earthobservations
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

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

0 commit comments

Comments
 (0)