From 677c5e1aa8422724936825bbc5d71ac703d658c1 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Wed, 22 Jan 2025 18:29:37 +0000 Subject: [PATCH] Revert "Reapply "Began preparing for conda deployment"" This reverts commit ade2f3b84572b4356d404da2dbcd1d7266f10205. --- .devcontainer/Dockerfile | 16 ---------------- .devcontainer/devcontainer.json | 20 +++++++++----------- .devcontainer/noop.txt | 3 --- .gitignore | 3 +-- .vscode/extensions.json | 5 ----- Jenkinsfile | 22 ++++++++-------------- environment.yml | 17 ----------------- pyproject.toml | 7 +------ requirements.txt | 8 ++++++++ 9 files changed, 27 insertions(+), 74 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/noop.txt delete mode 100644 .vscode/extensions.json delete mode 100644 environment.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 808f11b..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/miniconda: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 to install a different version of Python than the default -# RUN conda install -y python=3.6 \ -# && pip install --no-cache-dir pipx \ -# && pipx reinstall-all - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ff3ce3c..c58d0e4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,9 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/miniconda +// README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Miniconda (Python 3)", - "build": { - "context": "..", - "dockerfile": "Dockerfile" - }, + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, @@ -14,18 +12,18 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "python --version", - - // Configure tool-specific properties. + "postCreateCommand": "pip3 install --user -r requirements.txt", "customizations": { "vscode": { "extensions": [ - "mechatroner.rainbow-csv", - "piotrpalarz.vscode-gitignore-generator" + "mechatroner.rainbow-csv" ] } } + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" } diff --git a/.devcontainer/noop.txt b/.devcontainer/noop.txt deleted file mode 100644 index abee195..0000000 --- a/.devcontainer/noop.txt +++ /dev/null @@ -1,3 +0,0 @@ -This file is copied into the container along with environment.yml* from the -parent folder. This is done to prevent the Dockerfile COPY instruction from -failing if no environment.yml is found. \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1a306d2..2a36fc4 100644 --- a/.gitignore +++ b/.gitignore @@ -357,5 +357,4 @@ package # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) output -*.private.* -conda-bld \ No newline at end of file +*.private.* \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 1bddac4..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "piotrpalarz.vscode-gitignore-generator" - ] -} \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 58effaa..897556b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,42 +2,36 @@ pipeline { agent { kubernetes { cloud 'rsys-devel' - defaultContainer 'miniforge3' - inheritFrom 'miniforge' + defaultContainer 'pip' + inheritFrom 'pip' } } stages { stage("install") { steps { - sh 'conda env update -n base -f environment.yml' + sh 'python -m pip install -r requirements.txt' } } stage("unit tests") { steps { - sh returnStatus: true, script: "pytest --junitxml=test_results.xml --cov=src --cov-report xml:coverage.xml" + sh returnStatus: true, script: "python -m pytest --junitxml=test_results.xml --cov=src --cov-report xml:coverage.xml" xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test_results.xml', stopProcessingIfError: true)] recordCoverage(tools: [[parser: 'COBERTURA', pattern: 'coverage.xml']]) } } stage("build") { - environment { - GIT_AUTHOR_NAME = "Harrison Deng" - GIT_AUTHOR_EMAIL = "yunyangdeng@outlook.com" - } steps { sh "python -m build" - sh "grayskull pypi dist/*.tar.gz" - sh "conda-build autobigsst.engine --output-folder conda-bld" } } stage("archive") { steps { - archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl conda-bld/**/*.conda', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true + archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } stage("publish") { parallel { - stage ("internal") { + stage ("git.reslate.systems") { environment { CREDS = credentials('username-password-rs-git') } @@ -45,12 +39,12 @@ pipeline { sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/ydeng/pypi -u ${CREDS_USR} -p ${CREDS__PSW} --non-interactive --disable-progress-bar --verbose dist/*' } } - stage ("external") { + stage ("pypi.org") { when { tag '*.*' } environment { - PYPI_TOKEN = credentials('pypi.org') + TOKEN = credentials('pypi.org') } steps { sh returnStatus: true, script: 'python -m twine upload -u __token__ -p ${TOKEN} --non-interactive --disable-progress-bar --verbose dist/*' diff --git a/environment.yml b/environment.yml deleted file mode 100644 index 8cce59e..0000000 --- a/environment.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: base -channels: - - conda-forge -dependencies: -- aiohttp[speedups] -- biopython -- pytest -- pytest-asyncio -- python-build -- twine -- setuptools_scm -- pytest-cov -- grayskull -- conda-build -- anaconda-client -- conda-utils -- bioconda-build \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 309efd1..f83d2e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,12 +6,7 @@ build-backend = "setuptools.build_meta" name = "autobigsst.engine" dynamic = ["version"] readme = "README.md" -authors = [ - {name = "Harrison Deng"}, -] -maintainers = [ - {name = "Harrison Deng"}, -] + dependencies = [ "biopython", "aiohttp[speedups]", diff --git a/requirements.txt b/requirements.txt index e69de29..951b648 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,8 @@ +aiohttp[speedups] +biopython +pytest +pytest-asyncio +build +twine +setuptools_scm +pytest-cov \ No newline at end of file