Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@ jobs:
enable-cache: true
- name: Sync
run: uv sync
# FIXME: figure out how to get asv working with the new setup
# - name: Set asv machine
# run: uv run asv machine --yes
# - name: Check benchmarks
# run: uv run asv run -a repeat=1 -a rounds=1 HEAD
- name: Set asv machine
run: uv run asv machine --yes
- name: Check benchmarks
run: uv run asv run -a repeat=1 -a rounds=1 HEAD

docs:
runs-on: ubuntu-latest
Expand Down
14 changes: 9 additions & 5 deletions asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
"results_dir": ".asv/results",
"html_dir": ".asv/html",
"build_command": [
"pip install build",
"python -m build {build_dir}/core",
"python -m build {build_dir}/extensions/projection",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}/core",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}/extensions/projection"
"python -m pip install uv",
"python -m uv build --all-packages --wheel --out-dir {build_cache_dir} {build_dir}"
],
"install_command": [
"python -m pip install uv",
"python -m uv pip install --reinstall --find-links={build_cache_dir} pystac"
],
"uninstall_command": [
"return-code=any python -m uv pip uninstall pystac"
]
}
11 changes: 9 additions & 2 deletions benchmarks/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import os
import shutil
import tempfile
from pathlib import Path

from pystac import Item, StacIO

from ._base import Bench
from ._util import get_data_path


class ItemBench(Bench):
Expand All @@ -16,7 +16,14 @@ def setup(self) -> None:
self.stac_io = StacIO.default()

# using an item with many assets to better test deserialization timing
self.item_path = get_data_path("eo/eo-sentinel2-item.json")
self.item_path = (
Path(__file__).parents[1]
/ "extensions"
/ "eo"
/ "tests"
/ "data-files"
/ "eo-sentinel2-item.json"
)
with open(self.item_path) as src:
self.item_dict = json.load(src)
self.item = Item.from_file(self.item_path)
Expand Down