Skip to content

Commit

Permalink
Cleanup type annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed May 29, 2024
1 parent 5123a79 commit c7bd5f0
Show file tree
Hide file tree
Showing 38 changed files with 398 additions and 493 deletions.
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-28T21:50:33","documenter_version":"1.4.1"}}
{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-05-29T08:13:16","documenter_version":"1.4.1"}}
4 changes: 2 additions & 2 deletions docs/v0.1.0/chains.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ <h1 id="Chains">
<section>
<div>
<pre>
<code class="language-julia hljs">chain_reader(dafs::AbstractVector{F}; name::Maybe{AbstractString} = nothing)::DafReader where {F &lt;: DafReader}
<code class="language-julia hljs">chain_reader(dafs::AbstractVector{&lt;:DafReader}; name::Maybe{AbstractString} = nothing)::DafReader
</code>
</pre>
<p>Create a read-only chain wrapper of
Expand Down Expand Up @@ -313,7 +313,7 @@ <h1 id="Chains">
<section>
<div>
<pre>
<code class="language-julia hljs">chain_writer(dafs::AbstractVector{F}; name::Maybe{AbstractString} = nothing)::DafWriter where {F &lt;: DafReader}
<code class="language-julia hljs">chain_writer(dafs::AbstractVector{&lt;:DafReader}; name::Maybe{AbstractString} = nothing)::DafWriter
</code>
</pre>
<p>Create a chain wrapper for a chain of
Expand Down
6 changes: 3 additions & 3 deletions docs/v0.1.0/concat.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@ <h1 id="Concat">
<pre>
<code class="language-julia hljs">concatenate!(
destination::DafWriter,
axis::Union{AbstractString, AbstractStringVector},
axis::Union{AbstractString, AbstractVector{&lt;:AbstractString}},
sources::AbstractVector{&lt;:DafReader};
[names::Maybe{AbstractStringVector} = nothing,
[names::Maybe{AbstractVector{&lt;:AbstractString}} = nothing,
dataset_axis::Maybe{AbstractString} = &quot;dataset&quot;,
dataset_property::Bool = true,
prefix::Union{Bool, AbstractVector{Bool}} = false,
prefixed::Maybe{Union{AbstractStringSet, AbstractVector{&lt;:AbstractStringSet}}} = nothing,
prefixed::Maybe{Union{AbstractSet{&lt;:AbstractString}, AbstractVector{&lt;:AbstractSet{&lt;:AbstractString}}}} = nothing,
empty::Maybe{EmptyData} = nothing,
sparse_if_saves_storage_fraction = 0.25,
merge::Maybe{MergeData} = nothing,
Expand Down
16 changes: 8 additions & 8 deletions docs/v0.1.0/copies.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ <h1 id="Copies">
source::DafReader,
name::AbstractString,
[rename::Maybe{AbstractString} = nothing,
dtype::Maybe{Type{T}} = nothing,
dtype::Maybe{Type{&lt;:StorageScalarBase}} = nothing,
default::Union{StorageScalar, Nothing, UndefInitializer} = undef,
overwrite::Bool = false]
)::Nothing where {T &lt;: StorageScalarBase}
)::Nothing
</code>
</pre>
<p>Copy a scalar with some
Expand Down Expand Up @@ -392,11 +392,11 @@ <h1 id="Copies">
name::AbstractString,
[reaxis::Maybe{AbstractString} = nothing,
rename::Maybe{AbstractString} = nothing,
dtype::Maybe{Type{T}} = nothing,
dtype::Maybe{Type{&lt;:StorageScalarBase}} = nothing,
default::Union{StorageScalar, StorageVector, Nothing, UndefInitializer} = undef,
empty::Maybe{StorageScalar} = nothing,
overwrite::Bool = false]
)::Nothing where {T &lt;: StorageScalarBase}
)::Nothing
</code>
</pre>
<p>Copy a vector from some
Expand Down Expand Up @@ -459,12 +459,12 @@ <h1 id="Copies">
[rows_reaxis::Maybe{AbstractString} = nothing,
columns_reaxis::Maybe{AbstractString} = nothing,
rename::Maybe{AbstractString} = nothing,
dtype::Maybe{Type{T}} = nothing,
dtype::Maybe{Type{&lt;:StorageScalarBase}} = nothing,
default::Union{StorageScalar, StorageVector, Nothing, UndefInitializer} = undef,
empty::Maybe{StorageScalar} = nothing,
relayout::Bool = true,
overwrite::Bool = false]
)::Nothing where {T &lt;: StorageScalarBase}
)::Nothing
</code>
</pre>
<p>Copy a matrix from some
Expand Down Expand Up @@ -669,7 +669,7 @@ <h1 id="Copies">
</strong> to say is:
</p>
<pre>
<code class="nohighlight hljs">DataTypes = AbstractDict{DataKey, Type{T}} where {T &lt;: StorageScalarBase}
<code class="nohighlight hljs">DataTypes = AbstractDict{DataKey, Type{&lt;:StorageScalarBase}}}
</code>
</pre>
<p>But what we are
Expand All @@ -683,7 +683,7 @@ <h1 id="Copies">
<p>That&#39;s
<strong>not
</strong> a mistake. Even
<code>DataTypes = AbstractDict{Key, T &lt;: StorageScalarBase} where {Key, T &lt;: StorageScalarBase}
<code>DataTypes = AbstractDict{&lt;:Any, &lt;: StorageScalarBase}
</code> fails to work, as do all the (many) possibilities for expressing &quot;this is a dictionary where the key or the value can be one of several things&quot; Sigh. Glory to anyone who figures out an incantation that would force the system to perform
<strong>any
</strong> meaningful type inference here.
Expand Down
30 changes: 15 additions & 15 deletions docs/v0.1.0/formats.html
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ <h3 id="Scalar-properties">
<section>
<div>
<pre>
<code class="language-julia hljs">format_scalars_set(format::FormatReader)::AbstractStringSet
<code class="language-julia hljs">format_scalars_set(format::FormatReader)::AbstractSet{&lt;:AbstractString}
</code>
</pre>
<p>The names of the scalar properties in
Expand Down Expand Up @@ -807,7 +807,7 @@ <h3 id="Data-axes">
<section>
<div>
<pre>
<code class="language-julia hljs">format_axes_set(format::FormatReader)::AbstractStringSet
<code class="language-julia hljs">format_axes_set(format::FormatReader)::AbstractSet{&lt;:AbstractString}
</code>
</pre>
<p>The names of the axes of
Expand All @@ -833,7 +833,7 @@ <h3 id="Data-axes">
<section>
<div>
<pre>
<code class="language-julia hljs">format_axis_array(format::FormatReader, axis::AbstractString)::AbstractStringVector
<code class="language-julia hljs">format_axis_array(format::FormatReader, axis::AbstractString)::AbstractVector{&lt;:AbstractString}
</code>
</pre>
<p>Implement fetching the unique names of the entries of some
Expand Down Expand Up @@ -939,7 +939,7 @@ <h3 id="Vector-properties">
<section>
<div>
<pre>
<code class="language-julia hljs">format_vectors_set(format::FormatReader, axis::AbstractString)::AbstractStringSet
<code class="language-julia hljs">format_vectors_set(format::FormatReader, axis::AbstractString)::AbstractSet{&lt;:AbstractString}
</code>
</pre>
<p>Implement fetching the names of the vectors for the
Expand Down Expand Up @@ -1069,7 +1069,7 @@ <h3 id="Matrix-properties">
format::FormatReader,
rows_axis::AbstractString,
columns_axis::AbstractString,
)::AbstractStringSet
)::AbstractSet{&lt;:AbstractString}
</code>
</pre>
<p>Implement fetching the names of the matrix properties for the
Expand Down Expand Up @@ -1299,7 +1299,7 @@ <h3 id="Data-axes-2">
<code class="language-julia hljs">format_add_axis!(
format::FormatWriter,
axis::AbstractString,
entries::AbstractStringVector
entries::AbstractVector{&lt;:AbstractString}
)::Nothing
</code>
</pre>
Expand Down Expand Up @@ -1644,7 +1644,7 @@ <h3 id="Creating-properties">
axis::AbstractString,
name::AbstractString,
eltype::Type{T},
)::VectorVector where {T &lt;: StorageNumber}
)::Vector{T} where {T &lt;: StorageNumber}
</code>
</pre>
<p>Implement setting a vector property with some
Expand Down Expand Up @@ -1716,8 +1716,8 @@ <h3 id="Creating-properties">
daf::DafWriter,
axis::AbstractString,
name::AbstractString,
filled_vector::AbstractVector{T},
)::Nothing where {T &lt;: StorageNumber}
filled_vector::AbstractVector{&lt;:StorageNumber},
)::Nothing
</code>
</pre>
<p>Allow the
Expand Down Expand Up @@ -1802,8 +1802,8 @@ <h3 id="Creating-properties">
axis::AbstractString,
name::AbstractString,
extra::Any,
filled::SparseVector{T, I},
)::Nothing where {T &lt;: StorageNumber, I &lt;: StorageInteger}
filled::SparseVector{&lt;:StorageNumber, &lt;:StorageInteger},
)::Nothing
</code>
</pre>
<p>Allow the
Expand Down Expand Up @@ -1896,8 +1896,8 @@ <h3 id="Creating-properties">
rows_axis::AbstractString,
columns_axis::AbstractString,
name::AbstractString,
filled_matrix::AbstractVector{T},
)::Nothing where {T &lt;: StorageNumber}
filled_matrix::AbstractVector{&lt;:StorageNumber},
)::Nothing
</code>
</pre>
<p>Allow the
Expand Down Expand Up @@ -1982,8 +1982,8 @@ <h3 id="Creating-properties">
columns_axis::AbstractString,
name::AbstractString,
extra::Any,
filled::SparseMatrixCSC{T, I},
)::Nothing where {T &lt;: StorageNumber, I &lt;: StorageInteger}
filled::SparseMatrixCSC{&lt;:StorageNumber, &lt;:StorageInteger},
)::Nothing
</code>
</pre>
<p>Allow the
Expand Down
72 changes: 0 additions & 72 deletions docs/v0.1.0/generic_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@
</a>
</li>
<li>
<a class="tocitem" href="#Strings">
<span>Strings
</span>
</a>
</li>
<li>
<a class="tocitem" href="#Index">
<span>Index
</span>
Expand Down Expand Up @@ -365,60 +359,6 @@ <h2 id="Unions">
</div>
</section>
</article>
<h2 id="Strings">
<a class="docs-heading-anchor" href="#Strings">Strings
</a>
<a id="Strings-1">
</a>
<a class="docs-heading-anchor-permalink" href="#Strings" title="Permalink">
</a>
</h2>
<p>We use the following as type annotations for function arguments to be able to accept &quot;any&quot; concrete string collection type.
</p>
<article class="docstring">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.GenericTypes.AbstractStringVector" href="#Daf.GenericTypes.AbstractStringVector">
<code>Daf.GenericTypes.AbstractStringVector
</code>
</a>
<span class="docstring-category">Type
</span>
</header>
<section>
<div>
<pre>
<code class="language-julia hljs">AbstractStringVector = AbstractVector{S} where {S &lt;: AbstractString}
</code>
</pre>
<p>A vector of strings, without commitment to the concrete implementation of either the vector or the strings contained in it.
</p>
</div>
</section>
</article>
<article class="docstring">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.GenericTypes.AbstractStringSet" href="#Daf.GenericTypes.AbstractStringSet">
<code>Daf.GenericTypes.AbstractStringSet
</code>
</a>
<span class="docstring-category">Type
</span>
</header>
<section>
<div>
<pre>
<code class="language-julia hljs">AbstractStringSet = AbstractSet{S} where {S &lt;: AbstractString}
</code>
</pre>
<p>A set of strings, without commitment to the concrete implementation of either the set or the strings contained in it.
</p>
</div>
</section>
</article>
<h2 id="Index">
<a class="docs-heading-anchor" href="#Index">Index
</a>
Expand All @@ -435,18 +375,6 @@ <h2 id="Index">
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.AbstractStringSet">
<code>Daf.GenericTypes.AbstractStringSet
</code>
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.AbstractStringVector">
<code>Daf.GenericTypes.AbstractStringVector
</code>
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.Maybe">
<code>Daf.GenericTypes.Maybe
</code>
Expand Down
12 changes: 0 additions & 12 deletions docs/v0.1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -932,18 +932,6 @@ <h1 id="Index">
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.AbstractStringSet">
<code>Daf.GenericTypes.AbstractStringSet
</code>
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.AbstractStringVector">
<code>Daf.GenericTypes.AbstractStringVector
</code>
</a>
</li>
<li>
<a href="generic_types.html#Daf.GenericTypes.Maybe">
<code>Daf.GenericTypes.Maybe
</code>
Expand Down
Binary file modified docs/v0.1.0/objects.inv
Binary file not shown.
24 changes: 12 additions & 12 deletions docs/v0.1.0/operations.html
Original file line number Diff line number Diff line change
Expand Up @@ -1189,9 +1189,9 @@ <h2 id="Support-functions">
<div>
<pre>
<code class="language-julia hljs">float_dtype_for(
element_type::Type{T},
dtype::Maybe{Type{D}}
)::Type where {T &lt;: StorageNumber, D &lt;: StorageNumber}
element_type::Type{&lt;:StorageNumber},
dtype::Maybe{Type{&lt;:StorageNumber}}
)::Type{&lt;:AbstractFloat}
</code>
</pre>
<p>Given an input
Expand Down Expand Up @@ -1224,9 +1224,9 @@ <h2 id="Support-functions">
<div>
<pre>
<code class="language-julia hljs">int_dtype_for(
element_type::Type{T},
dtype::Maybe{Type{D}}
)::Type where {T &lt;: StorageNumber, D &lt;: StorageNumber}
element_type::Type{&lt;:StorageNumber},
dtype::Maybe{Type{&lt;:StorageNumber}}
)::Type
</code>
</pre>
<p>Given an input
Expand Down Expand Up @@ -1259,9 +1259,9 @@ <h2 id="Support-functions">
<div>
<pre>
<code class="language-julia hljs">unsigned_dtype_for(
element_type::Type{T},
dtype::Maybe{Type{D}}
)::Type where {T &lt;: StorageNumber, D &lt;: StorageNumber}
element_type::Type{&lt;:StorageNumber},
dtype::Maybe{Type{&lt;:StorageNumber}}
)::Type
</code>
</pre>
<p>Given an input
Expand Down Expand Up @@ -1294,9 +1294,9 @@ <h2 id="Support-functions">
<div>
<pre>
<code class="language-julia hljs">sum_dtype_for(
element_type::Type{T},
dtype::Maybe{Type{D}}
)::Type where {T &lt;: StorageNumber, D &lt;: StorageNumber}
element_type::Type{&lt;:StorageNumber},
dtype::Maybe{Type{&lt;:StorageNumber}}
)::Type
</code>
</pre>
<p>Given an input
Expand Down
4 changes: 2 additions & 2 deletions docs/v0.1.0/queries.html
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ <h2 id="Functions">
<code class="language-julia hljs">get_frame(
daf::DafReader,
axis::Union{Query, AbstractString},
[columns::Maybe{Union{AbstractStringVector, QueryColumns}} = nothing;
[columns::Maybe{Union{AbstractVector{&lt;:AbstractString}, QueryColumns}} = nothing;
cache::Bool = true]
)::DataFrame end
</code>
Expand Down Expand Up @@ -2496,7 +2496,7 @@ <h2 id="Query-Operators">
<section>
<div>
<pre>
<code class="language-julia hljs">struct QuerySequence{N} &lt;: Query where {N}
<code class="language-julia hljs">struct QuerySequence{N} &lt;: Query where {N&lt;:Integer}
</code>
</pre>
<p>A sequence of
Expand Down
Loading

0 comments on commit c7bd5f0

Please sign in to comment.