diff --git a/build_mosaic.sh b/build_mosaic.sh index a873366..38fca6e 100755 --- a/build_mosaic.sh +++ b/build_mosaic.sh @@ -3,6 +3,7 @@ end_date="2024-06-08" offset=7 data_dir="chemba" +file_name_tif="week_03_2024.tif" # Parse command line arguments for arg in "$@"; do @@ -16,6 +17,9 @@ for arg in "$@"; do --data_dir=*) data_dir="${arg#*=}" ;; + --file_name_tif=*) + file_name_tif="${arg#*=}" + ;; *) echo "Unknown option: $arg" exit 1 @@ -28,12 +32,12 @@ echo "offset: $offset" echo "end_date: $end_date" # Check if required arguments are set -if [ -z "$end_date" ] || [ -z "$data_dir" ] || [ -z "$offset" ]; then - echo "Missing arguments. Use: build_mosiac.sh --endate=2024-01-01 --offset=7 --data_dir=chemba" +if [ -z "$end_date" ] || [ -z "$data_dir" ] || [ -z "$offset" ] || [ -z "$file_name_tif" ]; then + echo "Missing arguments. Use: build_mosiac.sh --endate=2024-01-01 --offset=7 --data_dir=chemba --file_name_tif=week_03_2024.tif" exit 1 fi -echo mosaic_creation.R $end_date $offset $data_dir +echo mosaic_creation.R $end_date $offset $data_dir $file_name_tif cd ../r_app -Rscript mosaic_creation.R $end_date $offset $data_dir \ No newline at end of file +Rscript mosaic_creation.R $end_date $offset $data_dir $file_name_tif \ No newline at end of file diff --git a/laravel_app/app/Jobs/ProjectMosiacGeneratorJob.php b/laravel_app/app/Jobs/ProjectMosiacGeneratorJob.php index 7e634a3..cb9f15b 100644 --- a/laravel_app/app/Jobs/ProjectMosiacGeneratorJob.php +++ b/laravel_app/app/Jobs/ProjectMosiacGeneratorJob.php @@ -51,6 +51,7 @@ public function handle(): void sprintf('--end_date=%s', $this->mosaic->end_date->format('Y-m-d')), sprintf('--offset=%s', $this->mosaic->offset), sprintf('--data_dir=%s', $this->mosaic->project->download_path), + sprintf('--file_name_tif=%s', basename($this->mosaic->path)), ]; $currentPath = '/usr/bin:/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin/Users/mfolkerts/anaconda3/bin:/Library/Apple/usr/bin'; @@ -89,8 +90,7 @@ public static function handleFor(Project $project,Carbon $endDate, int $offset): */ $mosaic = $project->mosaics()->updateOrCreate( [ - 'end_date' => $endDate, - 'offset' => $offset, + 'name' => sprintf('Week_%s_%s', $week, $year), ], [ 'name' => sprintf('Week_%s_%s', $week, $year), diff --git a/laravel_app/app/Mail/ReportMailer.php b/laravel_app/app/Mail/ReportMailer.php index 05e60a8..b34682d 100644 --- a/laravel_app/app/Mail/ReportMailer.php +++ b/laravel_app/app/Mail/ReportMailer.php @@ -49,7 +49,7 @@ public function content(): Content markdown: 'emails.scheduled-report', with: [ 'mailingContent' => $this->mailing->message, - 'logoPath'=> Storage::disk('local')->path('images/smartcane.png'), + 'logoPath'=> resource_path('images/smartcane.png'), 'subject' => $this->mailing->subject, 'mailing' => $this->mailing, ], diff --git a/laravel_app/app/Models/Project.php b/laravel_app/app/Models/Project.php index ee19e51..2aaf309 100644 --- a/laravel_app/app/Models/Project.php +++ b/laravel_app/app/Models/Project.php @@ -49,20 +49,22 @@ public static function saveWithFormData(mixed $formData) $baseFrom = 'livewire-tmp/'; $baseTo = $project->download_path.'/Data/'; if ($formData['pivot_file']) { - Storage::copy($baseFrom.$formData['pivot_file']['tmpFilename'],$baseTo.'pivot.geojson'); + Storage::copy($baseFrom.$formData['pivot_file']['tmpFilename'], $baseTo.'pivot.geojson'); $project->update(['pivot_json_path' => $baseTo.'pivot.geojson']); } if ($formData['span_file']) { - Storage::copy($baseFrom.$formData['span_file']['tmpFilename'],$baseTo.'span.geojson'); + Storage::copy($baseFrom.$formData['span_file']['tmpFilename'], $baseTo.'span.geojson'); $project->update(['span_json_path' => $baseTo.'span.geojson']); } if ($formData['harvest_file']) { - Storage::copy($baseFrom.$formData['harvest_file']['tmpFilename'],$baseTo.'harvest.'.$formData['harvest_file']['extension']); - if($project->update(['harvest_json_path' => $baseTo.'harvest.'.$formData['harvest_file']['extension']])) { + Storage::copy($baseFrom.$formData['harvest_file']['tmpFilename'], + $baseTo.'harvest.'.$formData['harvest_file']['extension']); + if ($project->update(['harvest_json_path' => $baseTo.'harvest.'.$formData['harvest_file']['extension']])) { $project->setMinHarvestDate(); } } } + private function upsertMailRecipients($formData) { $mailRecipientsData = array_map(function ($mailRecipient) { @@ -134,7 +136,7 @@ public function downloads(): \Illuminate\Database\Eloquent\Relations\HasMany public function nonFailedDownloads(): \Illuminate\Database\Eloquent\Relations\HasMany { - return $this->hasMany(ProjectDownload::class)->where('status','<>','failed'); + return $this->hasMany(ProjectDownload::class)->where('status', '<>', 'failed'); } public function mosaics(): \Illuminate\Database\Eloquent\Relations\HasMany @@ -170,10 +172,10 @@ public function getMissingMosaicsInFileSystem(Carbon $endDate) }); } - public static function getMosaicFilenameListByEndDate(Carbon $endDate, int $offset=7): \Generator + public static function getMosaicFilenameListByEndDate(Carbon $endDate, int $offset = 7): \Generator { for ($i = 0; $i < 4; $i++) { - yield(ProjectMosaic::getFilenameByPeriod($endDate->copy()->subDays($offset*$i),$offset)); + yield (ProjectMosaic::getFilenameByPeriod($endDate->copy()->subDays($offset * $i), $offset)); } } @@ -237,6 +239,7 @@ public function hasPendingDownload(): bool { return $this->downloads()->statusPending()->count() > 0; } + public function hasPendingReport(): bool { return $this->reports()->statusPending()->count() > 0; @@ -255,7 +258,7 @@ public function startDownload(Carbon $date) 'name' => sprintf('%s.tif', $date->format('Y-m-d')), ], [ - 'path' => sprintf('%s/%s/%s.tif', $this->download_path, 'merged_final_tif', $date->format('Y-m-d')), + 'path' => sprintf('%s/%s/%s.tif', $this->download_path, 'merged_final_tif', $date->format('Y-m-d')), ] ); ProjectDownloadTiffJob::dispatch($downloadRequest, $date); @@ -276,7 +279,7 @@ public function shouldSchedule(): bool } - public function hasInvalidMosaicFor(Carbon $endDate,int $offset): bool + public function hasInvalidMosaicFor(Carbon $endDate, int $offset): bool { // parameters : $ // check if the mail day happens the day before mosaic -> good @@ -296,7 +299,7 @@ public function hasInvalidMosaicFor(Carbon $endDate,int $offset): bool public function scheduleReport(?Carbon $endDate = null, ?int $offset = null) { - if($endDate?->isFuture() || $endDate?->isToday() || $offset <= 0){ + if ($endDate?->isFuture() || $endDate?->isToday() || $offset <= 0) { logger('EndDate is today or in the future.'); $endDate = null; $offset = null; @@ -310,7 +313,7 @@ public function scheduleReport(?Carbon $endDate = null, ?int $offset = null) Bus::batch( [ new ProjectInterpolateGrowthModelJob($this), - $this->getReportFor($endDate, $offset,true) + $this->getReportFor($endDate, $offset, true) ]), ]) ->dispatch(); @@ -320,18 +323,18 @@ public function scheduleReport(?Carbon $endDate = null, ?int $offset = null) public function getReportFor(Carbon $endDate, int $offset = 7, $sendMail = false): ProjectReportGeneratorJob { $report = $this->reports()->create([ - 'name' => 'Report of the '.$endDate->format('d-m-Y').' from the past '.$offset.' days', + 'name' => 'Report of the '.$endDate->format('d-m-Y').' from the past '.$offset.' days', 'end_date' => $endDate, - 'offset' => $offset, - 'path' => 'reports/'.ProjectReport::getFileName($endDate,$offset).'.docx', + 'offset' => $offset, + 'path' => 'reports/'.ProjectReport::getFileName($endDate, $offset).'.docx', ]); return (new ProjectReportGeneratorJob($report, $sendMail)); } - public function getFileDownloadsFor(Carbon $endDate, int $offset=7):array + public function getFileDownloadsFor(Carbon $endDate, int $offset = 7): array { - $startOfRange = (clone $endDate)->subdays(4*$offset-1); + $startOfRange = (clone $endDate)->subdays(4 * $offset - 1); $dateRange = CarbonPeriod::create($startOfRange, $endDate); return collect($dateRange) @@ -340,15 +343,42 @@ public function getFileDownloadsFor(Carbon $endDate, int $offset=7):array ->toArray(); } - public function getMosaicsFor(Carbon $endDate, int $offset= 7): array + public function getMosaicsFor(Carbon $endDate, int $offset = 7): array { - logger(sprintf('in Get Mosaics for Period %s with %d offset', $endDate->format('Y-m-d'),$offset)); return collect(range(0, 3)) - ->map(function ($periodDiff) use ($endDate, $offset) { - $periodEndDate = $endDate->copy()->subDays($offset*$periodDiff); -// $periodStartDate = $periodEndDate->copy()->subDays($offset-1); - return ProjectMosiacGeneratorJob::handleFor($this, $periodEndDate, $offset); +// ->map(function ($periodDiff) use ($endDate, $offset) { +// $calculatedEndDate = $endDate->clone(); +// $calculatedOffset = (int) $endDate->clone()->previous($this->mail_day)->diffInDays($endDate); +// if ($calculatedOffset === 7) { +// $calculatedOffset = 1; +// } +// if ($periodDiff !== 0) { +// if ($calculatedOffset === 1) { +// for ($i = 1; $i < $periodDiff; $i++) { +// $calculatedEndDate->previous($this->mail_day); +// } +// } else { +// for ($i = 0; $i < $periodDiff; $i++) { +// $calculatedEndDate->previous($this->mail_day); +// } +// } +// $calculatedOffset = 7; +// $calculatedEndDate->subDay(); +// } +// +// return ProjectMosiacGeneratorJob::handleFor($this, $calculatedEndDate, $calculatedOffset); +// }) + ->map(function() use ($endDate, $offset){ + $currentEndDate = $endDate->clone(); + if (!$currentEndDate->isDayOfWeek($this->mail_day)) { + $endDate->previous($this->mail_day); + } + $endDate->subDay(); + $calculatedOffSet = (int) $endDate->clone()->diffInDays($currentEndDate); + + return ProjectMosiacGeneratorJob::handleFor($this, $currentEndDate, $calculatedOffSet); }) + ->filter() ->toArray(); } @@ -356,40 +386,41 @@ public function getMosaicsFor(Carbon $endDate, int $offset= 7): array public function handleMissingDownloads() { $this->getMissingDownloads() - ->each(function(Carbon $date){ - dispatch(ProjectDownloadTiffJob::handleForDate($this,$date)); + ->each(function (Carbon $date) { + dispatch(ProjectDownloadTiffJob::handleForDate($this, $date)); }); } - public function hasMissingDownloadsDateInHarvestFile():bool + public function hasMissingDownloadsDateInHarvestFile(): bool { - return $this->getMissingDownloads()->count() > 0; + return $this->getMissingDownloads()->count() > 0; } - public function getMissingDownloads():Collection + public function getMissingDownloads(): Collection { - if(!$this->min_harvest_date){ + if (!$this->min_harvest_date) { return collect([]); } - $harvest_dates = $this->nonFailedDownloads()->get()->map(fn($d)=>$d->date); - $all_dates = collect(CarbonPeriod::create($this->min_harvest_date,'1 day',now())->toArray()); + $harvest_dates = $this->nonFailedDownloads()->get()->map(fn($d) => $d->date); + $all_dates = collect(CarbonPeriod::create($this->min_harvest_date, '1 day', now())->toArray()); return $all_dates->diff($harvest_dates); } - public function setMinHarvestDate():bool + public function setMinHarvestDate(): bool { - if(!$this->harvest_json_path){ + if (!$this->harvest_json_path) { return false; } - return $this->update(['min_harvest_date'=> $this->getMinimumDateFromHarvestExcelFile()->format('Y-m-d')]); + return $this->update(['min_harvest_date' => $this->getMinimumDateFromHarvestExcelFile()->format('Y-m-d')]); } - private function getMinimumDateFromHarvestExcelFile():Carbon + + private function getMinimumDateFromHarvestExcelFile(): Carbon { $value = Storage::disk('local')->path($this->harvest_json_path); - $data = Excel::toCollection(new \App\Imports\ExcelFileImport(),$value); + $data = Excel::toCollection(new \App\Imports\ExcelFileImport(), $value); $season_start_index = $data->first()->first()->search('season_start'); - return collect($data->first()->slice(1))->reduce(function($carry,$value,$key) use ($season_start_index){ - return min($carry,Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); - },now()); + return collect($data->first()->slice(1))->reduce(function ($carry, $value, $key) use ($season_start_index) { + return min($carry, Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); + }, now()); } } diff --git a/laravel_app/app/Models/ProjectMosaic.php b/laravel_app/app/Models/ProjectMosaic.php index 024ddbc..8fc2048 100644 --- a/laravel_app/app/Models/ProjectMosaic.php +++ b/laravel_app/app/Models/ProjectMosaic.php @@ -29,13 +29,15 @@ class ProjectMosaic extends Model public static function getFilenameByPeriod(Carbon $endDate, int $offset) { - return sprintf('week_%s_%s.tif', (clone $endDate)->subdays($offset)->week, $endDate->year); + return sprintf('%s.tif', strtolower(self::projectMosaicNameFormat($endDate, $offset))); } public static function projectMosaicNameFormat(Carbon $endDate, int $offset): string { + $paddedWeek = str_pad($endDate->clone()->subDays($offset)->week, 2, '0', STR_PAD_LEFT); + return sprintf('Week_%s_%s', - $endDate->clone()->subDays($offset)->week, + $paddedWeek, $endDate->clone()->subDays($offset)->year ); } diff --git a/laravel_app/composer.lock b/laravel_app/composer.lock index eced4e4..433b5e9 100644 --- a/laravel_app/composer.lock +++ b/laravel_app/composer.lock @@ -1530,16 +1530,16 @@ }, { "name": "laravel/fortify", - "version": "v1.21.3", + "version": "v1.21.4", "source": { "type": "git", "url": "https://github.com/laravel/fortify.git", - "reference": "a725684d17959c4750f3b441ff2e94ecde7793a1" + "reference": "5c2e9cdf589e439feb1ed2911d4acc7ece0ec49e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/fortify/zipball/a725684d17959c4750f3b441ff2e94ecde7793a1", - "reference": "a725684d17959c4750f3b441ff2e94ecde7793a1", + "url": "https://api.github.com/repos/laravel/fortify/zipball/5c2e9cdf589e439feb1ed2911d4acc7ece0ec49e", + "reference": "5c2e9cdf589e439feb1ed2911d4acc7ece0ec49e", "shasum": "" }, "require": { @@ -1591,20 +1591,20 @@ "issues": "https://github.com/laravel/fortify/issues", "source": "https://github.com/laravel/fortify" }, - "time": "2024-05-08T18:07:38+00:00" + "time": "2024-06-27T07:55:32+00:00" }, { "name": "laravel/framework", - "version": "v11.10.0", + "version": "v11.14.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "99b4255194912044b75ab72329f8c19e6345720e" + "reference": "657e8464e13147d56bc3a399115c8c26f38d4821" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/99b4255194912044b75ab72329f8c19e6345720e", - "reference": "99b4255194912044b75ab72329f8c19e6345720e", + "url": "https://api.github.com/repos/laravel/framework/zipball/657e8464e13147d56bc3a399115c8c26f38d4821", + "reference": "657e8464e13147d56bc3a399115c8c26f38d4821", "shasum": "" }, "require": { @@ -1657,6 +1657,7 @@ }, "provide": { "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { @@ -1707,7 +1708,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0.15", + "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", @@ -1796,7 +1797,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-04T13:45:55+00:00" + "time": "2024-07-02T17:23:58+00:00" }, { "name": "laravel/jetstream", @@ -1867,16 +1868,16 @@ }, { "name": "laravel/prompts", - "version": "v0.1.23", + "version": "v0.1.24", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400" + "reference": "409b0b4305273472f3754826e68f4edbd0150149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/9bc4df7c699b0452c6b815e64a2d84b6d7f99400", - "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400", + "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", + "reference": "409b0b4305273472f3754826e68f4edbd0150149", "shasum": "" }, "require": { @@ -1919,22 +1920,22 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.23" + "source": "https://github.com/laravel/prompts/tree/v0.1.24" }, - "time": "2024-05-27T13:53:20+00:00" + "time": "2024-06-17T13:58:22+00:00" }, { "name": "laravel/reverb", - "version": "v1.0.0-beta12", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/laravel/reverb.git", - "reference": "513fc427e86c66dfc0042e0c58243d80480c1e3d" + "reference": "15e192405d39ce66a845e56ccefc207cd73c3429" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/reverb/zipball/513fc427e86c66dfc0042e0c58243d80480c1e3d", - "reference": "513fc427e86c66dfc0042e0c58243d80480c1e3d", + "url": "https://api.github.com/repos/laravel/reverb/zipball/15e192405d39ce66a845e56ccefc207cd73c3429", + "reference": "15e192405d39ce66a845e56ccefc207cd73c3429", "shasum": "" }, "require": { @@ -1948,7 +1949,6 @@ "php": "^8.2", "pusher/pusher-php-server": "^7.2", "ratchet/rfc6455": "^0.3.1", - "react/async": "^4.2", "react/promise-timer": "^1.10", "react/socket": "^1.14", "symfony/console": "^6.0|^7.0", @@ -1959,6 +1959,7 @@ "pestphp/pest": "^2.0", "phpstan/phpstan": "^1.10", "ratchet/pawl": "^0.4.1", + "react/async": "^4.2", "react/http": "^1.9" }, "type": "library", @@ -2001,9 +2002,9 @@ ], "support": { "issues": "https://github.com/laravel/reverb/issues", - "source": "https://github.com/laravel/reverb/tree/v1.0.0-beta12" + "source": "https://github.com/laravel/reverb/tree/v1.0.0" }, - "time": "2024-05-27T13:55:38+00:00" + "time": "2024-07-02T19:11:48+00:00" }, { "name": "laravel/sanctum", @@ -2131,16 +2132,16 @@ }, { "name": "laravel/telescope", - "version": "v5.0.5", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/laravel/telescope.git", - "reference": "ae5c28ca1e40a7a66bfc9b2557e7e1d84d95363c" + "reference": "7355643b998027f8fa9393e6c8c884f126204a80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/telescope/zipball/ae5c28ca1e40a7a66bfc9b2557e7e1d84d95363c", - "reference": "ae5c28ca1e40a7a66bfc9b2557e7e1d84d95363c", + "url": "https://api.github.com/repos/laravel/telescope/zipball/7355643b998027f8fa9393e6c8c884f126204a80", + "reference": "7355643b998027f8fa9393e6c8c884f126204a80", "shasum": "" }, "require": { @@ -2194,9 +2195,9 @@ ], "support": { "issues": "https://github.com/laravel/telescope/issues", - "source": "https://github.com/laravel/telescope/tree/v5.0.5" + "source": "https://github.com/laravel/telescope/tree/v5.1.1" }, - "time": "2024-05-09T17:09:01+00:00" + "time": "2024-06-27T07:12:23+00:00" }, { "name": "laravel/tinker", @@ -2652,16 +2653,16 @@ }, { "name": "livewire/livewire", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "72e900825c560f0e4e620185b26c5441a8914435" + "reference": "da044261bb5c5449397f18fda3409f14acf47c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/72e900825c560f0e4e620185b26c5441a8914435", - "reference": "72e900825c560f0e4e620185b26c5441a8914435", + "url": "https://api.github.com/repos/livewire/livewire/zipball/da044261bb5c5449397f18fda3409f14acf47c0a", + "reference": "da044261bb5c5449397f18fda3409f14acf47c0a", "shasum": "" }, "require": { @@ -2716,7 +2717,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.5.0" + "source": "https://github.com/livewire/livewire/tree/v3.5.1" }, "funding": [ { @@ -2724,7 +2725,7 @@ "type": "github" } ], - "time": "2024-05-21T13:39:04+00:00" + "time": "2024-06-18T11:10:42+00:00" }, { "name": "maatwebsite/excel", @@ -3061,16 +3062,16 @@ }, { "name": "monolog/monolog", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", + "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", "shasum": "" }, "require": { @@ -3146,7 +3147,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.6.0" + "source": "https://github.com/Seldaek/monolog/tree/3.7.0" }, "funding": [ { @@ -3158,20 +3159,20 @@ "type": "tidelift" } ], - "time": "2024-04-12T21:02:21+00:00" + "time": "2024-06-28T09:40:51+00:00" }, { "name": "nesbot/carbon", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318" + "reference": "39c8ef752db6865717cc3fba63970c16f057982c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/415782b7e48223342f1a616c16c45a95b15b2318", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", + "reference": "39c8ef752db6865717cc3fba63970c16f057982c", "shasum": "" }, "require": { @@ -3264,7 +3265,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T17:25:54+00:00" + "time": "2024-06-20T15:52:59+00:00" }, { "name": "nette/schema", @@ -3416,16 +3417,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -3436,7 +3437,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -3468,9 +3469,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "nunomaduro/termwind", @@ -4876,81 +4877,6 @@ }, "time": "2021-12-09T23:20:49+00:00" }, - { - "name": "react/async", - "version": "v4.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/async.git", - "reference": "635d50e30844a484495713e8cb8d9e079c0008a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/async/zipball/635d50e30844a484495713e8cb8d9e079c0008a5", - "reference": "635d50e30844a484495713e8cb8d9e079c0008a5", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.8 || ^1.2.1" - }, - "require-dev": { - "phpstan/phpstan": "1.10.39", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Async\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async utilities and fibers for ReactPHP", - "keywords": [ - "async", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/async/issues", - "source": "https://github.com/reactphp/async/tree/v4.3.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2024-06-04T14:40:02+00:00" - }, { "name": "react/cache", "version": "v1.2.0", @@ -5617,16 +5543,16 @@ }, { "name": "symfony/console", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3" + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9b008f2d7b21c74ef4d0c3de6077a642bc55ece3", - "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3", + "url": "https://api.github.com/repos/symfony/console/zipball/0aa29ca177f432ab68533432db0de059f39c92ae", + "reference": "0aa29ca177f432ab68533432db0de059f39c92ae", "shasum": "" }, "require": { @@ -5690,7 +5616,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.1" + "source": "https://github.com/symfony/console/tree/v7.1.2" }, "funding": [ { @@ -5706,7 +5632,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-06-28T10:03:55+00:00" }, { "name": "symfony/css-selector", @@ -5842,16 +5768,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "e9b8bbce0b4f322939332ab7b6b81d8c11da27dd" + "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/e9b8bbce0b4f322939332ab7b6b81d8c11da27dd", - "reference": "e9b8bbce0b4f322939332ab7b6b81d8c11da27dd", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", + "reference": "2412d3dddb5c9ea51a39cfbff1c565fc9844ca32", "shasum": "" }, "require": { @@ -5897,7 +5823,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.1.1" + "source": "https://github.com/symfony/error-handler/tree/v7.1.2" }, "funding": [ { @@ -5913,7 +5839,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-06-25T19:55:06+00:00" }, { "name": "symfony/event-dispatcher", @@ -6214,16 +6140,16 @@ }, { "name": "symfony/http-kernel", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "fa8d1c75b5f33b1302afccf81811f93976c6e26f" + "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fa8d1c75b5f33b1302afccf81811f93976c6e26f", - "reference": "fa8d1c75b5f33b1302afccf81811f93976c6e26f", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", + "reference": "ae3fa717db4d41a55d14c2bd92399e37cf5bc0f6", "shasum": "" }, "require": { @@ -6308,7 +6234,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.1.1" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.2" }, "funding": [ { @@ -6324,20 +6250,20 @@ "type": "tidelift" } ], - "time": "2024-06-04T06:52:15+00:00" + "time": "2024-06-28T13:13:31+00:00" }, { "name": "symfony/mailer", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "2eaad2e167cae930f25a3d731fec8b2ded5e751e" + "reference": "8fcff0af9043c8f8a8e229437cea363e282f9aee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/2eaad2e167cae930f25a3d731fec8b2ded5e751e", - "reference": "2eaad2e167cae930f25a3d731fec8b2ded5e751e", + "url": "https://api.github.com/repos/symfony/mailer/zipball/8fcff0af9043c8f8a8e229437cea363e282f9aee", + "reference": "8fcff0af9043c8f8a8e229437cea363e282f9aee", "shasum": "" }, "require": { @@ -6388,7 +6314,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.1.1" + "source": "https://github.com/symfony/mailer/tree/v7.1.2" }, "funding": [ { @@ -6404,20 +6330,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-06-28T08:00:31+00:00" }, { "name": "symfony/mime", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "21027eaacc1a8a20f5e616c25c3580f5dd3a15df" + "reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/21027eaacc1a8a20f5e616c25c3580f5dd3a15df", - "reference": "21027eaacc1a8a20f5e616c25c3580f5dd3a15df", + "url": "https://api.github.com/repos/symfony/mime/zipball/26a00b85477e69a4bab63b66c5dce64f18b0cbfc", + "reference": "26a00b85477e69a4bab63b66c5dce64f18b0cbfc", "shasum": "" }, "require": { @@ -6472,7 +6398,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.1.1" + "source": "https://github.com/symfony/mime/tree/v7.1.2" }, "funding": [ { @@ -6488,20 +6414,20 @@ "type": "tidelift" } ], - "time": "2024-06-04T06:40:14+00:00" + "time": "2024-06-28T10:03:55+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -6551,7 +6477,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -6567,20 +6493,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -6629,7 +6555,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -6645,20 +6571,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -6713,7 +6639,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -6729,20 +6655,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -6794,7 +6720,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -6810,20 +6736,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -6874,7 +6800,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -6890,20 +6816,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" + "reference": "10112722600777e02d2745716b70c5db4ca70442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", + "reference": "10112722600777e02d2745716b70c5db4ca70442", "shasum": "" }, "require": { @@ -6947,7 +6873,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" }, "funding": [ { @@ -6963,20 +6889,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -7027,7 +6953,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -7043,25 +6969,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-php80": "^1.14" + "php": ">=7.1" }, "type": "library", "extra": { @@ -7104,7 +7029,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0" }, "funding": [ { @@ -7120,20 +7045,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:35:24+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9", "shasum": "" }, "require": { @@ -7183,7 +7108,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0" }, "funding": [ { @@ -7199,7 +7124,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/process", @@ -7428,16 +7353,16 @@ }, { "name": "symfony/string", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "60bc311c74e0af215101235aa6f471bcbc032df2" + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/60bc311c74e0af215101235aa6f471bcbc032df2", - "reference": "60bc311c74e0af215101235aa6f471bcbc032df2", + "url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8", + "reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8", "shasum": "" }, "require": { @@ -7495,7 +7420,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.1" + "source": "https://github.com/symfony/string/tree/v7.1.2" }, "funding": [ { @@ -7511,7 +7436,7 @@ "type": "tidelift" } ], - "time": "2024-06-04T06:40:14+00:00" + "time": "2024-06-28T09:27:18+00:00" }, { "name": "symfony/translation", @@ -7761,16 +7686,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.1.1", + "version": "v7.1.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "deb2c2b506ff6fdbb340e00b34e9901e1605f293" + "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/deb2c2b506ff6fdbb340e00b34e9901e1605f293", - "reference": "deb2c2b506ff6fdbb340e00b34e9901e1605f293", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5857c57c6b4b86524c08cf4f4bc95327270a816d", + "reference": "5857c57c6b4b86524c08cf4f4bc95327270a816d", "shasum": "" }, "require": { @@ -7824,7 +7749,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.1.1" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.2" }, "funding": [ { @@ -7840,7 +7765,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-06-28T08:00:31+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -8384,16 +8309,16 @@ }, { "name": "laravel/pint", - "version": "v1.16.0", + "version": "v1.16.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98" + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98", - "reference": "1b3a3dc5bc6a81ff52828ba7277621f1d49d6d98", + "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", "shasum": "" }, "require": { @@ -8404,13 +8329,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.57.1", - "illuminate/view": "^10.48.10", - "larastan/larastan": "^2.9.6", + "friendsofphp/php-cs-fixer": "^3.59.3", + "illuminate/view": "^10.48.12", + "larastan/larastan": "^2.9.7", "laravel-zero/framework": "^10.4.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.7" + "pestphp/pest": "^2.34.8" }, "bin": [ "builds/pint" @@ -8446,20 +8371,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-05-21T18:08:25+00:00" + "time": "2024-06-18T16:50:05+00:00" }, { "name": "laravel/sail", - "version": "v1.29.2", + "version": "v1.30.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621" + "reference": "8ba049b6c06e0330b6aa1fb7af2746fb4da445e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/a8e4e749735ba2f091856eafeb3f99db8cd6b621", - "reference": "a8e4e749735ba2f091856eafeb3f99db8cd6b621", + "url": "https://api.github.com/repos/laravel/sail/zipball/8ba049b6c06e0330b6aa1fb7af2746fb4da445e4", + "reference": "8ba049b6c06e0330b6aa1fb7af2746fb4da445e4", "shasum": "" }, "require": { @@ -8509,7 +8434,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2024-05-16T21:39:11+00:00" + "time": "2024-07-01T20:55:03+00:00" }, { "name": "maximebf/debugbar", @@ -8939,16 +8864,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.14", + "version": "10.1.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "shasum": "" }, "require": { @@ -9005,7 +8930,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15" }, "funding": [ { @@ -9013,7 +8938,7 @@ "type": "github" } ], - "time": "2024-03-12T15:33:41+00:00" + "time": "2024-06-29T08:25:15+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9260,16 +9185,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.20", + "version": "10.5.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" + "reference": "831bf82312be6037e811833ddbea0b8de60ea314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/831bf82312be6037e811833ddbea0b8de60ea314", + "reference": "831bf82312be6037e811833ddbea0b8de60ea314", "shasum": "" }, "require": { @@ -9341,7 +9266,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.25" }, "funding": [ { @@ -9357,7 +9282,7 @@ "type": "tidelift" } ], - "time": "2024-04-24T06:32:35+00:00" + "time": "2024-07-03T05:49:17+00:00" }, { "name": "sebastian/cli-parser", @@ -10340,16 +10265,16 @@ }, { "name": "spatie/error-solutions", - "version": "1.0.0", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/spatie/error-solutions.git", - "reference": "202108314a6988ede156fba1b3ea80a784c1734a" + "reference": "264a7eef892aceb2fd65e206127ad3af4f3a2d6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/error-solutions/zipball/202108314a6988ede156fba1b3ea80a784c1734a", - "reference": "202108314a6988ede156fba1b3ea80a784c1734a", + "url": "https://api.github.com/repos/spatie/error-solutions/zipball/264a7eef892aceb2fd65e206127ad3af4f3a2d6b", + "reference": "264a7eef892aceb2fd65e206127ad3af4f3a2d6b", "shasum": "" }, "require": { @@ -10402,7 +10327,7 @@ ], "support": { "issues": "https://github.com/spatie/error-solutions/issues", - "source": "https://github.com/spatie/error-solutions/tree/1.0.0" + "source": "https://github.com/spatie/error-solutions/tree/1.0.4" }, "funding": [ { @@ -10410,7 +10335,7 @@ "type": "github" } ], - "time": "2024-06-12T14:49:54+00:00" + "time": "2024-06-28T13:33:04+00:00" }, { "name": "spatie/flare-client-php", @@ -10788,5 +10713,5 @@ "php": "^8.2" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/laravel_app/tests/Unit/Imports/HarvestDataImportTest.php b/laravel_app/tests/Unit/Imports/HarvestDataImportTest.php index b2d6ffa..c2002b4 100644 --- a/laravel_app/tests/Unit/Imports/HarvestDataImportTest.php +++ b/laravel_app/tests/Unit/Imports/HarvestDataImportTest.php @@ -11,40 +11,45 @@ class HarvestDataImportTest extends TestCase { + private $base_path; + private $excelData; + + protected function setUp(): void + { + parent::setUp(); // TODO: Change the autogenerated stub + + $this->base_path = base_path('tests/__fixtures__/harvest.xlsx'); + $this->excelData = Excel::toCollection(new \App\Imports\ExcelFileImport(), $this->base_path); + } public function test_it_gets_data_from_excel_file() { - $value = Storage::disk('local')->path('Chemba/Data/harvest.xlsx'); - $data = Excel::toCollection(new \App\Imports\ExcelFileImport(),$value); - $season_start_index = $data->first()->first()->search('season_start'); + $season_start_index = $this->excelData->first()->first()->search('season_start'); $min = now(); - collect($data->first()->slice(1))->each(function($value) use (&$min,$season_start_index){ - $min = min($min,Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); + collect($this->excelData->first()->slice(1))->each(function ($value) use (&$min, $season_start_index) { + $min = min($min, Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); }); + $this->assertTrue($min->equalTo('2023-01-12')); } public function test_it_gets_the_min_value() { - $value = Storage::disk('local')->path('Chemba/Data/harvest.xlsx'); - $data = Excel::toCollection(new \App\Imports\ExcelFileImport(),$value); - $season_start_index = $data->first()->first()->search('season_start'); + $season_start_index = $this->excelData->first()->first()->search('season_start'); $min = now(); - collect($data->first()->slice(1))->each(function($value) use (&$min,$season_start_index){ - $min = min($min,Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); + collect($this->excelData->first()->slice(1))->each(function ($value) use (&$min, $season_start_index) { + $min = min($min, Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); }); - assertEquals(Carbon::parse('2023-01-12'),$min); + assertEquals(Carbon::parse('2023-01-12'), $min); } public function test_it_gets_the_min_value_using_reduce() { - $value = Storage::disk('local')->path('chemba/Data/harvest.xlsx'); - $data = Excel::toCollection(new \App\Imports\ExcelFileImport(),$value); - $season_start_index = $data->first()->first()->search('season_start'); - $min = collect($data->first()->slice(1))->reduce(function($carry,$value,$key) use ($season_start_index){ - return min($carry,Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); - },now()); - assertEquals(Carbon::parse('2023-01-12'),$min); + $season_start_index = $this->excelData->first()->first()->search('season_start'); + $min = collect($this->excelData->first()->slice(1))->reduce(function ($carry, $value, $key) use ($season_start_index) { + return min($carry, Carbon::instance(SharedDate::excelToDateTimeObject($value[$season_start_index]))); + }, now()); + assertEquals(Carbon::parse('2023-01-12'), $min); } diff --git a/laravel_app/tests/Unit/Models/ProjectMosaicTest.php b/laravel_app/tests/Unit/Models/ProjectMosaicTest.php index 7d7222d..54fabc9 100644 --- a/laravel_app/tests/Unit/Models/ProjectMosaicTest.php +++ b/laravel_app/tests/Unit/Models/ProjectMosaicTest.php @@ -29,15 +29,14 @@ public function it_should_return_the_correct_attachment_path($endDate,$offset, $this->assertEquals( $expected, ProjectMosaic::getFilenameByPeriod($endDate,$offset) - ); } public static function filenameProvider(){ return [ - [new Carbon('2022-01-01'), 10, 'period_2021-12-22_2022-01-01.tif'], - [new Carbon('2022-10-25'),7, 'period_2022-10-18_2022-10-25.tif'], + [new Carbon('2022-01-01'), 7, 'week_52_2021.tif'], + [new Carbon('2022-10-25'),7, 'week_43_2022.tif'], ]; } diff --git a/laravel_app/tests/Unit/Models/ProjectTest.php b/laravel_app/tests/Unit/Models/ProjectTest.php index 7e8aa98..ed09151 100644 --- a/laravel_app/tests/Unit/Models/ProjectTest.php +++ b/laravel_app/tests/Unit/Models/ProjectTest.php @@ -77,10 +77,9 @@ public function when_running_the_seeder_their_are_three_projects_with_the_correc /** @test */ public function when_not_all_mosaics_are_present_it_should_return_an_exception() { - $this->seed(); $this->expectException(\Exception::class); - $this->expectExceptionMessage('Missing mosaics: period_2021-12-26_2022-01-01.tif, period_2021-12-19_2021-12-25.tif, period_2021-12-12_2021-12-18.tif, period_2021-12-05_2021-12-11.tif'); + $this->expectExceptionMessage('Missing mosaics: week_52_2021.tif, week_51_2021.tif, week_50_2021.tif, week_49_2021.tif'); $project = Project::find(1); $lastDate = Carbon::parse('2022-01-01'); $project->allMosaicsPresent($lastDate); @@ -89,15 +88,15 @@ public function when_not_all_mosaics_are_present_it_should_return_an_exception() /** @test */ public function when_all_mosaics_are_present_it_should_return_true() { - // TODO CHeck with Martin the Leading Zero test $project = Mockery::mock(Project::class)->makePartial(); + $project->mail_day = 'Friday'; $lastDate = Carbon::parse('2022-01-01'); $project->shouldReceive('getMosaicList')->andReturn( collect([ - "chemba/weekly_mosaic/period_2021-12-26_2022-01-01.tif", - "chemba/weekly_mosaic/period_2021-12-19_2021-12-25.tif", - "chemba/weekly_mosaic/period_2021-12-12_2021-12-18.tif", - "chemba/weekly_mosaic/period_2021-12-05_2021-12-11.tif", + "chemba/weekly_mosaic/week_52_2021.tif", + "chemba/weekly_mosaic/week_51_2021.tif", + "chemba/weekly_mosaic/week_50_2021.tif", + "chemba/weekly_mosaic/week_49_2021.tif", ])); $this->assertTrue($project->allMosaicsPresent($lastDate)); @@ -107,14 +106,14 @@ public function when_all_mosaics_are_present_it_should_return_true() public function when_not_mosaics_are_present_it_should_throw_an_exception_listing_the_missing_mosiacs() { $this->expectException(\Exception::class); - $this->expectExceptionMessage('Missing mosaics: period_2020-12-05_2020-12-11.tif'); + $this->expectExceptionMessage('Missing mosaics: week_49_2020.tif'); $project = Mockery::mock(Project::class)->makePartial(); $lastDate = Carbon::parse('2021-01-01'); $project->shouldReceive('getMosaicList')->andReturn( collect([ - "chemba/weekly_mosaic/period_2020-12-26_2021-01-01.tif", - "chemba/weekly_mosaic/period_2020-12-19_2020-12-25.tif", - "chemba/weekly_mosaic/period_2020-12-12_2020-12-18.tif", + "chemba/weekly_mosaic/week_52_2020.tif", + "chemba/weekly_mosaic/week_51_2020.tif", + "chemba/weekly_mosaic/week_50_2020.tif", ])); $project->allMosaicsPresent($lastDate); @@ -143,10 +142,10 @@ public function getMosiacFileListByEndDate_should_return_four_filenames() $list = iterator_to_array($project::getMosaicFilenameListByEndDate($lastDate)); $this->assertCount(4, $list); $this->assertEquals([ - "period_2020-12-26_2021-01-01.tif", - "period_2020-12-19_2020-12-25.tif", - "period_2020-12-12_2020-12-18.tif", - "period_2020-12-05_2020-12-11.tif", + 'week_52_2020.tif', + 'week_51_2020.tif', + 'week_50_2020.tif', + 'week_49_2020.tif', ], $list); } @@ -202,9 +201,34 @@ public function when_getMosaicsFor_is_called_it_returns_a_collection_of_4_jobs_w return $job->mosaic->name; })->toArray()); } + /** @test */ + public function when_getMosaicsFor_is_called_it_returns_a_collection_of_4_jobs_with_correct_week_numbers_when_end_date_is_mail_day() + { + /* @var Project $project */ + $project = Project::create([ + 'name' => 'project_name', + 'download_path' => 'project_download_path', + 'mail_day' => 'Friday', + ]); + + $mosaics = $project->getMosaicsFor(new Carbon('2024-07-05')); + $this->assertCount(4, $mosaics); + collect($mosaics)->each(fn($job) => $this->assertInstanceOf(ProjectMosiacGeneratorJob::class, $job)); + + $this->assertEquals([ + "Week_28_2024", + "Week_27_2024", + "Week_26_2024", + "Week_25_2024", + ], + collect($mosaics)->map(function ($job) { + return $job->mosaic->name; + })->toArray()); + } /** @test */ - public function when_getMosaicsFor_is_called_it_returns_a_collection_of_4_jobs_with_where_current_day_is_in_week_26_but_the_mail_day_is_in_week_27() + public function when_getMosaicsFor_is_called_it_returns_a_collection_of_4_jobs_with_where_current_day_is_in_week_26_but_the_mail_day_is_in_week_27( + ) { /* @var Project $project */ $project = Project::create([ diff --git a/laravel_app/tests/__fixtures__/harvest.xlsx b/laravel_app/tests/__fixtures__/harvest.xlsx new file mode 100644 index 0000000..f04ca8f Binary files /dev/null and b/laravel_app/tests/__fixtures__/harvest.xlsx differ diff --git a/r_app/CI_report_dashboard_planet.Rmd b/r_app/CI_report_dashboard_planet.Rmd index 4cda350..6741d50 100644 --- a/r_app/CI_report_dashboard_planet.Rmd +++ b/r_app/CI_report_dashboard_planet.Rmd @@ -72,8 +72,8 @@ source(here("r_app", "parameters_project.R")) ```{r week, message=FALSE, warning=FALSE, include=FALSE} today <- as.character(report_date) week <- week(today) - week <- 25 -today = "2024-06-21" +# week <- 25 +# today = "2024-06-21" #today = as.character(Sys.Date()) @@ -117,10 +117,22 @@ This PDF-dashboard shows the status of your fields on a weekly basis. We will sh CI_quadrant <- readRDS(here(cumulative_CI_vals_dir,"All_pivots_Cumulative_CI_quadrant_year_v2.rds"))# %>% # rename(pivot_quadrant = field) -CI <- brick(here(weekly_CI_mosaic, paste0("week_",week, "_", year, ".tif"))) %>% subset("CI") -CI_m1 <- brick(here(weekly_CI_mosaic, paste0("week_",week_minus_1, "_", year_1, ".tif"))) %>% subset("CI") -CI_m2 <- brick(here(weekly_CI_mosaic, paste0("week_",week_minus_2, "_", year_2, ".tif"))) %>% subset("CI") -CI_m3 <- brick(here(weekly_CI_mosaic, paste0("week_",week_minus_3, "_", year_3, ".tif"))) %>% subset("CI") +path_to_week_current = here(weekly_CI_mosaic, paste0("week_",week, "_", year, ".tif")) +path_to_week_minus_1 = here(weekly_CI_mosaic, paste0("week_",week_minus_1, "_", year_1, ".tif")) +path_to_week_minus_2 = here(weekly_CI_mosaic, paste0("week_",week_minus_2, "_", year_2, ".tif")) +path_to_week_minus_3 = here(weekly_CI_mosaic, paste0("week_",week_minus_3, "_", year_3, ".tif")) + +print("required mosaic paths") +print(path_to_week_current) +print(path_to_week_minus_1) +print(path_to_week_minus_2) +print(path_to_week_minus_3) + +CI <- brick(path_to_week_current) %>% subset("CI") +CI_m1 <- brick(path_to_week_minus_1) %>% subset("CI") +CI_m2 <- brick(path_to_week_minus_2) %>% subset("CI") +CI_m3 <- brick(path_to_week_minus_3) %>% subset("CI") + # last_week_dif_raster <- ((CI - CI_m1) / CI_m1) * 100 last_week_dif_raster_abs <- (CI - CI_m1) diff --git a/r_app/Rplots.pdf b/r_app/Rplots.pdf index e0f9a77..7a8f208 100644 Binary files a/r_app/Rplots.pdf and b/r_app/Rplots.pdf differ diff --git a/r_app/ci_extraction_utils.R b/r_app/ci_extraction_utils.R index f092da4..2bb8e52 100644 --- a/r_app/ci_extraction_utils.R +++ b/r_app/ci_extraction_utils.R @@ -1,6 +1,6 @@ # Utils for ci extraction -date_list <- function(end_date, offset){ +date_list <- function(end_date, offset, week){ offset <- as.numeric(offset) - 1 end_date <- as.Date(end_date) start_date <- end_date - lubridate::days(offset) diff --git a/r_app/mosaic_creation.R b/r_app/mosaic_creation.R index 400d034..2d2f9e4 100644 --- a/r_app/mosaic_creation.R +++ b/r_app/mosaic_creation.R @@ -45,6 +45,7 @@ if (!is.character(project_dir)) { laravel_storage_dir <- here("laravel_app/storage/app", project_dir) #preparing directories +reports_dir <- here(laravel_storage_dir, "reports") planet_tif_folder <- here(laravel_storage_dir, "merged_tif") merged_final <- here(laravel_storage_dir, "merged_final_tif") @@ -65,6 +66,7 @@ source("parameters_project.R") source("mosaic_creation_utils.R") dir.create(here(laravel_storage_dir)) +dir.create(here(reports_dir)) dir.create(here(data_dir)) dir.create(here(extracted_CI_dir)) dir.create(here(daily_CI_vals_dir)) @@ -83,7 +85,14 @@ week <- week(end_date) # Creating weekly mosaic #dates <- date_list(weeks_ago) dates <- date_list(end_date, offset) + +file_name_tif <- as.character(args[4]) +if (is.na(file_name_tif)) { + file_name_tif <- paste0("week_", sprintf("%02d", dates$week), "_", dates$year, ".tif") +} + print(dates) +print(file_name_tif) #load pivot geojson # pivot_sf_q <- st_read(here(data_dir, "pivot.geojson")) %>% dplyr::select(pivot, pivot_quadrant) %>% vect() @@ -146,7 +155,7 @@ if(sum(missing_pixels_count$thres_5perc)>1){ names(x) <- c("Red", "Green", "Blue", "NIR", "CI") }else{ message("No cloud free images available, all images combined") - + message(vrt_list) rsrc <- sprc(vrt_list) x <- mosaic(rsrc, fun = "max") # x <- rast(vrt_list[1]) %>% setValues(NA) @@ -157,6 +166,6 @@ if(sum(missing_pixels_count$thres_5perc)>1){ plot(x$CI, main = paste("CI map ", dates$week)) plotRGB(x, main = paste("RGB map ", dates$week)) -file_path_tif <- here(weekly_CI_mosaic ,paste0("week_", sprintf("%02d", dates$week), "_", dates$year, ".tif")) +file_path_tif <- here(weekly_CI_mosaic ,file_name_tif) writeRaster(x, file_path_tif, overwrite=TRUE) message("Raster written/made at: ", file_path_tif)