Skip to content

Commit

Permalink
Add docstrings to exported modules (#23990)
Browse files Browse the repository at this point in the history
* Add docstrings to exported modules

* Add docstrings to stdlib modules

* fix docstring of Base

* fix some module docstrings

* fix
  • Loading branch information
jw3126 authored and fredrikekre committed Oct 8, 2017
1 parent d377713 commit 19b3ca7
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 4 deletions.
3 changes: 3 additions & 0 deletions base/distributed/Distributed.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Tools for distributed parallel processing.
"""
module Distributed

# imports for extension
Expand Down
5 changes: 5 additions & 0 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1496,4 +1496,9 @@ See the manual section on [Tuple Types](@ref).
"""
Tuple

"""
The base library of Julia.
"""
kw"Base"

end
3 changes: 3 additions & 0 deletions base/iterators.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Methods for working with Iterators.
"""
module Iterators

import Base: start, done, next, isempty, length, size, eltype, iteratorsize, iteratoreltype, indices, ndims, pairs
Expand Down
3 changes: 3 additions & 0 deletions base/libc.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module Libc
@doc """
Interface to libc, the C standard library.
""" -> Libc

import Base: transcode

Expand Down
3 changes: 3 additions & 0 deletions base/libdl.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module Libdl
@doc """
Interface to libdl. Provides dynamic linking support.
""" -> Libdl

export DL_LOAD_PATH, RTLD_DEEPBIND, RTLD_FIRST, RTLD_GLOBAL, RTLD_LAZY, RTLD_LOCAL,
RTLD_NODELETE, RTLD_NOLOAD, RTLD_NOW, dlclose, dlopen, dlopen_e, dlsym, dlsym_e,
Expand Down
3 changes: 3 additions & 0 deletions base/libgit2/libgit2.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Interface to [libgit2](https://libgit2.github.com/).
"""
module LibGit2

import Base: merge!, ==
Expand Down
3 changes: 3 additions & 0 deletions base/linalg/blas.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module BLAS
@doc """
Interface to BLAS subroutines.
""" -> BLAS

import ..axpy!, ..axpby!
import Base: copy!
Expand Down
4 changes: 3 additions & 1 deletion base/linalg/lapack.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

## The LAPACK module of interfaces to LAPACK subroutines
module LAPACK
@doc """
Interfaces to LAPACK subroutines.
""" -> LAPACK

const liblapack = Base.liblapack_name

Expand Down
5 changes: 5 additions & 0 deletions base/linalg/linalg.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Linear algebra module. Provides array arithmetic,
matrix factorizations and other linear algebra related
functionality.
"""
module LinAlg

import Base: \, /, *, ^, +, -, ==
Expand Down
3 changes: 3 additions & 0 deletions base/markdown/Markdown.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Tools for working with the Markdown file format. Mainly for documentation.
"""
module Markdown

import Base: show, ==
Expand Down
6 changes: 3 additions & 3 deletions base/meta.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Convenience functions for metaprogramming.
"""
module Meta
#
# convenience functions for metaprogramming
#

export quot,
isexpr,
Expand Down
3 changes: 3 additions & 0 deletions base/profile.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Profiling support, main entry point is the [`@profile`](@ref) macro.
"""
module Profile

import Base.StackTraces: lookup, UNKNOWN, show_spec_linfo
Expand Down
5 changes: 5 additions & 0 deletions base/serialize.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Provide serialization of Julia code via the functions
* [`serialize`](@ref)
* [`deserialize`](@ref)
"""
module Serializer

import Base: GMP, Bottom, unsafe_convert, uncompressed_ast
Expand Down
3 changes: 3 additions & 0 deletions base/sparse/sparse.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Support for sparse arrays. Provides `AbstractSparseArray` and subtypes.
"""
module SparseArrays

using Base: ReshapedArray, promote_op, setindex_shape_check, to_shape, tail
Expand Down
3 changes: 3 additions & 0 deletions base/stacktraces.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Tools for collecting and manipulating stack traces. Mainly used for building errors.
"""
module StackTraces


Expand Down
3 changes: 3 additions & 0 deletions base/sysinfo.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

module Sys
@doc """
Provide methods for retrieving information about hardware and the operating system.
""" -> Sys

export CPU_CORES,
WORD_SIZE,
Expand Down
3 changes: 3 additions & 0 deletions base/threads.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Experimental multithreading support.
"""
module Threads

include("threadingconstructs.jl")
Expand Down
23 changes: 23 additions & 0 deletions doc/src/stdlib/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,29 @@ primitive type
;
```

## Base Modules
```@docs
Base.BLAS
Base.Dates
Base.Distributed
Base.Docs
Base.Iterators
Base.LAPACK
Base.LibGit2
Base.Libc
Base.Libdl
Base.LinAlg
Base.Markdown
Base.Meta
Base.Pkg
Base.Profile
Base.Serializer
Base.SparseArrays
Base.StackTraces
Base.Sys
Base.Threads
```

## All Objects

```@docs
Expand Down
4 changes: 4 additions & 0 deletions stdlib/DelimitedFiles/src/DelimitedFiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

__precompile__(true)

"""
Utilities for reading and writing delimited files, for example ".csv".
See [`readdlm`](@ref) and [`writedlm`](@ref).
"""
module DelimitedFiles

using Mmap
Expand Down
3 changes: 3 additions & 0 deletions stdlib/Mmap/src/Mmap.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Low level module for mmap (memory mapping of files).
"""
module Mmap

const PAGESIZE = Int(Sys.isunix() ? ccall(:jl_getpagesize, Clong, ()) : ccall(:jl_getallocationgranularity, Clong, ()))
Expand Down
3 changes: 3 additions & 0 deletions stdlib/SharedArrays/src/SharedArrays.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
Provide the [`SharedArray`](@ref) type. It represents an array, which is shared across multiple processes, on a single machine.
"""
module SharedArrays

using Mmap, Base.Distributed
Expand Down

0 comments on commit 19b3ca7

Please sign in to comment.