Skip to content

Commit

Permalink
Remove unused bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Oct 10, 2024
1 parent d2b078b commit 710d0e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/Sunny.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export Crystal, subcrystal, standardize, lattice_vectors, lattice_params, primit
reference_bonds, print_site, print_bond, print_symmetry_table, print_suggested_frame

include("Units.jl")
export Units
export Units, meV_per_K

include("FormFactor.jl")
export FormFactor
Expand Down Expand Up @@ -131,9 +131,9 @@ include("Binning/ExperimentData.jl")
export BinningParameters, load_nxs

include("deprecated.jl")
export set_external_field!, set_external_field_at!, meV_per_K,
dynamic_correlations, instant_correlations, intensity_formula, reciprocal_space_path,
delta_function_kernel, set_spiral_order_on_sublattice!, set_spiral_order!
export set_external_field!, set_external_field_at!, dynamic_correlations,
instant_correlations, intensity_formula, reciprocal_space_path,
set_spiral_order_on_sublattice!, set_spiral_order!

isloaded(pkg::String) = any(k -> k.name == pkg, keys(Base.loaded_modules))

Expand Down
4 changes: 4 additions & 0 deletions src/Units.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ function Base.getproperty(u::Units, name::Symbol)

error("Unknown unit :$name")
end


# Historically provided
const meV_per_K = Units(:meV, :angstrom).K
9 changes: 0 additions & 9 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ Base.@deprecate spin_matrices(; N::Int) let
spin_matrices((N-1)/2)
end

Base.@deprecate_binding large_S_spin_operators spin_matrices(Inf)
Base.@deprecate_binding large_S_stevens_operators stevens_matrices(Inf)

Base.@deprecate spin_operators(sys::System, i::Int) let
@warn "`spin_operators` is deprecated! Use `spin_matrices(spin_label(sys, i))` instead."
spin_matrices(spin_label(sys, i))
Expand Down Expand Up @@ -64,10 +61,6 @@ Base.@deprecate rotation_in_rlu(cryst::Crystal, axis, angle) let
return rotation_in_rlu(cryst, (axis, angle))
end

# Consider `units.K` where `units = Units(:meV, :angstrom)`.
Base.@deprecate_binding meV_per_K Units(:meV, :angstrom).K


function Base.getproperty(x::Type{Units}, name::Symbol)
if name in (:theory, :meV)
@warn "Units.$name is deprecated! See `Units` docs for new interface."
Expand Down Expand Up @@ -110,8 +103,6 @@ Base.@deprecate SpinInfo(i; S, g) let
i => Moment(; s=S, g)
end

Base.@deprecate_binding delta_function_kernel nothing


# REMEMBER TO ALSO DELETE:
#
Expand Down

0 comments on commit 710d0e5

Please sign in to comment.