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

Closed
erlend-aasland opened this issue Jul 6, 2022 · 14 comments · Fixed by #94636, #95269, #95751, #96136 or #96089
Closed

Restructure the sqlite3 docs table-of-contents #94635

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

Comments

@erlend-aasland
Copy link
Contributor

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

cc. @CAM-Gerlach #diataxis

@erlend-aasland
Copy link
Contributor Author

  • 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

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

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

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

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?

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 that referenced this issue Aug 9, 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>
iritkatriel pushed a commit to iritkatriel/cpython that referenced this issue Aug 11, 2022
In pythongh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
@erlend-aasland
Copy link
Contributor Author

I suggest to remove the Introduction heading (it serves little purpose), and then close this issue.

@CAM-Gerlach
Copy link
Member

There are still a couple things that need doing:

  • The "How-to" sections should be renamed to avoid "Using", etc. and be more clear they are how tos per Diataxis as you did in the closed Restructure the sqlite3 docs table-of-contents #94635
  • Thinking more about it, the "Default Adapters and Converters" section is actually pretty clearly a Reference, and should be moved accordingly

Would you like me to open PRs for these, or do them yourself?

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 19, 2022
(cherry picked from commit ede771c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 19, 2022
(cherry picked from commit ede771c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Aug 19, 2022
(cherry picked from commit ede771c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Aug 19, 2022
(cherry picked from commit ede771c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@erlend-aasland
Copy link
Contributor Author

There are still a couple things that need doing:

  • The "How-to" sections should be renamed to avoid "Using", etc. and be more clear they are how tos per Diataxis as you did in the closed Restructure the sqlite3 docs table-of-contents #94635
  • Thinking more about it, the "Default Adapters and Converters" section is actually pretty clearly a Reference, and should be moved accordingly

Would you like me to open PRs for these, or do them yourself?

Sure, go ahead :)

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Aug 19, 2022

FTR, Daniele's Camera docs repeat "How-to" for subsections:
Screenshot 2022-08-19 at 12 05 02

@CAM-Gerlach
Copy link
Member

Will do shortly 👍

I've indeed come around to your reasoning on this 😄

@CAM-Gerlach
Copy link
Member

Thanks, opened as #96136

erlend-aasland added a commit that referenced this issue Aug 24, 2022
…rs to reference (#96136)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this issue Aug 24, 2022
…efault adapters to reference (pythonGH-96136)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this issue Aug 24, 2022
…efault adapters to reference (pythonGH-96136)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
erlend-aasland added a commit that referenced this issue Aug 24, 2022
… adapters to reference (GH-96136) (#96226)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
erlend-aasland added a commit that referenced this issue Aug 24, 2022
… adapters to reference (GH-96136) (#96227)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@erlend-aasland
Copy link
Contributor Author

AFAICS, we can close this. Thanks CAM and Ezio!

mdboom pushed a commit to mdboom/cpython that referenced this issue Aug 24, 2022
…adapters to reference (python#96136)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
@CAM-Gerlach
Copy link
Member

Thanks to you for doing most of the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment