Skip to content

Commit

Permalink
small refinements on Makefile and scripts/src/TemporaryIndex.php
Browse files Browse the repository at this point in the history
  • Loading branch information
k00ni committed Oct 28, 2024
1 parent 5114d11 commit 0a6e9f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
default:
@echo ""
@echo "Available commands:"
@echo " - make install - Set up project the first time
@echo " - make index - Crawl portals and services and create index.csv"
@echo " - make prepare - Prepare for commit"
@echo " - make composer - Run 'composer update' in /scripts"
@echo ""

composer:
cd scripts && composer update

index:
rm -i -f ./scripts/var/index.db
rm -i -f ./scripts/var/temp_files/*
php ./scripts/bin/renew_index.php

install:
cd scripts && composer update
mkdir scripts/var/downloaded_rdf_files

prepare:
cd scripts && vendor/bin/php-cs-fixer fix
cd scripts && vendor/bin/phpstan
Expand Down
3 changes: 3 additions & 0 deletions scripts/src/TemporaryIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public function getEntryDataAsArray(string $iri): array|null
*/
public function hasEntry(string $iri): bool
{
// to avoid IRIs such as https://w3id.org/AIRO and https://w3id.org/airo considered different
$iri = strtolower($iri);

$stmt = $this->temporaryIndexDb->prepare('SELECT ontology_iri FROM entry WHERE ontology_iri = ?');
$stmt->execute([$iri]);
foreach ($stmt->getIterator() as $entry) {
Expand Down

0 comments on commit 0a6e9f3

Please sign in to comment.