Skip to content
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/python_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
package-manager: 'conda'
app-name: 'curve_apps'
python-version: '3.10'
python-version: '3.12'
call-workflow-pytest:
name: Pytest
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-pytest.yml@v2
Expand All @@ -42,10 +42,10 @@ jobs:
pull-requests: read
with:
package-manager: 'conda'
python-versions: '["3.10", "3.11", "3.12"]'
python-versions: '["3.12", "3.13"]'
os: '["ubuntu-latest", "windows-latest"]'
cache-number: 1
codecov-reference-python-version: '3.10'
codecov-reference-python-version: '3.12'
codecov-reference-os: '["windows-latest"]'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/python_deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
contents: write
with:
package-name: 'curve-apps'
python-version: '3.10'
python-version: '3.12'
source-repo-names: '["public-noremote-conda-dev"]'
conda-channels: '["conda-forge"]'
publish-repo-names: '["public-noremote-conda-dev"]'
Expand All @@ -37,7 +37,7 @@ jobs:
package-manager: 'poetry'
package-name: 'curve-apps'
version-tag: ${{ github.ref_name }}
python-version: '3.10'
python-version: '3.12'
virtual-repo-names: '["public-pypi-dev", "test-pypi"]'
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
Expand Down
21 changes: 16 additions & 5 deletions .idea/curve-apps.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ repos:
hooks:
- id: mypy
additional_dependencies: [
numpy==1.26.*,
pydantic==2.5.*,
numpy==2.4.*,
pydantic==2.12.*,
types-toml,
types-waitress==3.0.*,
types-PyYAML,
Expand Down
7 changes: 6 additions & 1 deletion curve_apps/contours/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ def has_intervals(self) -> bool:
def intervals(self) -> list[float]:
"""Returns arange of requested contour intervals."""

if self.has_intervals:
if (
self.interval_min is not None
and self.interval_max is not None
and self.interval_spacing is not None
and self.interval_spacing != 0
):
intervals = np.arange(
self.interval_min,
self.interval_max + self.interval_spacing / 2, # type: ignore
Expand Down
18 changes: 12 additions & 6 deletions curve_apps/peak_finder/line_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import numpy as np

from curve_apps.peak_finder.anomaly import Anomaly
from curve_apps.peak_finder.anomaly_group import AnomalyGroup
from curve_apps.peak_finder.line_data import LineData
from curve_apps.peak_finder.line_position import LinePosition
Expand Down Expand Up @@ -282,11 +283,12 @@ def group_n_groups(self, groups: list[AnomalyGroup]) -> list[AnomalyGroup]:

return_groups: list[AnomalyGroup] = []
all_starts = np.array([group.start for group in groups])
sort_inds = np.argsort(all_starts)
sorted_groups: list[AnomalyGroup] = list(np.array(groups)[sort_inds])

max_separation = np.ceil(self.max_separation / self.position.sampling)
neighbours_list = self.find_neighbour_groups(sorted_groups, max_separation)
sorted_groups: list[AnomalyGroup] = list(
np.array(groups)[np.argsort(all_starts)]
)
neighbours_list = self.find_neighbour_groups(
sorted_groups, np.ceil(self.max_separation / self.position.sampling)
)

if len(neighbours_list) == 0:
return return_groups
Expand All @@ -304,8 +306,12 @@ def group_n_groups(self, groups: list[AnomalyGroup]) -> list[AnomalyGroup]:
if len(indices) < self.n_groups:
continue

anomalies: list[Anomaly] = []
for ind in indices:
anomalies += sorted_groups[ind].anomalies.tolist()

new_group = AnomalyGroup(
np.concatenate([sorted_groups[ind].anomalies for ind in indices]),
anomalies,
self.property_group,
subgroups={sorted_groups[ind] for ind in indices},
)
Expand Down
4 changes: 3 additions & 1 deletion curve_apps/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def get_contour_list(params: ContourDetectionParameters) -> list[float]:
"""

if (
None not in [params.interval_min, params.interval_max, params.interval_spacing]
params.interval_min is not None
and params.interval_max is not None
and params.interval_spacing is not None
and params.interval_spacing != 0
):
interval_contours = np.arange(
Expand Down
3 changes: 1 addition & 2 deletions deps-lock-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include_dev: True
py_versions:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
suffix_for_extras:
"": ["webview"]
"raw": [""]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies:
- python=3.10.*
- python=3.13.*
- pip
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies:
- python=3.11.*
- python=3.14.*
- pip
204 changes: 0 additions & 204 deletions environments/py-3.10-linux-64-dev-raw.conda.lock.yml

This file was deleted.

Loading
Loading