Skip to content

Commit

Permalink
make sure colab quickstart uses current version
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasprobst committed Jun 28, 2024
1 parent e687c80 commit 0cfc5f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Current implementation highlights in the modules:

A quickstart notebook can be tested by clicking on the following badge:

[![Open Quickstart Notebook](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/matthiasprobst/h5RDMtoolbox/blob/colab/docs/colab/quickstart.ipynb)
[![Open Quickstart Notebook](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/matthiasprobst/h5RDMtoolbox/blob/main/docs/colab/quickstart.ipynb)

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs/colab/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"outputs": [],
"source": [
"# !pip install h5rdmtoolbox"
"# !pip install h5rdmtoolbox==1.4.0rc2"
]
},
{
Expand Down
14 changes: 14 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@ def test_codemeta(self):
codemeta = get_package_meta()

assert codemeta['version'] == __version__

def test_colab_version(self):
"""open colab jupyter notebook and check first cell for version"""
with open(__this_dir__ / '../docs' / 'colab' / 'quickstart.ipynb') as f:
lines = f.readlines()

found = False
for line in lines:
if 'pip install' in line:
print(line)
self.assertEqual(line.strip(), f'"# !pip install h5rdmtoolbox=={__version__}"')
found = True
break
self.assertTrue(found)

0 comments on commit 0cfc5f7

Please sign in to comment.