From 36fafb466a6ad3408fc71587afdafb57a9e06063 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 29 Feb 2024 07:24:48 +0000 Subject: [PATCH] build based on fc1acbe --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/license/index.html | 2 +- dev/reference/index.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 98acec7..ff58d0e 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-02-28T18:13:55","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-02-29T07:24:43","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index e2a86c4..0c224e3 100644 --- a/dev/index.html +++ b/dev/index.html @@ -43,4 +43,4 @@ preference = @load_preference("preference", "default") else preference = "default" -end

Note that these cannot be merged into a single @static if. Loading the package with using Preferences must be done on its own.

Authors

This repository was initiated by Elliot Saba (@staticfloat) and continues to be maintained by him and other contributors.

License and contributing

Preferences.jl is licensed under the MIT license (see License). Contributions by volunteers are welcome!

+end

Note that these cannot be merged into a single @static if. Loading the package with using Preferences must be done on its own.

Authors

This repository was initiated by Elliot Saba (@staticfloat) and continues to be maintained by him and other contributors.

License and contributing

Preferences.jl is licensed under the MIT license (see License). Contributions by volunteers are welcome!

diff --git a/dev/license/index.html b/dev/license/index.html index 9ebf5e0..8682d70 100644 --- a/dev/license/index.html +++ b/dev/license/index.html @@ -1,2 +1,2 @@ -License · Preferences.jl

License

The Preferences.jl package is licensed under the MIT "Expat" License:

Copyright (c) 2020: Elliot Saba and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+License · Preferences.jl

License

The Preferences.jl package is licensed under the MIT "Expat" License:

Copyright (c) 2020: Elliot Saba and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/dev/reference/index.html b/dev/reference/index.html index 43ffb45..643d7e3 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,4 +1,4 @@ -Reference · Preferences.jl

Reference

Preferences.delete_preferences!Method
delete_preferences!(uuid_or_module, prefs::String...; block_inheritance::Bool = false, export_prefs=false, force=false)

Deletes a series of preferences for the given UUID/Module, identified by the keys passed in as prefs.

See the docstring for set_preferences!for more details.

source
Preferences.has_preferenceMethod
has_preference(uuid_or_module, key)

Return true if the particular preference is found, and false otherwise.

See the has_preference docstring for more details.

source
Preferences.load_preferenceFunction
load_preference(uuid_or_module, key, default = nothing)

Load a particular preference from the Preferences.toml file, shallowly merging keys as it walks the hierarchy of load paths, loading preferences from all environments that list the given UUID as a direct dependency.

Most users should use the @load_preference convenience macro which auto-determines the calling Module.

