Update environment configuration and requirements; specify package versions and clean up dependencies
This commit is contained in:
parent
a1692817fe
commit
a5a8c16363
|
|
@ -1115,36 +1115,9 @@ python python_app/23_convert_harvest_format.py angata
|
|||
|
||||
**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
|
||||
<?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`)
|
||||
**Step 1: Update Project model** (`laravel_app/app/Models/Project.php`)
|
||||
|
||||
```php
|
||||
protected $fillable = [
|
||||
|
|
@ -1153,7 +1126,7 @@ protected $fillable = [
|
|||
];
|
||||
```
|
||||
|
||||
**Step 3: Add form UI** (Blade template)
|
||||
**Step 2: Add form UI** (Blade template)
|
||||
|
||||
```blade
|
||||
<div class="form-group mb-3">
|
||||
|
|
@ -1175,7 +1148,7 @@ protected $fillable = [
|
|||
</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:
|
||||
- **Option A**: Write to `parameters_project.R` dynamically before script execution
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ channels:
|
|||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.10
|
||||
- pytorch::pytorch
|
||||
- pytorch::torchvision
|
||||
- pytorch::torchaudio
|
||||
- pytorch::pytorch=2.5.1
|
||||
- pytorch::torchvision=0.20.1
|
||||
- pytorch::torchaudio=2.5.1
|
||||
- pytorch::pytorch-cuda=11.8
|
||||
- gdal>=3.7.0
|
||||
- shapely>=2.0.0
|
||||
- pyproj>=3.4.0
|
||||
- pip
|
||||
- pip:
|
||||
- sentinelhub>=3.9.0
|
||||
- shapely>=2.0.0
|
||||
- pyproj>=3.4.0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
torch>=2.0.0
|
||||
pandas>=1.5.0
|
||||
numpy>=1.23.0
|
||||
numpy>=1.23.0,<3.0.0
|
||||
scikit-learn>=1.3.0
|
||||
GDAL>=3.7.0
|
||||
sentinelhub>=3.9.0
|
||||
# GDAL must match the system libgdal version exactly; install via:
|
||||
# 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
|
||||
pyproj>=3.4.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue