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

Bug#853763: marked as done (unblock: astroplan/0.2-4)



Your message dated Fri, 03 Feb 2017 07:37:00 +0000
with message-id <311ebaa1-6a79-769a-274c-3f155974c3fe@thykier.net>
and subject line Re: Bug#853763: unblock: astroplan/0.2-4
has caused the Debian Bug report #853763,
regarding unblock: astroplan/0.2-4
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
853763: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853763
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear release team,

please unblock astroplan in the upcoming (Feb 5) freeze.

It solves #851437 "FTBFS: requires Internet to build", severity: serious.

Changelog entry:

astroplan (0.2-4) unstable; urgency=medium

  * Github patches + failures marked as known (Closes: #851437)

 -- Vincent Prat <vinceprat@free.fr>  Fri, 27 Jan 2017 20:57:06 +0100

The debdiff is attached. Requested commands:

unblock astroplan/0.2-4

diff -Nru astroplan-0.2/debian/changelog astroplan-0.2/debian/changelog
--- astroplan-0.2/debian/changelog	2016-12-21 13:25:25.000000000 +0100
+++ astroplan-0.2/debian/changelog	2017-01-27 20:57:06.000000000 +0100
@@ -1,3 +1,9 @@
+astroplan (0.2-4) unstable; urgency=medium
+
+  * Github patches + failures marked as known (Closes: #851437)
+
+ -- Vincent Prat <vinceprat@free.fr>  Fri, 27 Jan 2017 20:57:06 +0100
+
 astroplan (0.2-3) unstable; urgency=medium
 
   * Fix test failures. (Closes: #848750)
diff -Nru astroplan-0.2/debian/patches/disable_failing_tests.patch astroplan-0.2/debian/patches/disable_failing_tests.patch
--- astroplan-0.2/debian/patches/disable_failing_tests.patch	1970-01-01 01:00:00.000000000 +0100
+++ astroplan-0.2/debian/patches/disable_failing_tests.patch	2017-01-27 20:57:06.000000000 +0100
@@ -0,0 +1,40 @@
+From: Ole Streicher <olebole@debian.org>
+Subject: Mark known failures
+--- a/astroplan/tests/test_scheduling.py
++++ b/astroplan/tests/test_scheduling.py
+@@ -6,6 +6,7 @@
+ from astropy.time import Time
+ import astropy.units as u
+ from astropy.coordinates import SkyCoord
++from astropy.tests.helper import pytest
+ 
+ from ..utils import time_grid_from_range
+ from ..observer import Observer
+@@ -103,7 +104,8 @@
+     assert np.abs(schedule.slots[0].end - new_duration - start) < 1*u.second
+     assert schedule.slots[1].start == schedule.slots[0].end
+ 
+-
++# see https://github.com/astropy/astroplan/pull/282
++@pytest.mark.xfail()
+ def test_transitioner():
+     blocks = [ObservingBlock(t, 55 * u.minute, i) for i, t in enumerate(targets)]
+     slew_rate = 1 * u.deg / u.second
+@@ -132,6 +134,8 @@
+ default_transitioner = Transitioner(slew_rate=1 * u.deg / u.second)
+ 
+ 
++# see https://github.com/astropy/astroplan/pull/282
++@pytest.mark.xfail()
+ def test_priority_scheduler():
+     constraints = [AirmassConstraint(3, boolean_constraint=False)]
+     blocks = [ObservingBlock(t, 55*u.minute, i) for i, t in enumerate(targets)]
+@@ -157,6 +161,8 @@
+     scheduler(blocks, schedule)
+ 
+ 
++# see https://github.com/astropy/astroplan/pull/282
++@pytest.mark.xfail()
+ def test_sequential_scheduler():
+     constraints = [AirmassConstraint(2.5, boolean_constraint=False)]
+     blocks = [ObservingBlock(t, 55 * u.minute, i) for i, t in enumerate(targets)]
diff -Nru astroplan-0.2/debian/patches/issues-282-Fix-more-test-failures-in-astroplan.patch astroplan-0.2/debian/patches/issues-282-Fix-more-test-failures-in-astroplan.patch
--- astroplan-0.2/debian/patches/issues-282-Fix-more-test-failures-in-astroplan.patch	1970-01-01 01:00:00.000000000 +0100
+++ astroplan-0.2/debian/patches/issues-282-Fix-more-test-failures-in-astroplan.patch	2017-01-27 20:57:06.000000000 +0100
@@ -0,0 +1,41 @@
+From: Wilfred Tyler Gee <wtylergee@gmail.com>
+Date: Thu, 26 Jan 2017 17:34:02 +0100
+Subject: issues/282: Fix more test failures in astroplan
+
+I tried to spend some time today looking at this. I applied #273 #274
+and #281 after which there were still 6 outstanding errors. Applying
+the following reduces that to 3 errors, all in test_scheduling.py and
+all consistent with the error @olebole pointed out in
+astropy. Everything else I tried seemed to point to that error in
+astropy rather than in astroplan, but I could be wrong.
+
+URL: https://github.com/astropy/astroplan/files/726302/diff.txt
+---
+ astroplan/observer.py | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/astroplan/observer.py b/astroplan/observer.py
+index 873a609..27e6b24 100644
+--- a/astroplan/observer.py
++++ b/astroplan/observer.py
+@@ -591,7 +591,7 @@ class Observer(object):
+             time_inds = np.array(time_inds)
+ 
+         times = [t[int(i):int(i)+2] if not np.isnan(i) else np.nan for i in time_inds]
+-        altitudes = [alt[i, int(j):int(j)+2] if not np.isnan(j) else np.nan
++        altitudes = [alt[int(i), int(j):int(j)+2] if not np.isnan(j) else np.nan
+                      for i, j in zip(target_inds, time_inds)]
+ 
+         return times, altitudes
+@@ -706,10 +706,7 @@ class Observer(object):
+             times = _generate_24hr_grid(time, -1, 0, N)
+ 
+         altaz = self.altaz(times, target)
+-        if target_is_vector:
+-            altitudes = [aa.alt for aa in altaz]
+-        else:
+-            altitudes = altaz.alt
++        altitudes = altaz.alt
+ 
+         time_limits, altitude_limits = self._horiz_cross(times, altitudes, rise_set,
+                                                          horizon)
diff -Nru astroplan-0.2/debian/patches/pull-273-Change-to-use-new-SkyCoord-prints.patch astroplan-0.2/debian/patches/pull-273-Change-to-use-new-SkyCoord-prints.patch
--- astroplan-0.2/debian/patches/pull-273-Change-to-use-new-SkyCoord-prints.patch	1970-01-01 01:00:00.000000000 +0100
+++ astroplan-0.2/debian/patches/pull-273-Change-to-use-new-SkyCoord-prints.patch	2017-01-27 20:57:06.000000000 +0100
@@ -0,0 +1,49 @@
+From: Brigitta Sipocz <bsipocz@gmail.com>
+Date: Wed, 21 Dec 2016 19:39:36 +0100
+Subject: pull/273: Change to use new SkyCoord prints
+
+Numpy 1.12 will have a new array printing style, thus the SkyCoord
+changed its in astropy version 1.3 in astropy/astropy#5423. This PR
+fixes the docstring examples to use the new style, and skip running
+doctest with older astropy versions.
+
+URL: https://github.com/astropy/astroplan/pull/273
+---
+ astroplan/target.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/astroplan/target.py b/astroplan/target.py
+index b45af73..2cf793a 100644
+--- a/astroplan/target.py
++++ b/astroplan/target.py
+@@ -11,6 +11,12 @@ from astropy.coordinates import SkyCoord
+ 
+ __all__ = ["Target", "FixedTarget", "NonFixedTarget"]
+ 
++# Docstring code examples include printed SkyCoords, but the format changed
++# in astropy 1.3. Thus the doctest needs astropy >=1.3 and this is the
++# easiest way to make it work.
++
++__doctest_requires__ = {'FixedTarget.*': ['astropy.modeling.Hermite1D']}
++
+ 
+ class Target(object):
+     """
+@@ -123,7 +129,7 @@ class FixedTarget(Target):
+         >>> sirius = FixedTarget.from_name("Sirius")
+         >>> sirius.coord                              # doctest: +FLOAT_CMP
+         <SkyCoord (ICRS): (ra, dec) in deg
+-            (101.28715533, -16.71611586)>
++            ( 101.28715533, -16.71611586)>
+         """
+         # Allow manual override for name keyword so that the target name can
+         # be different from the query name, otherwise assume name=queryname.
+@@ -144,7 +150,7 @@ class FixedTarget(Target):
+         >>> vega_coord = SkyCoord(ra='279.23473479d', dec='38.78368896d')
+         >>> vega = FixedTarget(coord=vega_coord, name="Vega")
+         >>> print(vega)                             # doctest: +FLOAT_CMP
+-        <FixedTarget "Vega" at SkyCoord (ICRS): (ra, dec) in deg (279.23473479, 38.78368894)>
++        <FixedTarget "Vega" at SkyCoord (ICRS): (ra, dec) in deg ( 279.23473479,  38.78368896)>
+         """
+         class_name = self.__class__.__name__
+         fmt_coord = repr(self.coord).replace('\n   ', '')[1:-1]
diff -Nru astroplan-0.2/debian/patches/pull-274-Stop-recognizing-scalar-SkyCoord-objects-as-vect.patch astroplan-0.2/debian/patches/pull-274-Stop-recognizing-scalar-SkyCoord-objects-as-vect.patch
--- astroplan-0.2/debian/patches/pull-274-Stop-recognizing-scalar-SkyCoord-objects-as-vect.patch	1970-01-01 01:00:00.000000000 +0100
+++ astroplan-0.2/debian/patches/pull-274-Stop-recognizing-scalar-SkyCoord-objects-as-vect.patch	2017-01-27 20:57:06.000000000 +0100
@@ -0,0 +1,106 @@
+From: Brigitta Sipocz <bsipocz@gmail.com>
+Date: Wed, 21 Dec 2016 19:47:42 +0100
+Subject: pull/274: Stop recognizing scalar SkyCoord objects as vectors
+
+SkyCoords recently (new in astropy 1.3, from astropy/astropy#5254) got
+an iter attribute inherited from ShapedLikeNDArray, so it's not enough
+any more to check for the existence of that attribute to distinguish
+vectors from scalars.
+
+This PR should fix the issue while also gets rid of 19 test failures
+against astropy dev.
+
+URL: https://github.com/astropy/astroplan/pull/274
+---
+ astroplan/observer.py | 22 ++++++++--------------
+ 1 file changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/astroplan/observer.py b/astroplan/observer.py
+index 25eb1d4..873a609 100644
+--- a/astroplan/observer.py
++++ b/astroplan/observer.py
+@@ -13,6 +13,7 @@ from astropy.coordinates import (EarthLocation, SkyCoord, AltAz, get_sun,
+ from astropy.extern.six import string_types
+ import astropy.units as u
+ from astropy.time import Time
++from astropy.utils import isiterable
+ import numpy as np
+ import pytz
+ 
+@@ -66,13 +67,6 @@ def _generate_24hr_grid(t0, start, end, N, for_deriv=False):
+     return t0 + time_grid
+ 
+ 
+-def _target_is_vector(target):
+-    if hasattr(target, '__iter__'):
+-        return True
+-    else:
+-        return False
+-
+-
+ class Observer(object):
+ 
+     """
+@@ -458,7 +452,7 @@ class Observer(object):
+             return altaz_frame
+         else:
+             # If target is a list of targets:
+-            if _target_is_vector(target):
++            if isiterable(target) and not isinstance(target, SkyCoord):
+                 get_coord = lambda x: x.coord if hasattr(x, 'coord') else x
+                 transformed_coords = self._transform_target_list_to_altaz(time,
+                                                                           list(map(get_coord, target)))
+@@ -505,7 +499,7 @@ class Observer(object):
+         if not isinstance(time, Time):
+             time = Time(time)
+ 
+-        if _target_is_vector(target):
++        if isiterable(target):
+             get_coord = lambda x: x.coord if hasattr(x, 'coord') else x
+             coordinate = SkyCoord(list(map(get_coord, target)))
+         else:
+@@ -704,7 +698,7 @@ class Observer(object):
+         if not isinstance(time, Time):
+             time = Time(time)
+ 
+-        target_is_vector = _target_is_vector(target)
++        target_is_vector = isiterable(target)
+ 
+         if prev_next == 'next':
+             times = _generate_24hr_grid(time, 0, 1, N)
+@@ -766,7 +760,7 @@ class Observer(object):
+         if not isinstance(time, Time):
+             time = Time(time)
+ 
+-        target_is_vector = _target_is_vector(target)
++        target_is_vector = isiterable(target)
+ 
+         if prev_next == 'next':
+             times = _generate_24hr_grid(time, 0, 1, N, for_deriv=True)
+@@ -837,7 +831,7 @@ class Observer(object):
+                 return previous_event
+ 
+         if which == 'nearest':
+-            if _target_is_vector(target):
++            if isiterable(target):
+                 return_times = []
+                 for next_e, prev_e in zip(next_event, previous_event):
+                     if abs(time - prev_e) < abs(time - next_e):
+@@ -1547,7 +1541,7 @@ class Observer(object):
+             time = Time(time)
+ 
+         altaz = self.altaz(time, target)
+-        if _target_is_vector(target):
++        if isiterable(target):
+             observable = [bool(alt > horizon) for alt in altaz.alt]
+         else:
+             observable = bool(altaz.alt > horizon)
+@@ -1658,7 +1652,7 @@ class Observer(object):
+         if not isinstance(time, Time):
+             time = Time(time)
+ 
+-        if _target_is_vector(target):
++        if isiterable(target):
+             coords = [t.coord if hasattr(t, 'coord') else t
+                       for t in target]
+ 
diff -Nru astroplan-0.2/debian/patches/pull-281-Use-mock-machinery-for-remote-data-none.patch astroplan-0.2/debian/patches/pull-281-Use-mock-machinery-for-remote-data-none.patch
--- astroplan-0.2/debian/patches/pull-281-Use-mock-machinery-for-remote-data-none.patch	1970-01-01 01:00:00.000000000 +0100
+++ astroplan-0.2/debian/patches/pull-281-Use-mock-machinery-for-remote-data-none.patch	2017-01-27 20:57:06.000000000 +0100
@@ -0,0 +1,26 @@
+From: Brigitta Sipocz <bsipocz@gmail.com>
+Date: Fri, 6 Jan 2017 14:05:03 +0000
+Subject: pull/281: Use mock machinery for remote-data='none'
+
+Remote data got values in astropy 1.3, thus we need to check for that
+and use the mock machinery if remote-data='none'
+
+This solves most of the issues we see with astropy stable here #278 #263
+
+URL: https://github.com/astropy/astroplan/pull/281
+---
+ astroplan/conftest.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/astroplan/conftest.py b/astroplan/conftest.py
+index e7ab3d9..0b1c2dd 100644
+--- a/astroplan/conftest.py
++++ b/astroplan/conftest.py
+@@ -72,5 +72,6 @@ def pytest_configure(config):
+         # config.option.mpl_baseline_path = 'astroplan/plots/tests/baseline_images'
+ 
+     # Activate remote data mocking if the `--remote-data` option isn't used:
+-    if not config.getoption('remote_data'):
++    if (not config.getoption('remote_data')
++            or config.getvalue('remote_data') == 'none'):
+         _mock_remote_data()
diff -Nru astroplan-0.2/debian/patches/series astroplan-0.2/debian/patches/series
--- astroplan-0.2/debian/patches/series	2016-12-21 13:25:25.000000000 +0100
+++ astroplan-0.2/debian/patches/series	2017-01-27 20:57:06.000000000 +0100
@@ -1,3 +1,7 @@
 use_system_astropy_helpers
-fix_doctests
 fix_invalid_indices
+pull-281-Use-mock-machinery-for-remote-data-none.patch
+pull-274-Stop-recognizing-scalar-SkyCoord-objects-as-vect.patch
+pull-273-Change-to-use-new-SkyCoord-prints.patch
+issues-282-Fix-more-test-failures-in-astroplan.patch
+disable_failing_tests.patch

--- End Message ---
--- Begin Message ---
Vincent Prat:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Dear release team,
> 
> please unblock astroplan in the upcoming (Feb 5) freeze.
> 
> It solves #851437 "FTBFS: requires Internet to build", severity: serious.
> 
> Changelog entry:
> 
> astroplan (0.2-4) unstable; urgency=medium
> 
>   * Github patches + failures marked as known (Closes: #851437)
> 
>  -- Vincent Prat <vinceprat@free.fr>  Fri, 27 Jan 2017 20:57:06 +0100
> 
> The debdiff is attached. Requested commands:
> 
> unblock astroplan/0.2-4
> 

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: