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

Recommend BestieTemplate instead? #478

Open
gdalle opened this issue Jul 29, 2024 · 6 comments
Open

Recommend BestieTemplate instead? #478

gdalle opened this issue Jul 29, 2024 · 6 comments

Comments

@gdalle
Copy link
Collaborator

gdalle commented Jul 29, 2024

As discussed at JuliaCon with @oxinabox and @abelsiqueira, we would like BestieTemplate.jl to become the new PkgTemplates.jl, mainly because of its update functionality (you don't have to re-create a package from scratch to get the latest features).

Should we put a big warning on the README here and redirect? That way development efforts will be focused in one place. Abel can you handle the load? Frames would that be okay with you?

@gdalle gdalle changed the title Recomment BestieTemplate instead Recomment BestieTemplate instead? Jul 29, 2024
@oxinabox
Copy link
Collaborator

I am yet to actually try it, so I would feel a bit funny about recommending it.
But if you are satisfied then I would be happy enough

@abelsiqueira
Copy link

@gdalle, we are ready for the next step.

@oxinabox, we can have a slow rollout, if you prefer. E.g., announce the intention on Discourse asking for user of PkgTemplate to try Bestie, and if nothing is terrible after a few days/weeks, we proceed with the warning. It should give you time to try and decide. But I am also happy to wait, there is no rush in our side.

@gdalle
Copy link
Collaborator Author

gdalle commented Jul 30, 2024

I haven't tried it myself for a new package, I just went over the features with Abel. Let's wait until Frames and I have taken it out for a spin, and then we'll announce the switch

@gdalle gdalle changed the title Recomment BestieTemplate instead? Recommend BestieTemplate instead? Jul 30, 2024
This was referenced Aug 29, 2024
@pat-alt
Copy link

pat-alt commented Aug 29, 2024

Moving this here from #483

@abelsiqueira I've dabbled a bit with BestieTemplate.jl and having the update functionality is definitely a huge win. Maybe I'll abuse this thread here to ask a few questions/add some thoughts:

  1. What's Bestie's equivalent to plugins?
  2. Would it be possible to move to Bestie and not completely give up on the ability to generate templates programmatically?

To elaborate a bit on (1), I've found it very easy to add functionality here since it's all Julia and the docs for devs are comprehensive. To give you a concrete example, how easy do you think it would be to contribute something like #482 to Bestie?

As for point (2), it says in Bestie's docs:

PkgTemplates.jl is a project generator. This means that if you want to programmatically create templates inside Julia, this is the best solution. The questions (user interface) are implemented by the package, which then translates that into the answers for the engine.

I think this is a great feature and it would be a shame to lose it entirely. For example, I have been trying to leverage this functionality here to add a custom package template for Taija. I've continued to work on this even after hearing about Bestie at JuliaCon, because it seemed to me like the most straightforward pure-Julia approach.

Happy to instead focus my efforts on Bestie, these are just a few questions/concerns I've had so far, so what be great to hear your thoughts :)

@abelsiqueira
Copy link

Hi @pat-alt, some answers while my tests are running:

  1. I think "questions" are the closest? Depends on what you want to do.
    Ok, I looked at the rest of the question. There are quite a few changes in Quarto plugin #482, so the answer might be incomplete. But to add something like a conditional folder called quarto and some conditional file changes, you would need to:

    1. Create a new question in copier.yml (e.g., AddQuarto)
    2. Create the folder in template with a name like {% if AddQuarto %}quarto{% endif %}
    3. Change places like the docs GH action with a conditional like above
  2. I don't fully understand what you're doing. I am guessing the following (and correct me otherwise):

    1. You have some answers defined in Taija (the plugins) that you expect all Taija projects (or users?) will follow
    2. You have additional files that you want to include in that same template

You can accomplish 2.1 using data = Dict(q1 => a1, q2 => a2).
I don't know how to achieve 2.2, but it is a desired feature because of private additions (JuliaBesties/BestieTemplate.jl#368). I hope it is achievable, but it might involve more copier (the underlying project generator in Bestie) than Bestie. I'm happy to discuss more.

Let me know if the answers make sense or if you need more details.

@pat-alt
Copy link

pat-alt commented Aug 29, 2024

Thanks a lot for the quick response @abelsiqueira, this all makes sense! I'll come back to this as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants