GNU bug report logs - #48046
[PATCH]: Gnu add astropy

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Mon, 26 Apr 2021 20:03:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48046 in the body.
You can then email your comments to 48046 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Mon, 26 Apr 2021 20:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 26 Apr 2021 20:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH]: Gnu add astropy
Date: Mon, 26 Apr 2021 20:01:48 +0000
[Message part 1 (text/plain, inline)]
Hi Guix team!

Here is my attempt to pack bulky python package - https://www.astropy.org/
I've disabled test and add minor modification removing `_compiler.c' file.

Main license - https://docs.astropy.org/en/stable/license.html?highlight=license
third party licenses - https://github.com/astropy/astropy/tree/main/licenses
-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
[0001-Gnu-Add-Astropy.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Wed, 19 May 2021 18:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 48046 <at> debbugs.gnu.org
Subject: Re: [PATCH]: Gnu add astropy
Date: Wed, 19 May 2021 18:16:41 +0000
Hi,

Em seg, 2021-04-26 às 20:01 +0000, Sharlatan Hellseher escreveu:
> Hi Guix team!
> 
> Here is my attempt to pack bulky python package - 
> https://www.astropy.org/
> I've disabled test and add minor modification removing `_compiler.c'
> file.

I've tried to package AstroPy before but got stuck in the dependencies,
more specifically pytest-astropy. There is a bug somewhere that pytest-
filter-subpackage is not found by setup.py, even though it's listed in
the inputs. I encountered that problem again here, after enabling the
tests.

> +     ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build
> astropy
> +     ;; module, it needs a good review on how to enable them.
> +     `(#:tests? #f

AstroPy uses pytest, which is not listed in your native-inputs. The
other dependencies I had to add are python-hypothesis, python-pytest-
cov, python-pytest-astropy and python-pytest-xdist. According to the
documentation, it should be as simple as running pytest to run the
entire test suite:

https://docs.astropy.org/en/latest/development/testguide.html#running-tests

If you end up in 'ModuleNotFoundError: No module named "astropy"', you
may have to update PYTHONPATH after the install phase with (add-
installed-pythonpath inputs outputs). That usually happens when
replacing the check phase.

> +    (inputs
> +     `(("asdf" ,python-asdf)
> +       ("beautifulsoup4" ,python-beautifulsoup4)
> +       ("bleach" ,python-bleach)
> +       ("bottleneck" ,python-bottleneck)
> +       ("cfitsio" ,cfitsio)
> +       ("dask" ,python-dask)
> +       ("expat" ,expat)
> +       ("graphviz" ,graphviz)
> +       ("h5py" ,python-h5py)
> +       ("html5lib" ,python-html5lib)
> +       ("jplephem" ,python-jplephem)
> +       ("matplotlib" ,python-matplotlib)
> +       ("mpmath" ,python-mpmath)
> +       ("numpy" ,python-numpy)
> +       ("pandas" ,python-pandas)
> +       ("pyerfa" ,python-pyerfa)
> +       ("pytz" ,python-pytz)
> +       ("pyyaml" ,python-pyyaml)
> +       ("scipy" ,python-scipy)
> +       ("sortedcontainers" ,python-sortedcontainers)
> +       ("wcslib" ,wcslib)))

AstroPy is a library, its Python inputs should be propagated here.
See https://guix.gnu.org/manual/en/html_node/package-Reference.html#package-Reference
for reference.

Also, the documentation states that the only strict requirements are
PyERFA and NumPy:

https://docs.astropy.org/en/stable/install.html

IMO we should only propagate these, and leave the rest in native-inputs
as needed by tests.

Now speaking of the astropy dependencies, pytest-astropy is supposed to
propagate its six dependencies. AFAIK its purpose is to be a
metapackage to install these other 6 pytest modules. PyERFA should also
propagate numpy (liberfa can remain as normal input).

I'll take a look at this package again next week. Could you test these
suggestions in the meantime?

Vinicius
 





Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sat, 22 May 2021 20:01:02 GMT) Full text and rfc822 format available.

Message #11 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 48046 <at> debbugs.gnu.org
Subject: Re: [PATCH]: Gnu add astropy
Date: Sat, 22 May 2021 20:00:35 +0000
[Message part 1 (text/plain, inline)]
Hi Vinicius,

My attempt to make Astropy test working failed as well. the project
heavily depends on TOX which requires pip to install missing
dependencies for itself. I run test with pytest but it looks like it's
not allowed by this
https://github.com/astropy/astropy/blob/main/astropy/__init__.py#L139

I'll come back to conquer it once again when I have some fresh ideas.

On Wed, 19 May 2021 at 18:16, Vinicius Monego <monego <at> posteo.net> wrote:
>
> Hi,
>
> Em seg, 2021-04-26 às 20:01 +0000, Sharlatan Hellseher escreveu:
> > Hi Guix team!
> >
> > Here is my attempt to pack bulky python package -
> > https://www.astropy.org/
> > I've disabled test and add minor modification removing `_compiler.c'
> > file.
>
> I've tried to package AstroPy before but got stuck in the dependencies,
> more specifically pytest-astropy. There is a bug somewhere that pytest-
> filter-subpackage is not found by setup.py, even though it's listed in
> the inputs. I encountered that problem again here, after enabling the
> tests.
>
> > +     ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build
> > astropy
> > +     ;; module, it needs a good review on how to enable them.
> > +     `(#:tests? #f
>
> AstroPy uses pytest, which is not listed in your native-inputs. The
> other dependencies I had to add are python-hypothesis, python-pytest-
> cov, python-pytest-astropy and python-pytest-xdist. According to the
> documentation, it should be as simple as running pytest to run the
> entire test suite:
>
> https://docs.astropy.org/en/latest/development/testguide.html#running-tests
>
> If you end up in 'ModuleNotFoundError: No module named "astropy"', you
> may have to update PYTHONPATH after the install phase with (add-
> installed-pythonpath inputs outputs). That usually happens when
> replacing the check phase.
>
> > +    (inputs
> > +     `(("asdf" ,python-asdf)
> > +       ("beautifulsoup4" ,python-beautifulsoup4)
> > +       ("bleach" ,python-bleach)
> > +       ("bottleneck" ,python-bottleneck)
> > +       ("cfitsio" ,cfitsio)
> > +       ("dask" ,python-dask)
> > +       ("expat" ,expat)
> > +       ("graphviz" ,graphviz)
> > +       ("h5py" ,python-h5py)
> > +       ("html5lib" ,python-html5lib)
> > +       ("jplephem" ,python-jplephem)
> > +       ("matplotlib" ,python-matplotlib)
> > +       ("mpmath" ,python-mpmath)
> > +       ("numpy" ,python-numpy)
> > +       ("pandas" ,python-pandas)
> > +       ("pyerfa" ,python-pyerfa)
> > +       ("pytz" ,python-pytz)
> > +       ("pyyaml" ,python-pyyaml)
> > +       ("scipy" ,python-scipy)
> > +       ("sortedcontainers" ,python-sortedcontainers)
> > +       ("wcslib" ,wcslib)))
>
> AstroPy is a library, its Python inputs should be propagated here.
> See https://guix.gnu.org/manual/en/html_node/package-Reference.html#package-Reference
> for reference.
>
> Also, the documentation states that the only strict requirements are
> PyERFA and NumPy:
>
> https://docs.astropy.org/en/stable/install.html
>
> IMO we should only propagate these, and leave the rest in native-inputs
> as needed by tests.
>
> Now speaking of the astropy dependencies, pytest-astropy is supposed to
> propagate its six dependencies. AFAIK its purpose is to be a
> metapackage to install these other 6 pytest modules. PyERFA should also
> propagate numpy (liberfa can remain as normal input).
>
> I'll take a look at this package again next week. Could you test these
> suggestions in the meantime?
>
> Vinicius
>
>


-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
[0001-gnu-astropy-rc1.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sun, 23 May 2021 17:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 48046 <at> debbugs.gnu.org
Subject: Re: [PATCH]: Gnu add astropy
Date: Sun, 23 May 2021 17:54:08 +0000
[Message part 1 (text/plain, inline)]
Hi Sharlatan,

Thanks for continuing the work on the astropy package, I managed to
finish it this time. I am resending your patch with the following
modifications:

- Moved the package definition from the bottom to the middle of the
file (to avoid merge conflicts)
- Removed all optional inputs and propagated the remaining. I left only
those listed in install_requires, setup_requires, test_requires and
test[extras] in setup.cfg
- Changed synopsis and description
- Changed package labels to match the package name    
- Made the compiler file writable instead of deleting it
- Deleted the makdir-astropy phase (it wasn't needed)
- Added license for the jquery bundle that is not replaced

and then I made my own improvements on that patch: enabling tests and
unbundling some external libraries.

I removed the optional packages because astropy is a core package,
which will be a dependency for its many extensions. It's important that
it builds with a high probability of success or the chain will break.
Some of its optional dependencies, e.g. Pandas, have a broken build in
aarch64 at the moment. The "full" astropy package could be installed
easily from a manifest file and the tests can run again with
astropy.test().

> the project heavily depends on TOX which requires pip to install
> missing dependencies for itself.

I don't think that a project can heavily depend on tox, all it does is
manage a virtual environment with dependencies to run the tests. Guix
does the same so tox is redundant here. Tests will still run with the
testing framework.

Two more suggestions for future Python patches:

> +         (replace 'check
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (add-installed-pythonpath inputs outputs)
> +             (invoke "pytest" "-vv")))

When a project contains tests as part of the application code, as in
Astropy, tests should run with "pytest --pyargs module". See Pytest
Integration Pratices:
https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html

It's also good practice in Guix to use (when tests?) when overriding
the check phase to allow --without-tests=pkg.
  
> ImportError: You appear to be trying to import astropy from within a
> source checkout or from an editable installation without building the
> extension modules first. Either run:

I fixed this error by running the second command before the tests.

If you don't mind the modifications I did, I will call this patchset
complete and wait for a committer to review.

Vinicius
[0001-gnu-Add-python-astropy.patch (text/x-patch, attachment)]
[0002-gnu-python-pytest-astropy-Propagate-inputs.patch (text/x-patch, attachment)]
[0003-gnu-python-pyerfa-Adjust-inputs.patch (text/x-patch, attachment)]
[0004-gnu-Add-wcslib-7.3.patch (text/x-patch, attachment)]
[0005-gnu-python-astropy-Enable-tests.patch (text/x-patch, attachment)]
[0006-gnu-python-astropy-Unbundle-ply-and-configobj.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sun, 23 May 2021 20:02:01 GMT) Full text and rfc822 format available.

Message #17 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 48046 <at> debbugs.gnu.org
Subject: Re: [PATCH]: Gnu add astropy
Date: Sun, 23 May 2021 20:01:00 +0000
Hi Vinicius,

It' fantastic! Thanks for your feedback and modification, I'm
absolutely ok with them.

When astropy is accepted it will open a way for other astronomical
packages which are depend on it,
and I've noticed some other packages in master require astropy for
tests so it would beneficial to have it merged :)!

On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego <at> posteo.net> wrote:
>
> Hi Sharlatan,
>
> Thanks for continuing the work on the astropy package, I managed to
> finish it this time. I am resending your patch with the following
> modifications:
>
> - Moved the package definition from the bottom to the middle of the
> file (to avoid merge conflicts)
> - Removed all optional inputs and propagated the remaining. I left only
> those listed in install_requires, setup_requires, test_requires and
> test[extras] in setup.cfg
> - Changed synopsis and description
> - Changed package labels to match the package name
> - Made the compiler file writable instead of deleting it
> - Deleted the makdir-astropy phase (it wasn't needed)
> - Added license for the jquery bundle that is not replaced
>
> and then I made my own improvements on that patch: enabling tests and
> unbundling some external libraries.
>
> I removed the optional packages because astropy is a core package,
> which will be a dependency for its many extensions. It's important that
> it builds with a high probability of success or the chain will break.
> Some of its optional dependencies, e.g. Pandas, have a broken build in
> aarch64 at the moment. The "full" astropy package could be installed
> easily from a manifest file and the tests can run again with
> astropy.test().
>
> > the project heavily depends on TOX which requires pip to install
> > missing dependencies for itself.
>
> I don't think that a project can heavily depend on tox, all it does is
> manage a virtual environment with dependencies to run the tests. Guix
> does the same so tox is redundant here. Tests will still run with the
> testing framework.
>
> Two more suggestions for future Python patches:
>
> > +         (replace 'check
> > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > +             (add-installed-pythonpath inputs outputs)
> > +             (invoke "pytest" "-vv")))
>
> When a project contains tests as part of the application code, as in
> Astropy, tests should run with "pytest --pyargs module". See Pytest
> Integration Pratices:
> https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
>
> It's also good practice in Guix to use (when tests?) when overriding
> the check phase to allow --without-tests=pkg.
>
> > ImportError: You appear to be trying to import astropy from within a
> > source checkout or from an editable installation without building the
> > extension modules first. Either run:
>
> I fixed this error by running the second command before the tests.
>
> If you don't mind the modifications I did, I will call this patchset
> complete and wait for a committer to review.
>
> Vinicius



