deepSSF 0.2.0__tar.gz → 0.2.2__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.
Files changed (57) hide show
  1. {deepssf-0.2.0 → deepssf-0.2.2}/PKG-INFO +8 -3
  2. {deepssf-0.2.0 → deepssf-0.2.2}/README.md +7 -2
  3. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/__init__.py +1 -1
  4. {deepssf-0.2.0 → deepssf-0.2.2}/tests/test_deepssf.py +17 -14
  5. {deepssf-0.2.0 → deepssf-0.2.2}/.github/workflows/ci.yml +0 -0
  6. {deepssf-0.2.0 → deepssf-0.2.2}/.github/workflows/publish.yml +0 -0
  7. {deepssf-0.2.0 → deepssf-0.2.2}/.gitignore +0 -0
  8. {deepssf-0.2.0 → deepssf-0.2.2}/.pre-commit-config.yaml +0 -0
  9. {deepssf-0.2.0 → deepssf-0.2.2}/CHANGELOG.md +0 -0
  10. {deepssf-0.2.0 → deepssf-0.2.2}/CITATION.cff +0 -0
  11. {deepssf-0.2.0 → deepssf-0.2.2}/LICENSE +0 -0
  12. {deepssf-0.2.0 → deepssf-0.2.2}/Package_generation_process.md +0 -0
  13. {deepssf-0.2.0 → deepssf-0.2.2}/environment.yml +0 -0
  14. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example.html +0 -0
  15. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example.ipynb +0 -0
  16. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-15-output-1.png +0 -0
  17. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-17-output-1.png +0 -0
  18. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-19-output-1.png +0 -0
  19. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-21-output-1.png +0 -0
  20. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-23-output-1.png +0 -0
  21. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-24-output-1.png +0 -0
  22. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-25-output-1.png +0 -0
  23. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-27-output-1.png +0 -0
  24. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-28-output-1.png +0 -0
  25. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-29-output-1.png +0 -0
  26. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-30-output-1.png +0 -0
  27. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-32-output-1.png +0 -0
  28. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-7-output-1.png +0 -0
  29. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-138a6193a3bd40baf1e627da441a4734.min.css +0 -0
  30. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.css +0 -0
  31. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.woff +0 -0
  32. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap.min.js +0 -0
  33. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/clipboard/clipboard.min.js +0 -0
  34. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/anchor.min.js +0 -0
  35. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/popper.min.js +0 -0
  36. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto-syntax-highlighting-7f8f88aac4f3542376d5c11b86a4c14d.css +0 -0
  37. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto.js +0 -0
  38. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tabsets/tabsets.js +0 -0
  39. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.css +0 -0
  40. {deepssf-0.2.0 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.umd.min.js +0 -0
  41. {deepssf-0.2.0 → deepssf-0.2.2}/examples/references.bib +0 -0
  42. {deepssf-0.2.0 → deepssf-0.2.2}/icons/both_icons.png +0 -0
  43. {deepssf-0.2.0 → deepssf-0.2.2}/icons/deepSSF_hex_textured_Python.png +0 -0
  44. {deepssf-0.2.0 → deepssf-0.2.2}/icons/deepSSF_hex_textured_R.png +0 -0
  45. {deepssf-0.2.0 → deepssf-0.2.2}/pyproject.toml +0 -0
  46. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/data.py +0 -0
  47. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/datasets/data/buffalo_djelk_id2005.csv +0 -0
  48. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/datasets/data/ndvi_2005.tif +0 -0
  49. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/datasets/data/slope_2005.tif +0 -0
  50. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/model.py +0 -0
  51. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/simulate.py +0 -0
  52. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/train.py +0 -0
  53. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/utils.py +0 -0
  54. {deepssf-0.2.0 → deepssf-0.2.2}/src/deepssf/validate.py +0 -0
  55. {deepssf-0.2.0 → deepssf-0.2.2}/styles.css +0 -0
  56. {deepssf-0.2.0 → deepssf-0.2.2}/tests/__init__.py +0 -0
  57. {deepssf-0.2.0 → deepssf-0.2.2}/tests/test_smoke.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepSSF
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Deep learning step selection functions for predicting animal movement.
5
5
  Project-URL: Homepage, https://swforrest.github.io/deepSSF/
6
6
  Project-URL: Repository, https://github.com/swforrest/deepssf
@@ -83,13 +83,18 @@ print(deepssf.__version__)
83
83
  If you are coming from R, think of a conda environment the way you think of
84
84
  an `renv` project library — it is a self-contained Python installation that
85
85
  keeps this project's packages separate from everything else on your computer.
86
- The steps below create one for deepssf and should take about five minutes.
86
+ The steps below create one for deepSSF and should take about five minutes.
87
87
 
88
88
  ### 1. Install Miniconda (once, system-wide)
89
89
 
90
90
  Download and run the installer from the
91
91
  [official Miniconda page](https://docs.anaconda.com/miniconda/).
92
92
 
93
+ If you click 'Download' towards the top right, the links to download
94
+ Miniconda are towards the bottom of the page - the links at the top are
95
+ for the Anaconda Distribution, which has thousands of pacakges and is
96
+ not necessary to get things up and running initially.
97
+
93
98
  - **Windows**: use the **Anaconda Prompt** for all subsequent commands, and
94
99
  choose an install path that contains **no spaces** (e.g. `C:\miniconda3`).
95
100
  - **macOS / Linux**: a normal terminal works fine.
@@ -101,7 +106,7 @@ Download and run the installer from the
101
106
  ### 2. Create the environment
102
107
 
103
108
  ```bash
104
- git clone https://github.com/swforrest/deepssf
109
+ git clone https://github.com/swforrest/deepssf_package
105
110
  cd deepssf
106
111
  conda env create -f environment.yml
107
112
  ```
@@ -44,13 +44,18 @@ print(deepssf.__version__)
44
44
  If you are coming from R, think of a conda environment the way you think of
45
45
  an `renv` project library — it is a self-contained Python installation that
46
46
  keeps this project's packages separate from everything else on your computer.
47
- The steps below create one for deepssf and should take about five minutes.
47
+ The steps below create one for deepSSF and should take about five minutes.
48
48
 
49
49
  ### 1. Install Miniconda (once, system-wide)
50
50
 
51
51
  Download and run the installer from the
52
52
  [official Miniconda page](https://docs.anaconda.com/miniconda/).
53
53
 
54
+ If you click 'Download' towards the top right, the links to download
55
+ Miniconda are towards the bottom of the page - the links at the top are
56
+ for the Anaconda Distribution, which has thousands of pacakges and is
57
+ not necessary to get things up and running initially.
58
+
54
59
  - **Windows**: use the **Anaconda Prompt** for all subsequent commands, and
55
60
  choose an install path that contains **no spaces** (e.g. `C:\miniconda3`).
56
61
  - **macOS / Linux**: a normal terminal works fine.
@@ -62,7 +67,7 @@ Download and run the installer from the
62
67
  ### 2. Create the environment
63
68
 
64
69
  ```bash
65
- git clone https://github.com/swforrest/deepssf
70
+ git clone https://github.com/swforrest/deepssf_package
66
71
  cd deepssf
67
72
  conda env create -f environment.yml
68
73
  ```
@@ -7,7 +7,7 @@ expose the things you want people to rely on. Internal helpers stay private.
7
7
 
8
8
  # Single source of truth for the version. hatchling reads this string at build
9
9
  # time (see pyproject.toml [tool.hatch.version]). Bump it when you release.
10
- __version__ = "0.2.0"
10
+ __version__ = "0.2.2"
11
11
 
12
12
  from deepssf.data import (
13
13
  MovementDataset,
@@ -371,7 +371,7 @@ def test_make_simulation_inputs_hour_wraps():
371
371
 
372
372
 
373
373
  def test_simulate_next_step_returns_coords_and_tensors(small_params):
374
- """simulate_next_step returns new coordinates and three log-prob tensors."""
374
+ """simulate_next_step returns new coordinates."""
375
375
  import math
376
376
 
377
377
  import rasterio.transform
@@ -396,15 +396,12 @@ def test_simulate_next_step_returns_coords_and_tensors(small_params):
396
396
  scalars = torch.zeros(1, 4)
397
397
  bearing = torch.zeros(1, 1)
398
398
 
399
- new_x, new_y, hab, move, step, px, py = simulate_next_step(
399
+ new_x, new_y, px, py = simulate_next_step(
400
400
  model, rasters, scalars, bearing, window_size=W,
401
401
  x_loc=W * 25 / 2, y_loc=W * 25 / 2, transform=transform,
402
402
  )
403
403
  assert isinstance(new_x, float)
404
404
  assert isinstance(new_y, float)
405
- assert hab.shape == (W, W)
406
- assert move.shape == (W, W)
407
- assert step.shape == (W, W)
408
405
  assert 0 <= px < W
409
406
  assert 0 <= py < W
410
407
 
@@ -416,9 +413,7 @@ def test_simulate_trajectory_dataframe_shape(small_params):
416
413
  import rasterio.transform
417
414
 
418
415
  from deepssf.model import ConvJointModel, ModelParams
419
- from deepssf.simulate import simulate_trajectory
420
-
421
- from deepssf.simulate import make_simulation_inputs
416
+ from deepssf.simulate import make_simulation_inputs, simulate_trajectory
422
417
 
423
418
  dim = small_params.image_dim
424
419
  for _ in range(3):
@@ -678,11 +673,19 @@ def test_prepare_movement_df_has_dx_dy():
678
673
 
679
674
  assert "dx" in df.columns
680
675
  assert "dy" in df.columns
681
- assert np.isfinite(df["dx"].values).all()
682
- assert np.isfinite(df["dy"].values).all()
683
- # dx = x2_ - x1_, dy = y2_ - y1_
684
- np.testing.assert_allclose(df["dx"].values, df["x2_"].values - df["x1_"].values)
685
- np.testing.assert_allclose(df["dy"].values, df["y2_"].values - df["y1_"].values)
676
+
677
+ dx = df["dx"].to_numpy(dtype=float)
678
+ dy = df["dy"].to_numpy(dtype=float)
679
+ x1 = df["x1_"].to_numpy(dtype=float)
680
+ x2 = df["x2_"].to_numpy(dtype=float)
681
+ y1 = df["y1_"].to_numpy(dtype=float)
682
+ y2 = df["y2_"].to_numpy(dtype=float)
683
+
684
+ assert np.isfinite(dx).all()
685
+ assert np.isfinite(dy).all()
686
+
687
+ np.testing.assert_allclose(dx, x2 - x1)
688
+ np.testing.assert_allclose(dy, y2 - y1)
686
689
 
687
690
 
688
691
  def test_filter_steps_by_window_removes_large_steps():
@@ -777,7 +780,7 @@ def test_fit_returns_loss_history(small_params):
777
780
  optimisers, schedulers = make_optimisers(model)
778
781
  history = fit(
779
782
  model,
780
- n_conv_layers=3, # number of conv layers (used only for snapshots)
783
+ image_trim_pixels=3, # number of conv layers (used only for snapshots)
781
784
  window_size=H, # spatial crop size (used only for snapshots)
782
785
  dl_train=_DL(),
783
786
  dl_val=_DL(),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes