Skip to content

Commit

Permalink
updates readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowosad committed Dec 28, 2023
1 parent 9d0c0bc commit d1ba932
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 11 deletions.
47 changes: 37 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ a way to test changes and contribute fixes in an instant.

To run the book in Codespaces, click on the link below.

<div>

[![](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=447558863)

Open in GitHub Codespaces

</div>
<figure>
<a
href="https://github.com/codespaces/new?hide_repo_select=true&amp;ref=main&amp;repo=447558863"><img
src="https://github.com/codespaces/badge.svg"
alt="Open in GitHub Codespaces" /></a>
<figcaption>Open in GitHub Codespaces</figcaption>
</figure>

You should [see](https://github.com/geocompx/geocompy/issues/114)
something like this, the result of running all the code in the book by
Expand Down Expand Up @@ -121,14 +121,14 @@ deactivate
The [`environment.yml`](environment.yml) file contains a list of
dependencies that can be installed with a package manager such as
`conda`, `mamba` or `micromamba`. The instructions below are for
[micromamba](https://mamba.readthedocs.io/en/latest/installation.html#micromamba)
[micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)
but should work for any package manager.

``` bash
# For Linux, the default shell is bash:
curl micro.mamba.pm/install.sh | bash
curl -L micro.mamba.pm/install.sh | bash
# For macOS, the default shell is zsh:
curl micro.mamba.pm/install.sh | zsh
curl -L micro.mamba.pm/install.sh | zsh
```

After answering the questions, install dependencies with the following
Expand Down Expand Up @@ -250,3 +250,30 @@ micromamba list export > environment.yml
```

</details>
<!--
Note: we don't need this here but commenting out the content rather than deleting because some of it could be ported into the README.
Reasonable?
Happy for these lines to be deleted also (RL 2022-12)
&#10;## Reproducing this book
&#10;An important aspect of scientific research that results can be independently verified by others.
Information that is generated by scientific means does not on auguments of authority or other [logical fallacies](https://bookofbadarguments.com/) as the basis for belief.
Instead science relies on a network of people who are open minded yet skeptical to test assumptions and in some cases 'bust myths'.
&#10;In the digital age, trust in claims depends on computational reproducibility.
&#10;### Local with Quarto
&#10;To run the code locally, recommended for using the material on real data, you need to have a reasonable computer, e.g., with 8 GB RAM.
You'll need administrative rights to install the requirements, which include:
&#10;- A suitable integrated development environment (IDE) such as VS Code, RStudio or Jupyter Notebook
- Quarto, if you want to reproduce the book's open access website
- Either an Anaconda-like environment (we recommend `miniconda3`) or Docker to get systems dependencies
&#10;See the [project's README](https://github.com/geocompx/geocompy) for details on getting set-up.
After you have installed the necessary dependencies and cloned or [unzipped](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) the book's source code, you should be able to reproduce the code in its entirety with the following command:
&#10;```bash
quarto preview
```
&#10;If you see output like that below (with the IDE and browser arranged to see live updates after editing the source code), congratulations, it has worked!
&#10;![](https://user-images.githubusercontent.com/1825120/161321382-ac36aeab-5628-4bef-b3dd-7b2becdd4860.png)
&#10;### Local with Jupyter
&#10;Alternatively, you can [download](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) and unzip the book's source code. The unzipped directory `py-main/code/chapters/` contains:
&#10;* The source `ipynb` files, one for each chapter
* The `data` sub-directory with the sample data used in the code sections
&#10;Assuming that all required packages are installed (see beginning of each chapter), you can execute the `ipynb` files through your chosen working environment (VScode, Jupyter Notebook, etc.). -->
46 changes: 45 additions & 1 deletion README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,48 @@ To update the `environment.yml` file in the same way based on your newly install
micromamba list export > environment.yml
```

</details>
</details>



<!--
Note: we don't need this here but commenting out the content rather than deleting because some of it could be ported into the README.
Reasonable?
Happy for these lines to be deleted also (RL 2022-12)
## Reproducing this book
An important aspect of scientific research that results can be independently verified by others.
Information that is generated by scientific means does not on auguments of authority or other [logical fallacies](https://bookofbadarguments.com/) as the basis for belief.
Instead science relies on a network of people who are open minded yet skeptical to test assumptions and in some cases 'bust myths'.
In the digital age, trust in claims depends on computational reproducibility.
### Local with Quarto
To run the code locally, recommended for using the material on real data, you need to have a reasonable computer, e.g., with 8 GB RAM.
You'll need administrative rights to install the requirements, which include:
- A suitable integrated development environment (IDE) such as VS Code, RStudio or Jupyter Notebook
- Quarto, if you want to reproduce the book's open access website
- Either an Anaconda-like environment (we recommend `miniconda3`) or Docker to get systems dependencies
See the [project's README](https://github.com/geocompx/geocompy) for details on getting set-up.
After you have installed the necessary dependencies and cloned or [unzipped](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) the book's source code, you should be able to reproduce the code in its entirety with the following command:
```bash
quarto preview
```
If you see output like that below (with the IDE and browser arranged to see live updates after editing the source code), congratulations, it has worked!
![](https://user-images.githubusercontent.com/1825120/161321382-ac36aeab-5628-4bef-b3dd-7b2becdd4860.png)
### Local with Jupyter
Alternatively, you can [download](https://github.com/geocompx/geocompy/archive/refs/heads/main.zip) and unzip the book's source code. The unzipped directory `py-main/code/chapters/` contains:
* The source `ipynb` files, one for each chapter
* The `data` sub-directory with the sample data used in the code sections
Assuming that all required packages are installed (see beginning of each chapter), you can execute the `ipynb` files through your chosen working environment (VScode, Jupyter Notebook, etc.). -->

0 comments on commit d1ba932

Please sign in to comment.