Skip to content

Commit

Permalink
WEB: Refine PDEP presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed May 19, 2024
1 parent 3f8f704 commit 9b66357
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 33 deletions.
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0001-purpose-and-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[Noa Tamir](https://github.com/noatamir)
- Revision: 3

[TOC]

## PDEP definition, purpose and scope

A PDEP (pandas enhancement proposal) is a proposal for a **major** change in
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0004-consistent-to-datetime-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Author: [Marco Gorelli](https://github.com/MarcoGorelli)
- Revision: 2

[TOC]

## Abstract

The suggestion is that:
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0005-no-default-index-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Author: [Marco Gorelli](https://github.com/MarcoGorelli)
- Revision: 2

[TOC]

## Abstract

The suggestion is to add a ``NoRowIndex`` class. Internally, it would act a bit like
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0006-ban-upcasting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Author: [Marco Gorelli](https://github.com/MarcoGorelli) ([original issue](https://github.com/pandas-dev/pandas/issues/39584) by [Joris Van den Bossche](https://github.com/jorisvandenbossche))
- Revision: 1

[TOC]

## Abstract

The suggestion is that setitem-like operations would
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0007-copy-on-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Author: [Joris Van den Bossche](https://github.com/jorisvandenbossche)
- Revision: 1

[TOC]

## Abstract

Short summary of the proposal:
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0009-io-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- Author: [Marc Garcia](https://github.com/datapythonista)
- Revision: 1

[TOC]

## PDEP Summary

This document proposes that third-party projects implementing I/O or memory
Expand Down
2 changes: 2 additions & 0 deletions web/pandas/pdeps/0010-required-pyarrow-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[Patrick Hoefler](https://github.com/phofl)
- Revision: 1

[TOC]

## Abstract

This PDEP proposes that:
Expand Down
31 changes: 1 addition & 30 deletions web/pandas/pdeps/0012-compact-and-reversible-JSON-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,7 @@
- Author: [Philippe THOMY](https://github.com/loco-philippe)
- Revision: 3

##### Summary

- [Abstract](./0012-compact-and-reversible-JSON-interface.md/#Abstract)
- [Problem description](./0012-compact-and-reversible-JSON-interface.md/#Problem-description)
- [Feature Description](./0012-compact-and-reversible-JSON-interface.md/#Feature-Description)
- [Scope](./0012-compact-and-reversible-JSON-interface.md/#Scope)
- [Motivation](./0012-compact-and-reversible-JSON-interface.md/#Motivation)
- [Why is it important to have a compact and reversible JSON interface ?](./0012-compact-and-reversible-JSON-interface.md/#Why-is-it-important-to-have-a-compact-and-reversible-JSON-interface-?)
- [Is it relevant to take an extended type into account ?](./0012-compact-and-reversible-JSON-interface.md/#Is-it-relevant-to-take-an-extended-type-into-account-?)
- [Is this only useful for pandas ?](./0012-compact-and-reversible-JSON-interface.md/#Is-this-only-useful-for-pandas-?)
- [Description](./0012-compact-and-reversible-JSON-interface.md/#Description)
- [Data typing](./0012-compact-and-reversible-JSON-interface.md/#Data-typing)
- [Correspondence between TableSchema and pandas](./panda0012-compact-and-reversible-JSON-interfaces_PDEP.md/#Correspondence-between-TableSchema-and-pandas)
- [JSON format](./0012-compact-and-reversible-JSON-interface.md/#JSON-format)
- [Conversion](./0012-compact-and-reversible-JSON-interface.md/#Conversion)
- [Usage and impact](./0012-compact-and-reversible-JSON-interface.md/#Usage-and-impact)
- [Usage](./0012-compact-and-reversible-JSON-interface.md/#Usage)
- [Compatibility](./0012-compact-and-reversible-JSON-interface.md/#Compatibility)
- [Impacts on the pandas framework](./0012-compact-and-reversible-JSON-interface.md/#Impacts-on-the-pandas-framework)
- [Risk to do / risk not to do](./0012-compact-and-reversible-JSON-interface.md/#Risk-to-do-/-risk-not-to-do)
- [Implementation](./0012-compact-and-reversible-JSON-interface.md/#Implementation)
- [Modules](./0012-compact-and-reversible-JSON-interface.md/#Modules)
- [Implementation options](./0012-compact-and-reversible-JSON-interface.md/#Implementation-options)
- [F.A.Q.](./0012-compact-and-reversible-JSON-interface.md/#F.A.Q.)
- [Synthesis](./0012-compact-and-reversible-JSON-interface.md/Synthesis)
- [Core team decision](./0012-compact-and-reversible-JSON-interface.md/#Core-team-decision)
- [Timeline](./0012-compact-and-reversible-JSON-interface.md/#Timeline)
- [PDEP history](./0012-compact-and-reversible-JSON-interface.md/#PDEP-history)

-------------------------
[TOC]

## Abstract

Expand Down
20 changes: 20 additions & 0 deletions web/pandas/static/css/pandas.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,23 @@ blockquote {
color: #787878;
font-size: 18px;
}

.toc {
background: #f0f0f0;
padding: 10px;
display: inline-block;
}
a.headerlink {
opacity: 0;
}
h2:hover a.headerlink {
opacity: 1;
transition: opacity 0.5s;
}
h3:hover a.headerlink {
opacity: 1;
transition: opacity 0.5s;
}
.container {
max-width: 120ch;
}
26 changes: 23 additions & 3 deletions web/pandas_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,29 @@ def main(
with open(os.path.join(source_path, fname), encoding="utf-8") as f:
content = f.read()
if extension == ".md":
body = markdown.markdown(
content, extensions=context["main"]["markdown_extensions"]
)
if "pdeps/" in fname:
from markdown.extensions.toc import TocExtension

body = markdown.markdown(
content,
extensions=[
# Ignore the title of the PDEP in the table of contents
TocExtension(
title="Table of Contents",
toc_depth="2-3",
permalink=" #",
),
"tables",
"fenced_code",
"meta",
"footnotes",
"codehilite",
],
)
else:
body = markdown.markdown(
content, extensions=context["main"]["markdown_extensions"]
)
# Apply Bootstrap's table formatting manually
# Python-Markdown doesn't let us config table attributes by hand
body = body.replace("<table>", '<table class="table table-bordered">')
Expand Down

0 comments on commit 9b66357

Please sign in to comment.