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

fixes conversion to pythia citations style as wel as toc ordering #1

Merged
merged 33 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
93181dc
add dev tools an unittests
MartinSchobben Aug 14, 2024
1da1428
Quarto output
MartinSchobben Aug 14, 2024
20576d6
update CD github workflow
MartinSchobben Aug 14, 2024
1ea4513
limit ref substitution to md cells
MartinSchobben Aug 14, 2024
bc75c71
improved quarto ref regex replace
MartinSchobben Aug 15, 2024
91ed0f3
fig ref replace
MartinSchobben Aug 15, 2024
c38216d
correctly save formatted notebook
MartinSchobben Aug 15, 2024
32056fe
Quarto output
MartinSchobben Aug 15, 2024
f5facf6
remove reference notebook
MartinSchobben Aug 15, 2024
81ed588
convert bibliography
MartinSchobben Aug 15, 2024
9692f57
Quarto output
MartinSchobben Aug 15, 2024
1b30b4d
fix order of toc
MartinSchobben Aug 15, 2024
247077b
Quarto output
MartinSchobben Aug 15, 2024
7c85095
export bib file
MartinSchobben Aug 15, 2024
6368fbe
subtitle format
MartinSchobben Aug 15, 2024
9be7b40
add note
MartinSchobben Aug 15, 2024
dbaae90
Quarto output
MartinSchobben Aug 15, 2024
3881907
Quarto output
MartinSchobben Aug 15, 2024
0dc0983
convert callout notes
MartinSchobben Aug 16, 2024
4ea0942
fix test
MartinSchobben Aug 16, 2024
aa3dadb
change order
MartinSchobben Aug 16, 2024
02b02a6
fix frontmatter conversion
MartinSchobben Aug 17, 2024
aed72ad
pip install
MartinSchobben Aug 17, 2024
00c6a7b
Quarto output
MartinSchobben Aug 17, 2024
c52d51d
fix front matter conversion
MartinSchobben Aug 17, 2024
ddad3f1
reorder cleaning
MartinSchobben Aug 17, 2024
51a0d5b
Quarto output
MartinSchobben Aug 17, 2024
afad3e6
set pythia as current dir
MartinSchobben Aug 17, 2024
0862ad6
set pythia as current dir
MartinSchobben Aug 17, 2024
286a233
set pythia as current dir
MartinSchobben Aug 17, 2024
7a1305e
fix front matter
MartinSchobben Aug 17, 2024
f3f9290
Quarto output
MartinSchobben Aug 17, 2024
0c20dc8
fix callout note
MartinSchobben Aug 18, 2024
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
16 changes: 11 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,24 @@ jobs:
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${NB_PATH[*]} -m "Quarto output" || echo "No changes to commit"
git push origin || echo "No changes to commit"
git push || echo "No changes to commit"

- name: Commit Files Pythia Book
if: github.ref == 'refs/heads/main'
run: |
python src/render_sfinx_toc.py
pip install .
python src/eo_datascience/render_sfinx_toc.py
python src/eo_datascience/clean_nb.py
cp ./_toc.yml ./pythia/
cp ./Makefile ./pythia/
cp ./chapters/references.bib ./pythia/notebooks/
cp -R ./notebooks/. ./pythia/notebooks/
cd ./pythia
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add .
git commit -m "Quarto output" || echo "No changes to commit"
git push origin || echo "No changes to commit"
git push || echo "No changes to commit"

- name: Commit Files Quarto Book Branch dev
if: github.ref == 'refs/heads/dev'
Expand All @@ -115,14 +118,17 @@ jobs:
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit ${NB_PATH[*]} -m "Quarto output" || echo "No changes to commit"
git push origin dev || echo "No changes to commit"
git push || echo "No changes to commit"

- name: Commit Files Pythia Book Branch dev
if: github.ref == 'refs/heads/dev'
run: |
python src/render_sfinx_toc.py
pip install .
python src/eo_datascience/render_sfinx_toc.py
python src/eo_datascience/clean_nb.py
cp ./_toc.yml ./pythia/
cp ./Makefile ./pythia/
cp ./chapters/references.bib ./pythia/notebooks/
cp -R ./notebooks/. ./pythia/notebooks/
cd ./pythia
git config --local user.name "$GITHUB_ACTOR"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ docs/_rst/*
docs/_build/*
cover/*
MANIFEST
/**/*.html
/**/*_files/

# Per-project virtualenvs
.venv*/
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ post-render:
for i in $(QMD); do quarto convert $$i; done
- mv chapters/*.ipynb notebooks/ >/dev/null 2>&1
- for f in chapters/*.quarto_ipynb ; do mv -- "$f" "${f%.quarto_ipynb}.ipynb" >/dev/null 2>&1; done
python src/clean-nb.py
cp Makefile notebooks/

data:
Expand Down
2 changes: 1 addition & 1 deletion chapters/01_classification.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Classification
title: Classification of Sentinel-2 imagery
subtitle: Finding forests with satelite imagery
jupyter:
kernelspec:
Expand Down
5 changes: 5 additions & 0 deletions chapters/02_floodmapping.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jupyter:

![Image from [wikipedia](https://upload.wikimedia.org/wikipedia/commons/d/d4/Thomas_Bayes.gif)](https://upload.wikimedia.org/wikipedia/commons/d/d4/Thomas_Bayes.gif)

::: {.callout-note}
This notebooks contains interactive element. These interactive element can only be viewed on Binder by clicking on the Binder badge or 🚀 button.
:::


```{python}
%matplotlib widget

Expand Down
16 changes: 9 additions & 7 deletions chapters/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ @acelik/colors-methods-and-mistakes-in-spatial-data-visualization-60d02e7f09fd
author = {Celik, Anil},
month = aug,
year = {2015},
file = {Snapshot:/home/mschobbe/Zotero/storage/BCKHNHID/colors-methods-and-mistakes-in-spatial-data-visualization-60d02e7f09fd.html:text/html},
}

@article{nguyen_examining_2021,
Expand Down Expand Up @@ -134,11 +133,13 @@ @article{bauer-marschallinger_toward_2019
file = {IEEE Xplore Abstract Record:/home/mschobbe/Zotero/storage/5QJ4V6PY/8444430.html:text/html},
}

@software{quast_getting_2024,
author = {Raphael Quast},
title = {EOmaps: A python package to visualize and analyze geographical datasets.},
doi = {10.5281/zenodo.6459598},
url = {https://doi.org/10.5281/zenodo.6459598}
@article{quast_getting_2024,
author = {Raphael Quast},
title = {EOmaps: A python package to visualize and analyze geographical datasets.},
doi = {10.5281/zenodo.6459598},
url = {https://doi.org/10.5281/zenodo.6459598},
journal = {},
year = {2024}
}

@article{rouse1974monitoring,
Expand All @@ -157,4 +158,5 @@ @online{nasa2020
year = {2020},
url = {https://earthobservatory.nasa.gov/features/MeasuringVegetation/measuring_vegetation_2.php},
urldate = {2024-07-26}
}
}

9 changes: 9 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: eo-datascience
channels:
- conda-forge
dependencies:
- python=3.10
- pip
- mamba
- jupyter
- nbformat
Loading
Loading