-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.




Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Fri, 29 Oct 2021 21:37:02 GMT) Full text and rfc822 format available.

Message #20 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 48046 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: Re: [PATCH]: Gnu add astropy
Date: Fri, 29 Oct 2021 22:35:51 +0100
Hi Guix team!

Is this set of patches still in review or just dromaint :)?

Regards

On Sun, 23 May 2021 at 21:01, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:
>
> Hi Vinicius,
>
> It' fantastic! Thanks for your feedback and modification, I'm
> absolutely ok with them.
>
> When astropy is accepted it will open a way for other astronomical
> packages which are depend on it,
> and I've noticed some other packages in master require astropy for
> tests so it would beneficial to have it merged :)!
>
> On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego <at> posteo.net> wrote:
> >
> > Hi Sharlatan,
> >
> > Thanks for continuing the work on the astropy package, I managed to
> > finish it this time. I am resending your patch with the following
> > modifications:
> >
> > - Moved the package definition from the bottom to the middle of the
> > file (to avoid merge conflicts)
> > - Removed all optional inputs and propagated the remaining. I left only
> > those listed in install_requires, setup_requires, test_requires and
> > test[extras] in setup.cfg
> > - Changed synopsis and description
> > - Changed package labels to match the package name
> > - Made the compiler file writable instead of deleting it
> > - Deleted the makdir-astropy phase (it wasn't needed)
> > - Added license for the jquery bundle that is not replaced
> >
> > and then I made my own improvements on that patch: enabling tests and
> > unbundling some external libraries.
> >
> > I removed the optional packages because astropy is a core package,
> > which will be a dependency for its many extensions. It's important that
> > it builds with a high probability of success or the chain will break.
> > Some of its optional dependencies, e.g. Pandas, have a broken build in
> > aarch64 at the moment. The "full" astropy package could be installed
> > easily from a manifest file and the tests can run again with
> > astropy.test().
> >
> > > the project heavily depends on TOX which requires pip to install
> > > missing dependencies for itself.
> >
> > I don't think that a project can heavily depend on tox, all it does is
> > manage a virtual environment with dependencies to run the tests. Guix
> > does the same so tox is redundant here. Tests will still run with the
> > testing framework.
> >
> > Two more suggestions for future Python patches:
> >
> > > +         (replace 'check
> > > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > > +             (add-installed-pythonpath inputs outputs)
> > > +             (invoke "pytest" "-vv")))
> >
> > When a project contains tests as part of the application code, as in
> > Astropy, tests should run with "pytest --pyargs module". See Pytest
> > Integration Pratices:
> > https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
> >
> > It's also good practice in Guix to use (when tests?) when overriding
> > the check phase to allow --without-tests=pkg.
> >
> > > ImportError: You appear to be trying to import astropy from within a
> > > source checkout or from an editable installation without building the
> > > extension modules first. Either run:
> >
> > I fixed this error by running the second command before the tests.
> >
> > If you don't mind the modifications I did, I will call this patchset
> > complete and wait for a committer to review.
> >
> > Vinicius
>
>
>
> --
>
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.



-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.




Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Fri, 29 Oct 2021 23:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 48046 <at> debbugs.gnu.org
Subject: Re: [PATCH]: Gnu add astropy
Date: Fri, 29 Oct 2021 22:58:45 +0000
Hi Sharlatan,

I was looking at this series once again and there are some fixes I will
have to do in a resubmission.

The main problem right now is that astropy is tied to a specific wcs
version that it bundles. The code can't compile with the 7.5 version in
Guix. Astropy 4.2 comes with wcs 7.3 and 4.3 comes with wcs 7.6. I
tried to update wcs in guix to 7.6 but tests failed in this version.
Not sure what is the best approach in this, packaging a separate wcs at
7.3 and keep astropy at 4.2.1, or use the bundle.

Anyway, I'll submit this series again later.

Vinicius

