Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jakevdp/PythonDataScienceHandbook
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: KevinArce/PythonDataScienceHandbook
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on May 7, 2023

  1. 'Refactored by Sourcery'

    Sourcery AI committed May 7, 2023
    Copy the full SHA
    ba47765 View commit details
  2. Merge pull request #1 from KevinArce/sourcery/master

    Sourcery refactored master branch
    KevinArce authored May 7, 2023
    Copy the full SHA
    c5c2eb5 View commit details
Showing with 3 additions and 6 deletions.
  1. +1 −4 tools/generate_contents.py
  2. +2 −2 website/copy_notebooks.py
5 changes: 1 addition & 4 deletions tools/generate_contents.py
Original file line number Diff line number Diff line change
@@ -28,10 +28,7 @@ def get_notebook_title(nb_file):

def gen_contents(directory=None):
for nb in iter_notebooks():
if directory:
nb_url = os.path.join(directory, nb)
else:
nb_url = nb
nb_url = os.path.join(directory, nb) if directory else nb
chapter, section, title = REG.match(nb).groups()
title = get_notebook_title(nb)
if section == '00':
4 changes: 2 additions & 2 deletions website/copy_notebooks.py
Original file line number Diff line number Diff line change
@@ -98,8 +98,8 @@ def copy_notebooks():

nbformat.write(content, os.path.join(NB_DEST_DIR, nb))

pagefile = os.path.join(PAGE_DEST_DIR, base + '.md')
htmlfile = base.lower() + '.html'
pagefile = os.path.join(PAGE_DEST_DIR, f'{base}.md')
htmlfile = f'{base.lower()}.html'
with open(pagefile, 'w') as f:
f.write(PAGEFILE.format(title=title,
htmlfile=htmlfile,