Skip to content

Commit 53cd47d

Browse files
authored
Refactored to use quivr, upgrade adam-core, new index
1 parent 636e075 commit 53cd47d

29 files changed

+13061
-14279
lines changed

.github/workflows/lint-test.yml

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,20 @@ jobs:
1919
uses: actions/checkout@v3
2020
- name: Get git tags
2121
run: git fetch --prune --unshallow --tags
22-
- uses: actions/setup-python@v4
22+
23+
# Use pip to install dependencies
24+
- name: Setup PDM
25+
uses: pdm-project/setup-pdm@v4
2326
with:
2427
python-version: ${{ matrix.python-version }}
25-
cache: "pip"
26-
# Use pip to install dependencies
28+
cache: true
29+
cache-dependency-path: ./pyproject.toml
2730
- name: Install dependencies
2831
run: |
29-
python -m pip install --upgrade pip
30-
pip install ".[dev]"
31-
# Run linter
32+
pdm install -G test
3233
- name: Run linter
3334
run: |
3435
pdm run check
35-
# Get JPL ephemeris files
36-
- name: Get JPL ephemeris files
37-
run: |
38-
python scripts/set_up_assist.py
39-
- name: Set JPL ephemeris environment variable
40-
run: |
41-
export ASSIST_DATA_DIR=~/.adam_assist_data
4236
# Run tests
4337
- name: Run tests
4438
run: |
@@ -47,3 +41,40 @@ jobs:
4741
uses: coverallsapp/[email protected]
4842
with:
4943
path-to-lcov: coverage.xml
44+
45+
# Run benchmarks
46+
- name: Run benchmarks
47+
run: |
48+
pdm run benchmark --benchmark-json bench.json
49+
50+
# If on main branch, upload benchmark results
51+
- name: Store main benchmark result
52+
if: github.ref == 'refs/heads/main'
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: main-benchmark
56+
path: bench.json
57+
retention-days: 30
58+
59+
# If PR, download main benchmark data
60+
- name: Download main benchmark data
61+
if: github.event_name == 'pull_request'
62+
id: download-main-benchmark
63+
uses: actions/download-artifact@v3
64+
with:
65+
name: main-benchmark
66+
path: main-bench
67+
continue-on-error: true
68+
69+
- name: Compare benchmarks
70+
if: github.event_name == 'pull_request' && steps.download-main-benchmark.outcome == 'success'
71+
uses: benchmark-action/github-action-benchmark@v1
72+
with:
73+
name: Python Benchmark
74+
tool: 'pytest'
75+
output-file-path: bench.json
76+
external-data-json-path: main-bench/bench.json
77+
github-token: ${{ secrets.GITHUB_TOKEN }}
78+
comment-always: true
79+
fail-threshold: '150%'
80+
auto-push: false

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,7 @@ out/
120120
database/
121121
.docker_bash_history.txt
122122
*.DS_Store
123+
124+
pdm.lock
125+
.pdm-python
126+
precovery/_version.py

pdm.lock

Lines changed: 0 additions & 1448 deletions
This file was deleted.

precovery/_version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

precovery/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import json
22

3-
from ._version import __version__
3+
try:
4+
from ._version import __version__
5+
except ImportError:
6+
__version__ = "unknown"
47

58

69
class Config:

0 commit comments

Comments
 (0)