promote: rule 7 makes Colab-friendly links relative, and a notebook opened outside the site cannot follow them

オープン
#45 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
44/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
jupyter, python
領域
build-system

調査の方向性

Start by reading rule 7 in tools/promote, especially the QE_URL_RE pattern and its comment, then trace the product build step that publishes pooled notebooks. Check how the two links in lectures/linear_algebra.md and lectures/linear_models.md are handled. Done means pooled files remain tracked and self-contained, while published notebooks contain working full links for their product site.

索引モデルが issue の本文から書いたものです。

説明

question

Promote's rule 7 (tools/promote, the QE_URL_RE pattern, which its comment calls "the Colab-compatibility pattern") finds a link written as a published QuantEcon address, https://<site>.quantecon.org/_static/..., pools the file when the canonical series holds it, and rewrites the link to the pool path. It applied for the first time with intermediate's promotion (QuantEcon/lectures#44), to two links:

  • lectures/linear_algebra.md, line 842: [these notes](https://python.quantecon.org/_static/lecture_specific/linear_algebra/course_notes.pdf) became [these notes](_static/linear_algebra/course_notes.pdf).
  • lectures/linear_models.md, line 1046: the same, for iteration_notes.pdf.

The pooled PDFs are byte-identical to the published ones, and the relative links resolve on a site built from the pool. But the series write such links in full so that they work wherever the lecture is read: intermediate's _config.yml offers Colab launch buttons, and in a notebook opened in Colab, or downloaded, a relative _static/ link reaches nothing.

These two are the only such links in the estate at the current pins. Nothing breaks today, since the series still publish from their own repositories; it matters once a product's notebooks are built from the pool.

One way to settle it, at the build stage: keep rule 7, so the pool stays self-contained and the files are tracked, and have each product build write these links back in full, on the product's own site, into the notebooks it publishes. Leaving the links absolute in the pool instead would not hold after cutover: the pooled file lives at _static/<slug>/, so the old _static/lecture_specific/ address would no longer exist on a site built from the pool.

主要言語
Python
スター
1
フォーク
0
平均マージ
1日 3時間
マージ済み PR(30日)
17

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantEcon/lectures のほかの issue

QuantEcon/lectures の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。