Skip to content

Commit

Permalink
loosen nlp packages deps to support various python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Dec 6, 2023
1 parent 760a6e9 commit 31c3ea7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:

strategy:
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# somehow mamba with python 3.12 doesn't resolve spacy although available...
python-version: ["3.9", "3.10", "3.11"]
allow-failure: [false]
domain: ["eo", "nlp"]

Expand All @@ -60,12 +60,16 @@ jobs:
- uses: actions/cache@v2
id: cache
with:
path: /usr/share/miniconda3/envs/github-ci-test-python${{ matrix.python-version }}-${{ matrix.domain }}
key: conda-python${{ matrix.python-version }}-${{ matrix.domain }}-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
path: ${{ env.CONDA }}/envs/github-ci-test-python${{ matrix.python-version }}-${{ matrix.domain }}
key: conda-python${{ matrix.python-version }}-${{ matrix.domain }}-${{ hashFiles('${{ matrix.domain }}/environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}

- name: Display Python
run: which python

- name: Update environment
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "python=${{ matrix.python-version }}" > ${{ env.CONDA }}/envs/github-ci-test-python${{ matrix.python-version }}-${{ matrix.domain }}/conda-meta/pinned
mamba env update \
-n github-ci-test-python${{ matrix.python-version }}-${{ matrix.domain }} \
-f ${{ matrix.domain }}/environment.yml
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
**/cache/
**/*tree-tagger-linux*
**/.pytest_cache
**/condaenv.*.requirements.txt

### Binaries
**/*.jar
Expand Down
13 changes: 6 additions & 7 deletions nlp/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ channels:
- conda-forge

dependencies:
- intake-esm==2021.1.15
- intake-esm
- intake-stac==0.3.0
- sat-search==0.3.0
- threddsclient==0.4.2
- openjdk==8.0.152
# python-flair=0.8 only works with numpy<=1.19.5
- python-flair==0.8
- numpy<=1.19.5
- spacy>=3.5.0,<4
- python-flair
- numpy
- spacy>=3.5,<4
- pydantic<2
- python-dateutil==2.7.5
- python-levenshtein==0.12.2
- python-dateutil
- python-levenshtein
- requests
- pip>=22
- pip:
Expand Down

0 comments on commit 31c3ea7

Please sign in to comment.