{"id":28503184,"url":"https://github.com/turinglang/deprecated","last_synced_at":"2026-01-29T12:36:41.749Z","repository":{"id":289885772,"uuid":"972721551","full_name":"TuringLang/Deprecated","owner":"TuringLang","description":"Deprecated Utility Packages for Turing.jl","archived":false,"fork":false,"pushed_at":"2025-05-11T03:40:23.000Z","size":465,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-08T17:06:44.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://turinglang.org/Deprecated/","language":"Julia","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TuringLang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-25T14:47:54.000Z","updated_at":"2025-05-05T10:12:25.000Z","dependencies_parsed_at":"2025-04-26T15:33:45.046Z","dependency_job_id":null,"html_url":"https://github.com/TuringLang/Deprecated","commit_stats":null,"previous_names":["turinglang/depreciated","turinglang/deprecated"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TuringLang/Deprecated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuringLang%2FDeprecated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuringLang%2FDeprecated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuringLang%2FDeprecated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuringLang%2FDeprecated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TuringLang","download_url":"https://codeload.github.com/TuringLang/Deprecated/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TuringLang%2FDeprecated/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263741664,"owners_count":23504288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T17:06:14.811Z","updated_at":"2026-01-29T12:36:36.701Z","avatar_url":"https://github.com/TuringLang.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecated Utility Packages for Turing.jl\n\nThis repository contains *deprecated* utility packages for Turing.jl.  \nThese packages have either:\n- Been upstreamed into Turing.jl,\n- Been superseded by new features in Turing.jl itself,\n- Or replaced by other packages in the Julia ecosystem.\n\n## Planned Deprecations\n\n| Package | Status | Documentation | Prerequisite |\n|:--------|:-------|:---------------|:------|\n| `AdvancedPS.jl` | ⬜ Planned | *(pending)* | Need to upstream AdvancedPS to Turing.jl |\n| `TuringBenchmarking.jl` | ✅ Merged | [Documentation](https://turinglang.org/Deprecated/TuringBenchmarking/) | NIL |\n| `TuringCallbacks.jl` | ⬜ Planned | *(pending)* | Need to upstream callbacks to AbstractMCMC as an extension |\n| `ParetoSmooth.jl` | ⬜ Planned | *(pending)* | https://github.com/TuringLang/Turing.jl/issues/2534 |\n| `DistributionsAD.jl` | ⬜ Planned | *(pending)* |  https://github.com/TuringLang/DistributionsAD.jl/issues/282 |\n\n\n## Guide: Adding Packages While Preserving Commit History\n\nThe following steps describe how to migrate a standalone package into this repository while preserving its full Git history, using `git subtree`.\n\n### Step 1: Clone this repository\n\n```bash\ngit clone https://github.com/TuringLang/deprecated.git\ncd deprecated\n```\n\n### Step 2: Create a new branch\n\nYou can always create a feature branch for each imported package.\n\n```bash\ngit checkout -b migrate-\u003cpackage-name\u003e\n```\nExample:\n```bash\ngit checkout -b migrate-advancedps\n```\n\n### Step 3: Add the source repository as a remote\n\n```bash\ngit remote add \u003cremote-name\u003e \u003curl-to-original-repo\u003e\ngit fetch \u003cremote-name\u003e\n```\nExample:\n```bash\ngit remote add advancedps https://github.com/TuringLang/AdvancedPS.jl.git\ngit fetch advancedps\n```\n\n### Step 4: Add the package using `git subtree`\n\nImport the package under a subfolder while preserving history.\n\n```bash\ngit subtree add --prefix=\u003ctarget-folder-name\u003e \u003cremote-name\u003e/\u003cbranch-name\u003e\n```\nExample:\n```bash\ngit subtree add --prefix=AdvancedPS advancedps/main\n```\n\nThis will automatically create a new commit, preserving the full commit history within the subfolder.\n\n### Step 5: Check if all registered versions exist\nBefore opening a Pull Request, verify that all registered versions of the package are present locally.\nIn Julia REPL, run:\n```julia\nusing RegistryInstances, UUIDs, Git\n\nconst GENERAL_UUID = UUID(\"23338594-aafe-5451-b93e-139f81909106\")\n\npretty_print_row(row) = println(row.pkg_name, \": v\", row.version, \" \", row.found ? \"found\" : \"is missing\")\npretty_print_table(table) = foreach(pretty_print_row, table)\n\nfunction check_all_found(table)\n    idx = findfirst(row -\u003e !row.found, table)\n    idx === nothing \u0026\u0026 return nothing\n    row = table[idx]\n    error(string(\"Repository missing v\", row.version, \" of package $(row.pkg_name)\"))\nend\n\nfunction check_packages_versions(pkg_names, repo_url; registry_uuid=GENERAL_UUID, verbose=true, throw=true)\n    if isdir(repo_url)\n        dir = repo_url\n    else\n        dir = mktempdir()\n        run(`$(git()) clone $(repo_url) $dir`)\n    end\n\n    registry = only(filter!(r -\u003e r.uuid == registry_uuid, reachable_registries()))\n\n    table = @NamedTuple{pkg_name::String, version::VersionNumber, found::Bool, tree_sha::Base.SHA1}[]\n\n    for pkg_name in pkg_names\n        pkg = registry.pkgs[only(uuids_from_name(registry, pkg_name))]\n        versions = registry_info(pkg).version_info\n        for version in sort(collect(keys(versions)))\n            tree_sha = versions[version].git_tree_sha1\n            found = success(`$(git()) -C $dir rev-parse -q --verify \"$(tree_sha)^{tree}\"`)\n\n            push!(table, (; pkg_name, version, found, tree_sha))\n        end\n    end\n    verbose \u0026\u0026 pretty_print_table(table)\n    throw \u0026\u0026 check_all_found(table)\n    return table\nend\n\ncheck_package_versions(pkg_name, repo_url; kw...) = check_packages_versions([pkg_name], repo_url; kw...)\n```\nReference: [JuliaRegistries/General Contributing Guide](https://github.com/JuliaRegistries/General/blob/ce7010d91d2805182c4ed9539658ead03956e510/CONTRIBUTING.md#appendix-checking-if-a-repository-contains-all-registered-versions-of-a-package)\n\nThen check if all registered versions exist:\n```julia\njulia\u003e check_package_versions(\"AdvancedPS\", \".\")\n```\n\n### Step 6: Push your feature branch\n\n```bash\ngit push origin migrate-\u003cpackage-name\u003e\n```\n\nExample:\n```bash\ngit push origin migrate-advancedps\n```\n\n### Step 7: Open a Pull Request\n\n- Open a Pull Request from your feature branch (e.g., `migrate-advancedps`) into the `main` branch.\n- Get it reviewed and merged.\n\n### Step 8: Add all versioned docs\nOnce 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. \n\n```bash\ngit fetch origin\ngit checkout gh-pages\ngit pull origin gh-pages\n```\n\nMake sure that your Git is configured to allow symlinks:\n```bash\ngit config core.symlinks true\n```\n(This should be set before cloning, but good to double-check.)\nOtherwise, symlinks will be cloned as plain text files.\n\n#### Create a temporary folder\n```bash\nmkdir temp-gh-pages\ncd temp-gh-pages\n\n# Clone only the gh-pages branch of the original repo\ngit clone --branch gh-pages --single-branch --depth 1 \u003coriginal-repo-url\u003e .\n```\n\nMake sure to add these files and folders to the correct location:\n- All v* folders should be added to the root of the package folder.\n- versions.js should be replaced with versions.js from the original repository.\n- All symlinks should be added to the root of the package folder. Ensure that your Git has symlinks enabled.\n\nFinally, delete the temporary folder, add, commit the changes and push to the gh-pages branch of the deprecated repository:\n```bash\ngit add -A\ngit commit -m \"Add versioned docs for AdvancedPS\"\ngit push origin gh-pages\n```\n\n## Notes\n\n- `git subtree add` automatically creates a commit.  \n- Tags from the original repository are **not automatically transferred**.  \n  If needed, important tags should be manually recreated after migration.\n- Please avoid pushing directly to `main`. Always work via a feature branch and a Pull Request.\n\n## Redirect links of deprecated package to correct location\n\nFollow these steps to add HTML redirects for deprecated documentation such as `TuringBenchmarking.jl` to the `turinglang.github.io` repo's `gh-pages` branch.\n\n#### 1. Checkout `gh-pages` branch of `turinglang.github.io`\n\n```bash\ngit checkout gh-pages\ngit pull origin gh-pages\n```\n\n#### 2. Save and run the redirect script\n\nSave the following script as `redirects.sh` and update the `Config` in it:\n\n```bash\n#!/bin/bash\n\n# === Config ===\nSRC_REPO=\"https://github.com/TuringLang/TuringBenchmarking.jl.git\"\nSRC_BRANCH=\"gh-pages\"\nSRC_TMP_DIR=\"tmp_TuringBenchmarking\"\nDEST_PREFIX=\"/Deprecated/TuringBenchmarking\"\nDEST_BASE_DIR=\"TuringBenchmarking.jl\"\n\n# === Clean previous temp clone ===\nrm -rf \"$SRC_TMP_DIR\"\ngit clone --branch \"$SRC_BRANCH\" --depth 1 \"$SRC_REPO\" \"$SRC_TMP_DIR\"\n\ncd \"$SRC_TMP_DIR\" || exit 1\n\n# === Match dev, stable, v*, and symlinks ===\nMATCHED_DIRS=$(\n  find . -maxdepth 1 \\( -type d -o -type l \\) \\\n  ! -name \".\" \\\n  -exec bash -c '\n    for d; do\n      base=$(basename \"$d\")\n      [[ \"$base\" == \"dev\" || \"$base\" == \"stable\" || \"$base\" == v* ]] \u0026\u0026 echo \"$base\"\n    done\n  ' _ {} +\n)\n\ncd ..\n\n# === Create minimal redirect folders ===\nmkdir -p \"$DEST_BASE_DIR\"\nfor path in $MATCHED_DIRS; do\n  dest_dir=\"${DEST_BASE_DIR}/${path}\"\n  mkdir -p \"$dest_dir\"\n  cat \u003e \"${dest_dir}/index.html\" \u003c\u003cEOF\n\u003cmeta http-equiv=\"refresh\" content=\"0; url=${DEST_PREFIX}/${path}/\" /\u003e\nEOF\n  echo \"✅ Created redirect for: $path\"\ndone\n\n# === Create root redirect to stable ===\ncat \u003e \"${DEST_BASE_DIR}/index.html\" \u003c\u003cEOF\n\u003cmeta http-equiv=\"refresh\" content=\"0; url=${DEST_PREFIX}/stable/\" /\u003e\nEOF\necho \"✅ Created root redirect: /TuringBenchmarking.jl/ → /Deprecated/TuringBenchmarking/stable/\"\n\n# === Cleanup ===\nrm -rf \"$SRC_TMP_DIR\"\necho \"🎉 All redirects created in ./$DEST_BASE_DIR/\"\n\n# === Self-destruct this script ===\nrm -- \"$0\"\n```\n\nThen make it executable and run:\n\n```bash\nchmod +x redirects.sh\n./redirects.sh\n```\n\nThis creates a `TuringBenchmarking.jl/` folder with minimal `index.html` files to redirect `stable/`, `dev/`, `v*`, and the root URL.\n\n#### 3. Add any manual redirects if needed\n\nIf you know of any additional special-case redirects (e.g. `latest/`, `oldstable/`, custom aliases), you can manually create those similarly:\n\n```bash\nmkdir -p TuringBenchmarking.jl/latest\necho '\u003cmeta http-equiv=\"refresh\" content=\"0; url=/Deprecated/TuringBenchmarking/stable/\" /\u003e' \u003e TuringBenchmarking.jl/latest/index.html\n```\n\n#### 4. Commit and push the changes\n\n```bash\ngit add TuringBenchmarking.jl\ngit commit -m \"Added redirects for deprecated TuringBenchmarking.jl documentation\"\ngit push origin gh-pages\n```\n\n---\n\nThis ensures **all known URLs** like:\n\n* `https://turinglang.org/TuringBenchmarking.jl/`\n* `.../stable/`\n* `.../dev/`\n* `.../v0.5/`\n  continue working after deprecation, and point cleanly to the new location in `/Deprecated/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturinglang%2Fdeprecated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturinglang%2Fdeprecated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturinglang%2Fdeprecated/lists"}