Skip to content

Commit

Permalink
Feature docs (#14)
Browse files Browse the repository at this point in the history
add docs, fsspec integration, RPC camera model & camera factories
  • Loading branch information
dugalh committed May 15, 2024
1 parent 62fb83c commit f641e3b
Show file tree
Hide file tree
Showing 103 changed files with 13,088 additions and 5,831 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [leftfield-geospatial, dugalh] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: [leftfield-geospatial] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
38 changes: 23 additions & 15 deletions .github/workflows/run-unit-tests_conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
name: Tests (conda-forge)

on:
# push:
# branches: [main, feature_pytest_click]
# pull_request:
# branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 2 * * 1' # run weekly

jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3 # for the test data
- uses: conda-incubator/setup-miniconda@v2
- name: Check out repository
uses: actions/checkout@v4

- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
activate-environment: test
miniforge-variant: Mambaforge
channel-priority: strict
activate-environment: orthority-test
conda-solver: libmamba

- name: Install dependencies
# Note that conda-forge OpenCV 4.9 package has *GL dependencies that are not satisfied by
# GitHub's Ubuntu image, so 'opencv-python-headless' is installed with pip below.
run: |
mamba info
mamba list
mamba install -c conda-forge rasterio opencv click tqdm pyyaml pytest pytest-cov
mamba list
conda info
conda install -c conda-forge rasterio click tqdm pyyaml fsspec requests aiohttp pytest pytest-cov
pip install opencv-python-headless
conda list
- name: Run unit tests
run: |
python -m pytest --cov=simple_ortho --cov-report=term-missing --cov-report=xml:coverage.xml ./tests
python -m pytest --cov=orthority --cov-report=term-missing --cov-report=xml:coverage.xml ./tests
27 changes: 19 additions & 8 deletions .github/workflows/run-unit-tests_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,55 @@ name: Tests

on:
push:
branches: [main, feature_pytest_click]
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 2 * * 1' # run weekly

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v3
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
# TODO: pip install -e .[tests] ?
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
python -m pip install rasterio opencv-python-headless click tqdm pyyaml
python -m pip install rasterio opencv-python-headless click tqdm pyyaml fsspec requests aiohttp
python -m pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
timeout-minutes: 5
run: |
python -m pytest --cov=simple_ortho --cov-report=term-missing --cov-report=xml:coverage.xml ./tests
python -m pytest --cov=orthority --cov-report=term-missing --cov-report=xml:coverage.xml ./tests
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
fail_ci_if_error: false
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

sphinx:
configuration: docs/conf.py

build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
Loading

0 comments on commit f641e3b

Please sign in to comment.