Skip to content

Commit

Permalink
TVB-2113: add bin path to modify distribution python path
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianciu committed Dec 4, 2024
1 parent 90d2001 commit c0da1c7
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tvb_build/Jenkinsfile-Mac
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ pipeline {
archiveArtifacts artifacts: 'TVB_Mac*.zip'
}
}
stage ('Tests on SqLite') {
steps {
sh '''#!/bin/bash
source /Applications/anaconda3/etc/profile.d/conda.sh
conda activate mac-distribution
cd tvb_bin
/bin/bash run_tests.sh
exit 0
'''
junit 'tvb_bin/TEST_OUTPUT/results_*.xml'
}
}
}
post {
changed {
Expand Down
20 changes: 20 additions & 0 deletions tvb_build/Jenkinsfile-Step1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,26 @@ pipeline {
archiveArtifacts artifacts: 'dist/*'
}
}
stage ('Compute coverage') {
steps {
withDockerContainer(image: '${FULL_DOCKER_IMAGE_NAME}') {
sh '''#!/bin/bash
source activate tvb-run
rm -rf TEST_OUTPUT
mkdir TEST_OUTPUT
cd tvb_build
bash install_full_tvb.sh
cd ../tvb_library
py.test --cov-config .coveragerc --cov=tvb tvb/tests --cov-branch --cov-report xml:../TEST_OUTPUT/coverage_lib.xml --junitxml=../TEST_OUTPUT/results_lib.xml
cd ../tvb_framework
py.test --cov-config .coveragerc --cov=tvb tvb/tests --cov-branch --cov-report xml:../TEST_OUTPUT/coverage_frw.xml --junitxml=../TEST_OUTPUT/results_frw.xml
exit 0
'''
}
junit 'TEST_OUTPUT/results_*.xml'
step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'TEST_OUTPUT/coverage_*.xml', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])
}
}
}
post {
always {
Expand Down
8 changes: 8 additions & 0 deletions tvb_build/Jenkinsfile-Windows
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ pipeline {
}
}
}
stage ('Tests on SqLite') {
steps {
withDockerContainer(image: "${FULL_DOCKER_IMAGE_NAME}") {
powershell 'cd tvb_build; cmd /k "activate tvb-run & install_full_tvb.bat & cd ../tvb_bin & run_tests.bat"; exit 0'
}
junit 'tvb_bin/TEST_OUTPUT/results_*.xml'
}
}
stage('Copy Step 1') {
steps {
bat '''
Expand Down
3 changes: 1 addition & 2 deletions tvb_build/build_from_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def linux64():
'bin/tvb_stop.sh': 'bash ./distribution.sh stop',
'bin/jupyter_notebook.sh': set_path + 'cd ../bin\n../tvb_data/bin/python -m jupyterlab ../demo_scripts',
'demo_scripts/jupyter_notebook.sh': set_path + 'cd ../demo_scripts\n../tvb_data/bin/python -m jupyterlab',
'bin/activate_tvb_env.sh': '# Conda must be installed before running this script; \n # Run this script with source. \n conda activate ../tvb_data \n'
'bin/activate_tvb_env.sh': '# Conda must be installed before running this script;\n# Run this script with source.\nconda activate ../tvb_data \n'
}

return Config("Linux", "/opt/conda/envs/tvb-run", join("lib", Environment.PYTHON_FOLDER, "site-packages"),
Expand Down Expand Up @@ -254,7 +254,6 @@ def _modify_pth(pth_name):
fw.write(new_content)



def _fix_jupyter_kernel(tvb_data_folder, is_windows):
kernel_json = os.path.join(tvb_data_folder, "share", "jupyter", "kernels", "python3", "kernel.json")
if os.path.exists(kernel_json):
Expand Down

0 comments on commit c0da1c7

Please sign in to comment.