Skip to content

Commit

Permalink
Support importing QGIS project (#28)
Browse files Browse the repository at this point in the history
* Support importing QGIS project

* Fix setting of path prefix of QgsApplication

* Move import logic to test to avoid install

* Use pytest-qgis

* Set QT_QPA_PLATFORM=offscreen

* Run linter

---------

Co-authored-by: martinRenou <martin.renou@gmail.com>
  • Loading branch information
davidbrochart and martinRenou authored Jul 26, 2024
1 parent 8d84b63 commit 040976c
Show file tree
Hide file tree
Showing 5 changed files with 1,420 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
test:
name: ${{ matrix.os }} python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-dev.yml
environment-name: jupytergis
create-args: python=${{ matrix.python-version }}

- name: Install test packages
run: pip install pytest pytest-qgis dirty-equals

- name: Run tests
run: QT_QPA_PLATFORM=offscreen pytest --color=yes -v python/jupytergis_core/tests
6 changes: 6 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: jupytergis
channels:
- conda-forge
dependencies:
- pip
- qgis
Loading

0 comments on commit 040976c

Please sign in to comment.