From ec1dd8c9c6d04aa8faabf8e358d30b8609681236 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 14:49:12 +0100 Subject: [PATCH 01/20] add conda build --- .condarc | 4 +++ .github/workflows/conda-package.yml | 15 ++++++++++ conda.recipe/bld.bat | 3 ++ conda.recipe/build.sh | 2 ++ conda.recipe/meta.yaml | 43 +++++++++++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 .condarc create mode 100644 .github/workflows/conda-package.yml create mode 100644 conda.recipe/bld.bat create mode 100644 conda.recipe/build.sh create mode 100644 conda.recipe/meta.yaml diff --git a/.condarc b/.condarc new file mode 100644 index 00000000..b2344324 --- /dev/null +++ b/.condarc @@ -0,0 +1,4 @@ +channels: + - michaelsjp + +show_channel_urls: True \ No newline at end of file diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml new file mode 100644 index 00000000..1a8d586a --- /dev/null +++ b/.github/workflows/conda-package.yml @@ -0,0 +1,15 @@ +name: Conda Package + +on: [push, pull_request] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: publish-to-conda + uses: fcakyon/conda-publish-action@v1.3 + with: + subdir: '.' + anacondatoken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'win osx linux' diff --git a/conda.recipe/bld.bat b/conda.recipe/bld.bat new file mode 100644 index 00000000..447706ab --- /dev/null +++ b/conda.recipe/bld.bat @@ -0,0 +1,3 @@ +cd %RECIPE_DIR%\.. +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh new file mode 100644 index 00000000..aa59b4dc --- /dev/null +++ b/conda.recipe/build.sh @@ -0,0 +1,2 @@ +cd $RECIPE_DIR/.. +$PYTHON setup.py install \ No newline at end of file diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 00000000..9d868d19 --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,43 @@ +{% set name = "openrouteservice" %} +{% set version = "2.3.0" %} + +package: + name: "{{ name|lower }}" + version: "{{ version }}" + +source: + git_url: https://github.com/GIScience/openrouteservice-py.git + git_rev: "v{{ version }}" + + +requirements: + build: + - python>=3.4 + - pip + - requests>=2.0 + - nose>=1.0 + - responses>=0.10 + - coveralls>=1.7.0 + - coverage>=4.5.0 + run: + - requests>=2.0 +test: + imports: + - openrouteservice + source_files: + - openrouteservice + - test + requires: + - nose>1.0 + - requests>=2.0 + - responses>=0.10 + - coveralls>=1.7.0 + - coverage>=4.5.0 + commands: + - nosetests -v + +about: + home: https://github.com/GIScience/openrouteservice-py + license: Apache + license_family: BSD + license_file: LICENSE \ No newline at end of file From bea4653c0562c39f16a5a5f4c26bf211d383c2bc Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 14:51:58 +0100 Subject: [PATCH 02/20] chagne subdir --- .github/workflows/conda-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 1a8d586a..75b20eb6 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -10,6 +10,6 @@ jobs: - name: publish-to-conda uses: fcakyon/conda-publish-action@v1.3 with: - subdir: '.' + subdir: 'conda.recipe' anacondatoken: ${{ secrets.ANACONDA_TOKEN }} platforms: 'win osx linux' From 05ec86a0410ad1a358c8b543b4ac18dbc02f2f10 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:00:01 +0100 Subject: [PATCH 03/20] change source to itself --- conda.recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 9d868d19..4106be44 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,13 +1,12 @@ {% set name = "openrouteservice" %} -{% set version = "2.3.0" %} +{% set version = "2.3.2" %} package: name: "{{ name|lower }}" version: "{{ version }}" source: - git_url: https://github.com/GIScience/openrouteservice-py.git - git_rev: "v{{ version }}" + git_url: ../ requirements: From 45051ffdcfb34edd958fc2297af3649d8e36cfc3 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:06:17 +0100 Subject: [PATCH 04/20] re-add git url --- conda.recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 4106be44..9d868d19 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,12 +1,13 @@ {% set name = "openrouteservice" %} -{% set version = "2.3.2" %} +{% set version = "2.3.0" %} package: name: "{{ name|lower }}" version: "{{ version }}" source: - git_url: ../ + git_url: https://github.com/GIScience/openrouteservice-py.git + git_rev: "v{{ version }}" requirements: From 90b8e256d49bdcc90ba9dc2dd38eb9567cd2dc46 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:09:51 +0100 Subject: [PATCH 05/20] add git install --- .github/workflows/conda-package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 75b20eb6..e446fc46 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -7,6 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install git - name: publish-to-conda uses: fcakyon/conda-publish-action@v1.3 with: From 1ec33f4b64745dced089b769553f7654154e9340 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:16:16 +0100 Subject: [PATCH 06/20] test another version --- .github/workflows/conda-package.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index e446fc46..85d77846 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,19 +1,14 @@ name: Conda Package -on: [push, pull_request] +on: [pull_request] jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install git + - uses: actions/checkout@v1 - name: publish-to-conda - uses: fcakyon/conda-publish-action@v1.3 + uses: maxibor/conda-package-publish-action@v1.1 with: - subdir: 'conda.recipe' - anacondatoken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'win osx linux' + subDir: 'conda.recipe' + AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From 4991899a51c25b2ef5540e0f8ad0272f41b6cc5c Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:17:32 +0100 Subject: [PATCH 07/20] user master version --- .github/workflows/conda-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 85d77846..4071f9a3 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@v1.1 + uses: maxibor/conda-package-publish-action@master with: subDir: 'conda.recipe' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From e2d206c1326cc866313d1d51d0fc39d356f717e2 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:24:10 +0100 Subject: [PATCH 08/20] correct conda badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b14fbf19..e48aa77e 100644 --- a/README.rst +++ b/README.rst @@ -14,8 +14,8 @@ :target: https://badge.fury.io/py/openrouteservice :alt: PyPI version -.. image:: https://anaconda.org/nilsnolde/openrouteservice/badges/installer/conda.svg - :target: https://conda.anaconda.org/nilsnolde/openrouteservice +.. image:: https://anaconda.org/michaelsjp/openrouteservice/badges/installer/conda.svg + :target: https://anaconda.org/MichaelsJP/openrouteservice :alt: Conda install .. image:: https://mybinder.org/badge_logo.svg From 4369929313bf178c4dc2337808ef3d76f9daa137 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 15:32:25 +0100 Subject: [PATCH 09/20] add badge for conda version --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index e48aa77e..380cd102 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,10 @@ :target: https://badge.fury.io/py/openrouteservice :alt: PyPI version +.. image:: https://github.com/GIScience/openrouteservice-py/workflows/Conda%20Package/badge.svg + :target: https://anaconda.org/MichaelsJP/openrouteservice + :alt: Conda Build + .. image:: https://anaconda.org/michaelsjp/openrouteservice/badges/installer/conda.svg :target: https://anaconda.org/MichaelsJP/openrouteservice :alt: Conda install From e0c5054b0e121b6576d34793689dd8ee0f0cc6f5 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:02:37 +0100 Subject: [PATCH 10/20] give another package a try --- .github/workflows/conda-package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 4071f9a3..6fe96312 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -8,7 +8,8 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@master + uses: fcakyon/conda-publish-action@master with: - subDir: 'conda.recipe' - AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} + subdir: 'conda.recipe' + anacondatoken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'win osx linux' \ No newline at end of file From f311ce249e187cc2f43a90a96edd304a19334f86 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:14:33 +0100 Subject: [PATCH 11/20] revert to old package --- .github/workflows/conda-package.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 6fe96312..4071f9a3 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -8,8 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: fcakyon/conda-publish-action@master + uses: maxibor/conda-package-publish-action@master with: - subdir: 'conda.recipe' - anacondatoken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'win osx linux' \ No newline at end of file + subDir: 'conda.recipe' + AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From 5041f323896acec5fcb0ae7a9de2a150f8e742cf Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:15:03 +0100 Subject: [PATCH 12/20] change to run conda package only on push tags --- .github/workflows/conda-package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 4071f9a3..c4a05492 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,6 +1,9 @@ name: Conda Package -on: [pull_request] +on: + push: + tags: + - 'v*.*.*' jobs: publish: From cabe8438c47c6d0f0515e1a9b442a71add41e7ef Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:42:08 +0100 Subject: [PATCH 13/20] use custom github action --- .github/workflows/conda-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index c4a05492..11422d03 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -11,7 +11,8 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: maxibor/conda-package-publish-action@master + uses: MichaelsJP/conda-package-publish-action@add-all-platforms with: subDir: 'conda.recipe' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} + platforms: 'all' \ No newline at end of file From 9af92da1433da02da65622c51709f12bc221b3d1 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 16:44:30 +0100 Subject: [PATCH 14/20] back to dev execution --- .github/workflows/conda-package.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 11422d03..badecbfc 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,9 +1,6 @@ name: Conda Package -on: - push: - tags: - - 'v*.*.*' +on: [pull_request] jobs: publish: From d9c5d32ad91c88800832ff592bfa0aa92e7f4bce Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 18:53:40 +0100 Subject: [PATCH 15/20] add override switch --- .github/workflows/conda-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index badecbfc..5c84f982 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -12,4 +12,5 @@ jobs: with: subDir: 'conda.recipe' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'all' \ No newline at end of file + platforms: 'all' + override: true \ No newline at end of file From f8ee6d6cf2358ba8b6a7d0b57427cb8647b103a3 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 19:47:52 +0100 Subject: [PATCH 16/20] set os to 20.04 --- .github/workflows/conda-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 5c84f982..20b3f51f 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -4,7 +4,7 @@ on: [pull_request] jobs: publish: - runs-on: ubuntu-latest + runs-on: Ubuntu-20.04 steps: - uses: actions/checkout@v1 - name: publish-to-conda From fd94f14d21de66de827fd7bbea5e5acf9e313656 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 19:48:16 +0100 Subject: [PATCH 17/20] run only on release --- .github/workflows/conda-package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 20b3f51f..62b3a36b 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,6 +1,9 @@ name: Conda Package -on: [pull_request] +on: + push: + tags: + - 'v*.*.*' jobs: publish: From 874ff2465c6114e67d73db6be24c0d8864b2f26f Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 19:50:52 +0100 Subject: [PATCH 18/20] add correct conda badge --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 380cd102..90939c7b 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ :target: https://badge.fury.io/py/openrouteservice :alt: PyPI version -.. image:: https://github.com/GIScience/openrouteservice-py/workflows/Conda%20Package/badge.svg +.. image:: https://github.com/GIScience/openrouteservice-py/workflows/Conda%20Package/badge.svg?branch=master :target: https://anaconda.org/MichaelsJP/openrouteservice :alt: Conda Build From 0c20c2daa2ac192289d7eb23a52d39da7432c0a7 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 19:58:05 +0100 Subject: [PATCH 19/20] test new repo call --- .github/workflows/conda-package.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 62b3a36b..47130841 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -1,9 +1,6 @@ name: Conda Package -on: - push: - tags: - - 'v*.*.*' +on: [pull_request] jobs: publish: @@ -11,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: publish-to-conda - uses: MichaelsJP/conda-package-publish-action@add-all-platforms + uses: MichaelsJP/conda-package-publish-action@v1.0.0 with: subDir: 'conda.recipe' AnacondaToken: ${{ secrets.ANACONDA_TOKEN }} From 3f13788374caecdb1095671d308a22479cc353b2 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Tue, 2 Feb 2021 20:03:36 +0100 Subject: [PATCH 20/20] bump version --- conda.recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 9d868d19..e937f65c 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "openrouteservice" %} -{% set version = "2.3.0" %} +{% set version = "2.3.2" %} package: name: "{{ name|lower }}"