Skip to content

Commit

Permalink
Vendorize version of Parameters.jl with @kw_only
Browse files Browse the repository at this point in the history
  • Loading branch information
frankier committed Sep 14, 2022
1 parent 4a86ceb commit 4d1e1ad
Show file tree
Hide file tree
Showing 6 changed files with 750 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
MonteCarloIntegration = "4886b29c-78c9-11e9-0a6e-41e1f4161f7b"
NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand All @@ -39,6 +39,7 @@ StatFiles = "1463e38c-9381-5320-bcd4-4134955f093a"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
ArgParse = "1"
Expand All @@ -57,7 +58,6 @@ MacroTools = "0.5"
Measurements = "2"
NLSolversBase = "7"
Optim = "1"
Parameters = "0.12"
QuadGK = "2.5.0"
Reexport = "1"
Requires = "1"
Expand Down
4 changes: 2 additions & 2 deletions src/CatConfig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module CatConfig

export CatRules, CatLoopConfig

using Parameters
using ComputerAdaptiveTesting.Parameters

using ..Aggregators: AbilityEstimator, AbilityTracker, NullAbilityTracker
using ..NextItemRules: NextItemRule
Expand All @@ -21,7 +21,7 @@ needed to actually run the CAT.
This may be more a more convenient layer to integrate than CatLoopConfig if you
want to write your own CAT loop rather than using hooks.
"""
@with_kw struct CatRules <: CatConfigBase
@kw_only struct CatRules <: CatConfigBase
"""
The rule to choose the next item in the CAT given the current state.
"""
Expand Down
3 changes: 3 additions & 0 deletions src/ComputerAdaptiveTesting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export ExtraDistributions, IntegralCoeffs, Integrators, Interpolators, Optimizer
export ConfigBase, Responses, ItemBanks, Aggregators, NextItemRules, TerminationConditions
export CatConfig, Sim, DummyData

# Vendored dependencies
include("./vendor/Parameters.jl")

# Config base
include("./ConfigBase.jl")

Expand Down
2 changes: 1 addition & 1 deletion src/maths/Optimizers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export
using ..ConfigBase

using Optim
using Parameters
using ComputerAdaptiveTesting.Parameters

abstract type Optimizer end
function Optimizer(bits...)
Expand Down
2 changes: 1 addition & 1 deletion src/next_item_rules/NextItemRules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Springer, New York, NY.
module NextItemRules

using Reexport
using Parameters
using ComputerAdaptiveTesting.Parameters
using LinearAlgebra

using ..Responses: Response
Expand Down
Loading

0 comments on commit 4d1e1ad

Please sign in to comment.