Skip to content

WEB: Refine PDEP presentation #58791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Comment on lines +115 to +122
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be able to combine these two, but wasn't able to figure out the syntax.

.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:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the use of TocExtension below, we can't use the usual yaml. Not sure if there is a work around or a better approach here.

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