This repository contains deprecated utility packages for Turing.jl.
These packages have either:
- Been upstreamed into Turing.jl,
- Been superseded by new features in Turing.jl itself,
- Or replaced by other packages in the Julia ecosystem.
Package | Status | Documentation |
---|---|---|
AdvancedPS.jl |
⬜ Planned | (pending) |
TuringBenchmarking.jl |
✅ Merged | Documentation |
TuringCallbacks.jl |
⬜ Planned | (pending) |
ParetoSmooth.jl |
⬜ Planned | (pending) |
In addition, we would like to deprecate DistributionsAD.jl
when Mooncake
/ Enzyme
replaces ReverseDiff
and ForwardDiff
.
The following steps describe how to migrate a standalone package into this repository while preserving its full Git history, using git subtree
.
git clone https://github.com/TuringLang/deprecated.git
cd deprecated
You can always create a feature branch for each imported package.
git checkout -b migrate-<package-name>
Example:
git checkout -b migrate-advancedps
git remote add <remote-name> <url-to-original-repo>
git fetch <remote-name>
Example:
git remote add advancedps https://github.com/TuringLang/AdvancedPS.jl.git
git fetch advancedps
Import the package under a subfolder while preserving history.
git subtree add --prefix=<target-folder-name> <remote-name>/<branch-name>
Example:
git subtree add --prefix=AdvancedPS advancedps/main
This will automatically create a new commit, preserving the full commit history within the subfolder.
Before opening a Pull Request, verify that all registered versions of the package are present locally. In Julia REPL, run:
using RegistryInstances, UUIDs, Git
const GENERAL_UUID = UUID("23338594-aafe-5451-b93e-139f81909106")
pretty_print_row(row) = println(row.pkg_name, ": v", row.version, " ", row.found ? "found" : "is missing")
pretty_print_table(table) = foreach(pretty_print_row, table)
function check_all_found(table)
idx = findfirst(row -> !row.found, table)
idx === nothing && return nothing
row = table[idx]
error(string("Repository missing v", row.version, " of package $(row.pkg_name)"))
end
function check_packages_versions(pkg_names, repo_url; registry_uuid=GENERAL_UUID, verbose=true, throw=true)
if isdir(repo_url)
dir = repo_url
else
dir = mktempdir()
run(`$(git()) clone $(repo_url) $dir`)
end
registry = only(filter!(r -> r.uuid == registry_uuid, reachable_registries()))
table = @NamedTuple{pkg_name::String, version::VersionNumber, found::Bool, tree_sha::Base.SHA1}[]
for pkg_name in pkg_names
pkg = registry.pkgs[only(uuids_from_name(registry, pkg_name))]
versions = registry_info(pkg).version_info
for version in sort(collect(keys(versions)))
tree_sha = versions[version].git_tree_sha1
found = success(`$(git()) -C $dir rev-parse -q --verify "$(tree_sha)^{tree}"`)
push!(table, (; pkg_name, version, found, tree_sha))
end
end
verbose && pretty_print_table(table)
throw && check_all_found(table)
return table
end
check_package_versions(pkg_name, repo_url; kw...) = check_packages_versions([pkg_name], repo_url; kw...)
Reference: JuliaRegistries/General Contributing Guide
Then check if all registered versions exist:
julia> check_package_versions("AdvancedPS", ".")
git push origin migrate-<package-name>
Example:
git push origin migrate-advancedps
- Open a Pull Request from your feature branch (e.g.,
migrate-advancedps
) into themain
branch. - Get it reviewed and merged.
Once the PR is merged, add all versioned docs from the gh-pages branch of the original repository to the gh-pages branch of this repository in the package folder.
git fetch origin
git checkout gh-pages
git pull origin gh-pages
Make sure that your Git is configured to allow symlinks:
git config core.symlinks true
(This should be set before cloning, but good to double-check.) Otherwise, symlinks will be cloned as plain text files.
mkdir temp-gh-pages
cd temp-gh-pages
# Clone only the gh-pages branch of the original repo
git clone --branch gh-pages --single-branch --depth 1 <original-repo-url> .
Make sure to add these files and folders to the correct location:
- All v* folders should be added to the root of the package folder.
- versions.js should be replaced with versions.js from the original repository.
- All symlinks should be added to the root of the package folder. Ensure that your Git has symlinks enabled.
Finally, delete the temporary folder, add, commit the changes and push to the gh-pages branch of the deprecated repository:
git add -A
git commit -m "Add versioned docs for AdvancedPS"
git push origin gh-pages
git subtree add
automatically creates a commit.- Tags from the original repository are not automatically transferred.
If needed, important tags should be manually recreated after migration. - Please avoid pushing directly to
main
. Always work via a feature branch and a Pull Request.