-
Notifications
You must be signed in to change notification settings - Fork 95
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
支持 docstrings ? #105
Open
Gnimuc
wants to merge
8
commits into
master
Choose a base branch
from
docstring
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
支持 docstrings ? #105
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4c6c69d
Dump docstrings to key-value json format
Gnimuc 1199099
Dump docstrings
Gnimuc 30d9380
Update config
Gnimuc 3e7d7c8
Pull docstrings
Gnimuc cf98aa4
Dump again
Gnimuc 25d6122
Add source paths for `tx push -s`
Gnimuc e81d5e9
Add support for replacing docstrings
Gnimuc 9d5cab3
Update Manifest.toml
Gnimuc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ doc/deps | |
_*.dat | ||
*.swp | ||
__pycache__/ | ||
Manifest.toml | ||
/Manifest.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
[[Base64]] | ||
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" | ||
|
||
[[Dates]] | ||
deps = ["Printf"] | ||
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
|
||
[[Distributed]] | ||
deps = ["Random", "Serialization", "Sockets"] | ||
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" | ||
|
||
[[DocStringExtensions]] | ||
deps = ["LibGit2", "Markdown", "Pkg", "Test"] | ||
git-tree-sha1 = "c5714d9bcdba66389612dc4c47ed827c64112997" | ||
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
version = "0.8.2" | ||
|
||
[[Documenter]] | ||
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] | ||
git-tree-sha1 = "395fa1554c69735802bba37d9e7d9586fd44326c" | ||
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
version = "0.24.11" | ||
|
||
[[DocumenterLaTeX]] | ||
deps = ["Documenter", "Test"] | ||
git-tree-sha1 = "653299370be20ff580bccd707dc9f360c0852d7f" | ||
uuid = "cd674d7a-5f81-5cf3-af33-235ef1834b99" | ||
version = "0.2.0" | ||
|
||
[[InteractiveUtils]] | ||
deps = ["Markdown"] | ||
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" | ||
|
||
[[JSON]] | ||
deps = ["Dates", "Mmap", "Parsers", "Unicode"] | ||
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" | ||
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" | ||
version = "0.21.0" | ||
|
||
[[JSON3]] | ||
deps = ["Dates", "Mmap", "Parsers", "StructTypes", "UUIDs"] | ||
git-tree-sha1 = "6e34f9da882f28e05c8f790bbfd150bd7b5d8de7" | ||
uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" | ||
version = "1.0.3" | ||
|
||
[[JuliaZH]] | ||
deps = ["JSON", "JSON3", "REPL"] | ||
path = ".." | ||
uuid = "652e05fd-ed22-5b6c-bf99-44e63a676e5f" | ||
version = "1.5.0" | ||
|
||
[[LibGit2]] | ||
deps = ["Printf"] | ||
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" | ||
|
||
[[Libdl]] | ||
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" | ||
|
||
[[Logging]] | ||
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" | ||
|
||
[[Markdown]] | ||
deps = ["Base64"] | ||
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" | ||
|
||
[[Mmap]] | ||
uuid = "a63ad114-7e13-5084-954f-fe012c677804" | ||
|
||
[[Parsers]] | ||
deps = ["Dates", "Test"] | ||
git-tree-sha1 = "20ef902ea02f7000756a4bc19f7b9c24867c6211" | ||
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" | ||
version = "1.0.6" | ||
|
||
[[Pkg]] | ||
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] | ||
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" | ||
|
||
[[Printf]] | ||
deps = ["Unicode"] | ||
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
|
||
[[REPL]] | ||
deps = ["InteractiveUtils", "Markdown", "Sockets"] | ||
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" | ||
|
||
[[Random]] | ||
deps = ["Serialization"] | ||
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
|
||
[[SHA]] | ||
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" | ||
|
||
[[Serialization]] | ||
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" | ||
|
||
[[Sockets]] | ||
uuid = "6462fe0b-24de-5631-8697-dd941f90decc" | ||
|
||
[[StructTypes]] | ||
deps = ["Dates", "UUIDs"] | ||
git-tree-sha1 = "1ed04f622a39d2e5a6747c3a70be040c00333933" | ||
uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" | ||
version = "1.1.0" | ||
|
||
[[Test]] | ||
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] | ||
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[[UUIDs]] | ||
deps = ["Random", "SHA"] | ||
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | ||
|
||
[[Unicode]] | ||
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ using Documenter, DocumenterLaTeX | |
include("../contrib/HTMLWriter.jl") | ||
include("../contrib/LaTeXWriter.jl") | ||
|
||
using JuliaZH | ||
zh_CN() | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# Include the `build_sysimg` file. | ||
|
||
baremodule GenStdLib end | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.Cartesian.@nref":[{"Tuple{Int64,Symbol,Any}":" @nref N A indexexpr\n\nGenerate expressions like `A[i_1, i_2, ...]`. `indexexpr` can either be an iteration-symbol\nprefix, or an anonymous-function expression.\n\n# Examples\n```jldoctest\njulia> @macroexpand Base.Cartesian.@nref 3 A i\n:(A[i_1, i_2, i_3])\n```\n"}],"Base.Cartesian.@ncall":[{"Tuple{Int64,Any,Vararg{Any,N} where N}":" @ncall N f sym...\n\nGenerate a function call expression. `sym` represents any number of function arguments, the\nlast of which may be an anonymous-function expression and is expanded into `N` arguments.\n\nFor example, `@ncall 3 func a` generates\n\n func(a_1, a_2, a_3)\n\nwhile `@ncall 2 func a b i->c[i]` yields\n\n func(a, b, c[1], c[2])\n\n"}],"Base.Cartesian.@nexprs":[{"Tuple{Int64,Expr}":" @nexprs N expr\n\nGenerate `N` expressions. `expr` should be an anonymous-function expression.\n\n# Examples\n```jldoctest\njulia> @macroexpand Base.Cartesian.@nexprs 4 i -> y[i] = A[i+j]\nquote\n y[1] = A[1 + j]\n y[2] = A[2 + j]\n y[3] = A[3 + j]\n y[4] = A[4 + j]\nend\n```\n"}],"Base.Cartesian.@nloops":[{"Tuple{Any,Any,Any,Vararg{Any,N} where N}":" @nloops N itersym rangeexpr bodyexpr\n @nloops N itersym rangeexpr preexpr bodyexpr\n @nloops N itersym rangeexpr preexpr postexpr bodyexpr\n\nGenerate `N` nested loops, using `itersym` as the prefix for the iteration variables.\n`rangeexpr` may be an anonymous-function expression, or a simple symbol `var` in which case\nthe range is `axes(var, d)` for dimension `d`.\n\nOptionally, you can provide \"pre\" and \"post\" expressions. These get executed first and last,\nrespectively, in the body of each loop. For example:\n\n @nloops 2 i A d -> j_d = min(i_d, 5) begin\n s += @nref 2 A j\n end\n\nwould generate:\n\n for i_2 = axes(A, 2)\n j_2 = min(i_2, 5)\n for i_1 = axes(A, 1)\n j_1 = min(i_1, 5)\n s += A[j_1, j_2]\n end\n end\n\nIf you want just a post-expression, supply [`nothing`](@ref) for the pre-expression. Using\nparentheses and semicolons, you can supply multi-statement expressions.\n"}],"Base.Cartesian.@nall":[{"Tuple{Int64,Expr}":" @nall N expr\n\nCheck whether all of the expressions generated by the anonymous-function expression `expr`\nevaluate to `true`.\n\n`@nall 3 d->(i_d > 1)` would generate the expression `(i_1 > 1 && i_2 > 1 && i_3 > 1)`. This\ncan be convenient for bounds-checking.\n"}],"Base.Cartesian.@nextract":[{"Tuple{Int64,Symbol,Symbol}":" @nextract N esym isym\n\nGenerate `N` variables `esym_1`, `esym_2`, ..., `esym_N` to extract values from `isym`.\n`isym` can be either a `Symbol` or anonymous-function expression.\n\n`@nextract 2 x y` would generate\n\n x_1 = y[1]\n x_2 = y[2]\n\nwhile `@nextract 3 x d->y[2d-1]` yields\n\n x_1 = y[1]\n x_2 = y[3]\n x_3 = y[5]\n\n"}],"Base.Cartesian.@nif":[{"Tuple{Any,Any,Vararg{Any,N} where N}":" @nif N conditionexpr expr\n @nif N conditionexpr expr elseexpr\n\nGenerates a sequence of `if ... elseif ... else ... end` statements. For example:\n\n @nif 3 d->(i_d >= size(A,d)) d->(error(\"Dimension \", d, \" too big\")) d->println(\"All OK\")\n\nwould generate:\n\n if i_1 > size(A, 1)\n error(\"Dimension \", 1, \" too big\")\n elseif i_2 > size(A, 2)\n error(\"Dimension \", 2, \" too big\")\n else\n println(\"All OK\")\n end\n"}],"Base.Cartesian.@nany":[{"Tuple{Int64,Expr}":" @nany N expr\n\nCheck whether any of the expressions generated by the anonymous-function expression `expr`\nevaluate to `true`.\n\n`@nany 3 d->(i_d > 1)` would generate the expression `(i_1 > 1 || i_2 > 1 || i_3 > 1)`.\n"}],"Base.Cartesian.@ntuple":[{"Tuple{Int64,Any}":" @ntuple N expr\n\nGenerates an `N`-tuple. `@ntuple 2 i` would generate `(i_1, i_2)`, and `@ntuple 2 k->k+1`\nwould generate `(2,3)`.\n"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.Enums.Enum":[{"Union{}":" Enum{T<:Integer}\n\nThe abstract supertype of all enumerated types defined with [`@enum`](@ref).\n"}],"Base.Enums.@enum":[{"Tuple{Any,Vararg{Any,N} where N}":" @enum EnumName[::BaseType] value1[=x] value2[=y]\n\nCreate an `Enum{BaseType}` subtype with name `EnumName` and enum member values of\n`value1` and `value2` with optional assigned values of `x` and `y`, respectively.\n`EnumName` can be used just like other types and enum member values as regular values, such as\n\n# Examples\n```jldoctest fruitenum\njulia> @enum Fruit apple=1 orange=2 kiwi=3\n\njulia> f(x::Fruit) = \"I'm a Fruit with value: $(Int(x))\"\nf (generic function with 1 method)\n\njulia> f(apple)\n\"I'm a Fruit with value: 1\"\n\njulia> Fruit(1)\napple::Fruit = 1\n```\n\nValues can also be specified inside a `begin` block, e.g.\n\n```julia\n@enum EnumName begin\n value1\n value2\nend\n```\n\n`BaseType`, which defaults to [`Int32`](@ref), must be a primitive subtype of `Integer`.\nMember values can be converted between the enum type and `BaseType`. `read` and `write`\nperform these conversions automatically.\n\nTo list all the instances of an enum use `instances`, e.g.\n\n```jldoctest fruitenum\njulia> instances(Fruit)\n(apple, orange, kiwi)\n```\n"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.Experimental.@aliasscope":[{"Tuple{Any}":" @aliasscope expr\n\nAllows the compiler to assume that all `Const`s are not being modified through stores\nwithin this scope, even if the compiler can't prove this to be the case.\n\n!!! warning\n Experimental API. Subject to change without deprecation.\n"}],"Base.Experimental.Const":[{"Union{}":" Const(A::Array)\n\nMark an Array as constant/read-only. The invariant guaranteed is that you will not\nmodify an Array (through another reference) within an `@aliasscope` scope.\n\n!!! warning\n Experimental API. Subject to change without deprecation.\n"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.FastMath.@fastmath":[{"Tuple{Any}":" @fastmath expr\n\nExecute a transformed version of the expression, which calls functions that\nmay violate strict IEEE semantics. This allows the fastest possible operation,\nbut results are undefined -- be careful when doing this, as it may change numerical\nresults.\n\nThis sets the [LLVM Fast-Math flags](http://llvm.org/docs/LangRef.html#fast-math-flags),\nand corresponds to the `-ffast-math` option in clang. See [the notes on performance\nannotations](@ref man-performance-annotations) for more details.\n\n# Examples\n```jldoctest\njulia> @fastmath 1+2\n3\n\njulia> @fastmath(sin(3))\n0.1411200080598672\n```\n"}]} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.GC.gc":[{"Union{Tuple{}, Tuple{Bool}}":" GC.gc([full=true])\n\nPerform garbage collection. The argument `full` determines the kind of\ncollection: A full collection (default) sweeps all objects, which makes the\nnext GC scan much slower, while an incremental collection may only sweep\nso-called young objects.\n\n!!! warning\n Excessive use will likely lead to poor performance.\n"}],"Base.GC.enable":[{"Tuple{Bool}":" GC.enable(on::Bool)\n\nControl whether garbage collection is enabled using a boolean argument (`true` for enabled,\n`false` for disabled). Return previous GC state.\n\n!!! warning\n Disabling garbage collection should be used only with caution, as it can cause memory\n use to grow without bound.\n"}],"Base.GC.@preserve":[{"Tuple":" GC.@preserve x1 x2 ... xn expr\n\nTemporarily protect the given objects from being garbage collected, even if they would\notherwise be unreferenced.\n\nThe last argument is the expression during which the object(s) will be preserved.\nThe previous arguments are the objects to preserve.\n"}],"Base.GC.safepoint":[{"Tuple{}":" GC.safepoint()\n\nInserts a point in the program where garbage collection may run.\nThis can be useful in rare cases in multi-threaded programs where some threads\nare allocating memory (and hence may need to run GC) but other threads are doing\nonly simple operations (no allocation, task switches, or I/O).\nCalling this function periodically in non-allocating threads allows garbage\ncollection to run.\n\n!!! compat \"Julia 1.4\"\n This function is available as of Julia 1.4.\n"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Base.Grisu.print_shortest":[{"Tuple{IO,AbstractFloat,Bool}":" print_shortest(io::IO, x)\n\nPrint the shortest possible representation, with the minimum number of consecutive non-zero\ndigits, of number `x`, ensuring that it would parse to the exact same number.\n"}],"Base.Grisu.grisu":[{"Union{Tuple{AbstractFloat,Any,Any}, Tuple{AbstractFloat,Any,Any,Any}, Tuple{AbstractFloat,Any,Any,Any,Any}}":" (len, point, neg) = Grisu.grisu(v::AbstractFloat, mode, requested_digits, [buffer], [bignums])\n\nConvert the number `v` to decimal using the Grisu algorithm.\n\n`mode` can be one of:\n - `Grisu.SHORTEST`: convert to the shortest decimal representation which can be \"round-tripped\" back to `v`.\n - `Grisu.FIXED`: round to `requested_digits` digits.\n - `Grisu.PRECISION`: round to `requested_digits` significant digits.\n\nThe characters are written as bytes to `buffer`, with a terminating NUL byte, and `bignums` are used internally as part of the correction step. You can call `Grisu.getbuf()` to obtain a suitable task-local buffer.\n\nThe returned tuple contains:\n\n - `len`: the number of digits written to `buffer` (excluding NUL)\n - `point`: the location of the radix point relative to the start of the array (e.g. if\n `point == 3`, then the radix point should be inserted between the 3rd and 4th\n digit). Note that this can be negative (for very small values), or greater than `len`\n (for very large values).\n - `neg`: the signbit of `v` (see [`signbit`](@ref)).\n"}]} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是为了在PR中触发docstrings的替换,并在Gitlab Pages中预览,实际上,commit Manifest.toml是非必要的。