Em sex, 2021-10-29 às 22:35 +0100, Sharlatan Hellseher escreveu:
> Hi Guix team!
> 
> Is this set of patches still in review or just dromaint :)?
> 
> Regards
> 
> On Sun, 23 May 2021 at 21:01, Sharlatan Hellseher
> <sharlatanus <at> gmail.com> wrote:
> > 
> > Hi Vinicius,
> > 
> > It' fantastic! Thanks for your feedback and modification, I'm
> > absolutely ok with them.
> > 
> > When astropy is accepted it will open a way for other astronomical
> > packages which are depend on it,
> > and I've noticed some other packages in master require astropy for
> > tests so it would beneficial to have it merged :)!
> > 
> > On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego <at> posteo.net>
> > wrote:
> > > 
> > > Hi Sharlatan,
> > > 
> > > Thanks for continuing the work on the astropy package, I managed
> > > to
> > > finish it this time. I am resending your patch with the following
> > > modifications:
> > > 
> > > - Moved the package definition from the bottom to the middle of
> > > the
> > > file (to avoid merge conflicts)
> > > - Removed all optional inputs and propagated the remaining. I
> > > left only
> > > those listed in install_requires, setup_requires, test_requires
> > > and
> > > test[extras] in setup.cfg
> > > - Changed synopsis and description
> > > - Changed package labels to match the package name
> > > - Made the compiler file writable instead of deleting it
> > > - Deleted the makdir-astropy phase (it wasn't needed)
> > > - Added license for the jquery bundle that is not replaced
> > > 
> > > and then I made my own improvements on that patch: enabling tests
> > > and
> > > unbundling some external libraries.
> > > 
> > > I removed the optional packages because astropy is a core
> > > package,
> > > which will be a dependency for its many extensions. It's
> > > important that
> > > it builds with a high probability of success or the chain will
> > > break.
> > > Some of its optional dependencies, e.g. Pandas, have a broken
> > > build in
> > > aarch64 at the moment. The "full" astropy package could be
> > > installed
> > > easily from a manifest file and the tests can run again with
> > > astropy.test().
> > > 
> > > > the project heavily depends on TOX which requires pip to
> > > > install
> > > > missing dependencies for itself.
> > > 
> > > I don't think that a project can heavily depend on tox, all it
> > > does is
> > > manage a virtual environment with dependencies to run the tests.
> > > Guix
> > > does the same so tox is redundant here. Tests will still run with
> > > the
> > > testing framework.
> > > 
> > > Two more suggestions for future Python patches:
> > > 
> > > > +         (replace 'check
> > > > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > > > +             (add-installed-pythonpath inputs outputs)
> > > > +             (invoke "pytest" "-vv")))
> > > 
> > > When a project contains tests as part of the application code, as
> > > in
> > > Astropy, tests should run with "pytest --pyargs module". See
> > > Pytest
> > > Integration Pratices:
> > > https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
> > > 
> > > It's also good practice in Guix to use (when tests?) when
> > > overriding
> > > the check phase to allow --without-tests=pkg.
> > > 
> > > > ImportError: You appear to be trying to import astropy from
> > > > within a
> > > > source checkout or from an editable installation without
> > > > building the
> > > > extension modules first. Either run:
> > > 
> > > I fixed this error by running the second command before the
> > > tests.
> > > 
> > > If you don't mind the modifications I did, I will call this
> > > patchset
> > > complete and wait for a committer to review.
> > > 
> > > Vinicius
> > 
> > 
> > 
> > --
> > 
> > … наш разум - превосходная объяснительная машина которая способна
> > найти смысл почти в чем угодно, истолковать любой феномен, но
> > совершенно не в состоянии принять мысль о непредсказуемости.
> 
> 
> 






Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sat, 30 Oct 2021 02:57:01 GMT) Full text and rfc822 format available.

Message #26 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48046 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH v2 0/3] Add Astropy.
Date: Sat, 30 Oct 2021 02:51:30 +0000
Changes in this series:

Merged astropy patches into one and added myself as co-author.
Moved unbundling code from phase to snippet.
Updated astropy to 4.3.1.
Added python-jplephem to native-inputs in astropy.
Removed wcs patch and used the wcs bundle from astropy.

Sharlatan Hellseher (1):
  gnu: Add python-astropy.

Vinicius Monego (2):
  gnu: python-pytest-astropy: Adjust inputs.
  gnu: python-pyerfa: Adjust inputs.

 gnu/packages/astronomy.scm    | 101 +++++++++++++++++++++++++++++++++-
 gnu/packages/python-check.scm |  17 ++++--
 2 files changed, 111 insertions(+), 7 deletions(-)


base-commit: e1261ddd38cf02a0f046f3a5360502d659b4e7d4
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sat, 30 Oct 2021 02:57:02 GMT) Full text and rfc822 format available.

Message #29 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48046 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH v2 1/3] gnu: python-pytest-astropy: Adjust inputs.
Date: Sat, 30 Oct 2021 02:51:31 +0000
* gnu/packages/python-check.scm (python-pytest-astropy)[arguments]: Add new
phase to skip a version check bug.
[native-inputs]: Remove python-pytest. Move python-attrs, python-hypothesis,
python-pytest-arraydiff, python-pytest-astropy-header, python-pytest-cov,
python-pytest-filter-subpackage, python-pytest-mock, python-pytest-openfiles,
python-pytest-remotedata to ...
[propagated-inputs]: ... here.
---
 gnu/packages/python-check.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index a13bd0baa4..0cc0468d00 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -341,12 +341,20 @@ Astropy project, but is optimized for use with astropy-related projects.")
         (base32 "18j6z6y2fvykmcs5z0mldhhaxxn6wzpnhlm2ps7m8r5z5kmh1631"))))
     (build-system python-build-system)
     (arguments
-     ;; No tests provided
-     '(#:tests? #f))
+     `(#:tests? #f ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         ;; There is a bug somewhere that makes pytest-filter-subpackage appear
+         ;; as version 0.0.0 to setup.py.  Remove it from the requirements.
+         (add-after 'unpack 'remove-requirement
+           (lambda _
+             (substitute* "setup.cfg"
+               ((".*pytest-filter-subpackage.*") "")))))))
     (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (propagated-inputs
      `(("attrs" ,python-attrs)
        ("hypothesis" ,python-hypothesis)
-       ("pytest" ,python-pytest)
        ("pytest-arraydiff" ,python-pytest-arraydiff)
        ("pytest-astropy-header" ,python-pytest-astropy-header)
        ("pytest-cov" ,python-pytest-cov)
@@ -354,8 +362,7 @@ Astropy project, but is optimized for use with astropy-related projects.")
        ("pytest-filter-subpackage" ,python-pytest-filter-subpackage)
        ("pytest-mock" ,python-pytest-mock)
        ("pytest-openfiles" ,python-pytest-openfiles)
-       ("pytest-remotedata" ,python-pytest-remotedata)
-       ("setuptools-scm" ,python-setuptools-scm)))
+       ("pytest-remotedata" ,python-pytest-remotedata)))
     (home-page "https://github.com/astropy/pytest-astropy")
     (synopsis
      "Metapackage for all the testing machinery used by the Astropy Project")
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sat, 30 Oct 2021 02:58:01 GMT) Full text and rfc822 format available.

Message #32 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48046 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2 3/3] gnu: Add python-astropy.
Date: Sat, 30 Oct 2021 02:51:33 +0000
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>

This patch was co-authored with Vinicius Monego.