source
Preferences.set_preferences!Method
set_preferences!(uuid_or_module, prefs::Pair{String,Any}...; export_prefs=false,
+Reference · Preferences.jl

Reference

Preferences.delete_preferences!Method
delete_preferences!(uuid_or_module, prefs::String...; block_inheritance::Bool = false, export_prefs=false, force=false)

Deletes a series of preferences for the given UUID/Module, identified by the keys passed in as prefs.

See the docstring for set_preferences!for more details.

source
Preferences.has_preferenceMethod
has_preference(uuid_or_module, key)

Return true if the particular preference is found, and false otherwise.

See the has_preference docstring for more details.

source
Preferences.load_preferenceFunction
load_preference(uuid_or_module, key, default = nothing)

Load a particular preference from the Preferences.toml file, shallowly merging keys as it walks the hierarchy of load paths, loading preferences from all environments that list the given UUID as a direct dependency.

Most users should use the @load_preference convenience macro which auto-determines the calling Module.

source
Preferences.set_preferences!Method
set_preferences!(uuid_or_module, prefs::Pair{String,Any}...; export_prefs=false,
                  active_project_only=true, force=false)

Sets a series of preferences for the given UUID/Module, identified by the pairs passed in as prefs. Preferences are loaded from Project.toml and LocalPreferences.toml files on the load path, merging values together into a cohesive view, with preferences taking precedence in LOAD_PATH order, just as package resolution does. Preferences stored in Project.toml files are considered "exported", as they are easily shared across package installs, whereas the LocalPreferences.toml file is meant to represent local preferences that are not typically shared. LocalPreferences.toml settings override Project.toml settings where appropriate.

After running set_preferences!(uuid, "key" => value), a future invocation of load_preference(uuid, "key") will generally result in value, with the exception of the merging performed by load_preference() due to inheritance of preferences from elements higher up in the load_path(). To control this inheritance, there are two special values that can be passed to set_preferences!(): nothing and missing.

  • Passing missing as the value causes all mappings of the associated key to be removed from the current level of LocalPreferences.toml settings, allowing preferences set higher in the chain of preferences to pass through. Use this value when you want to clear your settings but still inherit any higher settings for this key.

  • Passing nothing as the value causes all mappings of the associated key to be removed from the current level of LocalPreferences.toml settings and blocks preferences set higher in the chain of preferences from passing through. Internally, this adds the preference key to a __clear__ list in the LocalPreferences.toml file, that will prevent any preferences from leaking through from higher environments.

Note that the behaviors of missing and nothing are both similar (they both clear the current settings) and diametrically opposed (one allows inheritance of preferences, the other does not). They can also be composed with a normal set_preferences!() call:

@set_preferences!("compiler_options" => nothing)
-@set_preferences!("compiler_options" => Dict("CXXFLAGS" => "-g", LDFLAGS => "-ljulia"))

The above snippet first clears the "compiler_options" key of any inheriting influence, then sets a preference option, which guarantees that future loading of that preference will be exactly what was saved here. If we wanted to re-enable inheritance from higher up in the chain, we could do the same but passing missing first.

The export_prefs option determines whether the preferences being set should be stored within LocalPreferences.toml or Project.toml.

The active_project_only flag ensures that the preference is set within the currently active project (as determined by Base.active_project()), and if the target package is not listed as a dependency, it is added under the extras section. Without this flag set, if the target package is not found in the active project, set_preferences!() will search up the load path for an environment that does contain that module, setting the preference in the first one it finds. If none are found, it falls back to setting the preference in the active project and adding it as an extra dependency.

source
Preferences.@delete_preferences!Macro
@delete_preferences!(prefs...)

Convenience macro to call delete_preferences!() for the current package. Defaults to setting force=true, since a package should have full control over itself, but not so for deleting the preferences in other packages, pending private dependencies.

source
Preferences.@set_preferences!Macro
@set_preferences!(prefs...)

Convenience macro to call set_preferences!() for the current package. Defaults to setting force=true, since a package should have full control over itself, but not so for setting the preferences in other packages, pending private dependencies.

source
+@set_preferences!("compiler_options" => Dict("CXXFLAGS" => "-g", LDFLAGS => "-ljulia"))

The above snippet first clears the "compiler_options" key of any inheriting influence, then sets a preference option, which guarantees that future loading of that preference will be exactly what was saved here. If we wanted to re-enable inheritance from higher up in the chain, we could do the same but passing missing first.

The export_prefs option determines whether the preferences being set should be stored within LocalPreferences.toml or Project.toml.

The active_project_only flag ensures that the preference is set within the currently active project (as determined by Base.active_project()), and if the target package is not listed as a dependency, it is added under the extras section. Without this flag set, if the target package is not found in the active project, set_preferences!() will search up the load path for an environment that does contain that module, setting the preference in the first one it finds. If none are found, it falls back to setting the preference in the active project and adding it as an extra dependency.

source
Preferences.@delete_preferences!Macro
@delete_preferences!(prefs...)

Convenience macro to call delete_preferences!() for the current package. Defaults to setting force=true, since a package should have full control over itself, but not so for deleting the preferences in other packages, pending private dependencies.

source
Preferences.@set_preferences!Macro
@set_preferences!(prefs...)

Convenience macro to call set_preferences!() for the current package. Defaults to setting force=true, since a package should have full control over itself, but not so for setting the preferences in other packages, pending private dependencies.

source