Skip to content

Commit

Permalink
Merge 8c24f6b into e3289c6
Browse files Browse the repository at this point in the history
  • Loading branch information
Scartography committed Nov 8, 2022
2 parents e3289c6 + 8c24f6b commit 1311438
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .conda/conda-environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: conda-build-publish-env
channels:
- conda-forge
- defaults
dependencies:
- python=3.9
- affine
- anaconda-client
- click>=7.1.1
- conda-build
- conda-verify
- gdal
- geojson
- rasterio>=1.0.21
- shapely
- pytest-runner
- pytest
17 changes: 12 additions & 5 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{% set name = "tilematrix" %}
{% set version = "2022.11.1" %}
{% set version = "2022.11.dev2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
git_url: https://github.com/ungarj/tilematrix
git_rev: {{ version }}
path: ../

build:
entry_points:
- tmx=tilematrix.tmx.main:tmx
noarch: python
script: {{ PYTHON }} -m pip install -e . -vv
script: {{ PYTHON }} -m pip install . -vv
number: 0

requirements:
Expand All @@ -33,10 +32,18 @@ test:
imports:
- tilematrix
commands:
- pip check
- tmx --help
- pytest test/ -v
requires:
- pip
- black
- coveralls
- flake8
- pre-commit
- pytest
- pytest-cov
source_files:
- test

about:
home: https://github.com/ungarj/tilematrix
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/conda-publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: Build, Test and Upload Conda Package

on:
on:
release:
types: [created]

jobs:
publish:
runs-on: continuumio/miniconda3
build-test-publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name:
- name: build-conda-package
run: conda install -y conda-build && conda index && conda-build --output-folder .conda/ --no-test --no-anaconda-upload tilematrix .conda/
- name: install local conda build and test conda package
run: conda install -c conda-forge -y gdal rasterio pytest-runner pytest && conda install -y --use-local tilematrix && pytest ./test/* -v
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: false
python-version: 3.9
activate-environment: conda-build-publish-env
auto-update-conda: true
environment-file: .conda/conda-environment.yaml
- name: build conda package
run: VERSION=$(python setup.py --version) && conda index && conda-build --no-anaconda-upload --verify tilematrix .conda/meta.yaml && conda index && conda install -y --offline --use-local tilematrix=$VERSION
- name: upload conda package
run: conda install -y anaconda-client && export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} && anaconda upload --force .conda/noarch/*.tar.bz2
run: VERSION=$(python setup.py && export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} && anaconda upload -c conda-forge tilematrix=$VERSION
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
#########

2022.11.2 - 2022-11-07
----------------------
* update `conda` build
* add `conda-environment.yaml` as building and testing `conda` environment
* the dependencies from `requirements.txt` are manually added to `conda-environment.yaml`

2022.11.1 - 2022-11-03
----------------------
* fix `conda` & `pip ` builds
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
affine
click
click>=7.1.1
geojson
rasterio>=1.0.21
shapely
2 changes: 1 addition & 1 deletion tilematrix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
]


__version__ = "2022.11.1"
__version__ = "2022.11.dev2"

0 comments on commit 1311438

Please sign in to comment.