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

Package overhaul #61

Merged
merged 82 commits into from
Nov 10, 2019
Merged

Package overhaul #61

merged 82 commits into from
Nov 10, 2019

Conversation

christopher-dG
Copy link
Member

@christopher-dG christopher-dG commented Mar 1, 2019

Closes #72
Closes #87
Closes #95
Closes #92
Closes # 90
Closes #80
Addresses #85 (does it supersede it? maybe)
Closes #103
Closes #104
Closes #96

Rewrites are fun πŸ€·β€β™‚οΈ This got like, way out of hand.
It's finally ready for review!

In short, the new internal architecture makes plugins a lot more powerful and flexible than they used to be, so every part of package generation has been moved into various default plugins.

I've built the docs here so you don't need to build them yourself.

TODO

  • Some more interactive code, it's pretty raw right now
  • More reference tests that use the full range of plugin options
  • Unit tests for the trickier bits of logic, especially interactive stuff

@christopher-dG christopher-dG changed the title Rework plugin design, add @plugin macro Rework plugin design, add @plugin macro, and a million other things Mar 7, 2019
@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #61 into master will decrease coverage by 34.25%.
The diff coverage is 63.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #61       +/-   ##
===========================================
- Coverage   97.54%   63.29%   -34.26%     
===========================================
  Files          16       15        -1     
  Lines         407      316       -91     
===========================================
- Hits          397      200      -197     
- Misses         10      116      +106
Impacted Files Coverage Ξ”
src/plugins/develop.jl 0% <0%> (ΓΈ)
src/plugins/coverage.jl 0% <0%> (ΓΈ)
src/plugins/license.jl 100% <100%> (ΓΈ)
src/PkgTemplates.jl 100% <100%> (ΓΈ) ⬆️
src/template.jl 100% <100%> (ΓΈ) ⬆️
src/plugins/src_dir.jl 100% <100%> (ΓΈ)
src/plugins/citation.jl 20% <20%> (-42.5%) ⬇️
src/plugins/documenter.jl 22.58% <23.33%> (-75.04%) ⬇️
src/plugins/project_file.jl 50% <50%> (ΓΈ)
src/plugins/ci.jl 6.66% <6.66%> (ΓΈ)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 26a4944...90253e5. Read the comment docs.

@christopher-dG
Copy link
Member Author

@christopher-dG christopher-dG changed the title Rework plugin design, add @plugin macro, and a million other things Package internals overhaul Jun 17, 2019
@bramtayl
Copy link

@christopher-dG how can I help get this over the finish line? I have a new package I want to write

@christopher-dG
Copy link
Member Author

You could plan my math lessons for me so that I have time to code πŸ˜….
In seriousness, I'm pretty sure that this PR is more or less feature-complete, it just needs tests. What I really need is just a kick in the butt to find the time to finish it up, and hopefully this is it. Since it's conveniently Friday, I'll have a look at it this evening and see if I can at least re-familiarize myself with what exactly needs doing.

@christopher-dG
Copy link
Member Author

christopher-dG commented Aug 25, 2019

I looked over my work here this weekend and there's a whole lot that I want to change (and have been changing), but I can see myself getting this done in the next week or two, time permitting.

the next week or two

ha

@christopher-dG christopher-dG changed the title Package internals overhaul Package overhaul Aug 26, 2019
@christopher-dG
Copy link
Member Author

Title updated to reflect the somewhat significantly changed user APIs... πŸ™ƒ

@christopher-dG
Copy link
Member Author

Wew, this is very close to ready (after a really really long time). The initial comment up top has been updated with the current state of things.

@iamed2 not sure how Invenia wants to go about reviewing this, I wouldn't really want to be tasked with looking at all this code myself... I'd be happy to walk someone through it over Slack or similar if that makes things easier. Just let me know what works best πŸ™‚

Copy link
Collaborator

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done, Chris! Excited to see this happening :)

I had a quick look, mostly reviewing docs so I can get up to speed with the new world :)

README.md Show resolved Hide resolved
src/template.jl Outdated Show resolved Hide resolved
docs/src/migrating.md Outdated Show resolved Hide resolved
docs/src/migrating.md Show resolved Hide resolved
docs/src/migrating.md Outdated Show resolved Hide resolved
docs/make.jl Outdated Show resolved Hide resolved
docs/src/user.md Outdated Show resolved Hide resolved
src/plugins/develop.jl Outdated Show resolved Hide resolved
src/plugins/documenter.jl Outdated Show resolved Hide resolved
docs/src/developer.md Show resolved Hide resolved
@christopher-dG
Copy link
Member Author

Yeah that's fair.

docs/make.jl Show resolved Hide resolved
@aminya
Copy link

aminya commented Nov 7, 2019

@christopher-dG Have you seen this:
https://github.com/julia-actions/example-workflows
It allows to use Github actions instead of .travis.yml, etc.

This can be a separate PR. Just wanted you to be aware of.

@aminya
Copy link

aminya commented Nov 8, 2019

@christopher-dG for pushing these ymls to Github's workflow some additional permissions are needed. I couldn't find them over the internet, but with Github desktop grants those automatically.
See the last line:
image

@aminya
Copy link

aminya commented Nov 8, 2019

I think here is the solution: https://stackoverflow.com/questions/57921401/push-to-origin-from-github-action
Can you add these to the git config when Github actions are used?

@christopher-dG
Copy link
Member Author

christopher-dG commented Nov 9, 2019

Not sure if I'm interpreting this correctly, but wouldn't setting up a Git push be Documenter's responsibility? And even then, its pushes don't update workflow files. AFAIK no other GitHub Actions are trying to push.

@aminya
Copy link

aminya commented Nov 9, 2019

Not sure if I'm interpreting this correctly, but wouldn't setting up a Git push be Documenter's responsibility? And even then, its pushes don't update workflow files. AFAIK no other GitHub Actions are trying to push.

The problem is that without Google Desktop, I cannot push any .yml file to Github's workflow folder. So probably if the user generates a yml file using this template, they can't push it.
I think this should be solved by individual basis (they change their pushing command).

@christopher-dG
Copy link
Member Author

Ok, after some digging, I'm guessing that you use a personal access token to authenticate with GitHub instead of your password? Because this issue only seems to affect access tokens, and I've just tried with both password and SSH and had no problems.
You might want to look into using SSH keys if you want to avoid using your password for Git!

The docs deployment requires Documenter 0.24 but I'm assuming that
PkgTemplates 0.7 won't be released until after Documenter 0.24.
This only came up when you generate more than one package in the same
Julia session. The mutating `append!` function was adding stuff to the
global variable that the coverage plugins were using for their
gitignores. The new `vcat` is non-mutating.
@christopher-dG
Copy link
Member Author

πŸ˜ƒ

@christopher-dG christopher-dG merged commit 055f37d into master Nov 10, 2019
@aminya
Copy link

aminya commented Nov 10, 2019

Congratulation πŸš€ @christopher-dG

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