Skip to content

Commit

Permalink
Merge pull request #313 from avdata99/301_fix_reqs
Browse files Browse the repository at this point in the history
Fix requirements
  • Loading branch information
amercader authored Jul 31, 2023
2 parents 7091f4b + c8fd28c commit 8471e63
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/test-postgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
needs: lint
strategy:
matrix:
ckan-version: [2.9, 2.9-py2]
include:
- ckan-version: 2.9
harvester-version: 'master'
- ckan-version: 2.9-py2
harvester-version: 'v1.4.2'
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}
Expand Down Expand Up @@ -53,9 +57,10 @@ jobs:
psql --host=postgres --username=postgres --command="CREATE USER datastore_write WITH PASSWORD 'pass' NOSUPERUSER NOCREATEDB NOCREATEROLE;"
psql --host=postgres --username=postgres --command="CREATE USER datastore_read WITH PASSWORD 'pass' NOSUPERUSER NOCREATEDB NOCREATEROLE;"
createdb --encoding=utf-8 --host=postgres --username=postgres --owner=datastore_write datastore_test
- name: Install harvester
run: |
git clone https://github.com/ckan/ckanext-harvest
git clone --branch ${{ matrix.harvester-version }} https://github.com/ckan/ckanext-harvest
cd ckanext-harvest
pip install -r pip-requirements.txt
pip install -r dev-requirements.txt
Expand All @@ -72,6 +77,19 @@ jobs:
gcc \
libxml2-dev \
libxslt-dev
- name: Patch to test pyproj
if: ${{ matrix.ckan-version == '2.9-py2' || matrix.ckan-version == '2.8' || matrix.ckan-version == '2.7' }}
run: |
pip install cython==0.29.36
pip install --no-use-pep517 pyproj==2.2.2
- name: Patch to test pyproj
if: ${{ matrix.ckan-version == '2.9' }}
run: |
pip install cython==0.29.36
pip install --no-use-pep517 pyproj==2.6.1
- name: Install dependencies (python2)
if: ${{ matrix.ckan-version == '2.9-py2' || matrix.ckan-version == '2.8' || matrix.ckan-version == '2.7' }}
run: |
Expand All @@ -86,6 +104,7 @@ jobs:
python3-dev
pip install -r requirements.txt
pip install -r requirements-postgis.txt
- name: Install requirements
run: |
pip install -e .
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ jobs:
- ckan-version: "2.10"
solr-image: "2.10-spatial"
requirements-file: 'requirements.txt'
harvester-version: 'master'
- ckan-version: 2.9
solr-image: 2.9-solr8-spatial
requirements-file: 'requirements.txt'
harvester-version: 'master'
- ckan-version: 2.9-py2
solr-image: 2.9-py2-solr8-spatial
requirements-file: 'requirements-py2.txt'
harvester-version: 'v1.4.2'
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}, Solr ${{ matrix.solr-image }}
Expand Down Expand Up @@ -89,6 +92,18 @@ jobs:
restore-keys: |
${{ runner.os }}-spatial-ckan-${{ matrix.ckan-version }}-${{ hashFiles('*requirements*.txt') }}
- name: Patch to test pyproj
if: ${{ matrix.ckan-version == '2.9' }}
run: |
pip install cython==0.29.36
pip install --no-use-pep517 pyproj==2.6.1
- name: Patch to test pyproj
if: ${{ matrix.ckan-version == '2.9-py2' }}
run: |
pip install cython==0.28.4
pip install --no-use-pep517 pyproj==2.2.2
- name: Install dependencies from ${{ matrix.requirements-file }}
if: steps.cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -98,7 +113,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "Installing harvester"
git clone --depth 1 https://github.com/ckan/ckanext-harvest
git clone --depth 1 --branch ${{ matrix.harvester-version }} https://github.com/ckan/ckanext-harvest
cd ckanext-harvest
echo "upgrade pip"
pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions requirements-py2.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ckantoolkit
cython==0.29.36
Shapely>=1.2.13,<2.0.0
pyproj==2.2.2
OWSLib==0.18.0
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ argparse
pyparsing>=2.1.10
requests>=1.1.0
six

cython==0.29.36; python_version < '3.9'
pyproj==2.6.1; python_version < '3.9'
pyproj==3.4.1; python_version >= '3.9'
pyproj @ git+https://github.com/pyproj4/pyproj.git@main; python_version >= '3.9'

Shapely==2.0.1
OWSLib==0.28.1
Expand Down

0 comments on commit 8471e63

Please sign in to comment.