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

Fix links in documentation #2142

Merged
merged 4 commits into from
Nov 22, 2022
Merged

Fix links in documentation #2142

merged 4 commits into from
Nov 22, 2022

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Nov 16, 2022

Description

The Developer Portal now requires relative paths or full URLs, absolute paths are not supported anymore.
This is checked by the new CI job, "Developer Portal Content Check".


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent added the Documentation Improvements or additions to documentation label Nov 16, 2022
@turbolent turbolent requested a review from bthaile November 16, 2022 01:16
@turbolent turbolent self-assigned this Nov 16, 2022
@turbolent turbolent force-pushed the bastian/fix-doc-links branch from 7fabd3c to fa256b8 Compare November 16, 2022 01:20
@turbolent
Copy link
Member Author

@turbolent
Copy link
Member Author

@bthaile it looks like relative paths are not fully supported, .. does not seem to work

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #2142 (2ca38d0) into master (cf0a69a) will decrease coverage by 0.28%.
The diff coverage is n/a.

❗ Current head 2ca38d0 differs from pull request most recent head 1fc3c49. Consider uploading reports for the commit 1fc3c49 to get more accurate results

@@            Coverage Diff             @@
##           master    #2142      +/-   ##
==========================================
- Coverage   77.97%   77.68%   -0.29%     
==========================================
  Files         306      308       +2     
  Lines       64018    64246     +228     
==========================================
- Hits        49918    49910       -8     
- Misses      12302    12600     +298     
+ Partials     1798     1736      -62     
Flag Coverage Δ
unittests 77.68% <ø> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
runtime/interpreter/value.go 68.96% <0.00%> (-1.74%) ⬇️
runtime/parser/function.go 69.95% <0.00%> (-0.87%) ⬇️
runtime/interpreter/interpreter_expression.go 86.14% <0.00%> (-0.16%) ⬇️
runtime/stdlib/account.go 86.44% <0.00%> (-0.11%) ⬇️
runtime/interpreter/decode.go 46.05% <0.00%> (-0.09%) ⬇️
runtime/stdlib/test.go 38.19% <0.00%> (ø)
runtime/ast/parameter.go 100.00% <0.00%> (ø)
runtime/common/metering.go 92.23% <0.00%> (ø)
runtime/common/memorykind_string.go 40.00% <0.00%> (ø)
runtime/sema/authaccount_contracts.go 100.00% <0.00%> (ø)
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

github-actions bot commented Nov 16, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit c9429ea
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
CheckContractInterfaceFungibleTokenConformance-2149µs ± 4%140µs ± 5%−6.04%(p=0.015 n=6+6)
ContractInterfaceFungibleToken-252.5µs ± 5%50.7µs ±13%~(p=0.295 n=6+7)
InterpretRecursionFib-22.79ms ± 5%2.73ms ± 4%~(p=0.209 n=7+7)
NewInterpreter/new_interpreter-21.38µs ± 5%1.38µs ± 5%~(p=0.945 n=7+6)
NewInterpreter/new_sub-interpreter-2766ns ± 9%749ns ± 2%~(p=0.209 n=7+7)
ParseArray-210.1ms ± 7%10.1ms ± 3%~(p=0.945 n=7+6)
ParseDeploy/byte_array-214.9ms ± 2%15.5ms ±10%~(p=0.209 n=7+7)
ParseDeploy/decode_hex-21.52ms ± 1%1.48ms ± 2%−2.17%(p=0.009 n=5+6)
ParseFungibleToken/With_memory_metering-2232µs ± 3%233µs ± 6%~(p=0.620 n=7+7)
ParseFungibleToken/Without_memory_metering-2180µs ± 1%184µs ± 7%~(p=0.181 n=6+7)
ParseInfix-28.24µs ± 2%8.73µs ± 8%+5.95%(p=0.026 n=7+7)
QualifiedIdentifierCreation/One_level-22.85ns ± 3%2.81ns ± 4%~(p=0.366 n=7+6)
QualifiedIdentifierCreation/Three_levels-2170ns ± 1%172ns ± 4%~(p=0.079 n=6+7)
RuntimeFungibleTokenTransfer-2715µs ±21%786µs ±35%~(p=0.535 n=7+7)
RuntimeResourceDictionaryValues-26.50ms ± 1%6.66ms ± 3%~(p=0.051 n=6+7)
RuntimeScriptNoop-224.3µs ±37%26.7µs ±35%~(p=0.805 n=7+7)
SuperTypeInference/arrays-2388ns ± 2%393ns ± 1%~(p=0.065 n=6+6)
SuperTypeInference/composites-2160ns ± 4%157ns ± 2%~(p=0.165 n=7+7)
SuperTypeInference/integers-2107ns ± 1%108ns ± 4%~(p=0.902 n=7+7)
ValueIsSubtypeOfSemaType-2110ns ± 3%113ns ± 7%~(p=0.249 n=6+7)
 
