Skip to content

Commit 6c4e087

Browse files
authored
Merge pull request #51 from quantifyearth/mwd-misc-fixes-again
Misc fixes again
2 parents b24b1a5 + 3b8b132 commit 6c4e087

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## v2.1.1 (18/03/2026)
2+
3+
### Changed
4+
5+
* For model validation results return all species, not just the ones marked as outliers.
6+
7+
### Fixed
8+
9+
* Remove Yirgacheffe chunk size override that was being inherited globally rather than just for aohcalc.
10+
111
## v2.1.0 (09/03/2026)
212

313
### Changed

aoh/_internal/aoh_fractional.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
logger = logging.getLogger(__name__)
1313

14-
yg.constants.YSTEP = 2048
15-
1614
def aohcalc_fractional(
1715
habitats_directory_path: Path | str,
1816
elevation_path: Path | str | tuple[Path,Path] | tuple[str,str],

aoh/validation/validate_map_prevalence.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def model_validation(aoh_df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame,
133133
raise ValueError("No species classes were found")
134134

135135
# Fit models for each class
136-
per_class_outliers_df = []
136+
per_class_results_df = []
137137
per_class_model_coefficients = []
138138
per_class_random_effects = []
139139

@@ -159,7 +159,7 @@ def model_validation(aoh_df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame,
159159
klass_df = add_diagnostic_columns(klass_df, upper_fence, lower_fence)
160160
klass_outliers = klass_df[klass_df.outlier == True] # pylint: disable = C0121
161161
print(f"\toutliers: {len(klass_outliers)}")
162-
per_class_outliers_df.append(klass_outliers)
162+
per_class_results_df.append(klass_df)
163163

164164
coef_df = extract_model_coefficients(model, klass)
165165
per_class_model_coefficients.append(coef_df)
@@ -168,7 +168,7 @@ def model_validation(aoh_df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame,
168168
per_class_random_effects.append(ranef_df)
169169

170170
# Concatenate results
171-
outliers_df = pd.concat(per_class_outliers_df) # type: ignore[arg-type]
171+
outliers_df = pd.concat(per_class_results_df) # type: ignore[arg-type]
172172
model_coefficients_df = pd.concat(per_class_model_coefficients) # type: ignore[arg-type]
173173
random_effects_df = pd.concat(per_class_random_effects) # type: ignore[arg-type]
174174

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "aoh"
7-
version = "2.1.0"
7+
version = "2.1.1"
88
description = "A library for calculating Area of Habitat for species distribution mapping"
99
authors = [
1010
{name = "Michael Dales", email = "mwd24@cam.ac.uk"}

0 commit comments

Comments
 (0)