julialang / example.jl Goto Github PK
View Code? Open in Web Editor NEWExample Julia package repo.
License: Other
Example Julia package repo.
License: Other
I suggest that the example be updated to deploy from main rather than master.
I tried replacing master with main in the ci.yml
branches: [main]
But then it doesn't deploy to gh-pages.
Info: Deployment criteria for deploying devbranch build from GitHub Actions:
│ - ✔ ENV["GITHUB_REPOSITORY"]="PsuAstro528/project-template" occurs in repo="github.com/PsuAstro528/project-template.git"
│ - ✔ ENV["GITHUB_EVENT_NAME"]="push" is "push"
│ - ✘ ENV["GITHUB_REF"] matches devbranch="master"
│ - ✔ ENV["GITHUB_ACTOR"] exists
│ - ✔ ENV["DOCUMENTER_KEY"] exists
└ Deploying: ✘
Then I tried adding devbranch to docs/make.jl
deploydocs(repo = "github.com/PsuAstro528/project-template.git", devbranch="main")
but then I got
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /tmp/jl_f1Y7Hk/.git/
Load key "/home/runner/work/project-template/project-template/docs/.documenter": error in libcrypto
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
┌ Error: Git failed to fetch [email protected]:PsuAstro528/project-template.git
│ This can be caused by a DOCUMENTER_KEY variable that is not correctly set up.
│ Make sure that the environment variable is properly set up as a Base64-encoded string
│ of the SSH private key. You may need to re-generate the keys with DocumenterTools.
└ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:552
┌ Error: Failed to push:
│ exception =
│ failed process: Process(`git fetch upstream`, ProcessExited(128)) [128]
│
│ Stacktrace:
│ [1] pipeline_error
│ @ ./process.jl:565 [inlined]
│ [2] run(::Cmd; wait::Bool)
│ @ Base ./process.jl:480
│ [3] run
│ @ ./process.jl:477 [inlined]
│ [4] (::Documenter.var"#git_commands#27"{String, String, SubString{String}, String, Vector{Any}, Bool, String, String})(sshconfig::String)
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:550
│ [5] (::Documenter.var"#26#32"{String})()
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:655
│ [6] cd(f::Documenter.var"#26#32"{String}, dir::String)
│ @ Base.Filesystem ./file.jl:112
│ [7] #25
│ @ ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:655 [inlined]
│ [8] withenv(f::Documenter.var"#25#31"{String, String}, keyvals::Pair{String, String})
│ @ Base ./env.jl:197
│ [9] (::Documenter.var"#24#30"{String, String, SubString{String}, String})(sshconfig::String, io::IOStream)
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:654
│ [10] mktemp(fn::Documenter.var"#24#30"{String, String, SubString{String}, String}, parent::String)
│ @ Base.Filesystem ./file.jl:732
│ [11] mktemp(fn::Function)
│ @ Base.Filesystem ./file.jl:730
│ [12] git_push(root::String, temp::String, repo::String; branch::String, dirname::String, target::String, sha::SubString{String}, devurl::String, versions::Vector{Any}, forcepush::Bool, deploy_config::Documenter.GitHubActions, subfolder::String, is_preview::Bool)
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:639
│ [13] git_push
│ @ ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:526 [inlined]
│ [14] #18
│ @ ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:504 [inlined]
│ [15] mktempdir(fn::Documenter.var"#18#20"{SubString{String}, String, String, String, String, Vector{Any}, Bool, Documenter.GitHubActions, Bool, String, String, String}, parent::String; prefix::String)
│ @ Base.Filesystem ./file.jl:760
│ [16] mktempdir(fn::Function, parent::String)
│ @ Base.Filesystem ./file.jl:756
│ [17] mktempdir
│ @ ./file.jl:756 [inlined]
│ [18] (::Documenter.var"#17#19"{String, String, String, Nothing, String, Vector{Any}, Bool, Documenter.GitHubActions, Bool, String, String, String})()
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:503
│ [19] cd(f::Documenter.var"#17#19"{String, String, String, Nothing, String, Vector{Any}, Bool, Documenter.GitHubActions, Bool, String, String, String}, dir::String)
│ @ Base.Filesystem ./file.jl:112
│ [20] deploydocs(; root::String, target::String, dirname::String, repo::String, branch::String, repo_previews::String, branch_previews::String, deps::Nothing, make::Nothing, devbranch::String, devurl::String, versions::Vector{Any}, forcepush::Bool, deploy_config::Documenter.GitHubActions, push_preview::Bool)
│ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:480
│ [21] top-level scope
│ @ ~/work/project-template/project-template/docs/make.jl:5
│ [22] include(mod::Module, _path::String)
│ @ Base ./Base.jl:[45](https://github.com/PsuAstro528/project-template/actions/runs/5902823903/job/16011550982#step:5:46)7
│ [23] exec_options(opts::Base.JLOptions)
│ @ Base ./client.jl:307
│ [24] _start()
│ @ Base ./client.jl:[52](https://github.com/PsuAstro528/project-template/actions/runs/5902823903/job/16011550982#step:5:53)2
└ @ Documenter ~/.julia/packages/Documenter/6vUwN/src/Documenter.jl:6[60](https://github.com/PsuAstro528/project-template/actions/runs/5902823903/job/16011550982#step:5:61)
At that point, I gave up.
I'm probably missing something basic, but it's not obvious how to solve this from either example or the documentation. Thanks.
Tests exist, ran 'julia runtests.jl', failed!
INFO: Installing Example v0.2.0
INFO: Package database updated
ERROR: test failed: Example.hello("Julia") == "Hello, Julia"
in error at error.jl:21
in default_handler at test.jl:19
in do_test at test.jl:39
in include_from_node1 at loading.jl:120
while loading /home/idunning/pkgtest/.julia/v0.3/Example/test/runtests.jl, in expression starting on line 7
INFO: Package database updated
I think the CompatHelper github workflow is important for packages that are setting [compat]
bounds (which should be all packages, these days).
https://github.com/JuliaRegistries/CompatHelper.jl
Can we add the suggested CompatHelper workflow file to this repo?
CC: @DilumAluthge
Is including a docs page automatically generated from a docstring that follows the style guide in the plans?
Add --code-coverage=tracefile-%p.info option to 1.1 and up to fix coverage.
Many Julia packages come with usage examples (for example https://github.com/denizyuret/Knet.jl/tree/master/examples ).
Would it be appropriate to add usage examples to the Example.jl?
Just a suggestion...
It seems hard to find Julia package repos that were created from scratch using Pkg3, which could be very useful when trying to diagnose problems one is having with creating such projects.
I'm happy to contribute a branch and PR for this; any reasons not to?
This issue is being filed by a script, but if you reply, I will see it.
PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their test (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3).
The results of this script are used to generate a package listing enhanced with testing results.
The status of this package, Example, on...
'No tests, but package loads.' can be due to their being no tests (you should write some if you can!) but can also be due to PackageEvaluator not being able to find your tests. Consider adding a test/runtests.jl
file.
'Package doesn't load.' is the worst-case scenario. Sometimes this arises because your package doesn't have BinDeps support, or needs something that can't be installed with BinDeps. If this is the case for your package, please file an issue and an exception can be made so your package will not be tested.
This automatically filed issue is a one-off message. Starting soon, issues will only be filed when the testing status of your package changes in a negative direction (gets worse). If you'd like to opt-out of these status-change messages, reply to this message.
Otherwise in principle anyone who uses it is violating our copyright.
In .travis.yml#L12
a softlinked directory with the extension .jl, Example.jl/
instead of the usual Example
is created. Code down the line called by e.g. Pkg.resolve() might be confused.
Compare
- julia -e 'Pkg.init(); run(`ln -s $(pwd()) $(Pkg.dir())/`); Pkg.resolve()'
- julia -e 'Pkg.init(); run(`ln -s $(pwd()) $(Pkg.dir())/Example`); Pkg.resolve()'
As pointed out in a recent thread on Slack, the way the LICENSE.md
file is written, quoting the actual license text, does not let Github recognize it as the "MIT License".
It would probably be better to use the exact same file that Github auto-creates.
Zenodo offers DOIs for released packages. See e.g. the DOI badge at https://github.com/eschnett/FastArrays.jl for an example.
It would be good if this package had an example for this. DOIs help make software citable.
Creating such DOIs is straightforward. Essentially, one adds the repo to Zenodo as one would for Travis or Appveyor https://zenodo.org/account/settings/github/, and Zenodo then tracks all releases made on Github and creates DOIs.
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.2.1+2 (2014-02-14 06:30 UTC)
_/ |\__'_|_|_|\__'_| | release-0.2/677086a (fork: 27 commits, 101 days)
|__/ | x86_64-unknown-linux-gnu
julia> Pkg.add("Example")
INFO: Installing Example v0.0.0
INFO: REQUIRE updated.
julia> using Example
ERROR: Example not found
in require at loading.jl:39
julia>
Apparently the root level name ~/Example.jl
is case-insensitive and the .jl
suffix is optional i.e. if I rename ~/Example.jl
to ~/example
it still works.
Changing ~/Example.jl
to ~/fobar
and it breaks.
However, ~/Example.jl/src/Example.jl
is not case-insensitive and the .jl
suffix is mandatory ...
This example project is still using Tavis-CI free open source service.
It says "at al." where it should say "et al." (which the commit message says… 😉).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.