Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9c43e88
add local changes
Oct 29, 2020
4ce6e2f
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Oct 30, 2020
532fd14
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Feb 9, 2021
641df79
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Feb 14, 2021
e07b430
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Feb 14, 2021
6101a2d
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Feb 15, 2021
0ae656d
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Apr 26, 2021
ca235d0
Merge branch 'develop' of https://github.com/openml/OpenML into develop
May 25, 2021
fc2822b
Merge branch 'develop' of https://github.com/openml/OpenML into develop
May 29, 2021
c6742a5
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Aug 12, 2021
d162bdc
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Aug 13, 2021
f68031a
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Aug 13, 2021
571558d
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Aug 23, 2021
081b6b3
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Aug 25, 2021
95bcdc6
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Sep 17, 2021
c1b9b7b
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Sep 17, 2021
933e583
resolve conflict
Jan 26, 2022
a782b6e
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Jan 26, 2022
a62cd4e
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Jan 26, 2022
7dc1a42
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Mar 8, 2022
6ca2160
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Mar 8, 2022
df2b8f0
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Mar 8, 2022
b0b1766
skis minio url for sparse arff
joaquinvanschoren Apr 6, 2022
220efd1
Merge branch 'develop' of https://github.com/openml/OpenML into develop
Apr 6, 2022
c174961
Update .htaccess
joaquinvanschoren Aug 18, 2022
cd64fde
cleanup
joaquinvanschoren Aug 18, 2022
8043e7f
Merge branch 'develop' of https://github.com/openml/OpenML into develop
joaquinvanschoren Aug 18, 2022
957f8f6
fix in data fork
Oct 21, 2022
9fbff81
fix for CORS
Oct 21, 2022
f1b6630
CORS fix
Oct 21, 2022
efec162
minio_url to parquet_url rename
Oct 21, 2022
39d8ca0
ES update
Oct 21, 2022
9181f73
set htaccess back to development state (?)
janvanrijn Nov 17, 2022
6c184db
Revert "set htaccess back to development state (?)"
janvanrijn Nov 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ RewriteRule ^(.*)$ https://www.openml.org/api_new/$1 [L,P]
RewriteCond $1 !^(questions|SWF|img|docs|downloads|GFX|favicon\.ico|tiny_mce|index\.php|js|css|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]


RedirectMatch 301 ^/?$ http://api.openml.org/home

<IfModule mod_headers.c>
SetEnvIfNoCase Origin "https?://(www\.)?(openml\.org|staging\.openml\.org)(:\d+)?$" ACAO=$0
Header set Access-Control-Allow-Origin %{ACAO}e env=ACAO
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
</IfModule>
11 changes: 7 additions & 4 deletions openml_OS/libraries/ElasticSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function index($type, $id = false, $altmetrics=True, $verbosity=0) {
}
}

public function index_from($type, $id = false, $verbosity=1, $altmetrics=True) {
public function index_from($type, $id = false, $verbosity=1, $altmetrics=False) {
//bootstrap
$indexParams['index'] = $type;
if(! $this->client->indices()->getMapping($indexParams))
Expand Down Expand Up @@ -1340,11 +1340,11 @@ public function index_run($id, $start_id = 0, $altmetrics=True, $verbosity=0) {
$submitted += sizeof($responses['items']);
if ($verbosity) {
#echo "- completed ".str_pad($submitted, 9, ' ', STR_PAD_RIGHT);
echo "\033[31D";
#echo "\033[31D";
}
}
} elseif($verbosity) {
echo "\033[9D";
#echo "\033[9D";
}
$rid += $incr;
}
Expand Down Expand Up @@ -1919,7 +1919,10 @@ public function index_data($id, $start_id = 0, $altmetrics=True, $verbosity=0) {

private function build_data($d, $altmetrics=True) {
$description_record = $this->CI->Dataset_description->getWhereSingle('did =' . $d->did, 'version DESC');
$headless_description = trim(preg_replace('/\s+/', ' ', preg_replace('/^\*{2,}.*/m', '', $description_record->description)));
if(!$description_record){
return 'Could not find description of dataset ' . $d->did;
}
$headless_description = trim(preg_replace('/\s+/', ' ', preg_replace('/^\*{2,}.*/m', '', $description_record->description)));
$new_data = array(
'data_id' => $d->did,
'name' => $d->name,
Expand Down
22 changes: 15 additions & 7 deletions openml_OS/models/api/v1/Api_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,22 +502,28 @@ private function data_fork() {
$latest_version = $this->Dataset-> getWhereSingle('`name` = "' . $dataset->name . '"', 'CAST(`version` AS DECIMAL) DESC');
$dataset->version = $latest_version->version + 1;
unset($dataset->did);
$data_id = $this->Dataset->insert($dataset);
if (!$data_id) {
$new_data_id = $this->Dataset->insert($dataset);
if (!$new_data_id) {
$this->returnError(1072, $this->version);
return;
}

// create a copy of the latest description
$description_record = $this->Dataset_description->getWhereSingle('did =' . $data_id, 'version DESC');
$description_record->did = $new_data_id;
$description_record->version = "1";
$this->Dataset_description->insert($description_record);

// update elastic search index.
try {
$this->elasticsearch->index('data', $data_id);
$this->elasticsearch->index('data', $new_data_id);
} catch (Exception $e) {
$this->returnError(105, $this->version, $this->openmlGeneralErrorCode, $e->getMessage());
return;
}

// Return data id, for user to verify changes
$this->xmlContents( 'data-fork', $this->version, array( 'id' => $data_id) );
$this->xmlContents( 'data-fork', $this->version, array( 'id' => $new_data_id) );
}

private function data_edit() {
Expand Down Expand Up @@ -757,9 +763,11 @@ private function data($data_id) {
if ($data_status != false) {
$dataset->status = $data_status->status;
}

$dataset->minio_url = 'http://openml1.win.tue.nl/dataset' . $data_id . '/dataset_' . $data_id . '.pq';
$this->xmlContents( 'data-get', $this->version, $dataset );
if ($dataset->format != 'Sparse_ARFF') {
$dataset->parquet_url = 'http://openml1.win.tue.nl/dataset' . $data_id . '/dataset_' . $data_id . '.pq';
$dataset->minio_url = 'http://openml1.win.tue.nl/dataset' . $data_id . '/dataset_' . $data_id . '.pq';
}
$this->xmlContents( 'data-get', $this->version, $dataset );
}

private function data_reset($data_id) {
Expand Down
1 change: 1 addition & 0 deletions openml_OS/views/pages/api_new/v1/xml/data-get.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<?php if ($language != null): ?><oml:language><?php echo htmlspecialchars($language); ?></oml:language><?php endif; ?>
<?php if ($licence != null): ?><oml:licence><?php echo htmlspecialchars($licence); ?></oml:licence><?php endif; ?>
<oml:url><?php echo htmlspecialchars($url); ?></oml:url>
<?php if ($parquet_url != null): ?><oml:parquet_url><?php echo htmlspecialchars($parquet_url); ?></oml:parquet_url><?php endif; ?>
<?php if ($file_id != null): ?><oml:file_id><?php echo $file_id; ?></oml:file_id><?php endif; ?>
<?php if ($default_target_attribute != null): ?><oml:default_target_attribute><?php echo htmlspecialchars($default_target_attribute); ?></oml:default_target_attribute><?php endif; ?>
<?php if ($row_id_attribute != null): ?><oml:row_id_attribute><?php echo htmlspecialchars($row_id_attribute); ?></oml:row_id_attribute><?php endif; ?>
Expand Down