This is based on the discussion started here:
- https://github.com/johnmyleswhite/PackageTesting.jl
- https://groups.google.com/forum/#!searchin/julia-dev/package/julia-dev/I_Ul4TgpcZw/z0PVPNurn3cJ
as well as the manual.
This Julep sets the rules for packages to improve the quality of the packaging ecosystem. All packages submitted to METADATA.jl
must meet these requirements.
- Packages must have a
REQUIRE
file that, as well as listing all packages it depends on, explicitly states the version of Julia it depends on.
- Packages should have license information, either in a dedicated
LICENSE
file or stated in a README
- Packages should have a
test/
directory, that contains a fileruntests.jl
- The
runtests.jl
file will be called by an automatic package ecosystem testing system. As such, it should not call long-running performance tests, and should not require any configuration above-and-beyond that is automatically carried out during package installation. If a test fails it should throw an error that causes Julia to exit with an error code. - Packages may contain other testing code in this folder of any nature, it will not be called.
- Packages are encouraged to have a
.travis.yml
file for TravisCI integration.
Each package has a folder in METADATA.jl, with the following contents
- Every package must have a url file in the root of their folder in
METADATA.jl
- The file should contain a single line that states the address of the package's git repository, e.g.
git://github.com/JuliaStats/DataFrames.jl.git
- Every package must have a
DESCRIPTION.md
file in the root of their folder inMETADATA.jl
- The format of the file should be as follows:
# Description
A short description of the package
# Keywords
A comma separated list of keywords, e.g. distributions, probability, random normals, monte carlo
# Maintainers
A comma separated list of maintainers
# Install notes
A short description that will be displayed when the package is installed. Should be used only if manual operations must be performed to complete installation.
- Every package must have a
versions
folder, see the README in https://github.com/JuliaLang/METADATA.jl/tree/devel
We have to think about what the tests are actually good for; what we want to accomplish with them. There are a couple different classes of tests, which we are differentiating via the
INSTALL
,TEST
, etc.... modifiers:INSTALL
should be tests that ensure that an installation went properly, and the package is ready to be used. Failure means that the package is non-functional, and I agree with @IainNZ, the package should be removed. This should (hopefully) be pretty hard to do, barring cases such as Gurobi where a binary dependency must be present.TEST
should be tests that ensure that a package is self-consistent. This is stuff like making sure 2 + 2 == 4, etc... These are the kinds of tests that we'll run to ensure that a new Julia version doesn't screw stuff up inside this package, and also that any binaries that were linked to are working properly. I think it's reasonable to not run these on package install and only when requested. These are run by Travis.PERF
I'm not 100% sold on, but having it there as an option doesn't hurt much.If a test can't be done on Travis/has external (non-opensource) requirements, the author will either have to remove
~/.travis.yml
, or define tests that do nothing/print out warnings but still pass.Having typed all this out, I suddenly feel like
INSTALL
tests are really nothing more than what is handled byBinDeps
andPkg2
, and the separation is not necessary. Can someone give me a good reason why we'd want to haveINSTALL
tests vs.TEST
tests?