From 1d5af0236f601deeb0d9a2526137f4525372b775 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Fri, 14 Jun 2024 10:58:53 +0200 Subject: [PATCH] First commit --- README.md | 53 ++------------------------------------------- book/_config.yml | 19 +++++++++------- book/_toc.yml | 24 +++++++++++++++++--- book/genindex.md | 1 + book/intro.md | 7 +----- book/references.bib | 6 ----- requirements.txt | 9 ++------ 7 files changed, 38 insertions(+), 81 deletions(-) create mode 100644 book/genindex.md delete mode 100644 book/references.bib diff --git a/README.md b/README.md index 40a6726..051da85 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,3 @@ -# Your first TeachBook using the GitHub template +# Bridging mechanics - -The template allows you to start your own Jupyter Book and hosting that book online without knowledge on Git, the Jupyter book package, python or anaconda. It doesn't elaborate on the collaborative functionalities of Git or how to edit the book. - -## Features -- A github repository structure for making a [Jupyter Book](https://github.com/executablebooks/jupyter-book) (`/book`) -- An empty book containing an intro page on root, an example markdown page, an example jupyter notebook page, an example references page. and an example credits page. (`/book/_toc.yml`, `/book/_config.yml`, `/book/credits.md`, `/book/intro.md`, `/book/references.md`, `/book/some_content/overview.md`, `/book/some_content/text_and_code.ipynb`) -- A file ready for adding references (`references.bib`, `/book/references.md`) -- An example favicon (web browser icon) (`/book/figures/favicon.ico`, `book/_config.yml`.) -- An example book logo (`/book/figures/TUDelft_logo_rgb.png`, `/book/config.yml`) -- The configuration files set ready to make your Jupyter Notebooks pages work with [live code using our sphinx-thebe extension](https://teachbooks.tudelft.nl/jupyter-book-manual/features/live_code.html) and our recommended settings (`/book/config.yml`) -- An example of setting up preprocessing your table of contents to hide certain draft chapters for eg. students (`_toc.yml`) -- A file containing all the recommended software packages (`requirements.txt`) -- A file containing the recommended license CC BY 4.0 (`LICENSE.md`) -- Our [GitHub workflow for publishing your book to GitHub Pages](https://github.com/TeachBooks/deploy-book-workflow) (`.github/workflow/call-deploy-book.yml`) -- A gitignore file containing standard python filetype to ignore (`.gitignore`) -- A readme containing information how to use the template, which can adjusted after using the template (`README.md`) - -## How to get started - -How to use the template is demonstrated in the figure below, all steps are elaborated on in the following step-by-step tutorial. - -![template-demo](figures/teachbooks-template.gif) -The demonstration is also available as a video [here](https://youtu.be/nN3Oi_MVvF0). - -1. To get started making your Jupyter Book with our functionalities, use the [template book](https://github.com/TeachBooks/template) as template: - -![use-template](figures/use_template.png) - -2. Fill in a repository name, this name will be used in the future url of your book: - -![create_new_repository](figures/create_new_repository.png) - -3. You need to activate GitHub pages so that your website is published to the internet. As long as you don't do this your book is not published online. Actually, now that you've taken this template our workflow tries to publish it to GitHub pages, which you didn't have the chance to activate yet. That's why you probably received an email with 'call-deploy-book: Some jobs were not successful' and you see the failed job under `Actions` - `All workflows` - `call-deploy-book` - `Initial commit`. You can activate GitHub pages by setting the source for GitHub pages to GitHub Actions under `Settings` - `Pages` - `Build and deployment` - `Source` - `GitHub Actions`: - -![Activate pages](figures/set_up_pages.png) - -4. Make an edit to the book by editing and committing changes to one of the files in the `book/` subdirectory (available under `Code`). Now checkout the progress of the publishing workflow under `Actions` - `All workflows` - `call-deploy-book` -``. Remember, the first commit which is there has failed because GitHub Pages wasn't activated at the time of `Initial commit`, you could also re-run that job if you don't want to make an edit. You can do so by running the workflow from `Actions` - `All workflows` - `call-deploy-book` - `Initial commit` - `Re-run all jobs` - `Re-run jobs`: - -![Action](figures/action_re-run.jpeg) - -5. When the workflow has finished, visit your build book at `https://.github.io/` (case sensitive). For our example it is [https://dummydocent.github.io/test_book_from_template/](https://dummydocent.github.io/test_book_from_template/) for the shown repository. These links are visible in the action's summary as well, as shown in the figure of step 4. - -Additional tip: -Set the repository website as your GitHub Pages website under `Code`- `About` - - `Website` - `Use your GitHub Pages Website` - -![github_pages_as_website](figures/use_github_pages_website.png) \ No newline at end of file +This folder includes all the contents for the bridging course structural mechanics. \ No newline at end of file diff --git a/book/_config.yml b/book/_config.yml index 23c06d3..df98ef0 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -1,6 +1,8 @@ -title: Template -author: TeachBooks Team from Delft university of Technology, built with TeachBooks and Jupyter Book, CC BY 4.0 #Add your own name here -logo: figures/TUDelft_logo_rgb.png #add your own logo here +# General settings +title: Bridging course Structural Mechanics +author: Tom van Woudenberg from Delft university of Technology, built with TeachBooks and Jupyter Book, CC BY 4.0 +email: T.R.vanWoudenberg@tudelft.nl +logo: images/TUDelft_logo_rgb.png execute: execute_notebooks: "off" @@ -8,19 +10,20 @@ execute: only_build_toc_files: true html: - favicon : "figures/favicon.ico" - baseurl : "https://teachbooks.github.io/template/" #Replace this with your own URL + favicon : "images/favicon.ico" + baseurl : "https://teachbooks.github.io/bridging_mechanics/" #Replace this with your own URL home_page_in_navbar : true sphinx: config: + bibtex_reference_style: super html_js_files: - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js thebe_config: use_thebe_lite: true - exclude_patterns: ["**/_*.yml", "**/*.md", "**/*.ipynb"] + exclude_patterns: ["**/**"] html_theme_options: - repository_url: "https://github.com/TeachBooks/template" #add your own repo URL here + repository_url: "https://github.com/TeachBooks/bridging_mechanics" use_repository_button: true use_issues_button : true launch_buttons: @@ -31,4 +34,4 @@ sphinx: - jupyterbook_patches bibtex_bibfiles: - - references.bib + - external/mechanics-BSc/book/references.bib diff --git a/book/_toc.yml b/book/_toc.yml index f11a0ec..feb0d54 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -4,7 +4,25 @@ root: intro.md parts: - caption: Contents chapters: - - file: some_content/overview.md + - file: external/mechanics-BSC/book/support_internal_forces/intro sections: - - file: some_content/text_and_code.ipynb - - file: references.md + - file: external/mechanics-BSC/book/support_internal_forces/model/intro + sections: + - file: external/mechanics-BSC/book/support_internal_forces/model/beams + - file: external/mechanics-BSC/book/support_internal_forces/model/cables + - file: external/mechanics-BSC/book/support_internal_forces/model/coordinate + - file: external/mechanics-BSC/book/support_internal_forces/model/supports + - file: external/mechanics-BSC/book/support_internal_forces/model/hinges + - file: external/mechanics-BSC/book/support_internal_forces/model/loads + - file: external/mechanics-BSC/book/support_internal_forces/model/internal_forces + - file: external/mechanics-BSC/book/support_internal_forces/model/FBD + - file: external/mechanics-BSC/book/support_internal_forces/model/structures + - file: external/mechanics-BSC/book/support_internal_forces/transforming_forces/intro + sections: + - file: external/mechanics-BSC/book/support_internal_forces/transforming_forces/Resolution_of_forces + - file: external/mechanics-BSC/book/support_internal_forces/equilibrium/intro + sections: + - file: external/mechanics-BSC/book/support_internal_forces/equilibrium/particle + - file: external/mechanics-BSC/book/support_internal_forces/equilibrium/rigid_body + - file: genindex + - file: references diff --git a/book/genindex.md b/book/genindex.md new file mode 100644 index 0000000..1630f89 --- /dev/null +++ b/book/genindex.md @@ -0,0 +1 @@ +# Index \ No newline at end of file diff --git a/book/intro.md b/book/intro.md index 6df898f..a10675e 100644 --- a/book/intro.md +++ b/book/intro.md @@ -1,6 +1 @@ -(intro)= -# Welcome to the Template Book - -_Write book intro here. This is the first page the student will see when opening the url._ - -This book can be used as a template for other books. It includes a starter package of the software developed by the TeachBooks initiative. \ No newline at end of file +# Welcome to the bridging course Structural Mechanics diff --git a/book/references.bib b/book/references.bib deleted file mode 100644 index 658a4ca..0000000 --- a/book/references.bib +++ /dev/null @@ -1,6 +0,0 @@ -@misc{jason_moore, - title={Learn Multibody Dynamics, SymPy}, - author={Moore, Jason}, - howpublished={\url{https://moorepants.github.io/learn-multibody-dynamics/sympy.html}}, - year={2023} -} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ebd2a79..5c547d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,4 @@ -# first list the packages you wish to download from PyPI -teachbooks # depends on jupyter-book -# numpy - -# docutils version for reference page formatting -docutils==0.17.1 +teachbooks # now list the packages (and the respective url) you wish to download from the GitLab package registry --extra-index-url https://gitlab.tudelft.nl/api/v4/projects/17983/packages/pypi/simple #temporarily disable @@ -12,4 +7,4 @@ jupyterbook_patches ~= 0.1.4 #temporarily disable sphinx-thebe ~= 0.9.9 #temporarily disable # lastly any packages you wish to download directly from a Git repository -download_link_replacer @ git+https://gitlab.tudelft.nl/mude/sphinx-download-link-replacer #temporarily disable +# download_link_replacer @ git+https://gitlab.tudelft.nl/mude/sphinx-download-link-replacer #temporarily disable \ No newline at end of file