From c490ce3f8636ac494be36a108508fcab10847fd7 Mon Sep 17 00:00:00 2001 From: RAHenriksen Date: Wed, 20 Nov 2024 14:37:10 +0100 Subject: [PATCH] added setup for cdiff component --- install.sh | 6 +++--- setup.cfg | 31 +++++++++++++++++++++++++++++++ setup.py | 19 +++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/install.sh b/install.sh index 369695c..ff598c5 100755 --- a/install.sh +++ b/install.sh @@ -76,12 +76,12 @@ git pull origin main --tags LATEST_COMMIT=$(git rev-parse HEAD) echo "Updated commit hash of cdiff_fbi after update: $LATEST_COMMIT" -# print the latest tag of ecoli_fbi +# print the latest tag of cdiff_fbi LATEST_TAG_COMMIT=$(git tag --sort=-creatordate --format '%(objectname)'|head -1) LATEST_TAG=$(git tag --sort=-creatordate|head -1) -echo "Checking commit hash for the latest tag of ecoli_fbi: $LATEST_TAG_COMMIT" -echo "Checking the lastest tag of ecoli_fbi: $LATEST_TAG" +echo "Checking commit hash for the latest tag of cdiff_fbi: $LATEST_TAG_COMMIT" +echo "Checking the lastest tag of cdiff_fbi: $LATEST_TAG" git checkout $LATEST_TAG_COMMIT diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..d1bb8c1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,31 @@ +[bumpversion] +current_version = 0.0.1 +parse = ((?P\d+))(.(?P\d+))(.(?P\d+)) +serialize = {major}.{minor}.{patch} +commit = True +tag = True + +[metadata] +description-file = README.md + +[bumpversion:file:setup.py] +search = version='{current_version}' +replace = version='{new_version}' + +[bumpversion:file:bifrost_sp_cdiff/config.yaml] +search = {current_version} +replace = {new_version} + +[bumpversion:file:bifrost_sp_cdiff/__init__.py] +search = __version__ = '{current_version}' +replace = __version__ = '{new_version}' + +[bumpversion:file:tests/test_simple.py] +search = component_name = "sp_cdiff__v{current_version}" +replace = component_name = "sp_cdiff__v{new_version}" + +[tool:pytest] +minversion = 6.0 +addopts = -ra -q --durations=0 +testpaths = + tests diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c2d2190 --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +from setuptools import setup, find_namespace_packages + +setup( + name='bifrost_sp_cdiff', + version='0.0.1', + description='Cdiff serotyping and stx typing for Bifrost', + url='https://github.com/ssi-dk/bifrost_sp_cdiff', + author='Rasmus', + author_email='raah@ssi.dk', + license='MIT', + packages=find_namespace_packages(), + install_requires=[ + 'bifrostlib >= 2.1.9', + 'biopython>=1.77' + ], + python_requires='>=3.11', + package_data={'bifrost_sp_cdiff': ['config.yaml', 'pipeline.smk']}, + include_package_data=True +)