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

Toolsreq 8242 appendix handling #26

Merged
merged 2 commits into from
Jan 3, 2023
Merged

Conversation

delfanbaum
Copy link
Contributor

This adds data-type - ing for appendixes, as well as a refactor; see commit messages for further details. PR 1/4 on TOOLSREQ-8242.

This commit adds a test and code to automatically apply the "appendix"
datatype to files beginning with "appx", e.g., "appxa", "appx_b", etc.
@delfanbaum delfanbaum requested review from ruralocity and a team December 22, 2022 20:37
This refactor gets us data-typing for non-chapters (e.g., prefaces, but
mostly appendixes) with subparts for free, and also cleans the code up.
We move the logic to apply the chapter-wide data-types to its own
function and allow the (new/old) process_chapter_soup function to take
either a Path (single-file chapter) or a list (a chapter with subfiles).

**NOTE**: We have to import `Union` from `typing` to support hinting for
this; Python 3.10 gives us a much cleaner `|` operator, but Atlas
currently is on 3.9.

Update: parallelism in the initial if-check in process_chapter_soup
@delfanbaum delfanbaum force-pushed the TOOLSREQ-8242-appendix-handling branch from c84f870 to 5bd48b3 Compare December 22, 2022 20:40
@delfanbaum delfanbaum marked this pull request as ready for review December 22, 2022 20:41
@delfanbaum delfanbaum merged commit 5903f20 into main Jan 3, 2023
@delfanbaum delfanbaum deleted the TOOLSREQ-8242-appendix-handling branch January 3, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants