spherapy 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spherapy-0.2.0 → spherapy-0.2.1}/CHANGELOG.md +3 -0
- {spherapy-0.2.0/spherapy.egg-info → spherapy-0.2.1}/PKG-INFO +1 -1
- {spherapy-0.2.0 → spherapy-0.2.1}/pyproject.toml +1 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/_version.py +3 -3
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/updater.py +1 -2
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/celestrak.py +1 -1
- {spherapy-0.2.0 → spherapy-0.2.1/spherapy.egg-info}/PKG-INFO +1 -1
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.egg-info/SOURCES.txt +1 -0
- spherapy-0.2.1/tests/spherapy/conftest.py +32 -0
- spherapy-0.2.1/tests/spherapy/test_orbit.py +563 -0
- spherapy-0.2.1/tests/spherapy/test_timespan.py +292 -0
- spherapy-0.2.1/tests/utils/test_epoch_u.py +104 -0
- spherapy-0.2.0/tests/spherapy/test_orbit.py +0 -565
- spherapy-0.2.0/tests/spherapy/test_timespan.py +0 -293
- spherapy-0.2.0/tests/utils/test_epoch_u.py +0 -103
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/ISSUE_TEMPLATE/question.yaml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/workflows/pr.yml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.github/workflows/release.yml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.gitignore +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/.pre-commit-config.yaml +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/CONTRIBUTING.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/LICENSE.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/README.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/README.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/orbit.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/timespan.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/updater.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.celestrak.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.constants.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.credentials.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.elements_u.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.epoch_u.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.exceptions.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.orbital_u.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/docs/util.spacetrack.md +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/setup.cfg +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/__init__.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/__main__.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/data/TLEs/25544.tle +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/orbit.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/timespan.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/__init__.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/constants.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/credentials.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/elements_u.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/epoch_u.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/exceptions.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/orbital_u.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy/util/spacetrack.py +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.conf +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.egg-info/dependency_links.txt +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.egg-info/entry_points.txt +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.egg-info/requires.txt +0 -0
- {spherapy-0.2.0 → spherapy-0.2.1}/spherapy.egg-info/top_level.txt +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 1)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'ge103d2055'
|
|
@@ -3,8 +3,7 @@ import datetime as dt
|
|
|
3
3
|
import pathlib
|
|
4
4
|
|
|
5
5
|
import spherapy
|
|
6
|
-
from spherapy.util import epoch_u, spacetrack
|
|
7
|
-
import spherapy.util.spacetrack as celestrak
|
|
6
|
+
from spherapy.util import celestrak, epoch_u, spacetrack
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
def updateTLEs(sat_id_list: list[int]) -> list[int]:
|
|
@@ -43,7 +43,7 @@ def updateTLEs(sat_id_list:list[int]) -> list[int]:
|
|
|
43
43
|
while retry_num < MAX_RETRIES:
|
|
44
44
|
retry_num += 1
|
|
45
45
|
r = requests.get(url, timeout=TIMEOUT)
|
|
46
|
-
if r.status_code == requests.codes.
|
|
46
|
+
if r.status_code == requests.codes.ok:
|
|
47
47
|
fetch_successful = True
|
|
48
48
|
tle_file = getTLEFilePath(sat_id)
|
|
49
49
|
dat_list = r.text.split('\r\n')
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
import spherapy
|
|
3
|
+
from importlib import resources
|
|
4
|
+
|
|
5
|
+
@pytest.fixture(scope='module')
|
|
6
|
+
|
|
7
|
+
def pytestFillPackagedData():
|
|
8
|
+
old_packaged_TLEs = spherapy.packaged_TLEs
|
|
9
|
+
print('Filling packaged TLEs index from data dir') #noqa: T201
|
|
10
|
+
|
|
11
|
+
# find path of spherapy package dir
|
|
12
|
+
package_dir = resources.files('spherapy')
|
|
13
|
+
# packaged TLEs stored in
|
|
14
|
+
TLE_dir = package_dir.joinpath('data').joinpath('TLEs')
|
|
15
|
+
entries = TLE_dir.glob('**/*')
|
|
16
|
+
files = [x for x in entries if x.is_file()]
|
|
17
|
+
|
|
18
|
+
packaged_TLEs = {}
|
|
19
|
+
# extract TLE files and add to packaged_TLEs
|
|
20
|
+
for file in files:
|
|
21
|
+
try:
|
|
22
|
+
tle_id = int(file.stem)
|
|
23
|
+
except ValueError:
|
|
24
|
+
print("Can't import packaged TLEs, skipping...") #noqa: T201
|
|
25
|
+
return None
|
|
26
|
+
packaged_TLEs[tle_id] = file
|
|
27
|
+
spherapy.packaged_TLEs = packaged_TLEs
|
|
28
|
+
|
|
29
|
+
yield
|
|
30
|
+
# Tear down
|
|
31
|
+
print('Restoring packaged TLEs:') #noqa: T201
|
|
32
|
+
spherapy.packaged_TLEs = old_packaged_TLEs
|