[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Improve autodep8 for R packages



Hi Dylan,

On Tue, Mar 13, 2018 at 12:52:14PM +0100, Dylan Aïssi wrote:
> 
> 2018-03-13 11:54 GMT+01:00 Andreas Tille <andreas@an3as.eu>:
> >> If we decide to go into this direction, we will be able to override
> >> this autopkgtest-pkg-r testsuite for specific packages which emit
> >> errors with the standard testsuite.
> >
> > I'm afraid I do not understand this part.  How would overriding a test
> > work?
> 
> I thought in case of packages which need some dependencies from the
> Suggests field to run these tests (e.g. testthat [1]).
> In contrary to the Recommends field that can be installed using
> "Restrictions: needs-recommends" in d/control, there is (currently?)
> no way to install the Suggests field for autopkgtest (no
> "Restrictions: needs-suggests" but I may be wrong here).

If you ask me I'd be very much in favour to move all those packages that
are needed to run the test suite from Suggests to Recommends.  Before
dh-r with the automatic replacement of

   Recommends: ${R:Recommends}

existed I used to specify those packages manually here.  May be the
solution to your above problem is to make R:Recommends more intelligent
to check the tests and adjust the Recommends to what I consider
sensible?  I'm even not sure whether the DESCRIPTION files know an
equivalent to Recommends at all - so we can just make it happen for the
Debian packages.

> So, in this case, we just have to write a specific d/control for a
> problematic package with manually written dependencies and no need to
> write a new runner ou run-unit-test script.

If you agree with me we could even use "Restrictions: needs-recommends"
which I would prefer for simple consistency (not that I would use this
as an argument against manually written scripts that might be useful
for other cases).
 
> > I personally consider it a good idea to let users easily run the
> > autopkgtest code on their local machine:
> >
> >   1. Just another test under different conditions (may be the
> >      most important one if a user can be sure that the software
> >      runs on the own machine)
> >   2. The test can sometimes serve as a usage example of the software
> >
> > Do you see some way to keep this feature?
> 
> Maybe a /usr/share/doc/PACKAGE/README.test file which inform user to
> use the script in the pkg-r-autopkgtest package ?

Fine for me - as long as users have a consistent and straightforward
way to test the packages on their machine.

> This pkg-r-autopkgtest package could be a dependency of r-base (or
> whatever) to be sure to be installed on all systems.
> We can also create a symlink for /usr/share/doc/PACKAGE/runner to the
> script from the pkg-r-autopkgtest package.

This are finally details we can easily agree upon later.  You see, I
really like your suggestions. :-)

Kind regards

       Andreas.
 
> [1] https://salsa.debian.org/r-pkg-team/r-cran-testthat/commit/c5c0417543

-- 
http://fam-tille.de


Reply to: