-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from invenia/cdg/plugins
Package overhaul
- Loading branch information
Showing
165 changed files
with
5,398 additions
and
4,062 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
.DS_Store | ||
*.jl.cov | ||
/docs/build/ | ||
*.jl.*.cov | ||
*.jl.cov | ||
*.jl.mem | ||
/docs/build/ | ||
/docs/site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
language: julia | ||
notifications: | ||
email: false | ||
os: | ||
- linux | ||
- osx | ||
- windows | ||
julia: | ||
- 1.0 | ||
- 1.1 | ||
- 1.2 | ||
- 1.3 | ||
- nightly | ||
before_script: | ||
- git config --global user.name Tester | ||
- git config --global user.email te@st.er | ||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- julia: 1.3 | ||
- julia: nightly | ||
fast_finish: true | ||
notifications: | ||
email: false | ||
after_success: julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' | ||
jobs: | ||
include: | ||
- arch: x86 | ||
julia: 1.0 | ||
- stage: Documentation | ||
julia: 1.1 | ||
script: julia --project=docs -e ' | ||
using Pkg; | ||
Pkg.develop(PackageSpec(path=pwd())); | ||
Pkg.instantiate(); | ||
include("docs/make.jl");' | ||
julia: 1.0 | ||
script: | ||
- git config --global user.name name | ||
- git config --global user.email email | ||
- git config --global github.user username | ||
- julia --project=docs -e ' | ||
using Pkg; | ||
Pkg.develop(PackageSpec(; path=pwd())); | ||
Pkg.instantiate(); | ||
include("docs/make.jl");' | ||
after_success: skip | ||
after_success: julia -e ' | ||
using Pkg; | ||
Pkg.add("Coverage"); | ||
using Coverage; | ||
Codecov.submit(process_folder());' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
name = "PkgTemplates" | ||
uuid = "14b8a8f1-9102-5b29-a752-f990bacb7fe1" | ||
authors = ["Chris de Graaf <chrisadegraaf@gmail.com>"] | ||
version = "0.6.3" | ||
authors = ["Chris de Graaf", "Invenia Technical Computing Corporation"] | ||
version = "0.7.0" | ||
|
||
[deps] | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" | ||
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" | ||
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" | ||
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" | ||
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" | ||
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" | ||
URIParser = "30578b45-9adc-5946-b283-645ec420af67" | ||
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | ||
|
||
[compat] | ||
Mustache = ">= 0.5.13" | ||
julia = "1" | ||
|
||
[extras] | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf" | ||
SimpleMock = "a896ed2c-15a5-4479-b61d-a0e88e2a1d25" | ||
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] | ||
test = ["Suppressor", "Random", "ReferenceTests", "SimpleMock", "Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,147 +1,56 @@ | ||
# PkgTemplates | ||
|
||
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://invenia.github.io/PkgTemplates.jl/stable) | ||
[![Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://invenia.github.io/PkgTemplates.jl/latest) | ||
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://invenia.github.io/PkgTemplates.jl/dev) | ||
[![Build Status](https://travis-ci.org/invenia/PkgTemplates.jl.svg?branch=master)](https://travis-ci.org/invenia/PkgTemplates.jl) | ||
[![Build Status](https://ci.appveyor.com/api/projects/status/r24xamruqlm88uti/branch/master?svg=true)](https://ci.appveyor.com/project/christopher-dG/pkgtemplates-jl/branch/master) | ||
[![Codecov](https://codecov.io/gh/invenia/PkgTemplates.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/invenia/PkgTemplates.jl) | ||
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle) | ||
|
||
**PkgTemplates is a Julia package for creating new Julia packages in an easy, | ||
repeatable, and customizable way.** | ||
**PkgTemplates creates new Julia packages in an easy, repeatable, and customizable way.** | ||
|
||
## Installation | ||
|
||
```julia | ||
pkg> add PkgTemplates | ||
``` | ||
|
||
## Plugins | ||
Install with Pkg, just like any other registered Julia package: | ||
|
||
`PkgTemplates` is based on plugins which handle the setup of individual package components. | ||
The available plugins are: | ||
|
||
* Continuous Integration (CI) | ||
* [Travis CI](https://travis-ci.com) (Linux, MacOS) | ||
* [AppVeyor](https://appveyor.com) (Windows) | ||
* [GitLabCI](https://gitlab.com) (Linux) | ||
* [CirrusCI](https://cirrus-ci.org) (FreeBSD) | ||
* Code Coverage | ||
* [Codecov](https://codecov.io) | ||
* [Coveralls](https://coveralls.io) | ||
* Documentation | ||
* [GitHubPages](https://pages.github.com) | ||
* Citation | ||
```jl | ||
pkg> add PkgTemplates # Press ']' to enter te Pkg REPL mode. | ||
``` | ||
|
||
## Usage | ||
|
||
Assuming you have the relatively standard Git options `user.name`, `user.email` and `github.user` set up globally with `git config --global`, the simplest template requires no arguments: | ||
|
||
```julia | ||
julia> using PkgTemplates | ||
|
||
julia> t = Template() | ||
Template: | ||
→ User: christopher-dG | ||
→ Host: github.com | ||
→ License: MIT (Chris de Graaf 2018) | ||
→ Package directory: ~/.julia/dev | ||
→ Minimum Julia version: v1.0 | ||
→ SSH remote: No | ||
→ Commit Manifest.toml: No | ||
→ Plugins: None | ||
|
||
julia> generate("MyPkg", t) | ||
|
||
julia> run(`git -C $(joinpath(t.dir, "MyPkg")) ls-files`); | ||
.gitignore | ||
LICENSE | ||
Manifest.toml | ||
Project.toml | ||
README.md | ||
REQUIRE | ||
src/MyPkg.jl | ||
test/runtests.jl | ||
``` | ||
Creating a `Template` is as simple as: | ||
|
||
However, we can also configure a number of keyword arguments to `Template`: | ||
|
||
```julia | ||
julia> t = Template(; | ||
user="myusername", | ||
license="ISC", | ||
authors=["Chris de Graaf", "Invenia Technical Computing Corporation"], | ||
dir="~/code", | ||
julia_version=v"0.7", | ||
plugins=[ | ||
TravisCI(), | ||
Codecov(), | ||
Coveralls(), | ||
AppVeyor(), | ||
GitHubPages(), | ||
CirrusCI(), | ||
], | ||
) | ||
Template: | ||
→ User: myusername | ||
→ Host: github.com | ||
→ License: ISC (Chris de Graaf, Invenia Technical Computing Corporation 2018) | ||
→ Package directory: ~/code | ||
→ Minimum Julia version: v0.7 | ||
→ SSH remote: No | ||
→ Commit Manifest.toml: No | ||
→ Plugins: | ||
• AppVeyor: | ||
→ Config file: Default | ||
→ 0 gitignore entries | ||
• Codecov: | ||
→ Config file: None | ||
→ 3 gitignore entries: "*.jl.cov", "*.jl.*.cov", "*.jl.mem" | ||
• Coveralls: | ||
→ Config file: None | ||
→ 3 gitignore entries: "*.jl.cov", "*.jl.*.cov", "*.jl.mem" | ||
• GitHubPages: | ||
→ 0 asset files | ||
→ 2 gitignore entries: "/docs/build/", "/docs/site/" | ||
• TravisCI: | ||
→ Config file: Default | ||
→ 0 gitignore entries | ||
|
||
julia> generate(t, "MyPkg2") | ||
|
||
julia> run(`git -C $(joinpath(t.dir, "MyPkg2")) ls-files`); | ||
.appveyor.yml | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
Project.toml | ||
README.md | ||
REQUIRE | ||
docs/Manifest.toml | ||
docs/Project.toml | ||
docs/make.jl | ||
docs/src/index.md | ||
src/MyPkg2.jl | ||
test/runtests.jl | ||
```jl | ||
using PkgTemplates | ||
t = Template() | ||
``` | ||
|
||
Information on each keyword as well as plugin types can be found in the | ||
[documentation](https://invenia.github.io/PkgTemplates.jl/stable). | ||
The no-keywords constructor assumes the existence of some preexisting Git configuration (set with `git config --global`): | ||
|
||
If that looks like a lot of work, you can also create templates interactively | ||
with `interactive_template`: | ||
- `user.name`: Your real name, e.g. John Smith. | ||
- `user.email`: Your email address, eg. john.smith@acme.corp. | ||
- `github.user`: Your GitHub username: e.g. john-smith. | ||
|
||
[![asciicast](https://asciinema.org/a/31bZqW9u8h5RHpd7gtsemioRV.png)](https://asciinema.org/a/31bZqW9u8h5RHpd7gtsemioRV) | ||
Once you have a `Template`, use it to generate a package: | ||
|
||
And if that's **still** too much work for you, you can call | ||
`interactive_template` with `fast=true` to use default values for everything | ||
but username and plugin selection. | ||
```jl | ||
t("MyPkg") | ||
``` | ||
|
||
You can also use `generate_interactive` to interactively generate a template and then | ||
immediately use it to create a new package. | ||
However, it's probably desirable to customize the template to your liking with various options and plugins: | ||
|
||
```jl | ||
t = Template(; | ||
dir="~/code", | ||
plugins=[ | ||
Git(; manifest=true, ssh=true), | ||
Codecov(), | ||
TravisCI(; x86=true), | ||
Documenter{TravisCI}(), | ||
], | ||
) | ||
``` | ||
|
||
## Contributing | ||
--- | ||
|
||
It's extremely easy to extend `PkgTemplates` with new plugins. To get started, | ||
check out the | ||
[plugin development guide](https://invenia.github.io/PkgTemplates.jl/stable/pages/plugin_development.html). | ||
For a much more detailled overview, please see the documentation. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.