Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds git fetch --tags #310

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading