Update environment configuration and requirements; specify package versions and clean up dependencies

This commit is contained in:
Timon 2026-02-24 15:19:58 +01:00
parent a1692817fe
commit a5a8c16363
3 changed files with 13 additions and 39 deletions

View file

@ -1115,36 +1115,9 @@ python python_app/23_convert_harvest_format.py angata
**What needs implementation:** **What needs implementation:**
**Step 1: Create database migration** > **Note**: Database migration for `preferred_area_unit` column already created in **STEP 1**. The column is added alongside `client_type` in the same migration with proper rollback handling.
```php **Step 1: Update Project model** (`laravel_app/app/Models/Project.php`)
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('projects', function (Blueprint $table) {
$table->enum('preferred_area_unit', ['hectare', 'acre'])
->default('hectare')
->after('client_type');
});
}
public function down(): void
{
Schema::table('projects', function (Blueprint $table) {
$table->dropColumn('preferred_area_unit');
});
}
};
```
**Step 2: Update Project model** (`laravel_app/app/Models/Project.php`)
```php ```php
protected $fillable = [ protected $fillable = [
@ -1153,7 +1126,7 @@ protected $fillable = [
]; ];
``` ```
**Step 3: Add form UI** (Blade template) **Step 2: Add form UI** (Blade template)
```blade ```blade
<div class="form-group mb-3"> <div class="form-group mb-3">
@ -1175,7 +1148,7 @@ protected $fillable = [
</div> </div>
``` ```
**Step 4: Pass preference to R scripts** (in job/shell wrapper) **Step 3: Pass preference to R scripts** (in job/shell wrapper)
When launching R scripts, read `project->preferred_area_unit` and either: When launching R scripts, read `project->preferred_area_unit` and either:
- **Option A**: Write to `parameters_project.R` dynamically before script execution - **Option A**: Write to `parameters_project.R` dynamically before script execution

View file

@ -5,13 +5,13 @@ channels:
- conda-forge - conda-forge
dependencies: dependencies:
- python=3.10 - python=3.10
- pytorch::pytorch - pytorch::pytorch=2.5.1
- pytorch::torchvision - pytorch::torchvision=0.20.1
- pytorch::torchaudio - pytorch::torchaudio=2.5.1
- pytorch::pytorch-cuda=11.8 - pytorch::pytorch-cuda=11.8
- gdal>=3.7.0 - gdal>=3.7.0
- shapely>=2.0.0
- pyproj>=3.4.0
- pip - pip
- pip: - pip:
- sentinelhub>=3.9.0 - sentinelhub>=3.9.0
- shapely>=2.0.0
- pyproj>=3.4.0

View file

@ -1,8 +1,9 @@
torch>=2.0.0 torch>=2.0.0
pandas>=1.5.0 pandas>=1.5.0
numpy>=1.23.0 numpy>=1.23.0,<3.0.0
scikit-learn>=1.3.0 scikit-learn>=1.3.0
GDAL>=3.7.0 # GDAL must match the system libgdal version exactly; install via:
sentinelhub>=3.9.0 # pip install gdal[numpy]=="$(gdal-config --version).*"
# Do not pin with >= here; handle GDAL installation separately in the Dockerfile/CI setup script.sentinelhub>=3.9.0
shapely>=2.0.0 shapely>=2.0.0
pyproj>=3.4.0 pyproj>=3.4.0