diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..34126571 --- /dev/null +++ b/.flake8 @@ -0,0 +1,26 @@ +[flake8] +exclude = + .venv, + .tox, + .git, + __pycache__, + _package/tests/files/*, + docs/source/conf.py, + pydocs/source/conf.py, + build, + dist, + tests/files/*, + tests/fixtures/*, + *.pyc, + *.egg-info, + .cache, + .eggs +ignore = D200, D212, B028, W503 +max-line-length = 120 +docstring-convention = google +import-order-style = appnexus +application-import-names = xms.interp +application-package-names = xms +count = true +statistics = true +banned-modules = osgeo.*=Use the xmsgdal library instead. diff --git a/.github/workflows/XmsInterp-CI.yaml b/.github/workflows/XmsInterp-CI.yaml index 31f76a15..038c75a4 100644 --- a/.github/workflows/XmsInterp-CI.yaml +++ b/.github/workflows/XmsInterp-CI.yaml @@ -31,7 +31,7 @@ jobs: steps: # Checkout Sources - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Setup Python - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v2 @@ -42,10 +42,15 @@ jobs: run: | python -m pip install --upgrade pip pip install flake8 flake8-docstrings flake8-bugbear flake8-import-order pep8-naming + pip install "xmsconan==2.16.0" -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple + # Generate .flake8 so CI lints with the same config developers use locally. + # Do not inline the flake8 settings here: that duplicates .flake8.jinja and + # the two copies drift apart silently. + - name: Generate Build Files + run: xmsconan_gen build.toml # Flake Code - name: Run Flake - run: | - flake8 --exclude .tox,.git,__pycache__,_package/tests/files/*,pydocs/source/conf.py,build,dist,tests/fixtures/*,*.pyc,*.egg-info,.cache,.eggs --ignore=D200,D212 --max-line-length=120 --docstring-convention google --isolated --import-order-style=appnexus --application-import-names=xms.interp --application-package-names=xms --count --statistics _package + run: flake8 _package # ---------------------------------------------------------------------------------------------- # MAC @@ -94,7 +99,7 @@ jobs: clang --version # Checkout Sources - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Setup Python - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -104,8 +109,11 @@ jobs: - name: Install Python Dependencies run: | python -m pip install --upgrade pip - pip install conan devpi-client wheel - python -m pip install xmsconan>=2.12.2 -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple + # conan is pinned to a patch series on purpose: a minor bump can change + # package_id computation and silently detach builds from the binaries + # already published to the remote. Bump this deliberately. + pip install "conan~=2.31.0" devpi-client wheel + python -m pip install --upgrade "xmsconan==2.16.0" -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple # Setup Conan - name: Setup Conan run: xmsconan_conan_setup --remote-url ${{ env.CONAN_REMOTE_URL }} --login --remove-conancenter @@ -234,12 +242,15 @@ jobs: steps: # Checkout Sources - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Install Python Dependencies - name: Install Python Dependencies run: | - pip install conan devpi-client wheel - pip install xmsconan>=2.12.2 -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple + # conan is pinned to a patch series on purpose: a minor bump can change + # package_id computation and silently detach builds from the binaries + # already published to the remote. Bump this deliberately. + pip install "conan~=2.31.0" devpi-client wheel + pip install --upgrade "xmsconan==2.16.0" -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple # Setup Conan - name: Setup Conan run: xmsconan_conan_setup --remote-url ${{ env.CONAN_REMOTE_URL }} --login @@ -368,7 +379,7 @@ jobs: steps: # Checkout Sources - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Setup Python - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -383,8 +394,11 @@ jobs: - name: Install Python Dependencies run: | python -m pip install --upgrade pip - pip install conan devpi-client wheel - python -m pip install xmsconan>=2.12.2 -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple + # conan is pinned to a patch series on purpose: a minor bump can change + # package_id computation and silently detach builds from the binaries + # already published to the remote. Bump this deliberately. + pip install "conan~=2.31.0" devpi-client wheel + python -m pip install --upgrade "xmsconan==2.16.0" -i https://public.aquapi.aquaveo.com/aquaveo/dev/+simple # Setup Visual Studio - name: Setup Visual Studio uses: microsoft/setup-msbuild@v2 diff --git a/build.toml b/build.toml index 4586bd1a..11148972 100644 --- a/build.toml +++ b/build.toml @@ -3,8 +3,8 @@ description = "Interpolation library for XMS products" ci_type = "github" xms_dependencies = [ - { name = "xmscore", version = "7.0.8" }, - { name = "xmsgrid", version = "9.0.9" }, + { name = "xmscore", version = "7.0.11" }, + { name = "xmsgrid", version = "9.0.10" }, ] python_namespaced_dir = "interp" diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..5a5beaf9 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +python_files = test_*.py *_test.py *_pyt.py +testpaths = _package/tests