Skip to content
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

Restructure the sqlite3 docs table-of-contents #94635

Open
erlend-aasland opened this issue Jul 6, 2022 · 6 comments · Fixed by #94636, #95269 or #95751 · May be fixed by #94677
Open

Restructure the sqlite3 docs table-of-contents #94635

erlend-aasland opened this issue Jul 6, 2022 · 6 comments · Fixed by #94636, #95269 or #95751 · May be fixed by #94677
Assignees
Labels
docs Documentation in the Doc dir expert-sqlite3 triaged The issue has been accepted as valid by a triager.

Comments

@erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jul 6, 2022

The current docs are laid out more or less like this:

  • short introduction
  • relatively short tutorial
  • reference
  • how-to's/guides and some in-depth explanations

Suggesting to make the following improvements:

  • add top-level headings for:
    • introduction
    • tutorial
    • reference
    • guides
    • concepts
  • reorder sections according to the new ToC
  • add anchors for each top-level heading

Implemented by (all backported to 3.11 and 3.10):

@erlend-aasland
Copy link
Contributor Author

@erlend-aasland erlend-aasland commented Jul 6, 2022

cc. @CAM-Gerlach #diataxis

@erlend-aasland
Copy link
Contributor Author

@erlend-aasland erlend-aasland commented Jul 6, 2022

  • introduction
  • tutorial
  • reference
  • guides
  • concepts

Maybe it is better to swap Concepts and Guides:

  • introduction
  • tutorial
  • reference
  • concepts
  • guides

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 6, 2022
@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Jul 7, 2022

FWIW, I teach sqlite3 directly from the current docs. They are VERY useful as-is.

I would like to know what problem is being solved here. From what I can tell, no user has ever had issues with the current arrangement.

@erlend-aasland
Copy link
Contributor Author

@erlend-aasland erlend-aasland commented Jul 7, 2022

FWIW, I teach sqlite3 directly from the current docs. They are VERY useful as-is.

Thanks!

I would like to know what problem is being solved here.

The top-level structure is flat. I'm suggesting to organise the sections under headings:

Current layout

Table of Contents

sqlite3 — DB-API 2.0 interface for SQLite databases

  • Module functions and constants
  • Connection Objects
  • Cursor Objects
  • Row Objects
  • Blob Objects
  • Exceptions
  • SQLite and Python types
    • Introduction
    • Using adapters to store custom Python types in SQLite databases
      • Letting your object adapt itself
      • Registering an adapter callable
    • Converting SQLite values to custom Python types
    • Default adapters and converters
    • Adapter and Converter Recipes
  • Controlling Transactions
  • Using sqlite3 efficiently
    • Using shortcut methods
    • Accessing columns by name instead of by index
    • Using the connection as a context manager
After this PR

Table of Contents

sqlite3 — DB-API 2.0 interface for SQLite databases

  • Introduction
  • Tutorial
  • Reference
    • Module functions and constants
    • Connection Objects
    • Cursor Objects
    • Row Objects
    • Blob Objects
    • Exceptions
  • Guides
    • Using adapters to store custom Python types in SQLite databases
      • Letting your object adapt itself
      • Registering an adapter callable
    • Converting SQLite values to custom Python types
    • Adapter and Converter Recipes
      • Default adapters and converters
    • Using shortcut methods
    • Accessing columns by name instead of by index
    • Using the connection as a context manager
  • Concepts
    • SQLite and Python types
    • Controlling Transactions

@erlend-aasland
Copy link
Contributor Author

@erlend-aasland erlend-aasland commented Jul 7, 2022

From what I can tell, no user has ever had issues with the current arrangement.

As I view it, this is a weak argument for keeping things as they are. There can be room for improvement, both in docs and code, even though no-one has taken the steps to create a ticket on the bug tracker.

@CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented Jul 7, 2022

Maybe it is better to swap Concepts and Guides:

At least per Diataxis, the most natural flow would have Explanations ("Concepts") last, since they are higher-level discussions of less urgent immediacy to most users...though, at least one of the "Concepts" subsections doesn't quite fit the "Explanation" mold, as discussed on the PR, and phrasing them as "Concepts" conveys more primacy than "Explanations".

FWIW, I teach sqlite3 directly from the current docs. They are VERY useful as-is.

Given your perspective, any additional details you could provide would be quite helpful. Are you referring to useful to yourself as an instructor? Or to your students—and if so, it would be helpful to know how you're evaluating that? Are they being used as a tutorial, reference, how-to/guide, or explanation—or some combination? And for context, what sort(s) of students are we talking here?

Also, do you have any specific concerns you could share about the proposed structure and its effect on your teaching and your students?

@bedevere-bot bedevere-bot linked a pull request Jul 7, 2022 that will close this issue
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 7, 2022
@erlend-aasland erlend-aasland added the triaged The issue has been accepted as valid by a triager. label Jul 25, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 27, 2022
pythonGH-95269)

(cherry picked from commit 2e35a13)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 27, 2022
pythonGH-95269)

(cherry picked from commit 2e35a13)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Jul 27, 2022
…95269)

(cherry picked from commit 2e35a13)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
ambv pushed a commit that referenced this issue Jul 27, 2022
…95269) (GH-95304)

(cherry picked from commit 2e35a13)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit that referenced this issue Jul 30, 2022
#94636)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 30, 2022
…o sqlite3 docs (pythonGH-94636)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 6c439b9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jul 30, 2022
…o sqlite3 docs (pythonGH-94636)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 6c439b9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit that referenced this issue Jul 31, 2022
…qlite3 docs (GH-94636) (#95482)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 6c439b9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>

* Fix refs
erlend-aasland added a commit that referenced this issue Jul 31, 2022
…qlite3 docs (GH-94636) (#95483)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 6c439b9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>

* Fix refs
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Aug 6, 2022
In pythongh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 6, 2022
…5751)

In pythongh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
(cherry picked from commit 56af5a2)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit that referenced this issue Aug 6, 2022
In gh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 6, 2022
…5751)

In pythongh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
(cherry picked from commit 56af5a200d60e86a8ac450264729d693053275e3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@erlend-aasland erlend-aasland linked a pull request Aug 6, 2022 that will close this issue
miss-islington added a commit that referenced this issue Aug 6, 2022
In gh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
(cherry picked from commit 56af5a2)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment