Skip to content

Commit

Permalink
Merge pull request #38 from ausgerechnet/v0.9.16
Browse files Browse the repository at this point in the history
v0.10.0
  • Loading branch information
ausgerechnet authored Nov 21, 2021
2 parents cc09a13 + adc93b9 commit d44057b
Show file tree
Hide file tree
Showing 81 changed files with 34,234 additions and 2,346 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build & Test

on: [workflow_dispatch, push]

jobs:

build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]

steps:
- uses: actions/checkout@v2
- name: Install CWB
run: |
sudo apt-get install libncurses5-dev
svn co http://svn.code.sf.net/p/cwb/code/cwb/trunk cwb
cd cwb
sed -i 's/SITE=beta-install/SITE=standard/' config.mk
sudo ./install-scripts/install-linux
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -q pipenv
make install
- name: Lint
continue-on-error: true
run: |
make lint
- name: Build
run: |
make compile
make build
- name: Test
run: |
make test
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create Dist & Publish on PyPI

on:
workflow_dispatch:
release:
types: [created]

jobs:

publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install CWB
run: |
sudo apt-get install libncurses5-dev
svn co http://svn.code.sf.net/p/cwb/code/cwb/trunk cwb
cd cwb
sed -i 's/SITE=beta-install/SITE=standard/' config.mk
sudo ./install-scripts/install-linux
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -q setuptools wheel twine pipenv
make install
- name: Build
run: |
make compile
make build
- name: Test
run: |
make test
- name: Create Dist
run: |
make dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
26 changes: 0 additions & 26 deletions .github/workflows/pythonpublish.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
legacy/

*.so

*.pyc
__pycache__/

Expand All @@ -19,5 +21,3 @@ build/
.Rproj.user
.RData
.Rhistory

Pipfile.lock
19 changes: 19 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# pylint config
[MASTER]
ignore-patterns=^test.*
[BASIC]
# variable-naming-style=any
# argument-naming-style=any
argument-rgx=[A-Za-z_][A-Za-z0-9_]{1,30}$
variable-rgx=[A-Za-z_][A-Za-z0-9_]{1,30}$
method-rgx=[A-Za-z_][A-Za-z0-9_]{1,30}$
attr-rgx=[A-Za-z_][A-Za-z0-9_]{1,30}$
module-rgx=[A-Za-z_][A-Za-z0-9_]{1,30}$
[MESSAGES CONTROL]
disable=too-few-public-methods,
no-name-in-module,
fixme,
too-many-arguments,
too-many-instance-attributes,
logging-not-lazy,
line-too-long,
64 changes: 64 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM ubuntu:20.04

##########################
# INSTALL OS DEPENDENCIES
##########################
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
apt-utils \
autoconf \
bison \
flex \
gcc \
libc6-dev \
libglib2.0-0 \
libglib2.0-dev \
libncurses5 \
libncurses5-dev \
libpcre3-dev \
libreadline8 \
libreadline-dev \
make \
pkg-config \
subversion \
git \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
cython3 \
less \
mg


#####################
# INSTALL LATEST CWB
#####################
RUN svn co http://svn.code.sf.net/p/cwb/code/cwb/trunk /cwb
WORKDIR /cwb
RUN sed -i 's/SITE=beta-install/SITE=standard/' config.mk &&\
./install-scripts/install-linux


##############################
# INSTALL PYTHON DEPENDENCIES
##############################
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install -q pipenv

WORKDIR /cwb-ccc
COPY . /cwb-ccc

RUN make clean
RUN make install
RUN make compile
RUN make build

##########
# TESTING
##########
# update registry directory is done in makefile
# RUN HERE=$(pwd) && \
# sed -i "s|HOME .*|HOME $HERE/tests/corpora/data/germaparl1386|g" tests/corpora/registry/germaparl1386
RUN make test
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global-include *.pyx
17 changes: 10 additions & 7 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ verify_ssl = true

[dev-packages]
pytest = "==6.1.2"
pylint = "==2.8.2"
pytest-cov = "==2.10.1"
attrs = "==19.1.0"
tabulate = "==0.8.9"
pyperclip = "==1.8.2"
cython = "==0.29.24"
setuptools = "*"
wheel = "*"
twine = "*"
sphinx = "*"
enthought-sphinx-theme = "*"

[packages]
association-measures = "==0.1.5"
cwb-python = "==0.2.2"
pandas = "==1.2.0"
numexpr = "==2.7.1"
Bottleneck = "==1.3.2"
unidecode = "==1.1.1"
pyyaml = "==5.4.1"
association-measures = ">=0.1.6"
pandas = ">=1.2.0"
numexpr = ">=2.7.1"
Bottleneck = ">=1.3.2"
unidecode = ">=1.1.1"
pyyaml = ">=5.4.1"
Loading

0 comments on commit d44057b

Please sign in to comment.