Skip to content

Commit

Permalink
try nbval instead of treon
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarter committed Feb 14, 2024
1 parent f8ce35d commit a70e171
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
- name: Test examples
run: |
cd examples
treon -v example.ipynb
pytest --nbval -v example.ipynb
23 changes: 9 additions & 14 deletions examples/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -75,28 +75,23 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<pCrunch.io.openfast.OpenFASTBinary at 0x13b007610>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x13b008750>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x13b0b2e10>]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
"[<class 'pCrunch.io.openfast.OpenFASTBinary'>, <class 'pCrunch.io.openfast.OpenFASTBinary'>, <class 'pCrunch.io.openfast.OpenFASTBinary'>]\n"
]
}
],
"source": [
"# The new framework provides an object oriented framework to interact with\n",
"# output files. The easiest way to use this is to use the 'load_FAST_out' function.\n",
"\n",
"outputs = load_FAST_out(outfiles[:3])\n",
"outputs"
"print([type(m) for m in outputs])"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies = ["fatpack", "numpy", "pandas", "pyyaml", "ruamel.yaml", "scipy"]
# projects.
[project.optional-dependencies] # Optional
dev = ["pre-commit", "pylint", "flake8", "black", "isort"]
test = ["pytest", "pytest-cov", "treon"]
test = ["pytest", "pytest-cov", "nbval"]
docs = ["sphinx", "sphinx_rtd_theme"]

# List URLs that are relevant to your project
Expand Down

0 comments on commit a70e171

Please sign in to comment.