diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 860fdfc..5b02f9d 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -4,39 +4,29 @@ on: push jobs: build: - runs-on: ${{ matrix.platform }} - strategy: - matrix: - platform: [ubuntu-latest] - python-version: ["3.10.9"] + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.2 + - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: "3.11" - - name: Install dependencies - run: | - pip install -r requirements.txt coverage + - uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + + - run: poetry install --no-interaction --no-root - - name: Test - run: | - coverage run -m unittest - coverage xml + - run: poetry run pytest --cov --cov-report xml:coverage.xml --cov-append -vv --hypothesis-show-statistics - name: Run codacy-coverage-reporter uses: codacy/codacy-coverage-reporter-action@v1 with: project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: coverage.xml - - - uses: codecov/codecov-action@v3 - with: - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml + coverage-reports: coverage.xml \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4950e79..cdf1b75 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,8 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ + + +.venv +.vscode +poetry.lock \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5946ea4..c4742b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #============================================================================================== -FROM python:3.10 +FROM python:3.11 WORKDIR /opt/software COPY . . RUN pip install . diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7f7790d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[tool.poetry] +name = "prodigy-lig" +version = "1.1.0" +description = "Calculate protein-small molecule binding affinities." +authors = ["BonvinLab "] +license = "Apache-2.0" +readme = "README.md" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Intended Audience :: Science/Research", +] +packages = [{ include = "prodigy_lig" }] + +[tool.poetry.dependencies] +python = "^3.11" +numpy = "^1.26.4" +biopython = "^1.79" + +[tool.poetry.group.dev.dependencies] +pytest = "^8.1.1" +coverage = "^7.5.0" +pytest-cov = "^5.0.0" +hypothesis = "^6.100.1" + +[tool.poetry.scripts] +prodigy_lig = "prodigy_lig.prodigy_lig:main" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index bc6726e..0000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -from setuptools import setup -import codecs - -from prodigy_lig import version - - -def read(fname): - return codecs.open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read() - -with open("requirements.txt") as f: - required = f.read().splitlines() - -setup( - name='prodigy_lig', - version = version, - description=("Calculate protein-small molecule binding affinities."), - url='http://github.com/haddocking/prodigy-lig', - author='Computational Structural Biology Group @ Utrecht University', - author_email='prodigy.bonvinlab@gmail.com', - license='Apache 2.0', - packages=['prodigy_lig'], - long_description=read('README.md'), - classifiers=[ - "Development Status :: 4 - Beta", - ], - install_requires=required, - entry_points={ - 'console_scripts': [ - 'prodigy_lig = prodigy_lig.prodigy_lig:main', - ] - }, - zip_safe=False -)