alloc/opdelta
CheckContractInterfaceFungibleTokenConformance-251.0kB ± 0%49.7kB ± 0%−2.66%(p=0.001 n=7+7)
ContractInterfaceFungibleToken-224.7kB ± 0%24.0kB ± 0%−2.79%(p=0.000 n=7+6)
InterpretRecursionFib-21.00MB ± 0%1.00MB ± 0%~(all equal)
NewInterpreter/new_interpreter-2752B ± 0%752B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-2200B ± 0%200B ± 0%~(all equal)
ParseArray-22.77MB ± 3%2.77MB ± 6%~(p=0.805 n=7+7)
ParseDeploy/byte_array-24.21MB ± 3%4.22MB ± 3%~(p=0.831 n=7+7)
ParseDeploy/decode_hex-2214kB ± 0%214kB ± 0%~(p=0.533 n=7+7)
ParseFungibleToken/With_memory_metering-229.4kB ± 0%29.2kB ± 0%−0.54%(p=0.001 n=7+7)
ParseFungibleToken/Without_memory_metering-229.4kB ± 0%29.2kB ± 0%−0.53%(p=0.001 n=7+7)
ParseInfix-21.92kB ± 0%1.92kB ± 0%~(p=0.867 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
RuntimeFungibleTokenTransfer-2102kB ± 1%102kB ± 1%~(p=0.535 n=7+7)
RuntimeResourceDictionaryValues-22.29MB ± 0%2.29MB ± 0%~(p=0.318 n=7+7)
RuntimeScriptNoop-28.50kB ± 1%8.46kB ± 0%~(p=0.066 n=7+7)
SuperTypeInference/arrays-296.0B ± 0%96.0B ± 0%~(all equal)
SuperTypeInference/composites-20.00B 0.00B ~(all equal)
SuperTypeInference/integers-20.00B 0.00B ~(all equal)
ValueIsSubtypeOfSemaType-248.0B ± 0%48.0B ± 0%~(all equal)
 
allocs/opdelta
CheckContractInterfaceFungibleTokenConformance-2920 ± 0%815 ± 0%−11.41%(p=0.001 n=7+7)
ContractInterfaceFungibleToken-2444 ± 0%388 ± 0%−12.61%(p=0.001 n=7+7)
InterpretRecursionFib-218.9k ± 0%18.9k ± 0%~(all equal)
NewInterpreter/new_interpreter-213.0 ± 0%13.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-24.00 ± 0%4.00 ± 0%~(all equal)
ParseArray-259.6k ± 0%59.6k ± 0%~(p=1.000 n=7+7)
ParseDeploy/byte_array-289.4k ± 0%89.4k ± 0%~(p=1.000 n=7+7)
ParseDeploy/decode_hex-264.0 ± 0%64.0 ± 0%~(all equal)
ParseFungibleToken/With_memory_metering-2779 ± 0%779 ± 0%~(all equal)
ParseFungibleToken/Without_memory_metering-2779 ± 0%779 ± 0%~(all equal)
ParseInfix-248.0 ± 0%48.0 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
RuntimeFungibleTokenTransfer-22.01k ± 0%1.99k ± 0%−0.86%(p=0.000 n=6+7)
RuntimeResourceDictionaryValues-237.0k ± 0%36.9k ± 0%−0.03%(p=0.001 n=7+7)
RuntimeScriptNoop-2137 ± 0%132 ± 0%−3.65%(p=0.001 n=7+7)
SuperTypeInference/arrays-23.00 ± 0%3.00 ± 0%~(all equal)
SuperTypeInference/composites-20.00 0.00 ~(all equal)
SuperTypeInference/integers-20.00 0.00 ~(all equal)
ValueIsSubtypeOfSemaType-21.00 ± 0%1.00 ± 0%~(all equal)
 

@bthaile
Copy link
Contributor

bthaile commented Nov 18, 2022

I'm confused on how links should work. It has been stated that if the links work in github they should work on the portal.
Its not intuitive how links work.
cuz the first link changed in the PR works fine in the dev portal.
In docs/design-patterns.mdx file,

  • "/cadence/language/capability-based-access-control" resolves fine. But in github the link is broken.

I'm curious if the link was changed to work in github would it break on the dev portal?

In docs/design-patterns.mdx file, change

  • "/cadence/language/capability-based-access-control" to
  • "docs/language/capability-based-access-control.md"

If not there is a redirects section in the flow-docs.json where urls can be redirected.

"tutorial": "tutorial/01-first-steps"

Copy link
Member Author

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying ../ instead of .. ...

Copy link
Member Author

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use full URLs instead

@turbolent turbolent merged commit e2f0bc5 into master Nov 22, 2022
@turbolent turbolent deleted the bastian/fix-doc-links branch November 22, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants