From 60e9e2c39947910f2db0a9a0d0525707234b8d9c Mon Sep 17 00:00:00 2001 From: Jorge Alvarez Jarreta Date: Wed, 22 Nov 2023 16:18:01 +0000 Subject: [PATCH 1/3] add pyproject.toml file --- .travis.yml | 7 +--- Makefile | 2 +- bio/__init__.py | 0 bio/ensembl/__init__.py | 1 - pyproject.toml | 83 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 8 deletions(-) delete mode 100644 bio/__init__.py delete mode 100644 bio/ensembl/__init__.py create mode 100644 pyproject.toml diff --git a/.travis.yml b/.travis.yml index ef19970..6d2125a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,13 +11,8 @@ before_install: - docker build -t ols tests/ols-docker - docker run -d -p 127.0.0.1:8080:8080 -t ols - docker ps -a - - git clone https://github.com/Ensembl/ensembl-hive.git - - export PYTHONPATH=$PWD/ensembl-hive/wrappers/python3:$PYTHONPATH install: - - pip install -r requirements.txt - - pip install nose - - pip install coverage - - pip install python-coveralls + - pip install .[cicd] # command to run tests script: - coverage run -m nose tests.test_basic --verbose --cover-package=bio.ensembl diff --git a/Makefile b/Makefile index 997cfaa..3826294 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ init: - pip install -r requirements.txt + pip install . test: nosetests tests diff --git a/bio/__init__.py b/bio/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bio/ensembl/__init__.py b/bio/ensembl/__init__.py deleted file mode 100644 index d3f5a12..0000000 --- a/bio/ensembl/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..136b2fa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,83 @@ +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# pyproject.toml -- OLS Ensembl loader project configuration + +## Generic configuration +[project] +name = "ols-ensembl-loader" +version = "1.0" +requires-python = ">= 3.5" +description = "OLS Ensembl loader" +readme = "README.md" +authors = [ + {name = "Ensembl", email = "dev@ensembl.org"}, +] +license = {text = "Apache License 2.0"} +keywords = [ + "ols", + "ensembl", + "bioinformatics", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "coreapi == 2.3.3", + "dateutils == 0.6.7", + "ensembl-hive @ git+https://github.com/Ensembl/ensembl-hive.git@main", + "hal_codec ~= 1.0.2", + "inflection == 0.3.1", + "mysqlclient == 1.4.6", + "ols-client @ git+https://github.com/Ensembl/ols-client.git@main", + "PyMySQL == 0.9.3", + "SQLAlchemy == 1.3.15", +] + +[project.optional-dependencies] +cicd = [ + "nose", + "coverage", + "python-coveralls", +] + +[project.urls] +homepage = "https://www.ensembl.org" +repository = "https://github.com/Ensembl/ols-ensembl-loader" + +[tool.setuptools] +package-dir = {"" = "."} + +[tool.setuptools.packages.find] +where = ["."] # list of folders that contain the packages (["."] by default) + +# For additional information on `setuptools` configuration see: +# https://setuptools.pypa.io/en/latest/userguide/quickstart.html +# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html +# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ + +[build-system] +requires = [ + "setuptools", + "setuptools-scm", + "wheel" +] +build-backend = "setuptools.build_meta" From 0c02da43af655ff9ab988a8d7889e1cd49a94c8c Mon Sep 17 00:00:00 2001 From: Jorge Alvarez Jarreta Date: Wed, 22 Nov 2023 17:05:00 +0000 Subject: [PATCH 2/3] update minimum Python version --- .travis.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d2125a..01e52f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - - "3.5" + - "3.8" # command to install dependencies services: - mysql diff --git a/pyproject.toml b/pyproject.toml index 136b2fa..b27d65f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ [project] name = "ols-ensembl-loader" version = "1.0" -requires-python = ">= 3.5" +requires-python = ">= 3.8" description = "OLS Ensembl loader" readme = "README.md" authors = [ From ffafeb9377d1d9c55a468706d3f5e4d63025f8f8 Mon Sep 17 00:00:00 2001 From: Jorge Alvarez Jarreta Date: Wed, 22 Nov 2023 17:49:28 +0000 Subject: [PATCH 3/3] bugfix: repo does not match library name --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b27d65f..6f56c3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,11 +43,11 @@ classifiers = [ dependencies = [ "coreapi == 2.3.3", "dateutils == 0.6.7", + "ebi-ols-client @ git+https://github.com/Ensembl/ols-client.git@main", "ensembl-hive @ git+https://github.com/Ensembl/ensembl-hive.git@main", "hal_codec ~= 1.0.2", "inflection == 0.3.1", "mysqlclient == 1.4.6", - "ols-client @ git+https://github.com/Ensembl/ols-client.git@main", "PyMySQL == 0.9.3", "SQLAlchemy == 1.3.15", ]