diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..ab01100 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,36 @@ +pipeline { + agent any + stages { + stage("clean") { + steps { + sh 'rm -rf ./dist/*' + } + } + stage("install") { + steps { + sh 'mamba env update --file environment.yml' + sh 'echo "mamba activate filterfasta" >> ~/.bashrc' + } + } + stage("build") { + steps { + sh "python -m build" + } + } + stage("test") { + steps { + sh "pip install dist/*.whl" + } + } + stage("publish") { + when { + branch '**/master' + } + steps { + withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { + sh "python -m twine upload --repository-url https://git.reslate.systems/api/packages/${USER}/pypi -u ${USER} -p ${PASS} --non-interactive --disable-progress-bar --verbose dist/*" + } + } + } + } +} \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..9ababcb --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: filterfasta +channels: + - conda-forge +dependencies: + - build=0.7 + - pytest=7 + - twine=4 + - biopython=1.81 + - python=3.11 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5f8f5e3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools", "wheel"] \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..fac52d5 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[metadata] +name = filterfasta +version = 0.0.1 + +[options] +packages = filterfasta + +[options.entry_points] +console_scripts = + filterfasta = filterfasta.filterfasta:main \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6068493 --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup()