1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
|
%global _empty_manifest_terminate_build 0
Name: python-skyfield-data
Version: 4.0.0
Release: 1
Summary: Data package for Skyfield
License: MIT
URL: https://github.com/brunobord/skyfield-data
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/be/a9/78f778d51e5de8583e4044543fb6223c857c723b4f6f1d5d21cc548d9f03/skyfield-data-4.0.0.tar.gz
BuildArch: noarch
Requires: python3-jplephem
Requires: python3-numpy
Requires: python3-tox
Requires: python3-colorama
Requires: python3-termcolor
Requires: python3-pytest
Requires: python3-skyfield
Requires: python3-mock
%description
# Data files for Skyfield
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Rationale
[Skyfield](https://rhodesmill.org/skyfield/) is a Python library for astronomical computations. It depends on various data files to accurately compute moon phases, planet positions, etc.
Several issues are raised by these data files:
* If they're not found in the path of the ``Loader``, they're **downloaded at runtime**. Depending on the archive you're requesting, some files might be very large, causing a long delay (directly related to your network bandwidth). In the case of a web server app, you'd cause a timeout on client's end.
* They come mainly from 2 sources: NASA's JPL, and the IERS. **If one of them is temporarily unavailable**, you couldn't perform any computation.
* In some countries, or behind some filtering proxies, some hosts may be **blocked**.
* These files have **an expiration date** (in a more or less distant future). As a consequence, even if the files are already downloaded in the right path, at each runtime you could possibly have to download one or more files before making any computation using them.
### Currently known expiration dates
| File | Date |
|:---------------:|:----------:|
| finals2000A.all | 2023-04-09 |
| de421.bsp | 2053-10-08 |
**Deprecation warning**: As of ``python-skyfield>=1.31``, `Leap_Second.dat`, `deltat.data` and `deltat.preds` files are not used anymore. They were not maintained anymore, and Brandon Rhodes switched to other source files for ∆T computations.
## Goal for this project
* Providing at least the most common of these assets in Python Package.
* Make regular releases to refresh the files before they expire.
* Provide a warning / logging mechanism when the files are about to expire (or when they are outdated) to still allow you to compute things with the loaded assets, but being informed you need to upgrade.
This way, you could **install or upgrade** this data package via ``pip``.
Once all the files are on your disk space, you can instantiate your ``skyfield`` loader pointing at their path, without having to worry about anything.
## Usage
Install the packages using:
```sh
pip install skyfield skyfield-data
```
To create a custom Skyfield loader, use the following code:
```python
from skyfield_data import get_skyfield_data_path
from skyfield.api import Loader
load = Loader(get_skyfield_data_path())
planets = load('de421.bsp') # this command won't download this file
ts = load.timescale(builtin=False) # this command won't download the IERS file
```
For the record, using `buitin=True` as an argument to load the timescale data won't trigger the download of the file, because python-skyfield embeds its own data files as a built-in data source.
If you want to make sure that the data files would **never** be downloaded, you can also use the ``expire`` option like this:
```python
load = Loader(get_skyfield_data_path(), expire=False)
```
Whenever a file contained in the catalog has expired, you're going to receive a warning when loading the `skyfield-data` path:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path())
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp has expired. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
By default, the loading isn't blocked, but it's strongly recommended to upgrade to a more recent version, to make sure you're not going to make wrong astronomical computations.
### Custom limit
By default, the ``RuntimeWarning`` is raised when the file **has** expired. You may want to be aware of this warning **in advance**, that is to say a few days or weeks before, in order to eventually upgrade your version of ``skyfield-data``.
In order to trigger this warning, you can use the ``expiration_limit`` argument, like this:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path(expiration_limit=30))
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp would expire in less than 30 days. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
**Note:** The ``expiration_limit`` argument should be a positive integer (or zero).
## Developers
We assume that you'll be using a Python3.6+ version for all regular operations.
We're providing a ``Makefile`` with basic targets to play around with the toolkit. use ``make help`` to get more details.
In order to be able to run the `download.py` script, we recommend to run it **from a virtualenv** where you'd have installed the "dev" dependencies, using:
```sh
make install-dev
```
### Python compatibility
*Important:* This project is, and should stay compatible with Python 2.6, 2.7 and Python 3.5+ up to 3.9, to keep the same Python compatibility that `skyfield` has.
### Hacking
Improving or fixing `skyfield-data` will require you to have at least a virtualenv with `tox` installed on it.
We'll ask you to add tests along your patch, to make sure that no regression or bug would be introduced by your patch or further ones.
To make a quick'n'dirty test, inside your "tox-ready" virtualenv, run:
```sh
make test
```
to launch the Python 2.7 and Python 3.5+ test jobs.
If you want to test your branch against Python 2.6, you'll have to setup a Python 2.6-ready tox environment, by doing something similar to:
```sh
sudo apt install python2.6 python2.6-dev # dev headers to compile numpy
mkvirtualenv TOX26 --python=`which python2.6` # You will activate this venv with `workon TOX26`
pip install tox
tox -c tox-py26.ini
```
**Known issues**: on Ubuntu, you may be unable to build numpy at this point, due to misplaced C header files in your system. I've had hard times on Ubuntu, but your mileage may vary.
Note: At the moment, we can't prove that skyfield-data is 100% compatible with Python 2.6, because of a defunct CI. Although, we're pretty confident it is. Fingers crossed!
### Online CI with Travis & Circle-CI
The online CI relies on Github Actions:
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Copyright
### Data files
* `de421.bsp` is provided by the *Jet Propulsion Laboratory*,
* `finals2000A.all` is provided by the *International Earth Rotation and Reference Systems Service*.
### Software
This Python Package code is published under the terms of the MIT license. See the ``COPYING`` file for more details.
%package -n python3-skyfield-data
Summary: Data package for Skyfield
Provides: python-skyfield-data
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-skyfield-data
# Data files for Skyfield
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Rationale
[Skyfield](https://rhodesmill.org/skyfield/) is a Python library for astronomical computations. It depends on various data files to accurately compute moon phases, planet positions, etc.
Several issues are raised by these data files:
* If they're not found in the path of the ``Loader``, they're **downloaded at runtime**. Depending on the archive you're requesting, some files might be very large, causing a long delay (directly related to your network bandwidth). In the case of a web server app, you'd cause a timeout on client's end.
* They come mainly from 2 sources: NASA's JPL, and the IERS. **If one of them is temporarily unavailable**, you couldn't perform any computation.
* In some countries, or behind some filtering proxies, some hosts may be **blocked**.
* These files have **an expiration date** (in a more or less distant future). As a consequence, even if the files are already downloaded in the right path, at each runtime you could possibly have to download one or more files before making any computation using them.
### Currently known expiration dates
| File | Date |
|:---------------:|:----------:|
| finals2000A.all | 2023-04-09 |
| de421.bsp | 2053-10-08 |
**Deprecation warning**: As of ``python-skyfield>=1.31``, `Leap_Second.dat`, `deltat.data` and `deltat.preds` files are not used anymore. They were not maintained anymore, and Brandon Rhodes switched to other source files for ∆T computations.
## Goal for this project
* Providing at least the most common of these assets in Python Package.
* Make regular releases to refresh the files before they expire.
* Provide a warning / logging mechanism when the files are about to expire (or when they are outdated) to still allow you to compute things with the loaded assets, but being informed you need to upgrade.
This way, you could **install or upgrade** this data package via ``pip``.
Once all the files are on your disk space, you can instantiate your ``skyfield`` loader pointing at their path, without having to worry about anything.
## Usage
Install the packages using:
```sh
pip install skyfield skyfield-data
```
To create a custom Skyfield loader, use the following code:
```python
from skyfield_data import get_skyfield_data_path
from skyfield.api import Loader
load = Loader(get_skyfield_data_path())
planets = load('de421.bsp') # this command won't download this file
ts = load.timescale(builtin=False) # this command won't download the IERS file
```
For the record, using `buitin=True` as an argument to load the timescale data won't trigger the download of the file, because python-skyfield embeds its own data files as a built-in data source.
If you want to make sure that the data files would **never** be downloaded, you can also use the ``expire`` option like this:
```python
load = Loader(get_skyfield_data_path(), expire=False)
```
Whenever a file contained in the catalog has expired, you're going to receive a warning when loading the `skyfield-data` path:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path())
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp has expired. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
By default, the loading isn't blocked, but it's strongly recommended to upgrade to a more recent version, to make sure you're not going to make wrong astronomical computations.
### Custom limit
By default, the ``RuntimeWarning`` is raised when the file **has** expired. You may want to be aware of this warning **in advance**, that is to say a few days or weeks before, in order to eventually upgrade your version of ``skyfield-data``.
In order to trigger this warning, you can use the ``expiration_limit`` argument, like this:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path(expiration_limit=30))
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp would expire in less than 30 days. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
**Note:** The ``expiration_limit`` argument should be a positive integer (or zero).
## Developers
We assume that you'll be using a Python3.6+ version for all regular operations.
We're providing a ``Makefile`` with basic targets to play around with the toolkit. use ``make help`` to get more details.
In order to be able to run the `download.py` script, we recommend to run it **from a virtualenv** where you'd have installed the "dev" dependencies, using:
```sh
make install-dev
```
### Python compatibility
*Important:* This project is, and should stay compatible with Python 2.6, 2.7 and Python 3.5+ up to 3.9, to keep the same Python compatibility that `skyfield` has.
### Hacking
Improving or fixing `skyfield-data` will require you to have at least a virtualenv with `tox` installed on it.
We'll ask you to add tests along your patch, to make sure that no regression or bug would be introduced by your patch or further ones.
To make a quick'n'dirty test, inside your "tox-ready" virtualenv, run:
```sh
make test
```
to launch the Python 2.7 and Python 3.5+ test jobs.
If you want to test your branch against Python 2.6, you'll have to setup a Python 2.6-ready tox environment, by doing something similar to:
```sh
sudo apt install python2.6 python2.6-dev # dev headers to compile numpy
mkvirtualenv TOX26 --python=`which python2.6` # You will activate this venv with `workon TOX26`
pip install tox
tox -c tox-py26.ini
```
**Known issues**: on Ubuntu, you may be unable to build numpy at this point, due to misplaced C header files in your system. I've had hard times on Ubuntu, but your mileage may vary.
Note: At the moment, we can't prove that skyfield-data is 100% compatible with Python 2.6, because of a defunct CI. Although, we're pretty confident it is. Fingers crossed!
### Online CI with Travis & Circle-CI
The online CI relies on Github Actions:
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Copyright
### Data files
* `de421.bsp` is provided by the *Jet Propulsion Laboratory*,
* `finals2000A.all` is provided by the *International Earth Rotation and Reference Systems Service*.
### Software
This Python Package code is published under the terms of the MIT license. See the ``COPYING`` file for more details.
%package help
Summary: Development documents and examples for skyfield-data
Provides: python3-skyfield-data-doc
%description help
# Data files for Skyfield
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Rationale
[Skyfield](https://rhodesmill.org/skyfield/) is a Python library for astronomical computations. It depends on various data files to accurately compute moon phases, planet positions, etc.
Several issues are raised by these data files:
* If they're not found in the path of the ``Loader``, they're **downloaded at runtime**. Depending on the archive you're requesting, some files might be very large, causing a long delay (directly related to your network bandwidth). In the case of a web server app, you'd cause a timeout on client's end.
* They come mainly from 2 sources: NASA's JPL, and the IERS. **If one of them is temporarily unavailable**, you couldn't perform any computation.
* In some countries, or behind some filtering proxies, some hosts may be **blocked**.
* These files have **an expiration date** (in a more or less distant future). As a consequence, even if the files are already downloaded in the right path, at each runtime you could possibly have to download one or more files before making any computation using them.
### Currently known expiration dates
| File | Date |
|:---------------:|:----------:|
| finals2000A.all | 2023-04-09 |
| de421.bsp | 2053-10-08 |
**Deprecation warning**: As of ``python-skyfield>=1.31``, `Leap_Second.dat`, `deltat.data` and `deltat.preds` files are not used anymore. They were not maintained anymore, and Brandon Rhodes switched to other source files for ∆T computations.
## Goal for this project
* Providing at least the most common of these assets in Python Package.
* Make regular releases to refresh the files before they expire.
* Provide a warning / logging mechanism when the files are about to expire (or when they are outdated) to still allow you to compute things with the loaded assets, but being informed you need to upgrade.
This way, you could **install or upgrade** this data package via ``pip``.
Once all the files are on your disk space, you can instantiate your ``skyfield`` loader pointing at their path, without having to worry about anything.
## Usage
Install the packages using:
```sh
pip install skyfield skyfield-data
```
To create a custom Skyfield loader, use the following code:
```python
from skyfield_data import get_skyfield_data_path
from skyfield.api import Loader
load = Loader(get_skyfield_data_path())
planets = load('de421.bsp') # this command won't download this file
ts = load.timescale(builtin=False) # this command won't download the IERS file
```
For the record, using `buitin=True` as an argument to load the timescale data won't trigger the download of the file, because python-skyfield embeds its own data files as a built-in data source.
If you want to make sure that the data files would **never** be downloaded, you can also use the ``expire`` option like this:
```python
load = Loader(get_skyfield_data_path(), expire=False)
```
Whenever a file contained in the catalog has expired, you're going to receive a warning when loading the `skyfield-data` path:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path())
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp has expired. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
By default, the loading isn't blocked, but it's strongly recommended to upgrade to a more recent version, to make sure you're not going to make wrong astronomical computations.
### Custom limit
By default, the ``RuntimeWarning`` is raised when the file **has** expired. You may want to be aware of this warning **in advance**, that is to say a few days or weeks before, in order to eventually upgrade your version of ``skyfield-data``.
In order to trigger this warning, you can use the ``expiration_limit`` argument, like this:
```python
>>> from skyfield_data import get_skyfield_data_path
>>> from skyfield.api import Loader
>>> load = Loader(get_skyfield_data_path(expiration_limit=30))
/home/[redacted]/skyfield_data/expirations.py:25: RuntimeWarning: The file de421.bsp would expire in less than 30 days. Please upgrade your version of `skyfield-data` or expect computation errors
RuntimeWarning
```
**Note:** The ``expiration_limit`` argument should be a positive integer (or zero).
## Developers
We assume that you'll be using a Python3.6+ version for all regular operations.
We're providing a ``Makefile`` with basic targets to play around with the toolkit. use ``make help`` to get more details.
In order to be able to run the `download.py` script, we recommend to run it **from a virtualenv** where you'd have installed the "dev" dependencies, using:
```sh
make install-dev
```
### Python compatibility
*Important:* This project is, and should stay compatible with Python 2.6, 2.7 and Python 3.5+ up to 3.9, to keep the same Python compatibility that `skyfield` has.
### Hacking
Improving or fixing `skyfield-data` will require you to have at least a virtualenv with `tox` installed on it.
We'll ask you to add tests along your patch, to make sure that no regression or bug would be introduced by your patch or further ones.
To make a quick'n'dirty test, inside your "tox-ready" virtualenv, run:
```sh
make test
```
to launch the Python 2.7 and Python 3.5+ test jobs.
If you want to test your branch against Python 2.6, you'll have to setup a Python 2.6-ready tox environment, by doing something similar to:
```sh
sudo apt install python2.6 python2.6-dev # dev headers to compile numpy
mkvirtualenv TOX26 --python=`which python2.6` # You will activate this venv with `workon TOX26`
pip install tox
tox -c tox-py26.ini
```
**Known issues**: on Ubuntu, you may be unable to build numpy at this point, due to misplaced C header files in your system. I've had hard times on Ubuntu, but your mileage may vary.
Note: At the moment, we can't prove that skyfield-data is 100% compatible with Python 2.6, because of a defunct CI. Although, we're pretty confident it is. Fingers crossed!
### Online CI with Travis & Circle-CI
The online CI relies on Github Actions:
[](https://github.com/brunobord/skyfield-data/actions/workflows/tests.yml)
## Copyright
### Data files
* `de421.bsp` is provided by the *Jet Propulsion Laboratory*,
* `finals2000A.all` is provided by the *International Earth Rotation and Reference Systems Service*.
### Software
This Python Package code is published under the terms of the MIT license. See the ``COPYING`` file for more details.
%prep
%autosetup -n skyfield-data-4.0.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-skyfield-data -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.0.0-1
- Package Spec generated
|