Skip to content

Commit

Permalink
Merge pull request #49 from opengisch/pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored Nov 19, 2023
2 parents 23aaf84 + 53948c6 commit 1f34247
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,21 @@ jobs:
- name: Test on QGIS LTR 3.
run: |
docker-compose -f .docker/docker-compose.yml run qgis /usr/src/.docker/run-docker-tests.sh
test_packaging:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
- name: Install toolchain
run: pip install build
- name: Package with build
run: python -m build
- name: Install with pip
run: pip install .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 4 additions & 7 deletions project_checker.py → libqfieldsync/project_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
from pathlib import Path
from typing import Callable, Dict, List, Optional

from qfieldsync.libqfieldsync.layer import (
LayerSource,
SyncAction,
UnsupportedPrimaryKeyError,
)
from qfieldsync.libqfieldsync.project import ProjectConfiguration, ProjectProperties
from qfieldsync.libqfieldsync.utils.file_utils import isascii
from qgis.core import Qgis, QgsMapLayer, QgsProject, QgsSettings
from qgis.PyQt.QtCore import QObject

from libqfieldsync.layer import LayerSource, SyncAction, UnsupportedPrimaryKeyError
from libqfieldsync.project import ProjectConfiguration, ProjectProperties
from libqfieldsync.utils.file_utils import isascii

from .offline_converter import ExportType

if sys.version_info >= (3, 8):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = [
"setuptools>=68.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["libqfieldsync", "libqfieldsync.utils"]

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }

[project]
name = "libqfieldsync"
description = "the qfieldsync library"
version = "1.0"
authors = [
{ name = "OPENGIS.ch", email = "[email protected]" }
]
requires-python = ">=3.8"

[project.urls]
homepage = "https://github.com/opengisch/libqfieldsync"
documentation = "https://docs.qfield.org/get-started/"
repository = "https://github.com/opengisch/libqfieldsync"
tracker = "https://github.com/opengisch/libqfieldsync/issues"

[project.optional-dependencies]
dev = ["pre-commit"]
5 changes: 3 additions & 2 deletions tests/test_offline_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@

import shutil
import tempfile
import unittest
from pathlib import Path

from qgis.core import QgsOfflineEditing, QgsProject
from qgis.testing import start_app, unittest
from qgis.testing import start_app
from qgis.testing.mocked import get_iface

from ..offline_converter import ExportType, OfflineConverter
from libqfieldsync.offline_converter import ExportType, OfflineConverter

start_app()

Expand Down

0 comments on commit 1f34247

Please sign in to comment.