Skip to content

Commit

Permalink
Merge pull request #310 from plenoptic-org/jenkins_tags
Browse files Browse the repository at this point in the history
adds git fetch --tags
  • Loading branch information
billbrod authored Dec 11, 2024
2 parents f2f22f8 + 0f9ff9f commit d37beff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ pipeline {
steps {
sh 'python3.11 -m venv --system-site-packages $HOME'
sh '''#!/bin/bash -ex
# make sure we have the git tags, since we need that to correctly version plenoptic
git fetch --tags
source $HOME/bin/activate
pip install -U pip
pip install .[docs]
Expand All @@ -96,6 +98,8 @@ pipeline {
echo \$(ls \$HOME)
echo \$(ls \$HOME/docs)
echo \$(ls \$HOME/docs/_build)
mv docs/_build/ $HOME/built-docs/
echo \$(ls \$HOME/built-docs)
'''
lock('plenoptic_docs_publish') {
script {
Expand All @@ -116,9 +120,9 @@ pipeline {
mkdir -p \$DOCS_DIR
echo \$(ls \$HOME)
echo \$(ls \$HOME/docs)
echo \$(ls \$HOME/docs/_build)
echo \$(ls \$HOME/built-docs)
echo \$(ls \$DOCS_DIR)
cp -rp \$HOME/docs/_build/html/* \$DOCS_DIR
cp -rp \$HOME/built-docs/html/* \$DOCS_DIR
# using -f here makes sure we add the index.html files, which are included in workshops .gitignore (since some are auto-generated)
git add -A -f --verbose docs/\$PROJECT_NAME
GIT_COMMITTER_EMAIL="jenkins@flatironinstitute.org" GIT_COMMITTER_NAME="Flatiron Jenkins" git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m "Generated documentation for \$DOCS_DIR" -m '${env.BUILD_TAG}'
Expand Down
2 changes: 2 additions & 0 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ def mean_metric(x, y):
po.tools.validate.validate_metric(mean_metric, device=DEVICE)

def test_validate_metric_nonnegative(self):
po.tools.set_seed(0)

def sum_metric(x, y):
return (x - y).sum()

Expand Down

0 comments on commit d37beff

Please sign in to comment.