Added stage for publishing to test.pypi.org when the tag a version number.
This commit is contained in:
parent
206a105bf9
commit
4fe0f0f287
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
@ -30,11 +30,26 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("publish") {
|
stage("publish") {
|
||||||
environment {
|
parallel {
|
||||||
CREDS = credentials('4d6f64be-d26d-4f95-8de3-b6a9b0beb311')
|
stage ("git.reslate.systems") {
|
||||||
}
|
environment {
|
||||||
steps {
|
CREDS = credentials('4d6f64be-d26d-4f95-8de3-b6a9b0beb311')
|
||||||
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/${CREDS_USR}/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*'
|
}
|
||||||
|
steps {
|
||||||
|
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/${CREDS_USR}/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("test.pypi.org") {
|
||||||
|
when {
|
||||||
|
tag '*.*'
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
TOKEN = credentials('test.pypi.org')
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh returnStatus: true, script: 'python -m twine upload -r testpypi -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
import asyncio
|
|
||||||
from Bio import Entrez
|
|
||||||
from Bio import SeqIO
|
|
||||||
|
|
||||||
# TODO Change this out for a more professional approach
|
|
||||||
Entrez.email = "yunyangdeng@outlook.com"
|
|
||||||
|
|
||||||
from automlst.engine.data.genomics import AnnotatedString, StringAnnotation
|
|
||||||
|
|
||||||
|
|
||||||
async def fetch_ncbi_genbank(genbank_id: str) -> AnnotatedString:
|
|
||||||
with (await asyncio.to_thread(Entrez.efetch, db="nucleotide", id=genbank_id, rettype="gb", retmode="text")) as fetch_stream:
|
|
||||||
record = SeqIO.read(fetch_stream, "genbank")
|
|
||||||
sequence_features = list()
|
|
||||||
for feature in record.features:
|
|
||||||
start = int(feature.location.start)
|
|
||||||
end = int(feature.location.end)
|
|
||||||
qualifiers = feature.qualifiers
|
|
||||||
for qualifier_key in qualifiers:
|
|
||||||
qualifiers[qualifier_key] = set(qualifiers[qualifier_key])
|
|
||||||
sequence_features.append(StringAnnotation(
|
|
||||||
type=feature.type,
|
|
||||||
start=start,
|
|
||||||
end=end+1, # Position is exclusive
|
|
||||||
feature_properties=qualifiers
|
|
||||||
))
|
|
||||||
return AnnotatedString(name=genbank_id, sequence=str(record.seq), annotations=sequence_features)
|
|
Loading…
x
Reference in New Issue
Block a user