From 3dbdae2b6ffdde4bfe5a8a06b1cc0dd807b5f810 Mon Sep 17 00:00:00 2001 From: hadware Date: Mon, 4 Mar 2024 17:47:28 +0100 Subject: [PATCH] Removed setup.py and added a new package-testing workflow --- .github/workflows/test-package.yml | 29 ++++++++++ setup.py | 89 ------------------------------ 2 files changed, 29 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/test-package.yml delete mode 100644 setup.py diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml new file mode 100644 index 0000000..e3378e9 --- /dev/null +++ b/.github/workflows/test-package.yml @@ -0,0 +1,29 @@ +# This workflow will install the package, and try to run the package to check that the package install works fine + +name: Tests + +on: + push: + branches: [ '*' ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install pygamma agreement + run: | + python -m pip install --upgrade pip + python -m pip install pygamma-agreement + - name: Test that CLI is running fine + run: | + pygamma-agreement -h diff --git a/setup.py b/setup.py deleted file mode 100644 index 442d4e2..0000000 --- a/setup.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -# The MIT License (MIT) - -# Copyright (c) 2020-2021 CoML - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# AUTHORS -# Rachid RIAD - -from setuptools import setup, find_packages - -with open("requirements.txt") as req_file: - requirements = req_file.read().split("\n") - -with open("README.md") as readme_file: - long_description = readme_file.read() - -setup( - - # package - packages=find_packages(), - install_requires=requirements, - version='0.5.6', - - # PyPI - name='pygamma-agreement', - description=('Inter-annotator agreement measure and alignment ' - 'written in python'), - long_description=long_description, - long_description_content_type="text/markdown", - author='Rachid RIAD', - author_email='rachid.riad@ens.fr', - url='https://pygamma-agreement.readthedocs.io/en/latest/', - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Scientific/Engineering", - "Topic :: Text Processing :: Linguistic", - "Topic :: Multimedia :: Sound/Audio :: Speech" - ], - entry_points={ - 'console_scripts': [ - 'pygamma-agreement = pygamma_agreement.cli_apps:pygamma_cmd', - ] - }, - extras_require={ - "notebook": [ - "matplotlib", - ], - "CBC": [ - "cylp" - ], - "testing": [ - "pytest", - "cylp" - ], - "docs": [ - "sphinx", - "sphinx_rtd_theme" - ] - } - -)