* gnu/packages/astronomy.scm (python-astropy): New variable.
---
 gnu/packages/astronomy.scm | 95 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 95846749af..ec48c787e3 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -613,6 +614,100 @@ accurately in real time at any rate desired.")
      `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
        #:tests? #f))))
 
+(define-public python-astropy
+  (package
+    (name "python-astropy")
+    (version "4.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "astropy" version))
+       (sha256
+        (base32 "0lfd6n7v7kas4wvacddnwgccax3ks908735dzilg7dsf7ci52f9d"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove Python bundles.
+           (with-directory-excursion "astropy/extern"
+             (for-each delete-file-recursively '("ply" "configobj")))
+           ;; Remove cextern bundles and leave the wcslib bundle.  Astropy
+           ;; upgrades to different versions of wcslib every few releases
+           ;; and tests break every upgrade.
+           ;; TODO: unbundle wcslib.
+           (with-directory-excursion "cextern"
+             (for-each delete-file-recursively '("cfitsio" "expat")))
+           #t))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'preparations
+           (lambda _
+             ;; Use our own libraries in place of bundles, with the
+             ;; exception of wcslib.
+             (setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1")
+             (setenv "ASTROPY_USE_SYSTEM_EXPAT" "1")
+             ;; Some tests require a writable home.
+             (setenv "HOME" "/tmp")
+             ;; Relax xfail tests.
+             (substitute* "setup.cfg"
+               (("xfail_strict = true") "xfail_strict = false"))
+             ;; Replace all references to external ply.
+             (let ((ply-files '("coordinates/angle_formats.py"
+                                "utils/parsing.py")))
+               (with-directory-excursion "astropy"
+                 (map (lambda (file)
+                        (substitute* file (("astropy.extern.ply")
+                                           "ply")))
+                      ply-files)))
+             ;; Replace reference to external configobj.
+             (with-directory-excursion "astropy/config"
+               (substitute* "configuration.py"
+                 (("from astropy.extern.configobj ") "")))))
+         ;; This file is opened in both install and check phases.
+         (add-before 'install 'writable-compiler
+           (lambda _ (make-file-writable "astropy/_compiler.c")))
+         (add-before 'check 'writable-compiler
+           (lambda _ (make-file-writable "astropy/_compiler.c")))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               ;; Extensions have to be rebuilt before running the tests.
+               (invoke "python" "setup.py" "build_ext" "--inplace")
+               (invoke "python" "-m" "pytest" "--pyargs" "astropy"
+                       ;; Skip tests that need remote data.
+                       "-m" "not remote_data")))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python-coverage" ,python-coverage)
+       ("python-cython" ,python-cython)
+       ("python-extension-helpers" ,python-extension-helpers)
+       ("python-ipython" ,python-ipython)
+       ("python-jplephem" ,python-jplephem)
+       ("python-objgraph" ,python-objgraph)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-astropy" ,python-pytest-astropy)
+       ("python-pytest-xdist" ,python-pytest-xdist)
+       ("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-sgp4" ,python-sgp4)
+       ("python-skyfield" ,python-skyfield)))
+    (inputs
+     `(("cfitsio" ,cfitsio)
+       ("expat" ,expat)))
+    (propagated-inputs
+     `(("python-configobj" ,python-configobj)
+       ("python-numpy" ,python-numpy)
+       ("python-ply" ,python-ply)
+       ("python-pyerfa" ,python-pyerfa)))
+    (home-page "https://www.astropy.org/")
+    (synopsis "Core package for Astronomy in Python")
+    (description
+     "Astropy is a single core package for Astronomy in Python.  It contains
+much of the core functionality and some common tools needed for performing
+astronomy and astrophysics.")
+    (license license:bsd-3)))
+
 (define-public libnova
   (package
     (name "libnova")
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#48046; Package guix-patches. (Sat, 30 Oct 2021 02:58:02 GMT) Full text and rfc822 format available.

Message #35 received at 48046 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48046 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH v2 2/3] gnu: python-pyerfa: Adjust inputs.
Date: Sat, 30 Oct 2021 02:51:32 +0000
* gnu/packages/astronomy.scm (python-pyerfa)[inputs]: Move python-numpy to ...
[propagated-inputs]: ... here.
---
 gnu/packages/astronomy.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1fb6f5a38b..95846749af 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021 Vinicius Monego <monego <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1009,8 +1010,9 @@ JPL ephemerides use to predict raw (x,y,z) planetary positions.")
        ("setuptools-scm" ,python-setuptools-scm)
        ("pytest-doctestplus" ,python-pytest-doctestplus)))
     (inputs
-     `(("liberfa" ,erfa)
-       ("numpy" ,python-numpy)))
+     `(("liberfa" ,erfa)))
+    (propagated-inputs
+     `(("numpy" ,python-numpy)))
     (home-page "https://github.com/liberfa/pyerfa")
     (synopsis "Python bindings for ERFA")
     (description
-- 
2.30.2





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Mon, 08 Nov 2021 08:08:01 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Mon, 08 Nov 2021 08:08:01 GMT) Full text and rfc822 format available.

Message #40 received at 48046-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 48046-done <at> debbugs.gnu.org
Subject: Re: [bug#48046] [PATCH v2 0/3] Add Astropy.
Date: Mon, 8 Nov 2021 10:06:27 +0200
[Message part 1 (text/plain, inline)]
Thanks for finishing this up. Patches pushed.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.