26. What do we do next?

26.1. KWL Maintainance

  • Jupyter book

  • building and publishing it

  • taking ownership

26.1.1. Making sure it is a jupyterbook

Check that you have:

  • _config.yml best practice is to copy the defaults then change the “Book settings” and “# Launch button settings” settings as needed.

  • _toc.yml follow the instructions and example inthe docs.

  • make sure that all of your markdown files are in the _toc.yml

26.1.2. Rendering and publishing it with GitHub

Github Actions allow you to run scripts, both specialized and anythign that you can run in bash on GitHub servers and use those results online.

What we are goign to do is add a file in .github/workflows/publish.yml To do run jupyterbook on GIthub’s server and then put the contents of the build directory on the gh-pages branch.

name: deploy-book

on:
  push:
    branches:
    - main


jobs:
  deploy-book:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    # Install dependencies
    - name: Set up Python 3.8
      uses: actions/setup-python@v1
      with:
        python-version: 3.8

    - name: Install dependencies
      run: |
        pip install -r requirements.txt

    # Build book
    - name: Build the book
      run: |
        jupyter-book build . --builder pdfhtml
        mv _build/pdf/book.pdf _build/html/kwlbook.pdf
        jupyter-book build .

    # Push the book's html to github-pages
    - name: GitHub Pages action
      uses: peaceiris/actions-gh-pages@v3.6.1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./_build/html

And then a requirements.txt file to the top level directory so that it knows what to install (see above we told it to install from requiremetns.txt)

jupyter-book
matplotlib
numpy
pyppeteer
pandas
lxml
sphinx_fontawesome
sphinx_panels

Note

Later, I’ll enable you to to turn on pages if you would like

26.1.3. Create an issue for its future

Use one of the following as the title of the issue.

I want to take ownership of my KWL repo and make it public
I want to take ownership of my KWL repo for my own reference
I want my kwl repo archived

26.2. Review

What happens in linking?

  • [ ] code from includes is copied into the file

  • [ ] binaries for compiled libraries is combined with the compiled program code

  • [ ] code is translated from assembly to machine code

  • [ ] code is translated from a high level language to assembly

What are three factors that you could use to choose the right langague for a project?

assuming you know or have time and motivation to learn many languages

What is the relationship between a half adder and a full adder?

  • [ ] a half adder adds half of the bits in the register and the full adds all

  • [ ] a half adder adds two one bit numbers into a two bit number; a full adder adds two one bit numbers and a carry bit into a one bit output and a carry bit

  • [ ] a half adder adds two one bit numbers into 1 bit; a full adder adds two one bit nubmers into two bits

26.3. Final Comments

  • this course site will remain available to you as a reference

  • Future sections will be separate sites, all will be listed on this main site

  • All students are responsible for the prepare activities and reflections

  • all re responsible for the minimum set of rows in your KWL chart

  • more practice grouped by class session

  • May 2 is the last day to change your grading contract

  • May 5 is the last day to submit work that you can revise

  • May 10 AOE1 is the last day to submit work

  • extra office hours go until May 10.

26.4. Feedback

Important

If 70% of the class completes the IDEA survey you will all get 1(large)-3(small) free mistakes. What this will mean is that, instead of having you having to find the answer and revise, I will give you the answer as a suggestion and you only have to commit my suggestion to get full credit on it.

26.5. Prepare for future classes

  1. Review the questions from today's class and write a solution guide for any that you got wrong with notes about what confused you in review.md (to make sure you do not leave with misconceptions)

  2. Add conclusion.md to your KWL repo. In the file include 2 sections: summary with an overall description of what you learned and how this course was/not helpful to you (paragraph or bullet form is fine) key points with the top 10 things you want to make sure you remember from this class (to reinforce these concepts and serve as a quick reference for yourself in the future)

26.6. More Practice

  1. In surprisingfacts.md explain why each of the following and one additional fact of your own is true. For each fact, include a demo showing that it happens.

    1. rename and move use the same command in bash
    1. `git revert` adds a commit
    1. adding to a large number can result in a negative number
    1. the following would most likelycause an endless loop `while not(i==.3)`
    1. A program without any inputs or randomization in it can give different results each time it is run
    
  2. For two imaginary projects, compare compare and contrast different programming languages and git workflows. Choose the two projects so that the best language and best workflow will be different choices. Include a description of each project, your comparisons, and conclusions in projectplanning.md


1

Anywhere on Earth time.