-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from Chemellia/at/docs
At/docs
- Loading branch information
Showing
7 changed files
with
99 additions
and
9 deletions.
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
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,5 @@ | ||
# Codecs | ||
|
||
```@docs | ||
Codec.OneHotOneCold | ||
``` |
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
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,32 @@ | ||
using Test | ||
using ChemistryFeaturization.AbstractType: AbstractFeaturization, AbstractFeatureDescriptor | ||
|
||
@testset "Modules and Abstract methods" begin | ||
@testset "top-level module" begin | ||
# testing on `nothing` as example of ::Any | ||
@test_throws MethodError encodable_elements(nothing) | ||
@test_throws MethodError decode(nothing, nothing) | ||
end | ||
|
||
@testset "featurizations module" begin | ||
struct FakeFeaturization <: AbstractFeaturization end | ||
ff = FakeFeaturization() | ||
|
||
F2_atom = AtomGraph(Float32.([0 1; 1 0]), ["F", "F"]) | ||
|
||
@test_throws MethodError encodable_elements(ff) | ||
@test_throws MethodError featurize!(F2_atom, ff) | ||
@test_throws MethodError decode(ff, nothing) | ||
end | ||
|
||
# @testset "atoms module" begin | ||
# TBD cleanest way to test generic decode(::AbstractAtoms) - either another "fake" class, or maybe the `invoke` function | ||
# end | ||
|
||
@testset "features module" begin | ||
struct FakeFD <: AbstractFeatureDescriptor end | ||
fd = FakeFD() | ||
@test_throws MethodError encodable_elements(fd) | ||
@test_throws MethodError decode(fd, nothing) | ||
end | ||
end |
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