Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5f9ce5c
Update RAT-SQ.tex
fragandi Dec 16, 2024
4b5304e
Addressing issue RAT for Module SQ and Readiness Assurance List #40
fragandi Dec 20, 2024
132e3ed
Update ai3 check it (#448)
TienChih Dec 16, 2024
4023d52
Update ad5 ad6 checkit (#445)
TienChih Dec 16, 2024
49a1f6e
Update template.xml (#446)
TienChih Dec 16, 2024
1c38eca
Update template.xml (#447)
TienChih Dec 16, 2024
321867e
comment out cylinder and rectangular prism. (#449)
TienChih Dec 16, 2024
4123cae
Youtube links update (#453)
TienChih Dec 16, 2024
cd243be
made PS2 notation to be consistent with PS1; addresses PS2 vs PS1 not…
cg2wilson Dec 16, 2024
44ff837
Update presentations on website (#456)
siwelwerd Dec 16, 2024
018658f
Added answers for Calculus LT1 MCQs (#458)
mlamich1 Dec 16, 2024
b324318
Update ti8 check it (#465)
TienChih Dec 16, 2024
1b602fb
make second colophon a preface (#464)
StevenClontz Dec 16, 2024
f736dcd
Quicker PR previews (#455)
StevenClontz Dec 16, 2024
4df6a79
Small edit to EL1 (#410)
AbbyANoble Dec 16, 2024
8b1878c
Precalculus TE1 (#397)
tdegeorge Dec 16, 2024
6f82d44
FN5 addition (#469)
tdegeorge Dec 17, 2024
6b088a6
Add more description of TBIL (#467)
siwelwerd Dec 17, 2024
295fc56
Solution added for 1.2 Limits Numerically (LT2) except the last one. …
mlamich1 Dec 17, 2024
ad9089b
Update Check-it links to be functional (#480)
jford1906 Dec 17, 2024
2c3f7e3
import improvised activities addressing issue Suggestion: Learning Ou…
jkostiuk Dec 17, 2024
45638f4
Appendix of common graphs (#416)
siwelwerd Dec 17, 2024
c24e2c8
preview checkit pull requests (#482)
StevenClontz Dec 18, 2024
cd9780d
Issue 352-EV7-suggestion (#353)
jkostiuk Dec 18, 2024
d589bec
Fix latex presentation of log_b in EL4 checkit (#438)
siwelwerd Dec 18, 2024
d24f8d1
Fix #479 merge (#490)
StevenClontz Dec 18, 2024
c5cd063
Fix LT2 activity answer scaffolding (#491)
StevenClontz Dec 18, 2024
640bfdb
Fix subtle error in PDF build for EV7 (#494)
StevenClontz Dec 18, 2024
5ed66af
Refactor LE2 generation (#486)
StevenClontz Dec 18, 2024
9268f41
Display powers of trig functions in usual way (#496)
siwelwerd Dec 18, 2024
e83b85e
Clarify form of integral for TI3 (#503)
StevenClontz Dec 18, 2024
126a0b5
Suggestion for LE2 #334 (#460)
jkostiuk Dec 18, 2024
2bf1cad
Added new activity to FN2 (#501)
AbbyANoble Dec 18, 2024
f6bd224
promote `format rat` to LE2 (#507)
StevenClontz Dec 19, 2024
0220930
Enable XML validation, other Codespace upgrades (#522)
StevenClontz Dec 19, 2024
eedefca
update frontmatter to use bibinfo and fix other deprecations (#509)
StevenClontz Dec 19, 2024
37f889f
issue #396 (#520)
jkostiuk Dec 19, 2024
362a16d
Ensure remarks have <p> tags (#514)
siwelwerd Dec 20, 2024
cc84eca
Fix precalculus pdf build (#521)
siwelwerd Dec 20, 2024
18f676c
Remove statements from remarks (#518)
siwelwerd Dec 20, 2024
0ed0cfd
Progress on XML validation (#526)
StevenClontz Dec 20, 2024
9081e7d
LF6 update (#368)
AbbyANoble Dec 20, 2024
ab38105
Add sage images for AD (#439)
cg2wilson Dec 20, 2024
0340dda
IN Sage Images (#442)
cg2wilson Dec 20, 2024
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
16 changes: 8 additions & 8 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},

// Respect the project's designated dependencies, and create codechat config file
"postCreateCommand": "pip install -r requirements.txt && git config core.hooksPath .githooks && touch codechat_config.yaml",
"postCreateCommand": "bash scripts/setup.sh",

// Port forwarding
// ---------------
Expand Down Expand Up @@ -71,18 +71,18 @@
"other": "off"
},
"editor.snippetSuggestions": "top",
"xml.validation.enabled": false,
"xml.validation.enabled": true,
"pretext-tools.schema.versionName": "Custom",
"pretext-tools.schema.customPath": "/workspaces/library/schema/tbil.rng",
"redhat.telemetry.enabled": false,
"CodeChat.CodeChatServer.Command": "CodeChat_Server",
"files.eol": "\n",
"files.associations": {
"*.sage": "python"
}
"files.eol": "\n"
},
"extensions": [
"ms-vscode.live-server",
"oscarlevin.pretext-tools",
"CodeChat.codechat",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"lov3.sagemath-enhanced"
]
}
}
Expand Down
117 changes: 75 additions & 42 deletions .github/workflows/pretext-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
container: oscarlevin/pretext:full
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)

steps:
- name: Checkout source
Expand All @@ -25,23 +26,15 @@ jobs:
- name: install deps
run: pip install -r requirements.txt

- name: quick build instructor versions
id: quickbuild
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && github.event_name != 'workflow_dispatch'
run: |
pretext build precalculus-web-instructor -q
pretext build calculus-web-instructor -q
pretext build linear-algebra-web-instructor -q

- name: build all deploy targets
if: steps.quickbuild.outcome == 'skipped'
# if: steps.quickbuild.outcome == 'skipped'
run: pretext build --deploys

- name: stage deployment
run: pretext deploy --stage-only

- name: build and stage all banks
if: steps.quickbuild.outcome == 'skipped'
# if: steps.quickbuild.outcome == 'skipped'
run: |
python scripts/build_bank.py precalculus --full
python scripts/build_bank.py calculus --full
Expand All @@ -53,10 +46,76 @@ jobs:
name: deploy
path: output/stage

deploy-cloudflare:
deploy-ghpages:
runs-on: ubuntu-latest
needs: build
if: vars.CLOUDFLARE_PROJECT_NAME != '' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download website artifact
uses: actions/download-artifact@v4
with:
name: deploy
path: deploy
- name: Setup GitHub Pages
id: check
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: deploy
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v4

preview:
runs-on: ubuntu-latest
container: oscarlevin/pretext:full
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
outputs:
markdown: ${{ steps.changes.outputs.markdown }}

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install deps
run: pip install -r requirements.txt

- name: Set necessary Git permission
run: git config --global --add safe.directory $(pwd)

- name: build previews of all changed files
id: changes
run: python -m scripts.quickbuild_changes

- name: stage deployment
run: pretext deploy --stage-only

# - name: build and stage all banks
# run: |
# python scripts/build_bank.py precalculus --full
# python scripts/build_bank.py calculus --full
# python scripts/build_bank.py linear-algebra --full

- name: Bundle output/stage as artifact
uses: actions/upload-artifact@v4
with:
name: deploy
path: output/stage

deploy-cloudflare:
runs-on: ubuntu-latest
needs: preview
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
permissions:
contents: read
deployments: write
Expand All @@ -70,8 +129,8 @@ jobs:
path: deploy
- name: Create 404.html
run: echo "404 page not found" >> deploy/404.html
- name: Delete CheckIt builds not supported by CloudFlare
run: find . -name "bank.json" -type f -delete
# - name: Delete CheckIt builds not supported by CloudFlare
# run: find . -name "bank.json" -type f -delete
- name: Publish to Cloudflare
id: cloudflare_publish
uses: cloudflare/pages-action@v1
Expand All @@ -87,37 +146,11 @@ jobs:
if: github.event_name == 'pull_request'
with:
script: |
cf_url = "${{ steps.cloudflare_publish.outputs.url }}"
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '## 🚀 Preview available 🚀\n\n${{ steps.cloudflare_publish.outputs.url }}\n\n- [Precalculus](${{ steps.cloudflare_publish.outputs.url }}/preview/precalculus/instructor/frontmatter)\n\n- [Calculus](${{ steps.cloudflare_publish.outputs.url }}/preview/calculus/instructor/frontmatter)\n\n- [Linear Algebra](${{ steps.cloudflare_publish.outputs.url }}/preview/linear-algebra/instructor/frontmatter)'
body: `${{ needs.preview.outputs.markdown }}`
})

deploy-ghpages:
runs-on: ubuntu-latest
needs: build
if: vars.PTX_ENABLE_DEPLOY_GHPAGES == 'yes' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download website artifact
uses: actions/download-artifact@v4
with:
name: deploy
path: deploy
- name: Setup GitHub Pages
id: check
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: deploy
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pretext == 2.6.2
pretext == 2.10.1
pelican == 4.9.1
checkit-dashboard == 0.2.6
133 changes: 133 additions & 0 deletions schema/tbil.rng
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href="/root/.ptx/2.10.1/core/schema/pretext-dev.rng">
<define name="Subtitle">
<zeroOrMore>
<element name="subtitle">
<optional>
<attribute name="component" />
</optional>
<ref name="TextLong" />
</element>
</zeroOrMore>
</define>
<define name="Bibinfo">
<element name="bibinfo">
<choice>
<group>
<ref name="Author" />
<zeroOrMore>
<ref name="Author" />
</zeroOrMore>
<zeroOrMore>
<ref name="Editor" />
</zeroOrMore>
</group>
<group>
<ref name="Editor" />
<zeroOrMore>
<ref name="Editor" />
</zeroOrMore>
</group>
</choice>
<zeroOrMore>
<ref name="Credit" />
</zeroOrMore>
<optional>
<ref name="Date" />
</optional>
<zeroOrMore>
<ref name="ColophonCredit" />
</zeroOrMore>
<optional>
<element name="edition">
<text />
</element>
</optional>
<optional>
<ref name="Website" />
</optional>
<optional>
<ref name="Copyright" />
</optional>
</element>
</define>
<define name="Author">
<element name="author">
<optional>
<ref name="XMLBase" />
</optional>
<ref name="PersonName" />
<optional>
<ref name="Department" />
</optional>
<optional>
<ref name="Institution" />
</optional>
<optional>
<ref name="Email" />
</optional>
</element>
</define>
<define name="Website">
<element name="website">
<optional>
<ref name="XMLBase" />
</optional>
<ref name="Url"/>
</element>
</define>
<define name="Paragraph">
<element name="p">
<optional>
<ref name="XMLBase" />
</optional>
<optional>
<ref name="UniqueID" />
</optional>
<optional>
<ref name="LabelID" />
</optional>
<optional>
<ref name="Component" />
</optional>
<ref name="TextParagraph" />
</element>
</define>
</include>
<start combine="choice">
<choice>
<ref name="Paragraph" />
<ref name="Author" />
<ref name="Website" />
<ref name="Copyright" />
</choice>
</start>
<define name="MetaDataTitleOptional" combine="interleave">
<optional>
<attribute name="estimated-time" />
</optional>
</define>
<define name="Copyright">
<element name="copyright">
<optional>
<ref name="XMLBase" />
</optional>
<element name="year">
<ref name="TextShort" />
</element>
<element name="holder">
<text />
</element>
<optional>
<element name="minilicense">
<ref name="TextShort" />
</element>
</optional>
<optional>
<ref name="ShortLicense" />
</optional>
</element>
</define>
</grammar>
8 changes: 7 additions & 1 deletion scripts/preview_outcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from checkit.bank import Bank
from checkit import static

def main(book:str, outcome:str, amount:int = 20):
def build_preview(book:str, outcome:str, amount:int = 20):
# check that this outcome exists
exercise_path = Path("source", book, "exercises")
sage_library_path = Path("source", book, "sage")
Expand Down Expand Up @@ -89,9 +89,15 @@ def main(book:str, outcome:str, amount:int = 20):
# copy assets
shutil.copytree(b.build_path(), os.path.join(docs_path, "assets"), dirs_exist_ok=True)

return sandbox_bank_path


def main(book:str, outcome:str, amount:int = 20):
sandbox_bank_path = build_preview(book, outcome, amount)

subprocess.run(['python', '-m', 'http.server', '-d', str(sandbox_bank_path/'docs')])


if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Preview a CheckIt outcome.')
parser.add_argument('book', choices=['precalculus', 'calculus', 'linear-algebra'])
Expand Down
Loading