Skip to content

Commit

Permalink
ci run_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miau1 committed Sep 15, 2023
1 parent 754553a commit a5e49e1
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,30 @@ permissions:
contents: read

jobs:
run_tests:
defaults:
run:
working-directory: opustools_pkg

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[all]
- name: Test with unittest
run: |
python -m unittest discover tests
deploy:
needs: run_tests
defaults:
run:
working-directory: opustools_pkg
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/python-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Python Package

on:
push:
branches: [develop]

permissions:
contents: read

jobs:
run_tests:
defaults:
run:
working-directory: opustools_pkg

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[all]
- name: Test with unittest
run: |
python -m unittest discover tests
4 changes: 4 additions & 0 deletions opustools_pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Tools for accessing and processing OPUS data.

`pip install opustools`

`pip install opustools[langid]` to use `opus_langid`

`pip install opustools[all]` to install all optional requirements

---

## opus_read
Expand Down
10 changes: 9 additions & 1 deletion opustools_pkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
with open("README.md", "r") as fh:
long_description = fh.read()

install_requires = ['ruamel.yaml']

langid_require = ['pycld2', 'langid']

all_require = langid_require

setuptools.setup(
name="opustools",
version="1.5.5",
version="1.5.6",
author="Mikko Aulamo",
author_email="[email protected]",
description="Tools to read OPUS",
Expand All @@ -21,4 +27,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
),
install_requires=install_requires,
extras_require={'langid': langid_require, 'all': all_require}
)

0 comments on commit a5e49e1

Please sign in to comment.