InterfaceFunctions
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: kunzaatko
- License: mit
- Language: Julia
- Default Branch: trunk
- Size: 1.61 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 6
Metadata Files
README.md
InterfaceFunctions
InterfaceFunctions.jl provides a robust and flexible (although light and very simple) way to define and manage function interfaces of abstract types in Julia, supporting both obligatory (necessary to implement by the concrete type creator) and optional (ones that provide a default implementation) interfaces with clear error handling and debug logging.
Installation
To install InterfaceFunctions.jl, open the Julia REPL and run:
julia
using Pkg
Pkg.add("InterfaceFunctions")
Quick Start
There is only a single macro that this package publicly provides: @interface.
Defining interfaces can be simply done by preceding a function (optional interface) or a call (obligatory interface)
by the @interface macro:
```julia using InterfaceFunctions
abstract type AbstractType end
@interface required_function(x::AbstractType)
struct ConcreteType <: AbstractType end
This will throw an UnimplementedInterface error
try required_function(ConcreteType()) catch e println(e) end
Implement the interface
requiredfunction(x::ConcreteType) = "Hello from ConcreteType!" println(requiredfunction(ConcreteType())) # Prints "Hello from ConcreteType!"
@interface optionalfunction(x::AbstractType) = "Hello from AbstractType!" println(optionalfunction(ConcreteType())) # Prints "Hello from AbstractType!" ```
Documentation
For more detailed information, examples, and API reference, please refer to the stable documentation or the development documentation.
Contributing
All contributions are welcome. For instructions on how to contribute in the correct manner, read the Julia ColPrac collaboration practices guidelines or create a PR and let the maintainers help you out.
Citing
See CITATION.bib for the relevant reference(s).
Owner
- Name: Martin Kunz
- Login: kunzaatko
- Kind: user
- Location: Prague
- Repositories: 2
- Profile: https://github.com/kunzaatko
Citation (CITATION.bib)
@misc{InterfaceFunctions.jl,
author = {Martin Kunz <martinkunz@email.cz> and contributors},
title = {InterfaceFunctions.jl},
url = {https://github.com/kunzaatko/InterfaceFunctions.jl},
version = {v1.0.0-DEV},
year = {2025},
month = {6}
}
GitHub Events
Total
- Create event: 6
- Commit comment event: 7
- Issues event: 2
- Release event: 4
- Delete event: 2
- Issue comment event: 2
- Push event: 42
- Pull request event: 2
Last Year
- Create event: 6
- Commit comment event: 7
- Issues event: 2
- Release event: 4
- Delete event: 2
- Issue comment event: 2
- Push event: 42
- Pull request event: 2
Packages
- Total packages: 1
-
Total downloads:
- julia 2 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
juliahub.com: InterfaceFunctions
- Documentation: https://docs.juliahub.com/General/InterfaceFunctions/stable/
- License: MIT
-
Latest release: 0.2.4
published 7 months ago
Rankings
Dependencies
- actions/checkout v4 composite
- julia-actions/cache v2 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/julia-uploadcoveralls v1 composite
- julia-actions/setup-julia v2 composite
- julia-actions/RegisterAction latest composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v4 composite
- orhun/git-cliff-action main composite
- svenstaro/upload-release-action v2 composite