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

WIP: add LocalRemoteCard and LocalRemoteSection #89

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented May 24, 2021

This is the first step towards #72 LocalRemotePage is just a normal DemoPage as far as I'm understanding.

Todo:

  • LocalRemoteCard
  • LocalRemoteSection
  • documentation

LocalRemoteCard as a virtual card placeholder will be generated if "remote" is specified in section level:

{
    "remote": {
        "julia_card.jl": "../../card/julia/title_1.jl",
        "markdown_card.md": "../../card/markdown/title_3.md"
    },
    "order": [
        "julia_card.jl",
        "markdown_card.md",
        "title_2.md"
    ]
}

Efforts are paid to support:

  • mixed usage of LocalRemoteCard and normal demo files, as well as order
  • LocalRemoteCard can be either an absolute path or a relative path (wrt the config.json)

@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #89 (282bea6) into master (3d424b7) will decrease coverage by 1.00%.
The diff coverage is 88.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   88.21%   87.20%   -1.01%     
==========================================
  Files          14       15       +1     
  Lines         823      930     +107     
==========================================
+ Hits          726      811      +85     
- Misses         97      119      +22     
Impacted Files Coverage Δ
src/types/remote_card.jl 54.54% <54.54%> (ø)
src/preview.jl 90.56% <85.71%> (-3.25%) ⬇️
src/generate.jl 77.77% <86.48%> (+1.11%) ⬆️
src/types/section.jl 93.25% <88.37%> (-4.96%) ⬇️
src/show.jl 100.00% <100.00%> (ø)
src/types/card.jl 96.96% <100.00%> (ø)
src/types/julia.jl 94.62% <100.00%> (+0.11%) ⬆️
src/types/markdown.jl 100.00% <100.00%> (ø)
src/types/page.jl 92.23% <100.00%> (+0.48%) ⬆️
src/utils.jl 87.97% <100.00%> (+0.13%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d424b7...282bea6. Read the comment docs.

@johnnychen94 johnnychen94 changed the title WIP: add LocalRemote[Card|Section|Page] WIP: add LocalRemoteCard and LocalRemoteSection May 25, 2021
some other small changes:

- validate_order: make sure `order` field is unique
- show: remove extra new line for AbstractDemoCard
It becomes nontrivial to fetch enough information if we can't ensure
the local remote file exists. This commit makes all remote entries
normal direct entries by copying the contents and remove the "remote"
from config.json.
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.

1 participant