geocompx / geocompy

Geocomputation with Python: an open source book and online resource for getting started in this space
https://py.geocompx.org/
Other
259 stars 47 forks source link

Improve "Code and sample data" section #222

Closed Nowosad closed 2 months ago

Nowosad commented 8 months ago

https://py.geocompx.org/preface#code-and-sample-data

  1. It only lists .ipynb and \data files. Many chapters also rely on the \output files (created in Chapter 1), however, I assume that some reader will only try to run some chapters. Maybe we could make copies of some files from \output to \data? Or you have some better idea?
  2. "landsat.tif" is not in the \data folder of the repo (maybe some others are also missing)
  3. Do we even use some of the files listed (e.g., yorkshire.json)?
  4. Can you explain me how the ipynb files are created? Maybe I could modify our GitHub action to make them automatically...
michaeldorman commented 8 months ago
  1. You're right, thanks! Now corrected in the text (https://github.com/geocompx/geocompy/commit/d0eb98107dde873b2b385132bbcbe8d67ca1d205)
michaeldorman commented 8 months ago
  1. landsat.tif was in .gitignore, I now removed the entry from there. I checked and no other files are missing
michaeldorman commented 8 months ago
  1. Right, thanks! Now removed yorkshire.json, there are no other unnecessary files as far as I checked
michaeldorman commented 8 months ago
  1. The .ipynb files are created using:
    for i in *.qmd; do
    quarto convert $i
    done

    (https://github.com/geocompx/geocompy/blob/main/convert.sh) It's a good idea if this can be automatic, thanks

Nowosad commented 8 months ago

@michaeldorman -- see https://github.com/geocompx/geocompy/tree/geocompy.

I think I was able to create a GitHub action that creates ipynb files and move them (and data folder) to a new branch. See https://github.com/geocompx/geocompy/blob/main/.github/workflows/prep-book-package.yml.

This GitHub action only starts when your commit message contains "update book package"

Nowosad commented 8 months ago

The above approach allows us to create GitHub releases (from the geocompy branch): see https://github.com/geocompx/geocompy/releases/tag/0.2.

@michaeldorman would you be able to update the data/code instructions in the book?

michaeldorman commented 8 months ago

Hi @Nowosad ,looks great, thanks! Perhaps the release can also contain the output directory? (according to note (1) in the first comment in this thread)

Nowosad commented 8 months ago

See it now: https://github.com/geocompx/geocompy/tree/geocompy

Let me know if there is something still missing. If not -- feel free to create a new release.

michaeldorman commented 2 months ago

As far as I can tell this is solved, so closing, thanks @Nowosad 🙏