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

update the introduction example to use the demo datafiles + documentation update #390

Merged
merged 37 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
67908fe
update the introdction example to use the demo datafiles
vergauwenthomas Nov 6, 2023
74b50cc
update the lcz example
vergauwenthomas Nov 6, 2023
965b6a6
add nbsphinx to extensions
vergauwenthomas Nov 7, 2023
8a1a7ec
examples in seperate folder
vergauwenthomas Nov 7, 2023
574e53b
converted examples into notebooks
vergauwenthomas Nov 7, 2023
038c5e7
created a concat_save function to fix the Futurewarning of pandas for…
vergauwenthomas Nov 8, 2023
6861333
fixed the futurwarning when appending an emtpy multiindex
vergauwenthomas Nov 8, 2023
90f1810
add notebook checkpoints to the ignore
vergauwenthomas Nov 8, 2023
234a270
Updated the examples for the documentation.
vergauwenthomas Nov 8, 2023
09d468c
delete checkpoints from git
vergauwenthomas Nov 8, 2023
768cc08
add new examples to the documentation
vergauwenthomas Nov 8, 2023
fc656c8
minor bugfix when a column is not present
vergauwenthomas Nov 8, 2023
ed2a1cc
minor bugfix to ensure unit conversion
vergauwenthomas Nov 8, 2023
66ee1d4
fix for #391
vergauwenthomas Nov 8, 2023
d884e7d
exclude .py examples, use only the nootbooks for git tracking
vergauwenthomas Nov 9, 2023
46662ce
run documentation examples as tests + build the documentation as test
vergauwenthomas Nov 9, 2023
453fd63
Make sure the meta columns are kept if not metadata is available (sol…
vergauwenthomas Nov 9, 2023
537e982
add groups to the pyproject so a poetry-documentation env can be used
vergauwenthomas Nov 9, 2023
633f9a8
explicit provide template
vergauwenthomas Nov 9, 2023
64e9bac
fix error in the gapfill test
vergauwenthomas Nov 9, 2023
da525e6
fixes sphinx warnings
vergauwenthomas Nov 9, 2023
8c58392
pass spell/grammer check
vergauwenthomas Nov 9, 2023
80d72f9
pass spell/grammer check
vergauwenthomas Nov 9, 2023
a8ef33f
pass spell/grammer check
vergauwenthomas Nov 9, 2023
b5f587b
spell and grammer check
vergauwenthomas Nov 9, 2023
7d246df
spell and grammer checks
vergauwenthomas Nov 9, 2023
4d4c4ce
fix titles
vergauwenthomas Nov 9, 2023
a0522b0
add titan in seperate group
vergauwenthomas Nov 9, 2023
d4aee6f
remove ipy checkpoints
vergauwenthomas Nov 9, 2023
3e6ae3d
update intro wrt titanlib installation
vergauwenthomas Nov 9, 2023
7d8f775
remove old examples that ar not relevant anymore
vergauwenthomas Nov 9, 2023
f558659
update version and fixed documentation reference
vergauwenthomas Nov 9, 2023
014795c
update version to beta 1.2
vergauwenthomas Nov 9, 2023
17a5d91
avoid using the requirements file, now directly using poetry in docum…
vergauwenthomas Nov 9, 2023
1125d94
gee map is always returned see codereview
vergauwenthomas Nov 9, 2023
c317726
the old examples are removed so no need to scan this folder
vergauwenthomas Nov 9, 2023
871c11a
remove ipy checkpoints
vergauwenthomas Nov 9, 2023
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ deploiment/*
#Exclude local package builds
dist/*

#exclude the python versions of the doc example notebooks
docs/examples/*.py

#Exclude local documentation builds
docs/_*
Expand All @@ -37,6 +39,8 @@ tests/*.html


# pychache
*.ipynb_checkpoints*

*__pycache__*
.spyproject
*.pyc
Expand Down
37 changes: 29 additions & 8 deletions deploiment/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,26 @@ DOCDIR=${WORKDIR}/docs
DISTDIR=${WORKDIR}/dist
TESTDIR=${WORKDIR}/tests
EXAMPLESDIR=${WORKDIR}/examples
DOCEXAMPLEDIR=${WORKDIR}/docs/examples


#1 install the package using poetry

poetry update #to update the poetry.lock with the latest versions of the depending packages
poetry install --all-extras
poetry install --with documentation,dev,titan


#list all packages installed (for debugging)
poetry show




#2. Update documentation
#2. build documentation
cd ${DOCDIR}
source build_doc
cd ${DEPLOY_DIR}


#3 build the package

echo "Removing old builds before building the package ..."
cd ${DISTDIR}
rm *.whl
Expand All @@ -48,8 +46,8 @@ poetry build



echo "Export requirements file ..."
poetry export -f requirements.txt --output requirements.txt
#echo "Export requirements file ..."
#poetry export -f requirements.txt --output requirements.txt



Expand All @@ -68,6 +66,7 @@ make_test_log () {


#Run examples
echo 'Running regular examples'
cd ${EXAMPLESDIR}
filenames=`ls ./*.py`
for t in $filenames; do
Expand All @@ -76,13 +75,35 @@ for t in $filenames; do
echo Running ${t} as a test
poetry run python ${example_file} >> ${logfile} 2>&1
if [ $? -eq 0 ]; then
echo "succeeded !!"
echo "succeeded !!"
else
echo "FAIL!!"
fi

done

#Run examples included in the documentation
echo 'Running the documentation examples as test'
cd ${DOCEXAMPLEDIR}
#delete all .py versions of the examples (rebuild them from the notebooks)
rm ${DOCEXAMPLEDIR}/*.py
#convert nb to python files
jupyter nbconvert --to python *.ipynb

cd ${DOCEXAMPLEDIR}
filenames=`ls ./*.py`
for t in $filenames; do
example_file=${DOCEXAMPLEDIR}/${t}
logfile="$(make_test_log ${t})"
echo Running ${t} as a test
poetry run python ${example_file} >> ${logfile} 2>&1
if [ $? -eq 0 ]; then
echo "succeeded !!"
else
echo "FAIL!!"
fi

done



Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"sphinx.ext.autosummary", # Create neat summary tables
"myst_parser", # for including md files (readme)
"sphinx.ext.autosectionlabel", #for cross linking
"nbsphinx", #to render the notebook examples in the doc
]


Expand Down
72 changes: 0 additions & 72 deletions docs/examples.rst

This file was deleted.

Loading