Compare commits

...

18 Commits

Author SHA1 Message Date
5b037d556e Merge branch 'master' into develop
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2024-07-21 04:03:50 +00:00
f08e4c7d35 Pipeline will not fail if version is the same.
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2024-07-21 04:03:36 +00:00
10d2e9f5b2 Merge branch 'master' into develop
Some checks reported errors
ydeng/splitmsa/pipeline/head Something is wrong with the build of this commit
2024-07-21 04:01:58 +00:00
2f49699a23 Loosened version requirements for twine.
Some checks reported errors
ydeng/splitmsa/pipeline/head Something is wrong with the build of this commit
2024-07-21 04:01:36 +00:00
31283d5e49 Merge branch 'master' into develop
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2024-07-21 03:01:39 +00:00
9d97ee6244 Added some extensions for the devcontainer.
Some checks failed
ydeng/splitmsa/pipeline/head There was a failure building this commit
2024-07-21 02:54:01 +00:00
bfeec68756 Added devcontainer to pipeline. 2024-07-21 02:52:25 +00:00
5d3ce699fa Updated pipeline to use latest build container image features
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-05-03 08:39:45 -05:00
ba4a532784 Bumped package version
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-24 16:23:02 -05:00
b047b6f8fc Added archiving stage to 'Jenkinsfile'
Some checks failed
ydeng/splitmsa/pipeline/head There was a failure building this commit
2023-04-24 09:42:10 -05:00
d1b3993011 Changed package version
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-24 09:35:31 -05:00
ad8fe00479 Fixed 'Jenkinsfile'
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-24 09:32:25 -05:00
df132814c8 Added installation test step 2023-04-24 09:25:48 -05:00
9b56853e36 Added '__init__.py'
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-21 13:58:28 -05:00
0cc3539280 Added clean stage to 'Jenkinsfile'.
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-20 15:47:52 -05:00
2c38d7d172 Bumped version number
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
2023-04-20 15:45:16 -05:00
3ca07feade Deleted 'requirements.txt' and updated 'setup.cfg'
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
Wrong package name given in 'setup.cfg' is now fixed.
2023-04-20 15:42:43 -05:00
cf9df14fce Removed "Gooey" as dependency and fixed "setup.cfg"
Some checks failed
ydeng/splitmsa/pipeline/head There was a failure building this commit
2023-04-20 15:39:20 -05:00
9 changed files with 75 additions and 14 deletions

11
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/devcontainers/anaconda:1-3
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
{
"name": "Anaconda (Python 3)",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.debugpy",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.flake8"
]
}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

3
.devcontainer/noop.txt Normal file
View File

@@ -0,0 +1,3 @@
This file copied into the container along with environment.yml* from the parent
folder. This file is included to prevents the Dockerfile COPY instruction from
failing if no environment.yml is found.

26
Jenkinsfile vendored
View File

@@ -1,15 +1,31 @@
pipeline { pipeline {
agent any agent {
kubernetes {
cloud 'Reslate Systems'
defaultContainer 'conda'
}
}
stages { stages {
stage("install") { stage("install") {
steps { steps {
sh 'mamba env update --file environment.yml' sh 'conda update conda -y -q'
sh 'echo "mamba activate splitmsa" >> ~/.bashrc' sh 'conda env update -n base --file environment.yml'
} }
} }
stage("build") { stage("build") {
steps { steps {
sh "python -m build" sh "conda run -n base python -m build"
}
}
stage("test") {
steps {
sh "conda run -n base pip install dist/*.whl"
sh "conda run -n base splitmsa -h"
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
} }
} }
stage("publish") { stage("publish") {
@@ -18,7 +34,7 @@ pipeline {
} }
steps { steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { 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/*" sh returnStatus: true, script: 'conda run -n base 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/*'
} }
} }
} }

View File

@@ -4,7 +4,7 @@ channels:
dependencies: dependencies:
- build=0.7.0 - build=0.7.0
- pytest=7.2.2 - pytest=7.2.2
- twine=4.0.2 - twine
- biopython=1.81 - biopython=1.81
- gooey=1.0.8.1
- python=3.9 - python=3.9
prefix: ./env

View File

@@ -1 +0,0 @@
Bio==1.5.6

View File

@@ -1,13 +1,12 @@
[metadata] [metadata]
name = splitmsa name = splitmsa
version = 0.0.1 version = 0.0.4
[options] [options]
packages = splitmsa packages = splitmsa
install_requires = install_requires =
gooey biopython ==1.81; python_version == "3.9"
Bio; python_version == "3.9"
[options.entry_points] [options.entry_points]
console_scripts = console_scripts =
splitmsa = splitmsa.splitmsa:main splitmsa = splitmsa.splitmsa:main

0
splitmsa/__init__.py Normal file
View File

View File

@@ -14,7 +14,6 @@ import os
from Bio import SeqIO, SeqRecord from Bio import SeqIO, SeqRecord
from Bio.Seq import Seq from Bio.Seq import Seq
import csv import csv
from gooey import Gooey
def read_genes_from_csv(batch_genes_csv_path: str): def read_genes_from_csv(batch_genes_csv_path: str):
@@ -309,7 +308,6 @@ def run(args):
info(f"Completed gene {gene_name} ({start} - {end})") info(f"Completed gene {gene_name} ({start} - {end})")
@Gooey
def main(): def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog="splitmsa", prog="splitmsa",