Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: build-book

on:
pull_request:
push:
branches:
- main

# Use bash by default in all jobs
defaults:
run:
# The -l {0} is necessary for conda environments to be activated
# But this breaks on MacOS if using actions/setup-python:
# https://github.com/actions/setup-python/issues/132
shell: bash -l {0}

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment.yml

- name: Build the website
run: jupyter-book build .

- name: Disable Jekyll builds on GitHub pages
run: touch _build/html/.nojekyll

- name: Print a directory tree of the generated HTML for debugging
run: tree -a _build/html

- name: Push to gh-pages
if: success() && github.event_name == 'push'
# Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_build/html
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tmp.*
*.gdf
model-data.txt
moulder-app.pkl
_build
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
Jupyter notebooks with tutorials for using Fatiando a Terra software to solve
data problems in geoscience.

## :notebook: Jupyter Notebooks
## 📓 Jupyter Notebooks

There are several options for running our tutorials
(follow the links by clicking on the "launch" buttons):

:rocket: Launch | ℹ️ Description
🚀Launch | ℹ️ Description
-- | --
[![Binder](https://img.shields.io/badge/launch-Binder-blue?style=flat-square)](https://mybinder.org/v2/gh/fatiando/tutorials/main?filepath=gravity-processing.ipynb) | Run the tutorials online through the excellent [Binder](https://mybinder.org/) service.
[![nbviewer](https://img.shields.io/badge/view-nbviewer-blue?style=flat-square)](https://nbviewer.org/github/fatiando/tutorials/blob/main/gravity-processing.ipynb) | Browse and explore the code and text in the notebooks online (but won't be able to run the code).
[![Download](https://img.shields.io/badge/download-GitHub-blue?style=flat-square)](https://github.com/fatiando/tutorials/archive/refs/heads/main.zip) | Download an archive of this repository and run the notebooks on your computer. See below for instructions.

> :rotating_light: **WARNING:** :rotating_light:
> 🚨 **WARNING:** 🚨
> Binder will not save any changes you make and may shutdown your
> JupyterLab without warning. This is a good way to explore but if you intend
> on editing the notebook then we recommend running things on your machine.
Expand All @@ -24,16 +24,4 @@ There are several options for running our tutorials
To run the code on your computer, you will first need to
[install our libraries](https://www.fatiando.org/install/)
as well as Jupyter and other dependencies.
See the [`environment.yml`](environment.yml) file for a full list.

## License

All Python source code is made available under the BSD 3-clause license. You
can freely use and modify the code, without warranty, so long as you provide
attribution to the authors.

Unless otherwise specified, all figures and Jupyter notebooks are available
under the Creative Commons Attribution 4.0 License (CC-BY).

The full text of these licenses is provided in the [`LICENSE.txt`](LICENSE.txt)
file.
See the [`environment.yml`](environment.yml) file for a full list.
87 changes: 87 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# https://jupyterbook.org/customize/config.html

#######################################################################################
# Book settings
title: Fatiando Tutorials
author: Fatiando a Terra
copyright: "2022" # Copyright year to be placed in the footer
logo: images/fatiando-logo.png
exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints"]

#######################################################################################
# Execution settings
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force

#######################################################################################
# Parse and render settings
parse:
myst_enable_extensions:
- amsmath
- colon_fence
- deflist
- dollarmath
- html_admonition
- html_image
- linkify
- replacements
- smartquotes
- substitution
- tasklist
myst_url_schemes: [mailto, http, https] # URI schemes that will be recognised as external URLs in Markdown links
myst_dmath_double_inline: true # Allow display math ($$) within an inline context

#######################################################################################
# HTML-specific settings
html:
favicon : "" # A path to a favicon image
use_edit_page_button : false # Whether to add an "edit this page" button to pages. If `true`, repository information in repository: must be filled in
use_repository_button : false # Whether to add a link to your repository button
use_issues_button : false # Whether to add an "open an issue" button
use_multitoc_numbering : true # Continuous numbering across parts/chapters
extra_navbar : Powered by <a href="https://jupyterbook.org">Jupyter Book</a> # Will be displayed underneath the left navbar.
extra_footer : "" # Will be displayed underneath the footer.
google_analytics_id : "" # A GA id that can be used to track book views.
home_page_in_navbar : true # Whether to include your home page in the left Navigation Bar
baseurl : "" # The base URL where your book will be hosted. Used for creating image previews and social links. e.g.: https://mypage.com/mybook/
comments:
hypothesis : false
utterances : false
announcement : "" # A banner announcement at the top of the site.

#######################################################################################
# LaTeX-specific settings
latex:
latex_engine : pdflatex # one of 'pdflatex', 'xelatex' (recommended for unicode), 'luatex', 'platex', 'uplatex'
use_jupyterbook_latex : true # use sphinx-jupyterbook-latex for pdf builds as default
latex_documents:
targetname: fatiando-tutorials.tex

#######################################################################################
# Launch button settings
launch_buttons:
notebook_interface : classic # The interface interactive links will activate ["classic", "jupyterlab"]
binderhub_url : https://mybinder.org # The URL of the BinderHub (e.g., https://mybinder.org)
jupyterhub_url : "" # The URL of the JupyterHub (e.g., https://datahub.berkeley.edu)
thebe : false # Add a thebe button to pages (requires the repository to run on Binder)
colab_url : "" # The URL of Google Colab (https://colab.research.google.com)

repository:
url : https://github.com/executablebooks/jupyter-book # The URL to your book's repository
path_to_book : "" # A path to your book's folder, relative to the repository root.
branch : master # Which branch of the repository should be used when creating links

#######################################################################################
# Advanced and power-user settings
sphinx:
extra_extensions : # A list of extra extensions to load by Sphinx (added to those already used by JB).
local_extensions : # A list of local extensions to load by sphinx specified by "name: path" items
recursive_update : false # A boolean indicating whether to overwrite the Sphinx config (true) or recursively update (false)
config :
bibtex_reference_style: author_year # key-value pairs to directly over-ride the Sphinx configuration

# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib
14 changes: 14 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
format: jb-book
root: intro
parts:
- caption: Transform 2021
chapters:
- file: notebooks/transform2021/gravity-processing.md
- caption: COMMUNITY
chapters:
- url: https://www.fatiando.org/contact/
title: Join the community
- url: https://github.com/fatiando/community/blob/main/CODE_OF_CONDUCT.md
title: Code of conduct
- url: https://github.com/fatiando/tutorials/issues/5
title: How to contribute
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- python==3.9
- pip
- numpy
- cartopy
- scipy
- pandas
- matplotlib
Expand All @@ -25,3 +26,4 @@ dependencies:
- boule==0.3.*
- harmonica==0.3.*
- ensaio>=0.2.0
- jupyter-book
Binary file added images/fatiando-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Welcome to Fatiando a Terra tutorials
On this website, you will find tutorials to help you get the most out of Fatiando a Terra software's capabilities for solving geoscience data problems.

There are several options for running our tutorials
(follow the links by clicking on the "launch" buttons):

🚀Launch | ℹ️ Description
-- | --
[![Binder](https://img.shields.io/badge/launch-Binder-blue?style=flat-square)](https://mybinder.org/v2/gh/fatiando/tutorials/main?filepath=gravity-processing.ipynb) | Run the tutorials online through the excellent [Binder](https://mybinder.org/) service.
[![nbviewer](https://img.shields.io/badge/view-nbviewer-blue?style=flat-square)](https://nbviewer.org/github/fatiando/tutorials/blob/main/gravity-processing.ipynb) | Browse and explore the code and text in the notebooks online (but won't be able to run the code).
[![Download](https://img.shields.io/badge/download-GitHub-blue?style=flat-square)](https://github.com/fatiando/tutorials/archive/refs/heads/main.zip) | Download an archive of this repository and run the notebooks on your computer. See below for instructions.

> 🚨 **WARNING:** 🚨
> Binder will not save any changes you make and may shutdown your
> JupyterLab without warning. This is a good way to explore but if you intend
> on editing the notebook then we recommend running things on your machine.

## Running the code

To run the code on your computer, you will first need to
[install our libraries](https://www.fatiando.org/install/)
as well as Jupyter and other dependencies.
See the [`environment.yml`](environment.yml) file for a full list.
Original file line number Diff line number Diff line change
Expand Up @@ -5645,7 +5645,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
"version": "3.8.8"
}
},
"nbformat": 4,
Expand Down
Loading