Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate RecipesBase and RecipesPipeline into Plots #4419

Merged
merged 445 commits into from
Oct 6, 2022

Conversation

t-bltg
Copy link
Member

@t-bltg t-bltg commented Oct 4, 2022

Fix #4359.

Setup common CI: RecipesBase > RecipesPipeline > Plots.

RecipesPipeline will benefit from this since we won't have to test Plots examples in RecipesPipeline.

The CI overhead is negligible: ~10s for testing RecipesBase and ~50s for testing RecipesPipeline.

https://github.com/JuliaRegistries/General/blob/master/R/RecipesBase/Package.toml

name = "RecipesBase"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
repo = "https://github.com/JuliaPlots/Plots.jl.git"
subdir = "RecipesBase"

https://github.com/JuliaRegistries/General/blob/master/R/RecipesPipeline/Package.toml

name = "RecipesPipeline"
uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c"
repo = "https://github.com/JuliaPlots/Plots.jl.git"
subdir = "RecipesPipeline"

@t-bltg t-bltg added upstream julia or dependencies nfc non-functional change RecipesBase RecipesPipeline labels Oct 4, 2022
@t-bltg
Copy link
Member Author

t-bltg commented Oct 4, 2022

The merge of RecipesBase and RecipesPipeline was created using the following commands (inspired from https://stackoverflow.com/a/10548919):

$ sudo apt install git-filter-repo

# clone all repos (vanilla)
git clone https://github.com/JuliaPlots/RecipesPipeline.jl
git clone https://github.com/JuliaPlots/RecipesBase.jl
git clone https://github.com/JuliaPlots/Plots.jl

RecipesPipeline=$PWD/RecipesPipeline.jl
RecipesBase=$PWD/RecipesBase.jl
Plots=$PWD/Plots.jl

# create a dedicated branch for this PR
(cd $Plots; git checkout -b rb_rp_hist)

# process `RecipesBase`
(
  cd $RecipesBase
  git filter-repo --to-subdirectory-filter RecipesBase
)
(
  cd $Plots
  git remote add RecipesBase $RecipesBase
  git fetch $RecipesBase master
  git merge --allow-unrelated-histories FETCH_HEAD
  git remote remove RecipesBase
)

# process `RecipesPipeline` (same procedure as previous)
(
  cd $RecipesPipeline
  git filter-repo --to-subdirectory-filter RecipesPipeline
)
(
  cd $Plots
  git remote add RecipesPipeline $RecipesPipeline
  git fetch $RecipesPipeline master
  git merge --allow-unrelated-histories FETCH_HEAD
  git remote remove RecipesPipeline
)

The following sanity check passes (inspired from JuliaRegistries/General#35965 (comment)):

using TOML

cd("Plots.jl")

for pkg  ("RecipesBase", "RecipesPipeline", "Plots")
  versions = TOML.parsefile(joinpath(first(DEPOT_PATH), "registries", "General", pkg[1:1], pkg, "Versions.toml"))

  found = all(sort(collect(keys(versions)))) do version
    tree_sha = versions[version]["git-tree-sha1"]
    try
      readchomp(`git rev-parse -q --verify "$(tree_sha)^{tree}"`)
      return true
    catch
      return false
    end
  end
  println(pkg, ": ", found ? "all versions found!" : "ney")
end

@DilumAluthge, can I request your expertise on this procedure, regarding the julia General registry: is this approach valid ? Did I forget anything ?

@BeastyBlacksmith, I'm requesting your review again.
This is sensitive since we don't want to break RecipesPipeline and RecipesBase older releases in the general registry. I prefer to merge this without modifications, and the cleanup docs and .github dirs afterwards.

@BeastyBlacksmith
Copy link
Member

This is sensitive since we don't want to break RecipesPipeline and RecipesBase older releases in the general registry

honestly, I don't know how I could test that

@t-bltg
Copy link
Member Author

t-bltg commented Oct 4, 2022

Thanks, normally, the sanity check above should cover that (i.e. if the RB and RP shas of the registry are found in this branch with subrepos, then we're good).
I'm thinking out loud here to avoid potential issues regarding the registry.

I have also checked installation against a single depot with this General registry PR applied:

julia> first(DEPOT_PATH)
# points to a modified local registry
(@v1.8) pkg> activate --temp
(jl_zodEAE) pkg> add Plots@1.30.0  # test adding an old version
[...]

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Base: 80.63% // Head: 80.63% // No change to project coverage 👍

Coverage data is based on head (7f26691) compared to base (8fef7aa).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4419   +/-   ##
=======================================
  Coverage   80.63%   80.63%           
=======================================
  Files          30       30           
  Lines        7469     7469           
=======================================
  Hits         6023     6023           
  Misses       1446     1446           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@t-bltg t-bltg changed the title integrate RecipesBase and RecipesPipeline into Plots integrate RecipesBase and RecipesPipeline into Plots Oct 4, 2022
@t-bltg t-bltg merged commit 2642132 into JuliaPlots:master Oct 6, 2022
@t-bltg t-bltg deleted the rb_rp_hist branch October 6, 2022 11:11
@t-bltg t-bltg restored the rb_rp_hist branch October 6, 2022 12:28
@t-bltg t-bltg deleted the rb_rp_hist branch October 6, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nfc non-functional change RecipesBase RecipesPipeline upstream julia or dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repository reorganization