Skip to content

Commit

Permalink
merge master into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
thorunna committed Oct 13, 2023
2 parents 6bd5dfc + e7d0ac4 commit d045890
Show file tree
Hide file tree
Showing 47 changed files with 73,942 additions and 8,395 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: tests

on:
push:
branches: [ master ]
branches:
- '*' # Run on all branches
pull_request:
branches: [ master ]
branches:
- '*' # Run on all branches

jobs:
build:
Expand All @@ -16,25 +15,29 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9, pypy-3.6]
python-version: [ "3.8", "3.9", "3.10", "3.11", "pypy-3.9", "pypy-3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install GreynirCorrect
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade pip wheel setuptools pytest
python -m pip install git+https://github.com/mideind/Tokenizer#egg=tokenizer
python -m pip install git+https://github.com/mideind/GreynirPackage#egg=reynir
python -m pip install -e .
- name: Type check with mypy
# The neural sentence classifier doesn't work with pypy so don't try to install it
if [ "${{ matrix.python-version }}" == "pypy-3.9" ] || [ "${{ matrix.python-version }}" == "pypy-3.10" ]; then
python -m pip install -e .
else
python -m pip install -e .[sentence_classifier]
fi
- name: Typecheck with mypy
run: |
if [ "${{ matrix.python-version }}" == "3.6" ]; then python -m pip install mypy; fi
if [ "${{ matrix.python-version }}" == "3.6" ]; then mypy --python-version=3.6 src/reynir_correct; fi
if [ "${{ matrix.python-version }}" == "3.8" ]; then python -m pip install mypy; fi
if [ "${{ matrix.python-version }}" == "3.8" ]; then mypy --ignore-missing-imports --python-version=3.8 src/reynir_correct; fi
- name: Test with pytest
run: |
python -m pip install pytest
pytest
python -m pytest
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ test/spantest.py

# Error analysis
eval/examples_iEC/
eval/examples_GC/

# Extra resources
src/reynir_correct/resources/*.csv
src/reynir_correct/resources/*.py
src/reynir_correct/resources/*.txt
src/reynir_correct/resources/*/*.csv

# Symlink to iceErrorCorpus for evaluation
eval/iceErrorCorpus
Expand Down Expand Up @@ -106,6 +113,7 @@ target/
.venv
env/
venv/
venv
ENV/
env.bak/
venv.bak/
Expand Down
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (C) 2021 Miðeind ehf.
Copyright (C) 2023 Miðeind ehf.
Original author: Vilhjálmur Þorsteinsson

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Loading

0 comments on commit d045890

Please sign in to comment.