https://github.com/baggepinnen/automaticdocstrings.jl
Automatically generated docstring stubs
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Automatically generated docstring stubs
Basic Info
- Host: GitHub
- Owner: baggepinnen
- License: mit
- Language: Julia
- Default Branch: master
- Size: 40 KB
Statistics
- Stars: 29
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 8
Topics
Metadata Files
README.md
AutomaticDocstrings
This small package automatically generates docstring stubs for you to fill in.
Install using import Pkg; Pkg.add("AutomaticDocstrings")
Usage
Place the macro call @autodoc above the function or struct definition that you want to generate a docstring for:
```julia
using AutomaticDocstrings
@autodoc
function f(x::A, b=5; c=LinRange(1,2,10)) where A
5
end
When you execute the macro, e.g. by ctrl-enter in Juno, the macro is replaced by a docstring
julia
"""
f(x::A, b=5; c=LinRange(1,2,10))
DOCSTRING
Arguments:
x: DESCRIPTIONb: DESCRIPTIONc: DESCRIPTION """ function f(x::A, b=5; c=LinRange(1,2,10)) where A 5 endBefore modifying your file, a backup is saved.julia-repl [ Info: Saved a backup to /tmp/jl_VQvgbW/backup ``` If you don't like the docstring or if something went wrong, ctrl-z (undo) works fine as well.
Limitations
- If a file with multiple
@autodocareincludeed, then only the first will be executed and then an error is thrown. Instead ofinclude(file)callautodoc(file). - Make sure the file is saved before you try to generate any docstrings.
VS code snippet
Adding the following snippet to vscode makes it easy to insert an automatically generated docstring, just make sure to save the file before executing the @autodoc macro.
json
"autodoc": {
"prefix": "autodoc",
"body": ["${1:@eval Main using AutomaticDocstrings}$2\n@eval Main @autodoc"],
},
Options
You may modify the AutomaticDocstrings.options::Dict to change some default values:
- :min_args = 3: Minimum number of arguments to print the argument list of function
- :args_header = "# Arguments:": Printed above the argument list of function
- :kwargs_header = nothing: Printed above the keyword argument list of function
- :struct_fields_header = "# Fields:": Printed above the fields list of a struct
- :arg_types_in_desc = false: Include the argument types in the description
- :defaults_in_desc = false: Include the default values in the description
- :arg_types_in_header = false: Include the argument types in the function header
- :defaults_in_header = false: Include the default values in the function header
You can always call restore_defaults() to restore the default options.
Owner
- Name: Fredrik Bagge Carlson
- Login: baggepinnen
- Kind: user
- Location: Lund, Sweden
- Website: baggepinnen.github.io
- Twitter: baggepinnen
- Repositories: 59
- Profile: https://github.com/baggepinnen
Control systems, system identification, signal processing and machine learning
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 34
- Total Committers: 4
- Avg Commits per committer: 8.5
- Development Distribution Score (DDS): 0.5
Top Committers
| Name | Commits | |
|---|---|---|
| Fredrik Bagge Carlson | c****b@u****g | 17 |
| Fredrik Bagge Carlson | b****n@g****m | 14 |
| Valentin Kaisermayer | 5****r@u****m | 2 |
| Julia TagBot | 5****t@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 9
- Total pull requests: 7
- Average time to close issues: 12 days
- Average time to close pull requests: 5 months
- Total issue authors: 7
- Total pull request authors: 4
- Average comments per issue: 4.11
- Average comments per pull request: 1.86
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ValentinKaisermayer (2)
- baggepinnen (2)
- ueliwechsler (1)
- rphillips31 (1)
- GerhardTotschnig (1)
- IljaK91 (1)
- JuliaTagBot (1)
Pull Request Authors
- github-actions[bot] (2)
- ValentinKaisermayer (2)
- baggepinnen (2)
- JuliaTagBot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 10 total
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 8
juliahub.com: AutomaticDocstrings
Automatically generated docstring stubs
- Documentation: https://docs.juliahub.com/General/AutomaticDocstrings/stable/
- License: MIT
-
Latest release: 1.0.5
published over 3 years ago
Rankings
Dependencies
- julia-actions/setup-julia latest composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite