From 710d0e53c0316b8b45cfe5c0de7d2e1692d602c0 Mon Sep 17 00:00:00 2001 From: Kipton Barros Date: Thu, 10 Oct 2024 10:02:42 -0600 Subject: [PATCH] Remove unused bindings --- src/Sunny.jl | 8 ++++---- src/Units.jl | 4 ++++ src/deprecated.jl | 9 --------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Sunny.jl b/src/Sunny.jl index e6e86c899..be29d828f 100644 --- a/src/Sunny.jl +++ b/src/Sunny.jl @@ -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 @@ -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)) diff --git a/src/Units.jl b/src/Units.jl index b229c5aec..228c85ca1 100644 --- a/src/Units.jl +++ b/src/Units.jl @@ -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 diff --git a/src/deprecated.jl b/src/deprecated.jl index aa0617368..3a41c17a0 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -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)) @@ -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." @@ -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: #