From 4c56149995f22710cda58aabfa1720aab95406a2 Mon Sep 17 00:00:00 2001 From: "deshpande.jaidev@gmail.com" Date: Thu, 26 Sep 2024 13:51:34 +0530 Subject: [PATCH] BLD: Use GitHub Actions for linting and unittests Remove TravisCI --- .github/workflows/python-app.yml | 42 ++++++++++++++++++++++++++++++++ .travis.yml | 26 -------------------- README.rst | 15 ++---------- 3 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/python-app.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..b98fd7e --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,42 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U pip pytest spacy coverage flake8 + python -m spacy download en_core_web_sm + python -m spacy download en_core_web_md + python -m spacy download en_core_web_lg + - name: Lint with flake8 + run: | + flake8 . + - name: unittests + run: | + coverage run -m pytest + coverage report -m diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ad699b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Config file for automatic testing at travis-ci.org - -# Run in Python 3 only. Drop Python 2 testing -language: python -python: - - 3.8 - - 3.9 - -dist: jammy - -before_install: - - python --version - -install: - - pip install -U pip pytest spacy coverage flake8 - # Set up variables - - export BRANCH=$TRAVIS_BRANCH - -script: - - flake8 - - python -m spacy download en_core_web_sm - - python -m spacy download en_core_web_md - - python -m spacy download en_core_web_lg - - python -m spacy download en_core_web_trf - - coverage run -m pytest - - coverage report -m diff --git a/README.rst b/README.rst index 26bb8ab..ab45423 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,3 @@ -|Build Status| - numerizer ========= @@ -7,6 +5,8 @@ A Python module to convert natural language numerics into ints and floats. This is a port of the Ruby gem `numerizer `_ +Numerizer has been tested on Python 3.9, 3.10 and 3.11. + Installation ------------ @@ -16,14 +16,6 @@ The numerizer library can be installed from PyPI as follows: $ pip install numerizer -or from source as follows: - -.. code:: bash - - $ git clone https://github.com/jaidevd/numerizer.git - $ cd numerizer - $ pip install -e . - Usage ----- @@ -91,6 +83,3 @@ Extras ------ For R users, a wrapper library has been developed by `@amrrs `_. Try it out `here `_. - -.. |Build Status| image:: https://app.travis-ci.com/jaidevd/numerizer.svg?branch=master - :target: https://app.travis-ci.com/jaidevd/numerizer