diff --git a/.github/workflows/release_docker.yaml b/.github/workflows/release_docker.yaml new file mode 100644 index 000000000..55406876c --- /dev/null +++ b/.github/workflows/release_docker.yaml @@ -0,0 +1,64 @@ +name: release-docker + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + + docker: + + runs-on: ubuntu-latest + + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Extract metadata (tags, labels) for Docker Hub + id: meta_dockerhub + uses: docker/metadata-action@v5 + with: + images: "openml/php-rest-api" + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v6 + with: + context: . + file: docker/Dockerfile + tags: ${{ steps.meta_dockerhub.outputs.tags }} + labels: ${{ steps.meta_dockerhub.outputs.labels }} + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name == 'push' }} + + - name: Update repo description + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: openml/php-rest-api + short-description: "PHP rest api for OpenML." + readme-filepath: ./docker/README.md + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.gitignore b/.gitignore index 728ccc53f..592e08b5e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,7 @@ data/* openml_OS/config/BASE_CONFIG.php openml_OS/third_party/OpenML/Java/old-evaluate.jar docs/site/ +*.icloud +*.DS_store openml_OS/vendor/ -openapi/vendor/ \ No newline at end of file +openapi/vendor/ diff --git a/.htaccess b/.htaccess index ce0db299b..d1d49bb33 100644 --- a/.htaccess +++ b/.htaccess @@ -1,19 +1,21 @@ -RewriteEngine on +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php/$0 [L] # TODO: specific for main instance of OpenML site. Should do something better -RewriteCond %{HTTP_HOST} ^api_new.openml.org -RewriteRule ^(.*)$ http://www.openml.org/api_new/$1 [L,P] +#RewriteCond %{HTTP_HOST} ^api_new.openml.org +#RewriteRule ^(.*)$ http://www.openml.org/api_new/$1 [L,P] -RewriteCond %{HTTPS_HOST} ^api_new.openml.org -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] +#RewriteCond %{HTTPS_HOST} ^api_new.openml.org +#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 - 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" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 276402c7e..3b6f7ee69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,29 +1,7 @@ -### Project vision -We want to make machine learning and data analysis **simple**, **accessible**, **collaborative** and **open** with an optimal **division of labour** between computers and humans. - ### Want to get involved? -Awesome, we're happy to have you! :tada: - -OpenML is dependent on the community. If you want to help, please email us (openmlHQ@googlegroups.com). If you feel already comfortable you can help by opening issues or make a pull request on GitHub. We also have regular workshops you can join (they are announced on openml.org). - -### Who are we? -We are a group of friendly people who are excited about open science and machine learning. A list of people currently involved can be found [here](https://www.openml.org/contact). - -### We need help! -We are currently looking for help with: -* User feedback (best via GitHub issues, but email is also fine) -* Frontend / UX / Design of the website -* Backend / API -* Outreach / making OpenML better known (especially in non-ML-communities, where people have data but no analysis expertise) -* Helping with the APIs ([Python](https://openml.github.io/OpenML/Python-start/), [R](https://openml.github.io/OpenML/R-guide/), [Java](https://openml.github.io/OpenML/Java-guide/) and [.Net](https://openml.github.io/OpenML/NET-API/); find the links to GitHub repos [here](https://github.com/openml/OpenML/wiki)) -* Helping with the integration of machine learning libraries ([WEKA](https://www.openml.org/#WEKA), [MOA](https://www.openml.org/#plugin_moa), [MLR](https://openml.github.io/OpenML/mlr/), find the links to GitHub repos [here](https://github.com/openml/OpenML/wiki)) -* Helping with documenting the interfaces or the API -* What could we do better to get new users started? Help us to figure out what is difficult to understand about OpenML. If you *are* a new user, you are the perfect person for this! - -### Beginner issues -Check out the issues labeled [Good first issue](https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Aopenml++label%3A%22Good+first+issue%22+) or [help wanted](https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Aopenml++label%3A%22help+wanted%22+) +Awesome, we're happy to have you! :star2: :tada: :clap: -### Change the world -If you have your own ideas on how you want to contribute, please [get in touch](https://github.com/openml/OpenML/wiki/Communication-Channels)! We are very friendly and open to new ideas :wink: +:point_right: Check out our contributing guide in +the [OpenML docs](https://docs.openml.org/Contributing/). diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..df97ee56b --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014-2021, OpenML +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 4d9856f05..c96c9d261 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Want to learn about OpenML or get involved? Please do and [get in touch](openmlH - The OpenML [Documentation page](https://openml.github.io/OpenML/) gives an introduction in details and features, as well as - OpenML's different [APIs](https://openml.github.io/OpenML/APIs) and [integrations](https://openml.github.io/OpenML/sklearn/) so that everyone can work with their favorite tool. - How to contribute: https://github.com/openml/OpenML/blob/master/CONTRIBUTING.md -- Citation and Honor Code: http://openml.org/cite +- Citation and Honor Code: https://www.openml.org/terms - Communication / Contact: https://github.com/openml/OpenML/wiki/Communication-Channels OpenML is an online machine learning platform for sharing and organizing data, machine learning algorithms and experiments. It is designed to create a frictionless, networked ecosystem, that you can readily integrate into your existing processes/code/environments, allowing people all over the world to collaborate and build directly on each other’s latest ideas, data and results, irrespective of the tools and infrastructure they happen to use. diff --git a/data/sql/data_feature.sql b/data/sql/data_feature.sql new file mode 100644 index 000000000..f3e953da4 --- /dev/null +++ b/data/sql/data_feature.sql @@ -0,0 +1,9 @@ +INSERT INTO `data_feature` (`did`, `index`, `evaluation_engine_id`, `name`, `data_type`, `is_target`, `is_row_identifier`, `is_ignore`, `NumberOfDistinctValues`, `NumberOfUniqueValues`, `NumberOfMissingValues`, `NumberOfIntegerValues`, `NumberOfRealValues`, `NumberOfNominalValues`, `NumberOfValues`, `MaximumValue`, `MinimumValue`, `MeanValue`, `StandardDeviation`, `ClassDistribution`) VALUES +(11, 0, 1, 'buying', 'nominal', 'false', 'false', 'false', 4, 0, 0, 1728, 0, '4', 1728, NULL, NULL, NULL, NULL, '[[\"vhigh\",\"high\",\"med\",\"low\"],[[360, 72, 0, 0],[324, 108, 0, 0],[268, 115, 23, 26],[258, 89, 46, 39]]]'), +(11, 1, 1, 'maint', 'nominal', 'false', 'false', 'false', 4, 0, 0, 1728, 0, '4', 1728, NULL, NULL, NULL, NULL, '[[\"vhigh\",\"high\",\"med\",\"low\"],[[360, 72, 0, 0],[314, 105, 0, 13],[268, 115, 23, 26],[268, 92, 46, 26]]]'), +(11, 2, 1, 'doors', 'nominal', 'false', 'false', 'false', 4, 0, 0, 1728, 0, '4', 1728, NULL, NULL, NULL, NULL, '[[\"2\",\"3\",\"4\",\"5more\"],[[326, 81, 15, 10],[300, 99, 18, 15],[292, 102, 18, 20],[292, 102, 18, 20]]]'), +(11, 3, 1, 'persons', 'nominal', 'false', 'false', 'false', 3, 0, 0, 1728, 0, '3', 1728, NULL, NULL, NULL, NULL, '[[\"2\",\"4\",\"more\"],[[576, 0, 0, 0],[312, 198, 36, 30],[322, 186, 33, 35]]]'), +(11, 4, 1, 'lug_boot', 'nominal', 'false', 'false', 'false', 3, 0, 0, 1728, 0, '3', 1728, NULL, NULL, NULL, NULL, '[[\"small\",\"med\",\"big\"],[[450, 105, 21, 0],[392, 135, 24, 25],[368, 144, 24, 40]]]'), +(11, 5, 1, 'safety', 'nominal', 'false', 'false', 'false', 3, 0, 0, 1728, 0, '3', 1728, NULL, NULL, NULL, NULL, '[[\"low\",\"med\",\"high\"],[[576, 0, 0, 0],[357, 180, 39, 0],[277, 204, 30, 65]]]'), +(11, 6, 1, 'class', 'nominal', 'true', 'false', 'false', 4, 0, 0, 1728, 0, '4', 1728, NULL, NULL, NULL, NULL, '[[\"unacc\",\"acc\",\"good\",\"vgood\"],[[1210, 0, 0, 0],[0, 384, 0, 0],[0, 0, 69, 0],[0, 0, 0, 65]]]') + diff --git a/data/sql/data_feature_description.sql b/data/sql/data_feature_description.sql new file mode 100644 index 000000000..dd8ec76f8 --- /dev/null +++ b/data/sql/data_feature_description.sql @@ -0,0 +1,5 @@ +INSERT INTO `data_feature_description` (`did`, `index`, `uploader`, `date`, `description_type`, `value`) VALUES +(11, 2, 1, '2024-01-09 13:15:36', 'ontology', 'https://en.wikipedia.org/wiki/Car_door'), +(11, 2, 1, '2024-01-09 13:15:36', 'ontology', 'https://en.wikipedia.org/wiki/Door'), +(11, 1, 1, '2024-01-09 13:23:18', 'ontology', 'https://en.wikipedia.org/wiki/Service_(motor_vehicle)'), +(11, 3, 1, '2024-01-09 13:24:18', 'ontology', 'https://en.wikipedia.org/wiki/Passenger_vehicles_in_the_United_States'); \ No newline at end of file diff --git a/data/sql/data_feature_value.sql b/data/sql/data_feature_value.sql new file mode 100644 index 000000000..b8a7ea616 --- /dev/null +++ b/data/sql/data_feature_value.sql @@ -0,0 +1,26 @@ +INSERT INTO `data_feature_value` (`did`, `index`, `value`) VALUES +(11, 0, 'high'), +(11, 0, 'low'), +(11, 0, 'med'), +(11, 0, 'vhigh'), +(11, 1, 'high'), +(11, 1, 'low'), +(11, 1, 'med'), +(11, 1, 'vhigh'), +(11, 2, '2'), +(11, 2, '3'), +(11, 2, '4'), +(11, 2, '5more'), +(11, 3, '2'), +(11, 3, '4'), +(11, 3, 'more'), +(11, 4, 'big'), +(11, 4, 'med'), +(11, 4, 'small'), +(11, 5, 'high'), +(11, 5, 'low'), +(11, 5, 'med'), +(11, 6, 'acc'), +(11, 6, 'good'), +(11, 6, 'unacc'), +(11, 6, 'vgood'); diff --git a/data/sql/data_processed.sql b/data/sql/data_processed.sql new file mode 100644 index 000000000..28714a186 --- /dev/null +++ b/data/sql/data_processed.sql @@ -0,0 +1,2 @@ +INSERT INTO `data_processed` (`did`, `evaluation_engine_id`, `user_id`, `processing_date`, `error`, `warning`, `num_tries`) VALUES +(11, 1, 1, '2024-01-09 18:02:58', NULL, NULL, 1); diff --git a/data/sql/dataset.sql b/data/sql/dataset.sql index c8468e962..75004b0d2 100644 --- a/data/sql/dataset.sql +++ b/data/sql/dataset.sql @@ -1,132 +1,132 @@ -INSERT INTO `dataset` (`did`, `uploader`, `source`, `name`, `version`, `version_label`, `description`, `format`, `creator`, `contributor`, `collection_date`, `upload_date`, `language`, `licence`, `citation`, `collection`, `url`, `isOriginal`, `file_id`, `default_target_attribute`, `row_id_attribute`, `ignore_attribute`, `paper_url`, `visibility`, `original_data_id`, `original_data_url`, `update_comment`, `last_update`) VALUES -(1, 1, 0, 'anneal', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Annealing Data\n \n 2. Source Information: donated by David Sterling and Wray Buntine.\n \n 3. Past Usage: unknown\n \n 4. Relevant Information:\n -- Explanation: I suspect this was left by Ross Quinlan in 1987 at the\n 4th Machine Learning Workshop. I\'d have to check with Jeff Schlimmer\n to double check this.\n \n 5. Number of Instances: 798\n \n 6. Number of Attributes: 38\n -- 6 continuously-valued\n -- 3 integer-valued\n -- 29 nominal-valued\n \n 7. Attribute Information:\n 1. family: --,GB,GK,GS,TN,ZA,ZF,ZH,ZM,ZS\n 2. product-type: C, H, G\n 3. steel: -,R,A,U,K,M,S,W,V\n 4. carbon: continuous\n 5. hardness: continuous\n 6. temper_rolling: -,T\n 7. condition: -,S,A,X\n 8. formability: -,1,2,3,4,5\n 9. strength: continuous\n 10. non-ageing: -,N\n 11. surface-finish: P,M,-\n 12. surface-quality: -,D,E,F,G\n 13. enamelability: -,1,2,3,4,5\n 14. bc: Y,-\n 15. bf: Y,-\n 16. bt: Y,-\n 17. bw/me: B,M,-\n 18. bl: Y,-\n 19. m: Y,-\n 20. chrom: C,-\n 21. phos: P,-\n 22. cbond: Y,-\n 23. marvi: Y,-\n 24. exptl: Y,-\n 25. ferro: Y,-\n 26. corr: Y,-\n 27. blue/bright/varn/clean: B,R,V,C,-\n 28. lustre: Y,-\n 29. jurofm: Y,-\n 30. s: Y,-\n 31. p: Y,-\n 32. shape: COIL, SHEET\n 33. thick: continuous\n 34. width: continuous\n 35. len: continuous\n 36. oil: -,Y,N\n 37. bore: 0000,0500,0600,0760\n 38. packing: -,1,2,3\n classes: 1,2,3,4,5,U\n \n -- The \'-\' values are actually \'not_applicable\' values rather than\n \'missing_values\' (and so can be treated as legal discrete\n values rather than as showing the absence of a discrete value).\n \n 8. Missing Attribute Values: Signified with \"?\"\n Attribute: Number of instances missing its value:\n 1 0\n 2 0\n 3 70\n 4 0\n 5 0\n 6 675\n 7 271\n 8 283\n 9 0\n 10 703\n 11 790\n 12 217\n 13 785\n 14 797\n 15 680\n 16 736\n 17 609\n 18 662\n 19 798\n 20 775\n 21 791\n 22 730\n 23 798\n 24 796\n 25 772\n 26 798\n 27 793\n 28 753\n 29 798\n 30 798\n 31 798\n 32 0\n 33 0\n 34 0\n 35 0\n 36 740\n 37 0\n 38 789\n 39 0\n \n 9. Distribution of Classes\n Class Name: Number of Instances:\n 1 8\n 2 88\n 3 608\n 4 0\n 5 60\n U 34\n ---\n 798', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:24', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1666876/phpFsFYVN', 'true', 1, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'Restoring dataset file', '2015-09-02 00:49:04'), -(2, 1, 0, 'kr-vs-kp', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Chess End-Game -- King+Rook versus King+Pawn on a7\n (usually abbreviated KRKPA7). The pawn on a7 means it is one square\n away from queening. It is the King+Rook\'s side (white) to move.\n \n 2. Sources:\n (a) Database originally generated and described by Alen Shapiro.\n (b) Donor/Coder: Rob Holte (holte@uottawa.bitnet). The database\n was supplied to Holte by Peter Clark of the Turing Institute\n in Glasgow (pete@turing.ac.uk).\n (c) Date: 1 August 1989\n \n 3. Past Usage:\n - Alen D. Shapiro (1983,1987), \"Structured Induction in Expert Systems\",\n Addison-Wesley. This book is based on Shapiro\'s Ph.D. thesis (1983)\n at the University of Edinburgh entitled \"The Role of Structured\n Induction in Expert Systems\".\n - Stephen Muggleton (1987), \"Structuring Knowledge by Asking Questions\",\n pp.218-229 in \"Progress in Machine Learning\", edited by I. Bratko\n and Nada Lavrac, Sigma Press, Wilmslow, England SK9 5BB.\n - Robert C. Holte, Liane Acker, and Bruce W. Porter (1989),\n \"Concept Learning and the Problem of Small Disjuncts\",\n Proceedings of IJCAI. Also available as technical report AI89-106,\n Computer Sciences Department, University of Texas at Austin,\n Austin, Texas 78712.\n \n 4. Relevant Information:\n The dataset format is described below. Note: the format of this\n database was modified on 2/26/90 to conform with the format of all\n the other databases in the UCI repository of machine learning databases.\n \n 5. Number of Instances: 3196 total\n \n 6. Number of Attributes: 36\n \n 7. Attribute Summaries:\n Classes (2): -- White-can-win (\"won\") and White-cannot-win (\"nowin\").\n I believe that White is deemed to be unable to win if the Black pawn\n can safely advance.\n Attributes: see Shapiro\'s book.\n \n 8. Missing Attributes: -- none\n \n 9. Class Distribution:\n In 1669 of the positions (52%), White can win.\n In 1527 of the positions (48%), White cannot win.\n \n The format for instances in this database is a sequence of 37 attribute values.\n Each instance is a board-descriptions for this chess endgame. The first\n 36 attributes describe the board. The last (37th) attribute is the\n classification: \"win\" or \"nowin\". There are 0 missing values.\n A typical board-description is\n \n f,f,f,f,f,f,f,f,f,f,f,f,l,f,n,f,f,t,f,f,f,f,f,f,f,t,f,f,f,f,f,f,f,t,t,n,won\n \n The names of the features do not appear in the board-descriptions.\n Instead, each feature correponds to a particular position in the\n feature-value list. For example, the head of this list is the value\n for the feature \"bkblk\". The following is the list of features, in\n the order in which their values appear in the feature-value list:\n \n [bkblk,bknwy,bkon8,bkona,bkspr,bkxbq,bkxcr,bkxwp,blxwp,bxqsq,cntxt,dsopp,dwipd,\n hdchk,katri,mulch,qxmsq,r2ar8,reskd,reskr,rimmx,rkxwp,rxmsq,simpl,skach,skewr,\n skrxp,spcop,stlmt,thrsk,wkcti,wkna8,wknck,wkovl,wkpos,wtoeg]\n \n In the file, there is one instance (board position) per line.\n \n \n Num Instances: 3196\n Num Attributes: 37\n Num Continuous: 0 (Int 0 / Real 0)\n Num Discrete: 37\n Missing values: 0 / 0.0%\n\n name type enum ints real missing distinct (1)\n 1 \'bkblk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 2 \'bknwy\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 3 \'bkon8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 4 \'bkona\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 5 \'bkspr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 6 \'bkxbq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 7 \'bkxcr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 8 \'bkxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 9 \'blxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 10 \'bxqsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 11 \'cntxt\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 12 \'dsopp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 13 \'dwipd\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 14 \'hdchk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 15 \'katri\' Enum 100% 0% 0% 0 / 0% 3 / 0% 0% \n 16 \'mulch\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 17 \'qxmsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 18 \'r2ar8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 19 \'reskd\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 20 \'reskr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 21 \'rimmx\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 22 \'rkxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 23 \'rxmsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 24 \'simpl\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 25 \'skach\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 26 \'skewr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 27 \'skrxp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 28 \'spcop\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 29 \'stlmt\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 30 \'thrsk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 31 \'wkcti\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 32 \'wkna8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 33 \'wknck\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 34 \'wkovl\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 35 \'wkpos\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 36 \'wtoeg\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 37 \'class\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0%', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3/dataset_3_kr-vs-kp.arff', 'true', 2, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:28'), -(3, 1, 0, 'letter', '1', '1', '**Author**: David J. Slate \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Letter+Recognition) - 01-01-1991 \r\n**Please cite**: P. W. Frey and D. J. Slate. \"Letter Recognition Using Holland-style Adaptive Classifiers\". Machine Learning 6(2), 1991 \r\n\r\n1. TITLE: \r\n Letter Image Recognition Data \r\n \r\n The objective is to identify each of a large number of black-and-white\r\n rectangular pixel displays as one of the 26 capital letters in the English\r\n alphabet. The character images were based on 20 different fonts and each\r\n letter within these 20 fonts was randomly distorted to produce a file of\r\n 20,000 unique stimuli. Each stimulus was converted into 16 primitive\r\n numerical attributes (statistical moments and edge counts) which were then\r\n scaled to fit into a range of integer values from 0 through 15. We\r\n typically train on the first 16000 items and then use the resulting model\r\n to predict the letter category for the remaining 4000. See the article\r\n cited above for more details.', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:41', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/6/dataset_6_letter.arff', 'true', 3, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:41'), -(4, 1, 0, 'balance-scale', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Balance Scale Weight & Distance Database\n\n2. Source Information: \n (a) Source: Generated to model psychological experiments reported\n by Siegler, R. S. (1976). Three Aspects of Cognitive\n Development. Cognitive Psychology, 8, 481-520.\n (b) Donor: Tim Hume (hume@ics.uci.edu)\n (c) Date: 22 April 1994\n\n3. Past Usage: (possibly different formats of this data)\n - Publications\n 1. Klahr, D., & Siegler, R.S. (1978). The Representation of\n Children\'s Knowledge. In H. W. Reese & L. P. Lipsitt (Eds.),\n Advances in Child Development and Behavior, pp. 61-116. New\n York: Academic Press \n 2. Langley,P. (1987). A General Theory of Discrimination\n Learning. In D. Klahr, P. Langley, & R. Neches (Eds.),\n Production System Models of Learning and Development, pp.\n 99-161. Cambridge, MA: MIT Press\n 3. Newell, A. (1990). Unified Theories of Cognition.\n Cambridge, MA: Harvard University Press\n 4. McClelland, J.L. (1988). Parallel Distibuted Processing:\n Implications for Cognition and Development. Technical\n Report AIP-47, Department of Psychology, Carnegie-Mellon\n University \n 5. Shultz, T., Mareschal, D., & Schmidt, W. (1994). Modeling\n Cognitive Development on Balance Scale Phenomena. Machine\n Learning, Vol. 16, pp. 59-88.\n\n4. Relevant Information: \n This data set was generated to model psychological\n experimental results. Each example is classified as having the\n balance scale tip to the right, tip to the left, or be\n balanced. The attributes are the left weight, the left\n distance, the right weight, and the right distance. The\n correct way to find the class is the greater of \n (left-distance * left-weight) and (right-distance *\n right-weight). If they are equal, it is balanced.\n\n5. Number of Instances: 625 (49 balanced, 288 left, 288 right)\n\n6. Number of Attributes: 4 (numeric) + class name = 5\n\n7. Attribute Information:\n 1. Class Name: 3 (L, B, R)\n 2. Left-Weight: 5 (1, 2, 3, 4, 5)\n 3. Left-Distance: 5 (1, 2, 3, 4, 5)\n 4. Right-Weight: 5 (1, 2, 3, 4, 5)\n 5. Right-Distance: 5 (1, 2, 3, 4, 5)\n\n8. Missing Attribute Values: \n none\n\n9. Class Distribution: \n 1. 46.08 percent are L\n 2. 07.84 percent are B\n 3. 46.08 percent are R', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:55', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/11/dataset_11_balance-scale.arff', 'true', 4, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:55'), -(5, 1, 0, 'mfeat-factors', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/12/dataset_12_mfeat-factors.arff', 'true', 5, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:04'), -(6, 1, 0, 'mfeat-fourier', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/14/dataset_14_mfeat-fourier.arff', 'true', 6, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:17'), -(7, 1, 0, 'breast-w', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:20', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52350/openml_phpJNxH0q', 'true', 7, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, 'added special attributes', '2014-09-21 23:04:47'), -(8, 1, 0, 'mfeat-karhunen', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:30', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/16/dataset_16_mfeat-karhunen.arff', 'true', 8, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:30'), -(9, 1, 0, 'mfeat-morphological', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (0 - 9)\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class \'0\', followed by sets of 200 patterns\n for each of the classes \'1\' - \'9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/18/dataset_18_mfeat-morphological.arff', 'true', 9, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:37'), -(10, 1, 0, 'mfeat-pixel', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:48', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/20/dataset_20_mfeat-pixel.arff', 'true', 10, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:48'), -(11, 1, 0, 'car', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Car Evaluation Database\n \n 2. Sources:\n (a) Creator: Marko Bohanec\n (b) Donors: Marko Bohanec (marko.bohanec@ijs.si)\n Blaz Zupan (blaz.zupan@ijs.si)\n (c) Date: June, 1997\n \n 3. Past Usage:\n \n The hierarchical decision model, from which this dataset is\n derived, was first presented in \n \n M. Bohanec and V. Rajkovic: Knowledge acquisition and explanation for\n multi-attribute decision making. In 8th Intl Workshop on Expert\n Systems and their Applications, Avignon, France. pages 59-78, 1988.\n \n Within machine-learning, this dataset was used for the evaluation\n of HINT (Hierarchy INduction Tool), which was proved to be able to\n completely reconstruct the original hierarchical model. This,\n together with a comparison with C4.5, is presented in\n \n B. Zupan, M. Bohanec, I. Bratko, J. Demsar: Machine learning by\n function decomposition. ICML-97, Nashville, TN. 1997 (to appear)\n \n 4. Relevant Information Paragraph:\n \n Car Evaluation Database was derived from a simple hierarchical\n decision model originally developed for the demonstration of DEX\n (M. Bohanec, V. Rajkovic: Expert system for decision\n making. Sistemica 1(1), pp. 145-157, 1990.). The model evaluates\n cars according to the following concept structure:\n \n CAR car acceptability\n . PRICE overall price\n . . buying buying price\n . . maint price of the maintenance\n . TECH technical characteristics\n . . COMFORT comfort\n . . . doors number of doors\n . . . persons capacity in terms of persons to carry\n . . . lug_boot the size of luggage boot\n . . safety estimated safety of the car\n \n Input attributes are printed in lowercase. Besides the target\n concept (CAR), the model includes three intermediate concepts:\n PRICE, TECH, COMFORT. Every concept is in the original model\n related to its lower level descendants by a set of examples (for\n these examples sets see http://www-ai.ijs.si/BlazZupan/car.html).\n \n The Car Evaluation Database contains examples with the structural\n information removed, i.e., directly relates CAR to the six input\n attributes: buying, maint, doors, persons, lug_boot, safety.\n \n Because of known underlying concept structure, this database may be\n particularly useful for testing constructive induction and\n structure discovery methods.\n \n 5. Number of Instances: 1728\n (instances completely cover the attribute space)\n \n 6. Number of Attributes: 6\n \n 7. Attribute Values:\n \n buying v-high, high, med, low\n maint v-high, high, med, low\n doors 2, 3, 4, 5-more\n persons 2, 4, more\n lug_boot small, med, big\n safety low, med, high\n \n 8. Missing Attribute Values: none\n \n 9. Class Distribution (number of instances per class)\n \n class N N[%]\n -----------------------------\n unacc 1210 (70.023 %) \n acc 384 (22.222 %) \n good 69 ( 3.993 %) \n v-good 65 ( 3.762 %) \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:52', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/21/dataset_21_car.arff', 'true', 11, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:52'), -(12, 1, 0, 'mfeat-zernike', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:00', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/22/dataset_22_mfeat-zernike.arff', 'true', 12, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:00'), -(13, 1, 0, 'cmc', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Contraceptive Method Choice\n \n 2. Sources:\n (a) Origin: This dataset is a subset of the 1987 National Indonesia\n Contraceptive Prevalence Survey\n (b) Creator: Tjen-Sien Lim (limt@stat.wisc.edu)\n (c) Donor: Tjen-Sien Lim (limt@stat.wisc.edu)\n (c) Date: June 7, 1997\n \n 3. Past Usage:\n Lim, T.-S., Loh, W.-Y. & Shih, Y.-S. (1999). A Comparison of\n Prediction Accuracy, Complexity, and Training Time of Thirty-three\n Old and New Classification Algorithms. Machine Learning. Forthcoming.\n (ftp://ftp.stat.wisc.edu/pub/loh/treeprogs/quest1.7/mach1317.pdf or\n (http://www.stat.wisc.edu/~limt/mach1317.pdf)\n \n 4. Relevant Information:\n This dataset is a subset of the 1987 National Indonesia Contraceptive\n Prevalence Survey. The samples are married women who were either not \n pregnant or do not know if they were at the time of interview. The \n problem is to predict the current contraceptive method choice \n (no use, long-term methods, or short-term methods) of a woman based \n on her demographic and socio-economic characteristics.\n \n 5. Number of Instances: 1473\n \n 6. Number of Attributes: 10 (including the class attribute)\n \n 7. Attribute Information:\n \n 1. Wife\'s age (numerical)\n 2. Wife\'s education (categorical) 1=low, 2, 3, 4=high\n 3. Husband\'s education (categorical) 1=low, 2, 3, 4=high\n 4. Number of children ever born (numerical)\n 5. Wife\'s religion (binary) 0=Non-Islam, 1=Islam\n 6. Wife\'s now working? (binary) 0=Yes, 1=No\n 7. Husband\'s occupation (categorical) 1, 2, 3, 4\n 8. Standard-of-living index (categorical) 1=low, 2, 3, 4=high\n 9. Media exposure (binary) 0=Good, 1=Not good\n 10. Contraceptive method used (class attribute) 1=No-use \n 2=Long-term\n 3=Short-term\n \n 8. Missing Attribute Values: None\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/23/dataset_23_cmc.arff', 'true', 13, 'Contraceptive_method_used', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:03'), -(14, 1, 0, 'mushroom', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Mushroom Database\n \n 2. Sources: \n (a) Mushroom records drawn from The Audubon Society Field Guide to North\n American Mushrooms (1981). G. H. Lincoff (Pres.), New York: Alfred\n A. Knopf\n (b) Donor: Jeff Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n (c) Date: 27 April 1987\n \n 3. Past Usage:\n 1. Schlimmer,J.S. (1987). Concept Acquisition Through Representational\n Adjustment (Technical Report 87-19). Doctoral disseration, Department\n of Information and Computer Science, University of California, Irvine.\n --- STAGGER: asymptoted to 95% classification accuracy after reviewing\n 1000 instances.\n 2. Iba,W., Wogulis,J., & Langley,P. (1988). Trading off Simplicity\n and Coverage in Incremental Concept Learning. In Proceedings of \n the 5th International Conference on Machine Learning, 73-79.\n Ann Arbor, Michigan: Morgan Kaufmann. \n -- approximately the same results with their HILLARY algorithm \n 3. In the following references a set of rules (given below) were\n learned for this data set which may serve as a point of\n comparison for other researchers.\n \n Duch W, Adamczak R, Grabczewski K (1996) Extraction of logical rules\n from training data using backpropagation networks, in: Proc. of the\n The 1st Online Workshop on Soft Computing, 19-30.Aug.1996, pp. 25-30,\n available on-line at: http://www.bioele.nuee.nagoya-u.ac.jp/wsc1/\n \n Duch W, Adamczak R, Grabczewski K, Ishikawa M, Ueda H, Extraction of\n crisp logical rules using constrained backpropagation networks -\n comparison of two new approaches, in: Proc. of the European Symposium\n on Artificial Neural Networks (ESANN\'97), Bruge, Belgium 16-18.4.1997,\n pp. xx-xx\n \n Wlodzislaw Duch, Department of Computer Methods, Nicholas Copernicus\n University, 87-100 Torun, Grudziadzka 5, Poland\n e-mail: duch@phys.uni.torun.pl\n WWW http://www.phys.uni.torun.pl/kmk/\n \n Date: Mon, 17 Feb 1997 13:47:40 +0100\n From: Wlodzislaw Duch \n Organization: Dept. of Computer Methods, UMK\n \n I have attached a file containing logical rules for mushrooms.\n It should be helpful for other people since only in the last year I\n have seen about 10 papers analyzing this dataset and obtaining quite\n complex rules. We will try to contribute other results later.\n \n With best regards, Wlodek Duch\n ________________________________________________________________\n \n Logical rules for the mushroom data sets.\n \n Logical rules given below seem to be the simplest possible for the\n mushroom dataset and therefore should be treated as benchmark results.\n \n Disjunctive rules for poisonous mushrooms, from most general\n to most specific:\n \n P_1) odor=NOT(almond.OR.anise.OR.none)\n 120 poisonous cases missed, 98.52% accuracy\n \n P_2) spore-print-color=green\n 48 cases missed, 99.41% accuracy\n \n P_3) odor=none.AND.stalk-surface-below-ring=scaly.AND.\n (stalk-color-above-ring=NOT.brown) \n 8 cases missed, 99.90% accuracy\n \n P_4) habitat=leaves.AND.cap-color=white\n 100% accuracy \n \n Rule P_4) may also be\n \n P_4\') population=clustered.AND.cap_color=white\n \n These rule involve 6 attributes (out of 22). Rules for edible\n mushrooms are obtained as negation of the rules given above, for\n example the rule:\n \n odor=(almond.OR.anise.OR.none).AND.spore-print-color=NOT.green\n \n gives 48 errors, or 99.41% accuracy on the whole dataset.\n \n Several slightly more complex variations on these rules exist,\n involving other attributes, such as gill_size, gill_spacing,\n stalk_surface_above_ring, but the rules given above are the simplest\n we have found.\n \n \n 4. Relevant Information:\n This data set includes descriptions of hypothetical samples\n corresponding to 23 species of gilled mushrooms in the Agaricus and\n Lepiota Family (pp. 500-525). Each species is identified as\n definitely edible, definitely poisonous, or of unknown edibility and\n not recommended. This latter class was combined with the poisonous\n one. The Guide clearly states that there is no simple rule for\n determining the edibility of a mushroom; no rule like ``leaflets\n three, let it be\'\' for Poisonous Oak and Ivy.\n \n 5. Number of Instances: 8124\n \n 6. Number of Attributes: 22 (all nominally valued)\n \n 7. Attribute Information: (classes: edible=e, poisonous=p)\n 1. cap-shape: bell=b,conical=c,convex=x,flat=f,\n knobbed=k,sunken=s\n 2. cap-surface: fibrous=f,grooves=g,scaly=y,smooth=s\n 3. cap-color: brown=n,buff=b,cinnamon=c,gray=g,green=r,\n pink=p,purple=u,red=e,white=w,yellow=y\n 4. bruises?: bruises=t,no=f\n 5. odor: almond=a,anise=l,creosote=c,fishy=y,foul=f,\n musty=m,none=n,pungent=p,spicy=s\n 6. gill-attachment: attached=a,descending=d,free=f,notched=n\n 7. gill-spacing: close=c,crowded=w,distant=d\n 8. gill-size: broad=b,narrow=n\n 9. gill-color: black=k,brown=n,buff=b,chocolate=h,gray=g,\n green=r,orange=o,pink=p,purple=u,red=e,\n white=w,yellow=y\n 10. stalk-shape: enlarging=e,tapering=t\n 11. stalk-root: bulbous=b,club=c,cup=u,equal=e,\n rhizomorphs=z,rooted=r,missing=?\n 12. stalk-surface-above-ring: ibrous=f,scaly=y,silky=k,smooth=s\n 13. stalk-surface-below-ring: ibrous=f,scaly=y,silky=k,smooth=s\n 14. stalk-color-above-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,\n pink=p,red=e,white=w,yellow=y\n 15. stalk-color-below-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,\n pink=p,red=e,white=w,yellow=y\n 16. veil-type: partial=p,universal=u\n 17. veil-color: brown=n,orange=o,white=w,yellow=y\n 18. ring-number: none=n,one=o,two=t\n 19. ring-type: cobwebby=c,evanescent=e,flaring=f,large=l,\n none=n,pendant=p,sheathing=s,zone=z\n 20. spore-print-color: black=k,brown=n,buff=b,chocolate=h,green=r,\n orange=o,purple=u,white=w,yellow=y\n 21. population: abundant=a,clustered=c,numerous=n,\n scattered=s,several=v,solitary=y\n 22. habitat: grasses=g,leaves=l,meadows=m,paths=p,\n urban=u,waste=w,woods=d\n \n 8. Missing Attribute Values: 2480 of them (denoted by \"?\"), all for\n attribute #11.\n \n 9. Class Distribution: \n -- edible: 4208 (51.8%)\n -- poisonous: 3916 (48.2%)\n -- total: 8124 instances', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:11', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/24/dataset_24_mushroom.arff', 'true', 14, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:11'), -(15, 1, 0, 'optdigits', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Optical Recognition of Handwritten Digits\n \n 2. Source:\n E. Alpaydin, C. Kaynak\n Department of Computer Engineering\n Bogazici University, 80815 Istanbul Turkey\n alpaydin@boun.edu.tr\n July 1998\n \n 3. Past Usage:\n C. Kaynak (1995) Methods of Combining Multiple Classifiers and Their\n Applications to Handwritten Digit Recognition, \n MSc Thesis, Institute of Graduate Studies in Science and \n Engineering, Bogazici University.\n \n E. Alpaydin, C. Kaynak (1998) Cascading Classifiers, Kybernetika,\n to appear. ftp://ftp.icsi.berkeley.edu/pub/ai/ethem/kyb.ps.Z\n \n 4. Relevant Information:\n We used preprocessing programs made available by NIST to extract\n normalized bitmaps of handwritten digits from a preprinted form. From\n a total of 43 people, 30 contributed to the training set and different\n 13 to the test set. 32x32 bitmaps are divided into nonoverlapping \n blocks of 4x4 and the number of on pixels are counted in each block.\n This generates an input matrix of 8x8 where each element is an \n integer in the range 0..16. This reduces dimensionality and gives \n invariance to small distortions.\n \n For info on NIST preprocessing routines, see \n M. D. Garris, J. L. Blue, G. T. Candela, D. L. Dimmick, J. Geist, \n P. J. Grother, S. A. Janet, and C. L. Wilson, NIST Form-Based \n Handprint Recognition System, NISTIR 5469, 1994.\n \n 5. Number of Instances\n optdigits.tra Training 3823\n optdigits.tes Testing 1797\n \n The way we used the dataset was to use half of training for \n actual training, one-fourth for validation and one-fourth\n for writer-dependent testing. The test set was used for \n writer-independent testing and is the actual quality measure.\n \n 6. Number of Attributes\n 64 input+1 class attribute\n \n 7. For Each Attribute:\n All input attributes are integers in the range 0..16.\n The last attribute is the class code 0..9\n \n 8. Missing Attribute Values\n None\n \n 9. Class Distribution\n Class: No of examples in training set\n 0: 376\n 1: 389\n 2: 380\n 3: 389\n 4: 387\n 5: 376\n 6: 377\n 7: 387\n 8: 380\n 9: 382\n \n Class: No of examples in testing set\n 0: 178\n 1: 182\n 2: 177\n 3: 183\n 4: 181\n 5: 182\n 6: 181\n 7: 179\n 8: 174\n 9: 180\n \n Accuracy on the testing set with k-nn \n using Euclidean distance as the metric\n \n k = 1 : 98.00\n k = 2 : 97.38\n k = 3 : 97.83\n k = 4 : 97.61\n k = 5 : 97.89\n k = 6 : 97.77\n k = 7 : 97.66\n k = 8 : 97.66\n k = 9 : 97.72\n k = 10 : 97.55\n k = 11 : 97.89', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:34', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/28/dataset_28_optdigits.arff', 'true', 15, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:34'), -(16, 1, 0, 'credit-a', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Credit Approval\n \n 2. Sources: \n (confidential)\n Submitted by quinlan@cs.su.oz.au\n \n 3. Past Usage:\n \n See Quinlan,\n * \"Simplifying decision trees\", Int J Man-Machine Studies 27,\n Dec 1987, pp. 221-234.\n * \"C4.5: Programs for Machine Learning\", Morgan Kaufmann, Oct 1992\n \n 4. Relevant Information:\n \n This file concerns credit card applications. All attribute names\n and values have been changed to meaningless symbols to protect\n confidentiality of the data.\n \n This dataset is interesting because there is a good mix of\n attributes -- continuous, nominal with small numbers of\n values, and nominal with larger numbers of values. There\n are also a few missing values.\n \n 5. Number of Instances: 690\n \n 6. Number of Attributes: 15 + class attribute\n \n 7. Attribute Information:\n \n A1: b, a.\n A2: continuous.\n A3: continuous.\n A4: u, y, l, t.\n A5: g, p, gg.\n A6: c, d, cc, i, j, k, m, r, q, w, x, e, aa, ff.\n A7: v, h, bb, j, n, z, dd, ff, o.\n A8: continuous.\n A9: t, f.\n A10: t, f.\n A11: continuous.\n A12: t, f.\n A13: g, p, s.\n A14: continuous.\n A15: continuous.\n A16: +,- (class attribute)\n \n 8. Missing Attribute Values:\n 37 cases (5%) have one or more missing values. The missing\n values from particular attributes are:\n \n A1: 12\n A2: 12\n A4: 6\n A5: 6\n A6: 9\n A7: 9\n A14: 13\n \n 9. Class Distribution\n \n +: 307 (44.5%)\n -: 383 (55.5%)', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:38', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/29/dataset_29_credit-a.arff', 'true', 16, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:38'), -(17, 1, 0, 'credit-g', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDescription of the German credit dataset.\n \n 1. Title: German Credit data\n \n 2. Source Information\n \n Professor Dr. Hans Hofmann \n Institut f\"ur Statistik und \"Okonometrie \n Universit\"at Hamburg \n FB Wirtschaftswissenschaften \n Von-Melle-Park 5 \n 2000 Hamburg 13 \n \n 3. Number of Instances: 1000\n \n Two datasets are provided. the original dataset, in the form provided\n by Prof. Hofmann, contains categorical/symbolic attributes and\n is in the file \"german.data\". \n \n For algorithms that need numerical attributes, Strathclyde University \n produced the file \"german.data-numeric\". This file has been edited \n and several indicator variables added to make it suitable for \n algorithms which cannot cope with categorical variables. Several\n attributes that are ordered categorical (such as attribute 17) have\n been coded as integer. This was the form used by StatLog.\n \n \n 6. Number of Attributes german: 20 (7 numerical, 13 categorical)\n Number of Attributes german.numer: 24 (24 numerical)\n \n \n 7. Attribute description for german\n \n Attribute 1: (qualitative)\n Status of existing checking account\n A11 : ... < 0 DM\n A12 : 0 <= ... < 200 DM\n A13 : ... >= 200 DM /\n salary assignments for at least 1 year\n A14 : no checking account\n \n Attribute 2: (numerical)\n Duration in month\n \n Attribute 3: (qualitative)\n Credit history\n A30 : no credits taken/\n all credits paid back duly\n A31 : all credits at this bank paid back duly\n A32 : existing credits paid back duly till now\n A33 : delay in paying off in the past\n A34 : critical account/\n other credits existing (not at this bank)\n \n Attribute 4: (qualitative)\n Purpose\n A40 : car (new)\n A41 : car (used)\n A42 : furniture/equipment\n A43 : radio/television\n A44 : domestic appliances\n A45 : repairs\n A46 : education\n A47 : (vacation - does not exist?)\n A48 : retraining\n A49 : business\n A410 : others\n \n Attribute 5: (numerical)\n Credit amount\n \n Attibute 6: (qualitative)\n Savings account/bonds\n A61 : ... < 100 DM\n A62 : 100 <= ... < 500 DM\n A63 : 500 <= ... < 1000 DM\n A64 : .. >= 1000 DM\n A65 : unknown/ no savings account\n \n Attribute 7: (qualitative)\n Present employment since\n A71 : unemployed\n A72 : ... < 1 year\n A73 : 1 <= ... < 4 years \n A74 : 4 <= ... < 7 years\n A75 : .. >= 7 years\n \n Attribute 8: (numerical)\n Installment rate in percentage of disposable income\n \n Attribute 9: (qualitative)\n Personal status and sex\n A91 : male : divorced/separated\n A92 : female : divorced/separated/married\n A93 : male : single\n A94 : male : married/widowed\n A95 : female : single\n \n Attribute 10: (qualitative)\n Other debtors / guarantors\n A101 : none\n A102 : co-applicant\n A103 : guarantor\n \n Attribute 11: (numerical)\n Present residence since\n \n Attribute 12: (qualitative)\n Property\n A121 : real estate\n A122 : if not A121 : building society savings agreement/\n life insurance\n A123 : if not A121/A122 : car or other, not in attribute 6\n A124 : unknown / no property\n \n Attribute 13: (numerical)\n Age in years\n \n Attribute 14: (qualitative)\n Other installment plans \n A141 : bank\n A142 : stores\n A143 : none\n \n Attribute 15: (qualitative)\n Housing\n A151 : rent\n A152 : own\n A153 : for free\n \n Attribute 16: (numerical)\n Number of existing credits at this bank\n \n Attribute 17: (qualitative)\n Job\n A171 : unemployed/ unskilled - non-resident\n A172 : unskilled - resident\n A173 : skilled employee / official\n A174 : management/ self-employed/\n highly qualified employee/ officer\n \n Attribute 18: (numerical)\n Number of people being liable to provide maintenance for\n \n Attribute 19: (qualitative)\n Telephone\n A191 : none\n A192 : yes, registered under the customers name\n \n Attribute 20: (qualitative)\n foreign worker\n A201 : yes\n A202 : no\n \n \n \n 8. Cost Matrix\n \n This dataset requires use of a cost matrix (see below)\n \n \n 1 2\n ----------------------------\n 1 0 1\n -----------------------\n 2 5 0\n \n (1 = Good, 2 = Bad)\n \n the rows represent the actual classification and the columns\n the predicted classification.\n \n It is worse to class a customer as good when they are bad (5), \n than it is to class a customer as bad when they are good (1).\n \n\n\n\n\n Relabeled values in attribute checking_status\n From: A11 To: \'<0\' \n From: A12 To: \'0<=X<200\' \n From: A13 To: \'>=200\' \n From: A14 To: \'no checking\' \n\n\n Relabeled values in attribute credit_history\n From: A30 To: \'no credits/all paid\'\n From: A31 To: \'all paid\' \n From: A32 To: \'existing paid\' \n From: A33 To: \'delayed previously\'\n From: A34 To: \'critical/other existing credit\'\n\n\n Relabeled values in attribute purpose\n From: A40 To: \'new car\' \n From: A41 To: \'used car\' \n From: A42 To: furniture/equipment \n From: A43 To: radio/tv \n From: A44 To: \'domestic appliance\'\n From: A45 To: repairs \n From: A46 To: education \n From: A47 To: vacation \n From: A48 To: retraining \n From: A49 To: business \n From: A410 To: other \n\n\n Relabeled values in attribute savings_status\n From: A61 To: \'<100\' \n From: A62 To: \'100<=X<500\' \n From: A63 To: \'500<=X<1000\' \n From: A64 To: \'>=1000\' \n From: A65 To: \'no known savings\' \n\n\n Relabeled values in attribute employment\n From: A71 To: unemployed \n From: A72 To: \'<1\' \n From: A73 To: \'1<=X<4\' \n From: A74 To: \'4<=X<7\' \n From: A75 To: \'>=7\' \n\n\n Relabeled values in attribute personal_status\n From: A91 To: \'male div/sep\' \n From: A92 To: \'female div/dep/mar\'\n From: A93 To: \'male single\' \n From: A94 To: \'male mar/wid\' \n From: A95 To: \'female single\' \n\n\n Relabeled values in attribute other_parties\n From: A101 To: none \n From: A102 To: \'co applicant\' \n From: A103 To: guarantor \n\n\n Relabeled values in attribute property_magnitude\n From: A121 To: \'real estate\' \n From: A122 To: \'life insurance\' \n From: A123 To: car \n From: A124 To: \'no known property\' \n\n\n Relabeled values in attribute other_payment_plans\n From: A141 To: bank \n From: A142 To: stores \n From: A143 To: none \n\n\n Relabeled values in attribute housing\n From: A151 To: rent \n From: A152 To: own \n From: A153 To: \'for free\' \n\n\n Relabeled values in attribute job\n From: A171 To: \'unemp/unskilled non res\'\n From: A172 To: \'unskilled resident\'\n From: A173 To: skilled \n From: A174 To: \'high qualif/self emp/mgmt\'\n\n\n Relabeled values in attribute own_telephone\n From: A191 To: none \n From: A192 To: yes \n\n\n Relabeled values in attribute foreign_worker\n From: A201 To: yes \n From: A202 To: no \n\n\n Relabeled values in attribute class\n From: 1 To: good \n From: 2 To: bad', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:47', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/31/dataset_31_credit-g.arff', 'true', 17, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:47'), -(18, 1, 0, 'pendigits', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Pen-Based Recognition of Handwritten Digits\n \n 2. Source:\n E. Alpaydin, F. Alimoglu\n Department of Computer Engineering\n Bogazici University, 80815 Istanbul Turkey\n alpaydin@boun.edu.tr\n July 1998\n \n 3. Past Usage:\n F. Alimoglu (1996) Combining Multiple Classifiers for Pen-Based\n Handwritten Digit Recognition, \n MSc Thesis, Institute of Graduate Studies in Science and \n Engineering, Bogazici University.\n http://www.cmpe.boun.edu.tr/~alimoglu/alimoglu.ps.gz\n \n F. Alimoglu, E. Alpaydin, \"Methods of Combining Multiple Classifiers \n Based on Different Representations for Pen-based Handwriting\n Recognition,\" Proceedings of the Fifth Turkish Artificial \n Intelligence and Artificial Neural Networks Symposium (TAINN 96), \n June 1996, Istanbul, Turkey.\n http://www.cmpe.boun.edu.tr/~alimoglu/tainn96.ps.gz\n \n \n 4. Relevant Information:\n \n We create a digit database by collecting 250 samples from 44 writers.\n The samples written by 30 writers are used for training,\n cross-validation and writer dependent testing, and the digits \n written by the other 14 are used for writer independent testing. This\n database is also available in the UNIPEN format.\n \n We use a WACOM PL-100V pressure sensitive tablet with an integrated \n LCD display and a cordless stylus. The input and display areas are\n located in the same place. Attached to the serial port of an Intel \n 486 based PC, it allows us to collect handwriting samples. The tablet\n sends $x$ and $y$ tablet coordinates and pressure level values of the\n pen at fixed time intervals (sampling rate) of 100 miliseconds. \n \n These writers are asked to write 250 digits in random order inside \n boxes of 500 by 500 tablet pixel resolution. Subject are monitored \n only during the first entry screens. Each screen contains five boxes\n with the digits to be written displayed above. Subjects are told to\n write only inside these boxes. If they make a mistake or are unhappy\n with their writing, they are instructed to clear the content of a box \n by using an on-screen button. The first ten digits are ignored \n because most writers are not familiar with this type of input devices,\n but subjects are not aware of this. \n \n In our study, we use only ($x, y$) coordinate information. The stylus\n pressure level values are ignored. First we apply normalization to \n make our representation invariant to translations and scale \n distortions. The raw data that we capture from the tablet consist of\n integer values between 0 and 500 (tablet input box resolution). The \n new coordinates are such that the coordinate which has the maximum \n range varies between 0 and 100. Usually $x$ stays in this range, since\n most characters are taller than they are wide. \n \n In order to train and test our classifiers, we need to represent \n digits as constant length feature vectors. A commonly used technique\n leading to good results is resampling the ( x_t, y_t) points. \n Temporal resampling (points regularly spaced in time) or spatial\n resampling (points regularly spaced in arc length) can be used here. \n Raw point data are already regularly spaced in time but the distance\n between them is variable. Previous research showed that spatial\n resampling to obtain a constant number of regularly spaced points \n on the trajectory yields much better performance, because it provides \n a better alignment between points. Our resampling algorithm uses \n simple linear interpolation between pairs of points. The resampled\n digits are represented as a sequence of T points ( x_t, y_t )_{t=1}^T,\n regularly spaced in arc length, as opposed to the input sequence, \n which is regularly spaced in time.\n \n So, the input vector size is 2*T, two times the number of points\n resampled. We considered spatial resampling to T=8,12,16 points in our\n experiments and found that T=8 gave the best trade-off between \n accuracy and complexity.\n \n \n 5. Number of Instances\n pendigits.tra Training 7494\n pendigits.tes Testing 3498\n \n The way we used the dataset was to use first half of training for \n actual training, one-fourth for validation and one-fourth\n for writer-dependent testing. The test set was used for \n writer-independent testing and is the actual quality measure.\n \n 6. Number of Attributes\n 16 input+1 class attribute\n \n 7. For Each Attribute:\n All input attributes are integers in the range 0..100.\n The last attribute is the class code 0..9\n \n 8. Missing Attribute Values\n None\n \n 9. Class Distribution\n Class: No of examples in training set\n 0: 780\n 1: 779\n 2: 780\n 3: 719\n 4: 780\n 5: 720\n 6: 720\n 7: 778\n 8: 719\n 9: 719\n Class: No of examples in testing set\n 0: 363\n 1: 364\n 2: 364\n 3: 336\n 4: 364\n 5: 335\n 6: 336\n 7: 364\n 8: 336\n 9: 336\n \n Accuracy on the testing set with k-nn \n using Euclidean distance as the metric\n \n k = 1 : 97.74\n k = 2 : 97.37\n k = 3 : 97.80\n k = 4 : 97.66\n k = 5 : 97.60\n k = 6 : 97.57\n k = 7 : 97.54\n k = 8 : 97.54\n k = 9 : 97.46\n k = 10 : 97.48\n k = 11 : 97.34', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:54', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/32/dataset_32_pendigits.arff', 'true', 18, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:54'), -(19, 1, 0, 'segment', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Image Segmentation data\n \n 2. Source Information\n -- Creators: Vision Group, University of Massachusetts\n -- Donor: Vision Group (Carla Brodley, brodley@cs.umass.edu)\n -- Date: November, 1990\n \n 3. Past Usage: None yet published\n \n 4. Relevant Information:\n \n The instances were drawn randomly from a database of 7 outdoor \n images. The images were handsegmented to create a classification\n for every pixel. \n \n Each instance is a 3x3 region.\n \n 5. Number of Instances: Training data: 210 Test data: 2100\n \n 6. Number of Attributes: 19 continuous attributes\n \n 7. Attribute Information:\n \n 1. region-centroid-col: the column of the center pixel of the region.\n 2. region-centroid-row: the row of the center pixel of the region.\n 3. region-pixel-count: the number of pixels in a region = 9.\n 4. short-line-density-5: the results of a line extractoin algorithm that \n counts how many lines of length 5 (any orientation) with\n low contrast, less than or equal to 5, go through the region.\n 5. short-line-density-2: same as short-line-density-5 but counts lines\n of high contrast, greater than 5.\n 6. vedge-mean: measure the contrast of horizontally\n adjacent pixels in the region. There are 6, the mean and \n standard deviation are given. This attribute is used as\n a vertical edge detector.\n 7. vegde-sd: (see 6)\n 8. hedge-mean: measures the contrast of vertically adjacent\n pixels. Used for horizontal line detection. \n 9. hedge-sd: (see 8).\n 10. intensity-mean: the average over the region of (R + G + B)/3\n 11. rawred-mean: the average over the region of the R value.\n 12. rawblue-mean: the average over the region of the B value.\n 13. rawgreen-mean: the average over the region of the G value.\n 14. exred-mean: measure the excess red: (2R - (G + B))\n 15. exblue-mean: measure the excess blue: (2B - (G + R))\n 16. exgreen-mean: measure the excess green: (2G - (R + B))\n 17. value-mean: 3-d nonlinear transformation\n of RGB. (Algorithm can be found in Foley and VanDam, Fundamentals\n of Interactive Computer Graphics)\n 18. saturatoin-mean: (see 17)\n 19. hue-mean: (see 17)\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: \n \n Classes: brickface, sky, foliage, cement, window, path, grass.\n \n 30 instances per class for training data.\n 300 instances per class for test data.\n \n\n\n\n\n Relabeled values in attribute class\n From: 1 To: brickface \n From: 2 To: sky \n From: 3 To: foliage \n From: 4 To: cement \n From: 5 To: window \n From: 6 To: path \n From: 7 To: grass', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/36/dataset_36_segment.arff', 'true', 19, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:10'), -(20, 1, 0, 'diabetes', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Pima Indians Diabetes Database\n \n 2. Sources:\n (a) Original owners: National Institute of Diabetes and Digestive and\n Kidney Diseases\n (b) Donor of database: Vincent Sigillito (vgs@aplcen.apl.jhu.edu)\n Research Center, RMI Group Leader\n Applied Physics Laboratory\n The Johns Hopkins University\n Johns Hopkins Road\n Laurel, MD 20707\n (301) 953-6231\n (c) Date received: 9 May 1990\n \n 3. Past Usage:\n 1. Smith,~J.~W., Everhart,~J.~E., Dickson,~W.~C., Knowler,~W.~C., &\n Johannes,~R.~S. (1988). Using the ADAP learning algorithm to forecast\n the onset of diabetes mellitus. In {it Proceedings of the Symposium\n on Computer Applications and Medical Care} (pp. 261--265). IEEE\n Computer Society Press.\n \n The diagnostic, binary-valued variable investigated is whether the\n patient shows signs of diabetes according to World Health Organization\n criteria (i.e., if the 2 hour post-load plasma glucose was at least \n 200 mg/dl at any survey examination or if found during routine medical\n care). The population lives near Phoenix, Arizona, USA.\n \n Results: Their ADAP algorithm makes a real-valued prediction between\n 0 and 1. This was transformed into a binary decision using a cutoff of \n 0.448. Using 576 training instances, the sensitivity and specificity\n of their algorithm was 76% on the remaining 192 instances.\n \n 4. Relevant Information:\n Several constraints were placed on the selection of these instances from\n a larger database. In particular, all patients here are females at\n least 21 years old of Pima Indian heritage. ADAP is an adaptive learning\n routine that generates and executes digital analogs of perceptron-like\n devices. It is a unique algorithm; see the paper for details.\n \n 5. Number of Instances: 768\n \n 6. Number of Attributes: 8 plus class \n \n 7. For Each Attribute: (all numeric-valued)\n 1. Number of times pregnant\n 2. Plasma glucose concentration a 2 hours in an oral glucose tolerance test\n 3. Diastolic blood pressure (mm Hg)\n 4. Triceps skin fold thickness (mm)\n 5. 2-Hour serum insulin (mu U/ml)\n 6. Body mass index (weight in kg/(height in m)^2)\n 7. Diabetes pedigree function\n 8. Age (years)\n 9. Class variable (0 or 1)\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: (class value 1 is interpreted as \"tested positive for\n diabetes\")\n \n Class Value Number of instances\n 0 500\n 1 268\n \n 10. Brief statistical analysis:\n \n Attribute number: Mean: Standard Deviation:\n 1. 3.8 3.4\n 2. 120.9 32.0\n 3. 69.1 19.4\n 4. 20.5 16.0\n 5. 79.8 115.2\n 6. 32.0 7.9\n 7. 0.5 0.3\n 8. 33.2 11.8\n \n \n\n\n\n\n Relabeled values in attribute \'class\'\n From: 0 To: tested_negative \n From: 1 To: tested_positive', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:13', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/37/dataset_37_diabetes.arff', 'true', 20, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:13'), -(21, 1, 0, 'sick', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n;\n ; Thyroid disease records supplied by the Garavan Institute and J. Ross\n ; Quinlan, New South Wales Institute, Syndney, Australia.\n ;\n ; 1987.\n ;\n \n sick, negative. | classes\n \n age: continuous.\n sex: M, F.\n on thyroxine: f, t.\n query on thyroxine: f, t.\n on antithyroid medication: f, t.\n sick: f, t.\n pregnant: f, t.\n thyroid surgery: f, t.\n I131 treatment: f, t.\n query hypothyroid: f, t.\n query hyperthyroid: f, t.\n lithium: f, t.\n goitre: f, t.\n tumor: f, t.\n hypopituitary: f, t.\n psych: f, t.\n TSH measured: f, t.\n TSH: continuous.\n T3 measured: f, t.\n T3: continuous.\n TT4 measured: f, t.\n TT4: continuous.\n T4U measured: f, t.\n T4U: continuous.\n FTI measured: f, t.\n FTI: continuous.\n TBG measured: f, t.\n TBG: continuous.\n referral source: WEST, STMW, SVHC, SVI, SVHD, other.\n \n\n Num Instances: 3772\n Num Attributes: 30\n Num Continuous: 7 (Int 1 / Real 6)\n Num Discrete: 23\n Missing values: 6064 / 5.4%\n\n name type enum ints real missing distinct (1)\n 1 \'age\' Int 0% 100% 0% 1 / 0% 93 / 2% 0% \n 2 \'sex\' Enum 96% 0% 0% 150 / 4% 2 / 0% 0% \n 3 \'on thyroxine\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 4 \'query on thyroxine\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 5 \'on antithyroid medicati Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 6 \'sick\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 7 \'pregnant\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 8 \'thyroid surgery\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 9 \'I131 treatment\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 10 \'query hypothyroid\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 11 \'query hyperthyroid\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 12 \'lithium\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 13 \'goitre\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 14 \'tumor\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 15 \'hypopituitary\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 16 \'psych\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 17 \'TSH measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 18 \'TSH\' Real 0% 11% 79% 369 / 10% 287 / 8% 2% \n 19 \'T3 measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 20 \'T3\' Real 0% 9% 71% 769 / 20% 69 / 2% 0% \n 21 \'TT4 measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 22 \'TT4\' Real 0% 94% 0% 231 / 6% 241 / 6% 1% \n 23 \'T4U measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 24 \'T4U\' Real 0% 2% 87% 387 / 10% 146 / 4% 1% \n 25 \'FTI measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 26 \'FTI\' Real 0% 90% 0% 385 / 10% 234 / 6% 2% \n 27 \'TBG measured\' Enum 100% 0% 0% 0 / 0% 1 / 0% 0% \n 28 \'TBG\' Real 0% 0% 0% 3772 /100% 0 / 0% 0% \n 29 \'referral source\' Enum 100% 0% 0% 0 / 0% 5 / 0% 0% \n 30 \'Class\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0%', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:19', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/38/dataset_38_sick.arff', 'true', 21, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:19'), -(22, 1, 0, 'soybean', '1', '1', '**Author**: R.S. Michalski and R.L. Chilausky (Donors: Ming Tan & Jeff Schlimmer) \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Soybean+(Large)) - 1988 \r\n**Please cite**: R.S. Michalski and R.L. Chilausky \"Learning by Being Told and Learning from Examples: An Experimental Comparison of the Two Methods of Knowledge Acquisition in the Context of Developing an Expert System for Soybean Disease Diagnosis\", International Journal of Policy Analysis and Information Systems, Vol. 4, No. 2, 1980. \r\n\r\n**Large Soybean Database** \r\nThis is the large soybean database from the UCI repository, with its training and test database combined into a single file. There are 19 classes, only the first 15 of which have been used in prior work. The folklore seems to be that the last four classes are unjustified by the data since they have so few examples. There are 35 categorical attributes, some nominal and some ordered. The value \'dna\' means does not apply. The values for attributes are encoded numerically, with the first value encoded as \'0\', the second as \'1\', and so forth. An unknown values is encoded as \'?\'.', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/42/dataset_42_soybean.arff', 'true', 22, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:32'), -(23, 1, 0, 'spambase', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: SPAM E-mail Database\n \n 2. Sources:\n (a) Creators: Mark Hopkins, Erik Reeber, George Forman, Jaap Suermondt\n Hewlett-Packard Labs, 1501 Page Mill Rd., Palo Alto, CA 94304\n (b) Donor: George Forman (gforman at nospam hpl.hp.com) 650-857-7835\n (c) Generated: June-July 1999\n \n 3. Past Usage:\n (a) Hewlett-Packard Internal-only Technical Report. External forthcoming.\n (b) Determine whether a given email is spam or not.\n (c) ~7% misclassification error.\n False positives (marking good mail as spam) are very undesirable.\n If we insist on zero false positives in the training/testing set,\n 20-25% of the spam passed through the filter.\n \n 4. Relevant Information:\n The \"spam\" concept is diverse: advertisements for products/web\n sites, make money fast schemes, chain letters, pornography...\n Our collection of spam e-mails came from our postmaster and \n individuals who had filed spam. Our collection of non-spam \n e-mails came from filed work and personal e-mails, and hence\n the word \'george\' and the area code \'650\' are indicators of \n non-spam. These are useful when constructing a personalized \n spam filter. One would either have to blind such non-spam \n indicators or get a very wide collection of non-spam to \n generate a general purpose spam filter.\n \n For background on spam:\n Cranor, Lorrie F., LaMacchia, Brian A. Spam! \n Communications of the ACM, 41(8):74-83, 1998.\n \n 5. Number of Instances: 4601 (1813 Spam = 39.4%)\n \n 6. Number of Attributes: 58 (57 continuous, 1 nominal class label)\n \n 7. Attribute Information:\n The last column of \'spambase.data\' denotes whether the e-mail was \n considered spam (1) or not (0), i.e. unsolicited commercial e-mail. \n Most of the attributes indicate whether a particular word or\n character was frequently occuring in the e-mail. The run-length\n attributes (55-57) measure the length of sequences of consecutive \n capital letters. For the statistical measures of each attribute, \n see the end of this file. Here are the definitions of the attributes:\n \n 48 continuous real [0,100] attributes of type word_freq_WORD \n = percentage of words in the e-mail that match WORD,\n i.e. 100 * (number of times the WORD appears in the e-mail) / \n total number of words in e-mail. A \"word\" in this case is any \n string of alphanumeric characters bounded by non-alphanumeric \n characters or end-of-string.\n \n 6 continuous real [0,100] attributes of type char_freq_CHAR\n = percentage of characters in the e-mail that match CHAR,\n i.e. 100 * (number of CHAR occurences) / total characters in e-mail\n \n 1 continuous real [1,...] attribute of type capital_run_length_average\n = average length of uninterrupted sequences of capital letters\n \n 1 continuous integer [1,...] attribute of type capital_run_length_longest\n = length of longest uninterrupted sequence of capital letters\n \n 1 continuous integer [1,...] attribute of type capital_run_length_total\n = sum of length of uninterrupted sequences of capital letters\n = total number of capital letters in the e-mail\n \n 1 nominal {0,1} class attribute of type spam\n = denotes whether the e-mail was considered spam (1) or not (0), \n i.e. unsolicited commercial e-mail. \n \n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution:\n Spam 1813 (39.4%)\n Non-Spam 2788 (60.6%)\n \n \n Attribute Statistics:\n Min: Max: Average: Std.Dev: Coeff.Var_%: \n 1 0 4.54 0.10455 0.30536 292 \n 2 0 14.28 0.21301 1.2906 606 \n 3 0 5.1 0.28066 0.50414 180 \n 4 0 42.81 0.065425 1.3952 2130 \n 5 0 10 0.31222 0.67251 215 \n 6 0 5.88 0.095901 0.27382 286 \n 7 0 7.27 0.11421 0.39144 343 \n 8 0 11.11 0.10529 0.40107 381 \n 9 0 5.26 0.090067 0.27862 309 \n 10 0 18.18 0.23941 0.64476 269 \n 11 0 2.61 0.059824 0.20154 337 \n 12 0 9.67 0.5417 0.8617 159 \n 13 0 5.55 0.09393 0.30104 320 \n 14 0 10 0.058626 0.33518 572 \n 15 0 4.41 0.049205 0.25884 526 \n 16 0 20 0.24885 0.82579 332 \n 17 0 7.14 0.14259 0.44406 311 \n 18 0 9.09 0.18474 0.53112 287 \n 19 0 18.75 1.6621 1.7755 107 \n 20 0 18.18 0.085577 0.50977 596 \n 21 0 11.11 0.80976 1.2008 148 \n 22 0 17.1 0.1212 1.0258 846 \n 23 0 5.45 0.10165 0.35029 345 \n 24 0 12.5 0.094269 0.44264 470 \n 25 0 20.83 0.5495 1.6713 304 \n 26 0 16.66 0.26538 0.88696 334 \n 27 0 33.33 0.7673 3.3673 439 \n 28 0 9.09 0.12484 0.53858 431 \n 29 0 14.28 0.098915 0.59333 600 \n 30 0 5.88 0.10285 0.45668 444 \n 31 0 12.5 0.064753 0.40339 623 \n 32 0 4.76 0.047048 0.32856 698 \n 33 0 18.18 0.097229 0.55591 572 \n 34 0 4.76 0.047835 0.32945 689 \n 35 0 20 0.10541 0.53226 505 \n 36 0 7.69 0.097477 0.40262 413 \n 37 0 6.89 0.13695 0.42345 309 \n 38 0 8.33 0.013201 0.22065 1670 \n 39 0 11.11 0.078629 0.43467 553 \n 40 0 4.76 0.064834 0.34992 540 \n 41 0 7.14 0.043667 0.3612 827 \n 42 0 14.28 0.13234 0.76682 579 \n 43 0 3.57 0.046099 0.22381 486 \n 44 0 20 0.079196 0.62198 785 \n 45 0 21.42 0.30122 1.0117 336 \n 46 0 22.05 0.17982 0.91112 507 \n 47 0 2.17 0.0054445 0.076274 1400 \n 48 0 10 0.031869 0.28573 897 \n 49 0 4.385 0.038575 0.24347 631 \n 50 0 9.752 0.13903 0.27036 194 \n 51 0 4.081 0.016976 0.10939 644 \n 52 0 32.478 0.26907 0.81567 303 \n 53 0 6.003 0.075811 0.24588 324 \n 54 0 19.829 0.044238 0.42934 971 \n 55 1 1102.5 5.1915 31.729 611 \n 56 1 9989 52.173 194.89 374 \n 57 1 15841 283.29 606.35 214 \n 58 0 1 0.39404 0.4887 124 \n \n \n This file: \'spambase.DOCUMENTATION\' at the UCI Machine Learning Repository\n http://www.ics.uci.edu/~mlearn/MLRepository.html\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:41', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/44/dataset_44_spambase.arff', 'true', 23, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:41'), -(24, 1, 0, 'splice', '1', '1', '**Author**: Genbank \nDonor: G. Towell, M. Noordewier, and J. Shavlik \n**Source**: [Genbank 64.1](genbank.bio.net) - 1/1/92 \n**Please cite**: \n\nPrimate splice-junction gene sequences (DNA) with associated imperfect domain theory. All examples taken from Genbank 64.1. Categories \"ei\" and \"ie\" include every \"split-gene\" for primates in Genbank 64.1. Non-splice examples taken from sequences known not to include a splicing site.\n \nProblem Description: \nSplice junctions are points on a DNA sequence at which \'superfluous\' DNA is removed during the process of protein creation in higher organisms. The problem posed in this dataset is to recognize, given a sequence of DNA, the boundaries between exons (the parts of the DNA sequence retained after splicing) and introns (the parts of the DNA sequence that are spliced out). This problem consists of two subtasks: recognizing exon/intron boundaries (referred to as EI sites), and recognizing intron/exon boundaries (IE sites). (In the biological community, IE borders are referred to a \'\'acceptors\'\' while EI borders are referred to as \'\'donors\'\'.)\n \nThis dataset has been developed to help evaluate a \"hybrid\" learning algorithm (KBANN) that uses examples to inductively refine preexisting knowledge.\n \nAttributes: \n>\n 1 One of {n ei ie}, indicating the class.\n 2 The instance name.\n 3-62 The remaining 60 fields are the sequence, starting at \n position -30 and ending at position +30. Each of\n these fields is almost always filled by one of \n {a, g, t, c}. Other characters indicate ambiguity among\n the standard characters according to the following table:\n character: meaning\n D: A or G or T\n N: A or G or C or T\n S: C or G\n R: A or G\n\nNotes: \n* Instance_name is an identifier and should be ignored for modelling', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:49', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/46/dataset_46_splice.arff', 'true', 24, 'Class', NULL, 'Instance_name', NULL, 'public', NULL, NULL, 'Instance_name is an identifier and should be ignored for modelling', '2014-09-19 17:06:29'), -(25, 1, 0, 'tic-tac-toe', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Tic-Tac-Toe Endgame database\n \n 2. Source Information\n -- Creator: David W. Aha (aha@cs.jhu.edu)\n -- Donor: David W. Aha (aha@cs.jhu.edu)\n -- Date: 19 August 1991\n \n 3. Known Past Usage: \n 1. Matheus,~C.~J., & Rendell,~L.~A. (1989). Constructive\n induction on decision trees. In {it Proceedings of the\n Eleventh International Joint Conference on Artificial Intelligence} \n (pp. 645--650). Detroit, MI: Morgan Kaufmann.\n -- CITRE was applied to 100-instance training and 200-instance test\n sets. In a study using various amounts of domain-specific\n knowledge, its highest average accuracy was 76.7% (using the\n final decision tree created for testing).\n \n 2. Matheus,~C.~J. (1990). Adding domain knowledge to SBL through\n feature construction. In {it Proceedings of the Eighth National\n Conference on Artificial Intelligence} (pp. 803--808). \n Boston, MA: AAAI Press.\n -- Similar experiments with CITRE, includes learning curves up\n to 500-instance training sets but used _all_ instances in the\n database for testing. Accuracies reached above 90%, but specific\n values are not given (see Chris\'s dissertation for more details).\n \n 3. Aha,~D.~W. (1991). Incremental constructive induction: An instance-based\n approach. In {it Proceedings of the Eighth International Workshop\n on Machine Learning} (pp. 117--121). Evanston, ILL: Morgan Kaufmann.\n -- Used 70% for training, 30% of the instances for testing, evaluated\n over 10 trials. Results reported for six algorithms:\n -- NewID: 84.0%\n -- CN2: 98.1% \n -- MBRtalk: 88.4%\n -- IB1: 98.1% \n -- IB3: 82.0%\n -- IB3-CI: 99.1%\n -- Results also reported when adding an additional 10 irrelevant \n ternary-valued attributes; similar _relative_ results except that\n IB1\'s performance degraded more quickly than the others.\n \n 4. Relevant Information:\n \n This database encodes the complete set of possible board configurations\n at the end of tic-tac-toe games, where \"x\" is assumed to have played\n first. The target concept is \"win for x\" (i.e., true when \"x\" has one\n of 8 possible ways to create a \"three-in-a-row\"). \n \n Interestingly, this raw database gives a stripped-down decision tree\n algorithm (e.g., ID3) fits. However, the rule-based CN2 algorithm, the\n simple IB1 instance-based learning algorithm, and the CITRE \n feature-constructing decision tree algorithm perform well on it.\n \n 5. Number of Instances: 958 (legal tic-tac-toe endgame boards)\n \n 6. Number of Attributes: 9, each corresponding to one tic-tac-toe square\n \n 7. Attribute Information: (x=player x has taken, o=player o has taken, b=blank)\n \n 1. top-left-square: {x,o,b}\n 2. top-middle-square: {x,o,b}\n 3. top-right-square: {x,o,b}\n 4. middle-left-square: {x,o,b}\n 5. middle-middle-square: {x,o,b}\n 6. middle-right-square: {x,o,b}\n 7. bottom-left-square: {x,o,b}\n 8. bottom-middle-square: {x,o,b}\n 9. bottom-right-square: {x,o,b}\n 10. Class: {positive,negative}\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: About 65.3% are positive (i.e., wins for \"x\")\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/50/dataset_50_tic-tac-toe.arff', 'true', 25, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:59'), -(26, 1, 0, 'vehicle', '1', '1', '**Author**: Peter Mowforth \n**Source**: UCI - \n**Please cite**: Siebert,JP. Turing Institute Research Memorandum TIRM-87-018 \"Vehicle Recognition Using Rule Based Methods\" (March 1987) \n\n NAME\n vehicle silhouettes\n \n PURPOSE\n to classify a given silhouette as one of four types of vehicle,\n using a set of features extracted from the silhouette. The\n vehicle may be viewed from one of many different angles. \n \n PROBLEM TYPE\n classification\n \n SOURCE\n Drs.Pete Mowforth and Barry Shepherd\n Turing Institute\n George House\n 36 North Hanover St.\n Glasgow\n G1 2AD\n \n CONTACT\n Alistair Sutherland\n Statistics Dept.\n Strathclyde University\n Livingstone Tower\n 26 Richmond St.\n GLASGOW G1 1XH\n Great Britain\n \n Tel: 041 552 4400 x3033\n \n Fax: 041 552 4711 \n \n e-mail: alistair@uk.ac.strathclyde.stams\n \n HISTORY\n This data was originally gathered at the TI in 1986-87 by\n JP Siebert. It was partially financed by Barr and Stroud Ltd.\n The original purpose was to find a method of distinguishing\n 3D objects within a 2D image by application of an ensemble of\n shape feature extractors to the 2D silhouettes of the objects.\n Measures of shape features extracted from example silhouettes\n of objects to be discriminated were used to generate a class-\n ification rule tree by means of computer induction.\n This object recognition strategy was successfully used to \n discriminate between silhouettes of model cars, vans and buses\n viewed from constrained elevation but all angles of rotation.\n The rule tree classification performance compared favourably\n to MDC (Minimum Distance Classifier) and k-NN (k-Nearest Neigh-\n bour) statistical classifiers in terms of both error rate and\n computational efficiency. An investigation of these rule trees\n generated by example indicated that the tree structure was \n heavily influenced by the orientation of the objects, and grouped\n similar object views into single decisions.\n \n DESCRIPTION\n The features were extracted from the silhouettes by the HIPS\n (Hierarchical Image Processing System) extension BINATTS, which \n extracts a combination of scale independent features utilising\n both classical moments based measures such as scaled variance,\n skewness and kurtosis about the major/minor axes and heuristic\n measures such as hollows, circularity, rectangularity and\n compactness.\n Four \"Corgie\" model vehicles were used for the experiment:\n a double decker bus, Cheverolet van, Saab 9000 and an Opel Manta 400.\n This particular combination of vehicles was chosen with the \n expectation that the bus, van and either one of the cars would\n be readily distinguishable, but it would be more difficult to\n distinguish between the cars.\n The images were acquired by a camera looking downwards at the\n model vehicle from a fixed angle of elevation (34.2 degrees\n to the horizontal). The vehicles were placed on a diffuse\n backlit surface (lightbox). The vehicles were painted matte black\n to minimise highlights. The images were captured using a CRS4000\n framestore connected to a vax 750. All images were captured with\n a spatial resolution of 128x128 pixels quantised to 64 greylevels.\n These images were thresholded to produce binary vehicle silhouettes,\n negated (to comply with the processing requirements of BINATTS) and\n thereafter subjected to shrink-expand-expand-shrink HIPS modules to\n remove \"salt and pepper\" image noise.\n The vehicles were rotated and their angle of orientation was measured\n using a radial graticule beneath the vehicle. 0 and 180 degrees\n corresponded to \"head on\" and \"rear\" views respectively while 90 and\n 270 corresponded to profiles in opposite directions. Two sets of\n 60 images, each set covering a full 360 degree rotation, were captured\n for each vehicle. The vehicle was rotated by a fixed angle between \n images. These datasets are known as e2 and e3 respectively.\n A further two sets of images, e4 and e5, were captured with the camera \n at elevations of 37.5 degs and 30.8 degs respectively. These sets\n also contain 60 images per vehicle apart from e4.van which contains\n only 46 owing to the difficulty of containing the van in the image\n at some orientations.\n \n ATTRIBUTES\n \n COMPACTNESS (average perim)**2/area\n \n CIRCULARITY (average radius)**2/area\n \n DISTANCE CIRCULARITY area/(av.distance from border)**2\n \n RADIUS RATIO (max.rad-min.rad)/av.radius\n \n PR.AXIS ASPECT RATIO (minor axis)/(major axis)\n \n MAX.LENGTH ASPECT RATIO (length perp. max length)/(max length)\n \n SCATTER RATIO (inertia about minor axis)/(inertia about major axis)\n \n ELONGATEDNESS area/(shrink width)**2\n \n PR.AXIS RECTANGULARITY area/(pr.axis length*pr.axis width)\n \n MAX.LENGTH RECTANGULARITY area/(max.length*length perp. to this)\n \n SCALED VARIANCE (2nd order moment about minor axis)/area\n ALONG MAJOR AXIS\n \n SCALED VARIANCE (2nd order moment about major axis)/area\n ALONG MINOR AXIS \n \n SCALED RADIUS OF GYRATION (mavar+mivar)/area\n \n SKEWNESS ABOUT (3rd order moment about major axis)/sigma_min**3\n MAJOR AXIS\n \n SKEWNESS ABOUT (3rd order moment about minor axis)/sigma_maj**3\n MINOR AXIS\n \n KURTOSIS ABOUT (4th order moment about major axis)/sigma_min**4\n MINOR AXIS \n \n KURTOSIS ABOUT (4th order moment about minor axis)/sigma_maj**4\n MAJOR AXIS\n \n HOLLOWS RATIO (area of hollows)/(area of bounding polygon)\n \n Where sigma_maj**2 is the variance along the major axis and\n sigma_min**2 is the variance along the minor axis, and\n \n area of hollows= area of bounding poly-area of object \n \n The area of the bounding polygon is found as a side result of\n the computation to find the maximum length. Each individual\n length computation yields a pair of calipers to the object\n orientated at every 5 degrees. The object is propagated into\n an image containing the union of these calipers to obtain an\n image of the bounding polygon. \n \n NUMBER OF CLASSES\n \n 4 OPEL, SAAB, BUS, VAN\n \n NUMBER OF EXAMPLES\n \n Total no. = 946\n \n No. in each class\n \n opel 240\n saab 240\n bus 240\n van 226\n \n \n 100 examples are being kept by Strathclyde for validation.\n So StatLog partners will receive 846 examples.\n \n NUMBER OF ATTRIBUTES\n \n No. of atts. = 18', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:23:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/54/dataset_54_vehicle.arff', 'true', 26, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:23:10'), -(27, 1, 0, 'waveform-5000', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Waveform Database Generator (written in C)\n \n 2. Source:\n (a) Breiman,L., Friedman,J.H., Olshen,R.A., & Stone,C.J. (1984). \n Classification and Regression Trees. Wadsworth International\n Group: Belmont, California. (see pages 43-49).\n (b) Donor: David Aha \n (c) Date: 11/10/1988\n \n 3. Past Usage:\n 1. CART book (above):\n -- Optimal Bayes classification rate: 86% accuracy\n -- CART decision tree algorithm: 72%\n -- Nearest Neighbor Algorithm: 78%\n -- 300 training and 5000 test instances\n \n 4. Relevant Information:\n -- 3 classes of waves\n -- 21 attributes, all of which include noise\n -- See the book for details (49-55, 169)\n -- waveform.data.Z contains 5000 instances\n \n 5. Number of Instances: chosen by user\n \n 6. Number of Attributes:\n -- 21 attributes with continuous values between 0 and 6\n \n 7. Attribute Information:\n -- Each class is generated from a combination of 2 of 3 \"base\" waves\n -- Each instance is generated f added noise (mean 0, variance 1) in \n each attribute\n -- See the book for details (49-55, 169)\n \n 8. Missing Attribute Values: none\n \n 9. Class Distribution: 33% for each of 3 classes', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:23:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/60/dataset_60_waveform-5000.arff', 'true', 27, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:23:37'), -(28, 1, 0, 'electricity', '1', '1', '**Author**: M. Harries, J. Gama, A. Bifet \n**Source**: [Gama](http://www.inescporto.pt/~jgama/ales/ales_5.html) - 2009 \n**Please cite**: \n\n**Electricity** is a widely used dataset described by M. Harries and analysed by Gama. This data was collected from the Australian New South Wales Electricity Market. In this market, prices are not fixed and are affected by demand and supply of the market. They are set every five minutes. The ELEC dataset contains 45, 312 instances. The class label identifies the change of the price relative to a moving average of the last 24 hours.', 'ARFF', NULL, NULL, NULL, '2014-04-10 02:42:23', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/2419/electricity-normalized.arff', 'true', 28, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-10 02:42:23'), -(29, 1, 0, 'satimage', '1', '1', '**Author**: Ashwin Srinivasan, Department of Statistics and Data Modeling, University of Strathclyde \r\n**Source**: https://archive.ics.uci.edu/ml/datasets/Statlog+(Landsat+Satellite)\r\n**Please cite**: \r\n\r\nThe database consists of the multi-spectral values of pixels in 3x3 neighbourhoods in a satellite image, and the classification associated with the central pixel in each neighbourhood. The aim is to predict this classification, given the multi-spectral values. In the sample database, the class of a pixel is coded as a number.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:14:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3619/dataset_186_satimage.arff', 'true', 29, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:14:59'), -(30, 1, 0, 'abalone', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Abalone data\n \n 2. Sources:\n \n (a) Original owners of database:\n Marine Resources Division\n Marine Research Laboratories - Taroona\n Department of Primary Industry and Fisheries, Tasmania\n GPO Box 619F, Hobart, Tasmania 7001, Australia\n (contact: Warwick Nash +61 02 277277, wnash@dpi.tas.gov.au)\n \n (b) Donor of database:\n Sam Waugh (Sam.Waugh@cs.utas.edu.au)\n Department of Computer Science, University of Tasmania\n GPO Box 252C, Hobart, Tasmania 7001, Australia\n \n (c) Date received: December 1995\n \n \n 3. Past Usage:\n \n Sam Waugh (1995) \"Extending and benchmarking Cascade-Correlation\", PhD\n thesis, Computer Science Department, University of Tasmania.\n \n -- Test set performance (final 1044 examples, first 3133 used for training):\n 24.86% Cascade-Correlation (no hidden nodes)\n 26.25% Cascade-Correlation (5 hidden nodes)\n 21.5% C4.5\n 0.0% Linear Discriminate Analysis\n 3.57% k=5 Nearest Neighbour\n (Problem encoded as a classification task)\n \n -- Data set samples are highly overlapped. Further information is required\n to separate completely using affine combinations. Other restrictions\n to data set examined.\n \n David Clark, Zoltan Schreter, Anthony Adams \"A Quantitative Comparison of\n Dystal and Backpropagation\", submitted to the Australian Conference on\n Neural Networks (ACNN\'96). Data set treated as a 3-category classification\n problem (grouping ring classes 1-8, 9 and 10, and 11 on).\n \n -- Test set performance (3133 training, 1044 testing as above):\n 64% Backprop\n 55% Dystal\n -- Previous work (Waugh, 1995) on same data set:\n 61.40% Cascade-Correlation (no hidden nodes)\n 65.61% Cascade-Correlation (5 hidden nodes)\n 59.2% C4.5\n 32.57% Linear Discriminate Analysis\n 62.46% k=5 Nearest Neighbour\n \n \n 4. Relevant Information Paragraph:\n \n Predicting the age of abalone from physical measurements. The age of\n abalone is determined by cutting the shell through the cone, staining it,\n and counting the number of rings through a microscope -- a boring and\n time-consuming task. Other measurements, which are easier to obtain, are\n used to predict the age. Further information, such as weather patterns\n and location (hence food availability) may be required to solve the problem.\n \n From the original data examples with missing values were removed (the\n majority having the predicted value missing), and the ranges of the\n continuous values have been scaled for use with an ANN (by dividing by 200).\n \n Data comes from an original (non-machine-learning) study:\n \n Warwick J Nash, Tracy L Sellers, Simon R Talbot, Andrew J Cawthorn and\n Wes B Ford (1994) \"The Population Biology of Abalone (_Haliotis_\n species) in Tasmania. I. Blacklip Abalone (_H. rubra_) from the North\n Coast and Islands of Bass Strait\", Sea Fisheries Division, Technical\n Report No. 48 (ISSN 1034-3288)\n \n \n 5. Number of Instances: 4177\n \n \n 6. Number of Attributes: 8\n \n \n 7. Attribute information:\n \n Given is the attribute name, attribute type, the measurement unit and a\n brief description. The number of rings is the value to predict: either\n as a continuous value or as a classification problem.\n \n Name Data Type Meas. Description\n ---- --------- ----- -----------\n Sex nominal M, F, and I (infant)\n Length continuous mm Longest shell measurement\n Diameter continuous mm perpendicular to length\n Height continuous mm with meat in shell\n Whole weight continuous grams whole abalone\n Shucked weight continuous grams weight of meat\n Viscera weight continuous grams gut weight (after bleeding)\n Shell weight continuous grams after being dried\n Rings integer +1.5 gives the age in years\n \n Statistics for numeric domains:\n \n Length Diam Height Whole Shucked Viscera Shell Rings\n Min 0.075 0.055 0.000 0.002 0.001 0.001 0.002 1\n Max 0.815 0.650 1.130 2.826 1.488 0.760 1.005 29\n Mean 0.524 0.408 0.140 0.829 0.359 0.181 0.239 9.934\n SD 0.120 0.099 0.042 0.490 0.222 0.110 0.139 3.224\n Correl 0.557 0.575 0.557 0.540 0.421 0.504 0.628 1.0\n \n \n 8. Missing Attribute Values: None\n \n \n 9. Class Distribution:\n \n Class Examples\n ----- --------\n 1 1\n 2 1\n 3 15\n 4 57\n 5 115\n 6 259\n 7 391\n 8 568\n 9 689\n 10 634\n 11 487\n 12 267\n 13 203\n 14 126\n 15 103\n 16 67\n 17 58\n 18 42\n 19 32\n 20 26\n 21 14\n 22 6\n 23 9\n 24 2\n 25 1\n 26 1\n 27 2\n 29 1\n ----- ----\n Total 4177\n \n Num Instances: 4177\n Num Attributes: 9\n Num Continuous: 8 (Int 1 / Real 7)\n Num Discrete: 1\n Missing values: 0 / 0.0%\n\n name type enum ints real missing distinct (1)\n 1 \'Sex\' Enum 100% 0% 0% 0 / 0% 3 / 0% 0% \n 2 \'Length\' Real 0% 0% 100% 0 / 0% 134 / 3% 0% \n 3 \'Diameter\' Real 0% 0% 100% 0 / 0% 111 / 3% 0% \n 4 \'Height\' Real 0% 0% 100% 0 / 0% 51 / 1% 0% \n 5 \'Whole weight\' Real 0% 0% 100% 0 / 0% 2429 / 58% 31% \n 6 \'Shucked weight\' Real 0% 0% 100% 0 / 0% 1515 / 36% 10% \n 7 \'Viscera weight\' Real 0% 0% 100% 0 / 0% 880 / 21% 3% \n 8 \'Shell weight\' Real 0% 0% 100% 0 / 0% 926 / 22% 8% \n 9 \'Class_Rings\' Int 0% 100% 0% 0 / 0% 28 / 1% 0%', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:15:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3620/dataset_187_abalone.arff', 'true', 30, 'Class_number_of_rings', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:15:04'), -(31, 1, 0, 'eucalyptus', '1', '1', '**Author**: Bruce Bulloch \n**Source**: [WEKA Dataset Collection](http://www.cs.waikato.ac.nz/ml/weka/datasets.html) \n**Please cite**: \n\n**Eucalyptus Soil Conservation** \nThe objective was to determine which seedlots in a species are best for soil conservation in seasonally dry hill country. Determination is found by measurement of height, diameter by height, survival, and other contributing factors. \n \nIt is important to note that eucalypt trial methods changed over time; earlier trials included mostly 15 - 30cm tall seedling grown in peat plots and the later trials have included mostly three replications of eight trees grown. This change may contribute to less significant results.\n\nExperimental data recording procedures which require noting include:\n - instances with no data recorded due to experimental recording procedures\n require that the absence of a species from one replicate at a site was\n treated as a missing value, but if absent from two or more replicates at a\n site the species was excluded from the site\'s analyses.\n - missing data for survival, vigour, insect resistance, stem form, crown form\n and utility especially for the data recorded at the Morea Station; this \n could indicate the death of species in these areas or a lack in collection\n of data. \n\n Attribute Information: \n 1. Abbrev - site abbreviation - enumerated\n 2. Rep - site rep - integer\n 3. Locality - site locality in the North Island - enumerated\n 4. Map_Ref - map location in the North Island - enumerated\n 5. Latitude - latitude approximation - enumerated\n 6. Altitude - altitude approximation - integer\n 7. Rainfall - rainfall (mm pa) - integer\n 8. Frosts - frosts (deg. c) - integer\n 9. Year - year of planting - integer\n 10. Sp - species code - enumerated\n 11. PMCno - seedlot number - integer\n 12. DBH - best diameter base height (cm) - real\n 13. Ht - height (m) - real\n 14. Surv - survival - integer\n 15. Vig - vigour - real\n 16. Ins_res - insect resistance - real\n 17. Stem_Fm - stem form - real\n 18. Crown_Fm - crown form - real\n 19. Brnch_Fm - branch form - real\n Class:\n 20. Utility - utility rating - enumerated\n\n Class Distribution:\n none - 180\n low - 107\n average - 130\n good - 214\n best - 105\n\n Contact: Bruce Bulloch, 128 Cook Street, Palmerston North, New Zealand', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:15:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3625/dataset_194_eucalyptus.arff', 'true', 31, 'Utility', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:15:28'), -(32, 94, 0, 'isolet', '1', NULL, '**Author**: Ron Cole and Mark Fanty (cole@cse.ogi.edu, fanty@cse.ogi.edu) \n**Donor**: Tom Dietterich (tgd@cs.orst.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/ISOLET) - 1994 \n**Please cite**: \n\n**ISOLET (Isolated Letter Speech Recognition)** \nThis data set was generated as follows. 150 subjects spoke the name of each letter of the alphabet twice. Hence, we have 52 training examples from each speaker. The speakers are grouped into sets of 30 speakers each, 4 groups can serve as trainings set, the last group as the test set.\n\nYou will note that 3 examples are missing. I believe they were dropped due to difficulties in recording.\n\nI believe this is a good domain for a noisy, perceptual task. It is also a very good domain for testing the scaling abilities of algorithms. For example, C4.5 on this domain is slower than backpropagation!\n\nPast Usage:\n* Fanty, M., Cole, R. (1991). Spoken letter recognition. In Lippman, R. P., Moody, J., and Touretzky, D. S. (Eds). Advances in Neural Information Processing Systems 3. San Mateo, CA: Morgan Kaufmann.\nGoal: Predict which letter-name was spoken, a simple classification task. 95.9% correct classification using the OPT backpropagation implementation. Training on isolet1+2+3+4, testing on isolet5. Network architecture: 56 hidden units, 26 output units (one-per-class).\n\n* Dietterich, T. G., Bakiri, G. (1991) Error-correcting output codes: A general method for improving multiclass inductive learning programs. Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI-91), Anaheim, CA: AAAI Press.\nGoal: same as above. 95.83% correct using OPT backpropagation. (Architecture: 78 hidden units, 26 output units, one-per-class). 96.73% correct using a 30-bit error-correcting output code with OPT (Architecture: 156 hidden units, 30 output units).\n\n**Attributes** \nAll attributes are continuous, real-valued attributes scaled into the range -1.0 to 1.0. The features are described in the paper by Cole and Fanty cited above. The features include spectral coefficients; contour features, sonorant features, pre-sonorant features, and post-sonorant features. Exact order of appearance of the features is not known.', 'ARFF', NULL, NULL, '1994', '2014-08-20 20:59:05', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52405/phpB0xrNj', 'true', 32, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'all numeric variables declared as factors before', '2014-09-25 23:26:09'), -(33, 2, 0, 'vowel', '2', '2', '**Author**: Peter Turney (peter@ai.iit.nrc.ca) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/machine-learning-databases/undocumented/connectionist-bench/vowel/) - date unknown \n**Please cite**: \n\n**Vowel Recognition Data** \nIn my work on context-sensitive learning, I used the \"Deterding Vowel Recognition Data\", but I found it necessary to reformulate the data. Implicit in the original data is contextual information on the speaker\'s gender and identity. For my work, it was necessary to make this information explicit. This dataset adds the speaker\'s sex and identity as new features. \n\nNotes: \n* This is version 2. Version 1 is hidden because it includes a feature dividing the data in train and test set. In OpenML this information is explicitly available in the corresponding task.', 'ARFF', '\"Peter Turney\"', '\"\"', '', '2014-08-22 16:57:30', NULL, 'Public', '', NULL, 'https://www.openml.org/data/download/52210/phpd8EoD9', 'true', 33, 'Class', '', NULL, '', 'public', NULL, 'http://www.openml.org/d/58', NULL, '2014-08-22 16:57:30'), -(34, 94, 0, 'scene', '1', '', '**Author**: \n \n**Source**: Unknown - \n**Please cite**: \n\nScene recognition dataset\n\nSource:\nMatthew R. Boutell, Jiebo Luo, Xipeng Shen, and Christopher M. Brown.\nLearning multi-label scene classification.\nPattern Recognition, 37(9):1757-1771, 2004. \n\n1: Description.\nScenes data set contains characteristics about images and thier classes. One image can belong to one or more classes.\n\n2: Type: Multi label \n3: Origin: Real world\n4: Instances: 2407\n5: Features: 294\n6: Labels: 6 \n7: Missing values: No', 'ARFF', '\"\"', '\"\"', '', '2014-08-25 11:43:22', NULL, 'Public', '', NULL, 'https://www.openml.org/data/download/1390080/phpuZu33P', 'true', 34, 'Urban', '', NULL, '', 'public', NULL, '', 'removed ranges after the definition of a numerical attribute', '2015-04-15 22:22:58'), -(35, 2, 0, 'monks-problems-1', '1', NULL, '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - October 1992 \n**Please cite**: \n\nThe Monk\'s Problems: Problem 1\n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992\n\n4. Relevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set.\n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 8. \n\nTarget Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 'ARFF', '\"Sebastian Thrun\"', NULL, 'October 1992', '2014-08-26 17:11:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52236/phpAyyBys', 'true', 35, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:11:18'), -(36, 2, 0, 'monks-problems-2', '1', NULL, '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - October 1992 \n**Please cite**: \n\nThe Monk\'s Problems: Problem 2 \n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992 \n\nRelevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set. \n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 \n\n8. Target Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 'ARFF', '\"Sebastian Thrun\"', NULL, 'October 1992', '2014-08-26 17:29:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52237/php4fATLZ', 'true', 36, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:29:02'), -(37, 2, 0, 'monks-problems-3', '1', NULL, '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - \n**Please cite**: \n\nThe Monk\'s Problems: Problem 3 \n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992 \n\nRelevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set. \n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 \n\nTarget Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 'ARFF', '\"Sebastian Thrun\"', NULL, NULL, '2014-08-26 17:41:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52238/phphZierv', 'true', 37, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:41:07'), -(38, 2, NULL, 'JapaneseVowels', '1', NULL, '**Author**: Mineichi Kudo, Jun Toyama, Masaru Shimbo ({mine,jun,shimbo}@main.eng.hokudai.ac.jp) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Japanese+Vowels) - 2000 \n**Please cite**: \n\n**Japanese vowels** \nThis dataset records 640 time series of 12 LPC cepstrum coefficients taken from nine male speakers.\n\nThe data was collected for examining our newly developed classifier for multidimensional curves (multidimensional time series). Nine male speakers uttered two Japanese vowels /ae/ successively. For each utterance, with the analysis parameters described below, we applied 12-degree linear prediction analysis to it to obtain a discrete-time series with 12 LPC cepstrum coefficients. This means that one utterance by a speaker forms a time series whose length is in the range 7-29 and each point of a time series is of 12 features (12 coefficients).\n\nSimilar data are available for different utterances /ei/, /iu/, /uo/, /oa/ in addition to /ae/. Please contact the donor if you are interested in using this data.\n\nThe number of the time series is 640 in total. We used one set of 270 time series for training and the other set of 370 time series for testing.\n\nAnalysis parameters: \n* Sampling rate : 10kHz\n* Frame length : 25.6 ms\n* Shift length : 6.4ms\n* Degree of LPC coefficients : 12\n\nEach line represents 12 LPC coefficients in the increasing order separated by spaces. This corresponds to one analysis\nframe. Lines are organized into blocks, which are a set of 7-29 lines separated by blank lines and corresponds to a single speech utterance of /ae/ with 7-29 frames.\n\nEach speaker is a set of consecutive blocks. In ae.train there are 30 blocks for each speaker. Blocks 1-30 represent speaker 1, blocks 31-60 represent speaker 2, and so on up to speaker 9. In ae.test, speakers 1 to 9 have the corresponding number of blocks: 31 35 88 44 29 24 40 50 29. Thus, blocks 1-31 represent speaker 1 (31 utterances of /ae/), blocks 32-66 represent speaker 2 (35 utterances of /ae/), and so on.\n\n**Past Usage**\n\nM. Kudo, J. Toyama and M. Shimbo. (1999). \"Multidimensional Curve Classification Using Passing-Through Regions\". Pattern Recognition Letters, Vol. 20, No. 11--13, pages 1103--1111.\n\nIf you publish any work using the dataset, please inform the donor. Use for commercial purposes requires donor permission.\n\nReferences \n\n1. http://ips9.main.eng.hokudai.ac.jp/index_e.html\n2. mailto:mine@main.eng.hokudai.ac.jp\n3. mailto:jun@main.eng.hokudai.ac.jp\n4. mailto:shimbo@main.eng.hokudai.ac.jp\n5. http://kdd.ics.uci.edu/\n6. http://www.ics.uci.edu/\n7. http://www.uci.edu/', 'ARFF', NULL, NULL, NULL, '2014-09-27 10:56:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52415/JapaneseVowels.arff', 'true', 38, 'speaker', NULL, NULL, NULL, 'public', NULL, NULL, 'set target feature', '2014-09-27 11:19:36'), -(39, 2, NULL, 'synthetic_control', '1', NULL, '**Author**: Dr Robert Alcock (rob@skyblue.csd.auth.gr) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Synthetic+Control+Chart+Time+Series) - 1999 \n**Please cite**: \n\n**Synthetic Control Chart Time Series** \nThis data consists of synthetically generated control charts. This dataset contains 600 examples of control charts synthetically generated by the process in Alcock and Manolopoulos (1999). There are six different classes of control charts:\n\n1. Normal\n2. Cyclic\n3. Increasing trend\n4. Decreasing trend\n5. Upward shift\n6. Downward shift\n\n**Past Usage** \nAlcock R.J. and Manolopoulos Y. Time-Series Similarity Queries Employing a Feature-Based Approach. 7th Hellenic Conference on\nInformatics. August 27-29. Ioannina,Greece 1999.\n\n**References and Further Information** \nD.T. Pham and A.B. Chan \"Control Chart Pattern Recognition using a New Type of Self Organizing Neural Network\" Proc. Instn, Mech, Engrs. Vol 212, No 1, pp 115-127 1998.\n\nReferences \n\n1. http://skyblue.csd.auth.gr/~rob/\n2. mailto:rob@skyblue.csd.auth.gr\n3. http://kdd.ics.uci.edu/\n4. http://www.ics.uci.edu/\n5. http://www.uci.edu/', 'ARFF', NULL, NULL, NULL, '2014-09-27 10:56:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52417/synthetic_control.arff', 'true', 39, 'class', 'index', NULL, NULL, 'public', NULL, NULL, 'set index feature', '2014-09-27 11:35:53'), -(40, 2, NULL, 'irish', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nIrish Educational Transitions Data\n\nBelow are shown data on educational transitions for a sample of 500\nIrish schoolchildren aged 11 in 1967. The data were collected by\nGreaney and Kelleghan (1984), and reanalyzed by Raftery and Hout (1985, 1993).\n\nThe data were also used, in a simplified form, as an example to illustrate\nBayesian model selection methods by Raftery (1988) and Kass and Raftery (1993).\nIn that simplified form, primary terminal leavers and cases with any missing\ndata were removed, leaving 441 cases. The Leaving Certificate variable\nwas used as the dependent variable in a logistic regression analysis.\n\nThe variables shown are as follows:\n\n1. Sex: 1=male; 2=female.\n\n2. DVRT (Drumcondra Verbal Reasoning Test Score).\n\n3. Educational level attained:\n1 Primary terminal leaver\n2 Junior cycle incomplete: vocational school\n3 Junior cycle incomplete: secondary school\n4 Junior cycle terminal leaver: vocational school\n5 Junior cycle terminal leaver: secondary school\n6 Senior cycle incomplete: vocational school\n7 Senior cycle incomplete: secondary school\n8 Senior cycle terminal leaver: vocational school\n9 Senior cycle terminal leaver: secondary school\n10 3rd level incomplete\n11 3rd level complete\n\n4. Leaving Certificate. 1 if Leaving Certificate not taken; 2 if taken.\n\n5. Prestige score for father\'s occupation\n(calculated by Raftery and Hout, 1985). 0 if missing.\n\n6. Type of school: 1=secondary; 2=vocational; 9=primary terminal leaver.\n\nREFERENCES\n\nGreaney, V. and Kelleghan, T. (1984). Equality of Opportunity in Irish\nSchools. Dublin: Educational Company.\n\nKass, R.E. and Raftery, A.E. (1993). Bayes factors and model uncertainty.\nTechnical Report no. 254, Department of Statistics, University of Washington.\nRevised version to appear in Journal of the American Statistical\nAssociation.\n\nRaftery, A.E. (1988). Approximate Bayes factors for generalized linear models.\nTechnical Report no. 121, Department of Statistics, University of Washington.\n\nRaftery, A.E. and Hout, M. (1985). Does Irish education approach the\nmeritocratic ideal? A logistic analysis.\nEconomic and Social Review, 16, 115-140.\n\nRaftery, A.E. and Hout, M. (1993). Maximally maintained inequality:\nExpansion, reform and opportunity in Irish schools.\nSociology of Education, 66, 41-62.\n\n\nOWNERSHIP STATEMENT\n\nThis data belongs to Vincent Greaney and Thomas Kelleghan,\nEducational Research Centre, St. Patrick\'s College, Drumcondra,\nDublin 9, Ireland, who retain the copyright.\n\nIn the form given here, it may be used solely as an example for research\non the development of statistical methods. For any other use of the data,\npermission must be obtained from the owners. Subject to this statement,\npermission is hereby given to StatLib to distribute this data freely.\n\nSubmitted by Adrian Raftery (raftery@stat.washington.edu).\n\nCopyright 1984 Vincent Greaney and Thomas Kelleghan.\n\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: 4', 'ARFF', NULL, NULL, NULL, '2014-09-28 23:50:51', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52563/irish.arff', 'true', 40, 'Leaving_Certificate', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:50:51'), -(41, 2, NULL, 'analcatdata_authorship', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nanalcatdata A collection of data sets used in the book \"Analyzing Categorical Data,\"\nby Jeffrey S. Simonoff, Springer-Verlag, New York, 2003. The submission\nconsists of a zip file containing two versions of each of 84 data sets,\nplus this README file. Each data set is given in comma-delimited ASCII\n(.csv) form, and Microsoft Excel (.xls) form.\n\nNOTICE: These data sets may be used freely for scientific, educational and/or\nnoncommercial purposes, provided suitable acknowledgment is given (by citing\nthe above-named reference).\n\nFurther details concerning the book, including information on statistical software\n(including sample S-PLUS/R and SAS code), are available at the web site\n\nhttp://www.stern.nyu.edu/~jsimonof/AnalCatData\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last\n\n\nNote: Quotes, Single-Quotes and Backslashes were removed, Blanks replaced\nwith Underscores', 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52570/analcatdata_authorship.arff', 'true', 41, 'Author', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:06'), -(42, 2, NULL, 'analcatdata_dmft', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nanalcatdata A collection of data sets used in the book \"Analyzing Categorical Data,\"\nby Jeffrey S. Simonoff, Springer-Verlag, New York, 2003. The submission\nconsists of a zip file containing two versions of each of 84 data sets,\nplus this README file. Each data set is given in comma-delimited ASCII\n(.csv) form, and Microsoft Excel (.xls) form.\n\nNOTICE: These data sets may be used freely for scientific, educational and/or\nnoncommercial purposes, provided suitable acknowledgment is given (by citing\nthe above-named reference).\n\nFurther details concerning the book, including information on statistical software\n(including sample S-PLUS/R and SAS code), are available at the web site\n\nhttp://www.stern.nyu.edu/~jsimonof/AnalCatData\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last\n\n\nNote: Quotes, Single-Quotes and Backslashes were removed, Blanks replaced\nwith Underscores', 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:25', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52581/analcatdata_dmft.arff', 'true', 42, 'Prevention', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:25'), -(43, 2, NULL, 'profb', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nPRO FOOTBALL SCORES (raw data appears after the description below)\n\nHow well do the oddsmakers of Las Vegas predict the outcome of\nprofessional football games? Is there really a home field advantage - if\nso how large is it? Are teams that play the Monday Night game at a\ndisadvantage when they play again the following Sunday? Do teams benefit\nfrom having a \"bye\" week off in the current schedule? These questions and\na host of others can be investigated using this data set.\n\nHal Stern from the Statistics Department at Harvard University has\nmade available his compilation of scores for all National Football League\ngames from the 1989, 1990, and 1991 seasons. Dr. Stern used these data as\npart of his presentation \"Who\'s Number One?\" in the special \"Best of\nBoston\" session at the 1992 Joint Statistics Meetings.\n\nSeveral variables in the data are keyed to the oddsmakers \"point\nspread\" for each game. The point spread is a value assigned before each\ngame to serve as a handicap for whichever is perceived to be the better\nteam. Thus, to win against the point spread, the \"favorite\" team must beat\nthe \"underdog\" team by more points than the spread. The underdog \"wins\"\nagainst the spread if it wins the game outright or manages to lose by fewer\npoints than the spread. In theory, the point spread should represent the\n\"expert\" prediction as to the game\'s outcome. In practice, it more usually\ndenotes a point at which an equal amount of money will be wagered both for\nand against the favored team.\n\nRaw data below contains 672 cases (all 224 regular season games in\neach season and informatino on the following 9 varialbes: .\n\nHome/Away = Favored team is at home (1) or away (0)\nFavorite Points = Points scored by the favored team\nUnderdog Points = Points scored by the underdog team\nPointspread = Oddsmaker\'s points to handicap the favored team\nFavorite Name = Code for favored team\'s name\nUnderdog name = Code for underdog\'s name\nYear = 89, 90, or 91\nWeek = 1, 2, ... 17\nSpecial = Mon.night (M), Sat. (S), Thur. (H), Sun. night (N)\not - denotes an overtime game\n\n\nData were submitted by: Robin Lock (rlock@stlawu.bitnet)\nMathematics Department, St. Lawrence University\n\nData were compiled by: Hal Stern, Dept. of Statistics, Harvard University\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: 1', 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52582/profb.arff', 'true', 43, 'Home/Away', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:27'), -(44, 2, NULL, 'collins', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nThe following are data used in an analysis of the Brown and Frown corpora for my doctoral dissertation titled ``Variations in Written English: Characterizing Authors\' Rhetorical Language Choices Across Corpora of Published Texts\" (Completed at Carnegie Mellon Univ, 2003). The source of the corpora was the ICAME CD-ROM (get info at ).\n\nThe data were generated from the texts using tagging and visualization software, Docuscope.\n\nThe first row is the variable names. The genre of each text (assigned by the Brown corpus compilers) is in \'Genre\' column and the corpus is listed in the \'corpus\' column with 1=Brown and 2=Frown corpus.\n\nThe dataset may be freely used and distributed for non-commercial purposes.\n\nJeff Collins 11 July 2003\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last', 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:43', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52590/collins.arff', 'true', 44, 'Corp.Genre', 'Counter', '\"Text\"', NULL, 'public', NULL, NULL, 'attribute counter is a row id', '2015-04-15 17:08:50'), -(45, 2, NULL, 'sylva_agnostic', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\nModified by TunedIT (converted to ARFF format)\n\n\nSYLVA is the ecology database\n\n\nThe task of SYLVA is to classify forest cover types. The forest cover type for 30 x 30 meter cells is obtained from US Forest Service (USFS) Region 2 Resource Information System (RIS) data. We brought it back to a two-class classification problem (classifying Ponderosa pine vs. everything else). The \"agnostic learning track\" data consists in 216 input variables. Each pattern is composed of 4 records: 2 true records matching the target and 2 records picked at random. Thus 1/2 of the features are distracters.\n\nData type: non-sparse\nNumber of features: 216\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 805 12281 13086 238271607.00\nValid 81 1228 1309 23817234.00\n\n\nThis dataset contains samples from both training and validation datasets.', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:55:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53919/sylva_agnostic.arff', 'true', 45, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:55:56'), -(46, 2, NULL, 'gina_agnostic', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\n\nModified by TunedIT (converted to ARFF format)\n\n\nGINA is digit recognition database\n\nThe task of GINA is handwritten digit recognition. For the \"agnostic learning track\" we chose the problem of separating two-digit odd numbers from two-digit even numbers. Only the unit digit is informative for that task, therefore at least 1/2 of the features are distracters. Additionally, the pixels that are almost always blank were removed and the pixel order was randomized to hide the feature identity. This is a two class classification problem with sparse continuous input variables, in which each class is composed of several clusters. It is a problem with heterogeneous classes.\n\nData type: non-sparse\nNumber of features: 970\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 1550 1603 3153 164947945.00\nValid 155 160 315 16688946.00\n\n\nThis dataset contains samples from both training and validation datasets.', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:56:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53921/gina_agnostic.arff', 'true', 46, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:56:01'), -(47, 2, NULL, 'ada_agnostic', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\n\nModified by TunedIT (converted to ARFF format)\n\n\nADA is the marketing database\n\nThe task of ADA is to discover high revenue people from census data. This is a two-class classification problem. The raw data from the census bureau is known as the Adult database in the UCI machine-learning repository. The 14 original attributes (features) include age, workclass, education,\nmarital status, occupation, native country, etc. It contains continuous, binary and categorical features. This dataset is from the \"agnostic learning track\", i.e. has access to a preprocessed numeric representation eliminating categorical variables, but the identity of the features is not revealed.\n\n\n\nData type: non-sparse\nNumber of features: 48\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 1029 3118 4147 6798109.00\nValid 103 312 415 681151.00\n\n\nThis dataset contains samples from both training and validation datasets.', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:56:15', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53926/ada_agnostic.arff', 'true', 47, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:56:15'), -(48, 2, NULL, 'mozilla4', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promisedata.org/repository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n(c) 2007 A. Gunes Koru\nContact: gkoru AT umbc DOT edu Phone: +1 (410) 455 8843\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\n1. Title: Recurrent event (defect fix) and size data for Mozilla Classes\nThis one includes a binary attribute (event) to show defect fix.\nThe data is at the \"observation\" level. Each modification made to\na C++ class was entered as an observation. A newly added class\ncreated an observation. The observation period was between\nMay 29, 2002 and Feb 22, 2006.\n\n2. Sources\n(a) Creator: A. Gunes Koru\n(b) Date: February 23, 2007\n(c) Contact: gkoru AT umbc DOT edu Phone: +1 (410) 455 8843\n\n3. Donor: A. Gunes Koru\n\n4. Past Usage: This data set was used for:\n\nA. Gunes Koru, Dongsong Zhang, and Hongfang Liu, \"Modeling the\nEffect of Size on Defect Proneness for Open-Source Software\",\nPredictive Models in Software Engineering Workshop, PROMISE 2007,\nMay 20th 2007, Minneapolis, Minnesota, US.\n\nAbstract:\nQuality is becoming increasingly important with the continuous\nadoption of open-source software. Previous research has found that\nthere is generally a positive relationship between module size and\ndefect proneness. Therefore, in open-source software development, it\nis important to monitor module size and understand its impact on\ndefect proneness. However, traditional approaches to quality\nmodeling, which measure specific system snapshots and obtain future\ndefect counts, are not well suited because open-source modules\nusually evolve and their size changes over time. In this study, we\nused Cox proportional hazards modeling with recurrent events to\nstudy the effect of class size on defect-proneness in the Mozilla\nproduct. We found that the effect of size was significant, and we\nquantified this effect on defect proneness.\n\nThe full paper can be downloaded from A. Gunes Koru\'s Website\nhttp://umbc.edu/~gkoru\nby following the Publications link or from the Web site of PROMISE 2007.\n\n5. Features:\n\nThis data set is used to create a conditional Cox Proportional\nHazards Model\n\nid: A numeric identification assigned to each separate C++ class\n(Note that the id\'s do not increment from the first to the last\ndata row)\n\nstart: A time infinitesimally greater than the time of the modification\nthat created this observation (practically, modification time). When a\nclass is introduced to a system, a new observation is entered with start=0\n\nend: Either the time of the next modification, or the end of the\nobservation period, or the time of deletion, whichever comes first.\n\nevent: event is set to 1 if a defect fix takes place\nat the time represented by \'end\', or 0 otherwise. A class deletion\nis handled easily by entering a final observation whose event is set\nto 1 if the class is deleted for corrective maintenance, or 0 otherwise.\n\nsize: It is a time-dependent covariate and its column carries the\nnumber of source Lines of Code of the C++ classes\nat time \'start\'. Blank and comment lines are not counted.\n\nstate: Initially set to 0, and it becomes 1 after the class\nexperiences an event, and remains at 1 thereafter.', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53929/mozilla4.arff', 'true', 48, 'state', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:07'), -(49, 2, NULL, 'pc4', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE data set made publicly available in order to encourage\nrepeatable, verifiable, refutable, and/or improvable predictive models\nof software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC4/ defect prediction\n\n(c) 2007 : Tim Menzies : tim@menzies.us\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\nFor more deatils on this data set, see\nhttp://promisedata.org/repository/data/kc2/kc2.arff', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53932/pc4.arff', 'true', 49, 'c', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:12'), -(50, 2, NULL, 'pc3', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE data set made publicly available in order to encourage\nrepeatable, verifiable, refutable, and/or improvable predictive models\nof software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC3/software defect prediction\n\n(c) 2007 : Tim Menzies : tim@menzies.us\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\nFor more deatils on this data set, see\nhttp://promisedata.org/repository/data/kc2/kc2.arff', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:13', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53933/pc3.arff', 'true', 50, 'c', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:13'), -(51, 2, NULL, 'jm1', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nThis is a PROMISE data set made publicly available in order to encourage repeatable, verifiable, refutable, and/or improvable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please follow the acknowledgment guidelines posted on [the PROMISE repository web page](http://promise.site.uottawa.ca/SERepository).\n\n## Title/Topic\nJM1/software defect prediction\n\n\n## Sources\n* **Creators:** NASA, then the NASA Metrics Data Program, http://mdp.ivv.nasa.gov. \n* **Contacts:** \n * Mike Chapman, Galaxy Global Corporation (Robert.Chapman@ivv.nasa.gov) +1-304-367-8341\n * Pat Callis, NASA, NASA project manager for MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n* **Donor:** Tim Menzies (tim@barmag.net)\n\n* **Date:** December 2nd, 2004\n\n## Past usage\n**_How Good is Your Blind Spot Sampling Policy?_; 2003; Tim Menzies and Justin S. Di Stefano; 2004 IEEE Conference on High Assurance Software Engineering (http://menzies.us/pdf/03blind.pdf).**\n\n### Results:\n* Very simple learners (ROCKY) perform as well in this domain as more sophisticated methods (e.g. J48, model trees, model trees) for predicting detects\n* Many learners have very low false alarm rates.\n* Probability of detection (PD) rises with effort and rarely rises above it.\n* High PDs are associated with high PFs (probability of failure)\n* PD, PF, effort can change significantly while accuracy remains essentially stable\n* With two notable exceptions, detectors learned from one data set (e.g. KC2) have nearly they same properties when applied to another (e.g. PC2, KC2). Exceptions:\n* LinesOfCode measures generate wider inter-data-set variances;\n* Precision\'s inter-data-set variances vary wildly\n\n**_\"Assessing Predictors of Software Defects\"_, T. Menzies and J. DiStefano and A. Orrego and R. Chapman, 2004,**\n**Proceedings, workshop on Predictive Software Models, Chicago, Available from http://menzies.us/pdf/04psm.pdf.**\n\n### Results:\n* From JM1, Naive Bayes generated PDs of 25% with PF of 20%\n* Naive Bayes out-performs J48 for defect detection\n* When learning on more and more data, little improvement is seen after processing 300 examples.\n* PDs are much higher from data collected below the sub-sub-system level.\n* Accuracy is a surprisingly uninformative measure of success for a defect detector. Two detectors with the same accuracy can have widely varying PDs and PFs.\n\n## Relevant information\n* JM1 is written in \"C\" and is a real-time predictive ground system: Uses simulations to generate predictions\n* Data comes from McCabe and Halstead features extractors of source code. These features were defined in the 70s in an attempt to objectively characterize code features that are associated with software quality. The nature of association is under dispute.\n\nNotes on McCabe and Halstead follow.\n\n* The McCabe and Halstead measures are \"module\"-based where a \"module\" is the smallest unit of functionality. In C or Smalltalk, \"modules\" would be called \"function\" or \"method\" respectively.\n\n* Defect detectors can be assessed according to the following measures:\n\n module actually has defects\n +-------------+------------+\n | no | yes |\n +-----+-------------+------------+\n classifier predicts no defects | no | a | b |\n +-----+-------------+------------+\n classifier predicts some defects | yes | c | d |\n +-----+-------------+------------+\n\n\n accuracy = acc = (a+d)/(a+b+c+d\n probability of detection = pd = recall = d/(b+d)\n probability of false alarm = pf = c/(a+c)\n precision = prec = d/(c+d)\n effort = amount of code selected by detector = (c.LOC + d.LOC)/(Total LOC)\n\n\nIdeally, detectors have high PDs, low PFs, and low effort. This ideal state rarely happens:\n\n* PD and effort are linked. The more modules that trigger the detector, the higher the PD. However, effort also gets increases\n* High PD or low PF comes at the cost of high PF or low PD (respectively). This linkage can be seen in a standard receiver operator curve (ROC). Suppose, for example, LOC> x is used as the detector (i.e. we assume large modules have more errors). LOC > x represents a family of detectors. At x=0, EVERY module is predicted to have errors. This detector has a high PD but also a high false alarm rate. At x=0, NO module is predicted to have errors. This detector has a low false alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n* The line pf=pd on the above graph represents the \"no information\" line. If pf=pd then the detector is pretty useless. The better the detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more error-prone. His metrics therefore reflect the pathways within a code module.\n\n @Article{mccabe76,\n title = \"A Complexity Measure\",\n author = \"T.J. McCabe\",\n pages = \"308--320\",\n journal = \"IEEE Transactions on Software Engineering\",\n year = \"1976\",\n volume = \"2\",\n month = \"December\",\n number = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be fault prone. Halstead estimates reading complexity by counting the number of concepts in a module; e.g. number of unique operators.\n\n @Book{halstead77,\n Author = \"M.H. Halstead\",\n Title = \"Elements of Software Science\",\n Publisher = \"Elsevier \",\n Year = 1977}\n\nWe study these static code measures since they are useful, easy to use, and widely used:\n\n* USEFUL: E.g. this data set can generate highly accurate predictors for defects\n* EASY TO USE: Static code measures (e.g. lines of code, the McCabe/Halstead measures) can be automatically and cheaply collected.\n* WIDELY USED: Many researchers use static measures to guide software quality predictions (see the reference list in the above \"blind spot\" paper. Verification and validation (V\\&V) textbooks advise using static code complexity measures to decide which modules are worthy of manual inspections. Further, we know of several large government software contractors that won\'t review software modules _unless_ tools like McCabe predict that they are fault prone. Hence, defect detectors have a major economic impact when they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely criticized. Static code measures are hardly a complete characterization of the internals of a function. Fenton offers an insightful example where the same functionality is achieved using different programming language constructs resulting in different static measurements for that module. Fenton uses this example to argue the uselessness of static code measures.\n\n @Book{fenton97,\n author = \"N.E. Fenton and S.L. Pfleeger\",\n title = {Software metrics: a Rigorous \\& Practical Approach},\n publisher = {International Thompson Press},\n year = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static measures can never be a definite and certain indicator of the presence of a fault. Rather, defect detectors based on static measures are best viewed as probabilistic statements that the frequency of faults tends to increase in code modules that trigger the detector. By definition, such probabilistic statements will are not categorical claims with some a non-zero false alarm rate. The research challenge for data miners is to ensure that these false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics: essential complexity, cyclomatic complexity, design complexity and LOC, Lines of Code.\n\n* Cyclomatic Complexity, or \"v(G)\", measures the number of \"linearly independent paths\". A set of paths is said to be linearly independent if no path in the set is a linear combination of any other paths in the set through a program\'s \"flowgraph\". A flowgraph is a directed graph where each node corresponds to a program statement, and each arc indicates the flow of control from one statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\" where \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in the flowgraph, and \"n\" is the number of nodes in the flowgraph. The standard McCabes rules (\"v(G)\">10), are used to identify fault-prone module.\n* Essential Complexity, or \"ev(G)$\" is the extent to which a flowgraph can be \"reduced\" by decomposing all the subflowgraphs of $G$ that are \"D-structured primes\". Such \"D-structured primes\" are also sometimes referred to as \"proper one-entry one-exit subflowgraphs\" (for a more thorough discussion of D-primes, see the Fenton text referenced above). \"ev(G)\" is calculated using \"ev(G)= v(G) - m\" where $m$ is the number of subflowgraphs of \"G\" that are D-structured primes.\n* Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a module\'s reduced flowgraph. The flowgraph, \"G\", of a module is reduced to eliminate any complexity which does not influence the interrelationship between design modules. According to McCabe, this complexity measurement reflects the modules calling patterns to its immediate subordinate modules.\n* Lines of code is measured according to McCabe\'s line counting conventions.\n\nThe Halstead falls into three groups: the base measures, the derived measures, and lines of code measures.\n\n* Base measures:\n * mu1 = number of unique operators\n * mu2 = number of unique operands\n * N1 = total occurrences of operators\n * N2 = total occurrences of operands\n * length = N = N1 + N2\n * vocabulary = mu = mu1 + mu2\n * Constants set for each function:\n * mu1\' = 2 = potential operator count (just the function name and the \"return\" operator)\n * mu2\' = potential operand count. (the number of arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\" operators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y), \"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique operands (w,x,y).\n\n* Derived measures:\n * P = volume = V = N * log2(mu) (the number of mental comparisons needed to write\na program of length N)\n * V* = volume on minimal implementation = (2 + mu2\')*log2(2 + mu2\')\n * L = program length = V*/N\n * D = difficulty = 1/L\n * L\' = 1/D\n * I = intelligence = L\'*V\'\n * E = effort to write program = V/L\n * T = time to write program = E/18 seconds\n\n## Number of instances\n10885\n\n## Number of attributes\n22 (5 different lines of code measure, 3 McCabe metrics, 4 base Halstead measures, 8 derived Halstead measures, a branch-count, and 1 goal field)\n\n## Attribute Information\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. defects : {false,true} % module has/has not one or more reported defects\n\n## Missing attributes\nNone\n\n## Class Distribution\nThe class value (defects) is discrete\nfalse: 2106 = 19.35%\ntrue: 8779 = 80.65%', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:19', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53936/jm1.arff', 'true', 51, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:19'), -(52, 2, NULL, 'kc2', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: KC2/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From KC2, Naive Bayes generated PDs of 50% with PF of 10%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n-- Data from C++ functions. Science data processing; another part\nof the same project as KC1; different personnel than KC1. Shared\nsome third-party software libraries with KC1, but no other software\noverlap.\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 522\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. problems : {no,yes}% module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (problems) is discrete\nyes: 105 = 20.5%\nno: 415 = 79.5%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:36', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53946/kc2.arff', 'true', 52, 'problems', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:36'), -(53, 2, NULL, 'kc1', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: KC1/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From KC2, Naive Bayes generated PDs of 45% with PF of 10%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n\n-- KC1 is a \"C++\" system implementing storage management for\nreceiving and processing ground data\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 2109\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. problems : {false,true}% module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (problems) is discrete\nyes: 326 = 15.45%\nno: 1783 = 84.54%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:43', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53950/kc1.arff', 'true', 53, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:43'), -(54, 2, NULL, 'pc1', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC1/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From JM1, Naive Bayes generated PDs of 20% with PF of 25%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n-- Data from C functions. flight software\nfor earth orbiting satellite.\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 1109\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. defects : {false,true} % module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (defects) is discrete\nfalse: 77 = 6.94%\ntrue: 1032 = 93.05%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:45', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53951/pc1.arff', 'true', 54, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:45'), -(55, 2, NULL, 'KDDCup09_churn', '1', NULL, '**Author**: Orange Telecom \n**Source**: [ACM KDD Cup](http://www.sigkdd.org/kddcup/index.php) - 2009 \n**Please cite**: \n\nThe KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict the propensity of customers to switch provider (churn). \n\nChurn (wikipedia definition): Churn rate is also sometimes called attrition rate. It is one of two primary factors that determine\nthe steady-state level of customers a business will support. In its broadest sense, churn rate is a measure of the number\nof individuals or items moving into or out of a collection over a specific period of time.\n\nThe term is used in many contexts, but is most widely applied in business with respect to a contractual customer base. For instance, it is an important factor for any business with a subscriber-based service model, including mobile telephone networks and pay TV operators. The term is also used to refer to participant turnover in peer-to-peer networks.\n\nThe training set contains 50,000 examples.\nThe first predictive 190 variables are numerical and the last 40 predictive variables are categorical.\nThe last target variable is binary {-1,1}.', 'ARFF', NULL, NULL, NULL, '2014-10-07 00:08:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53995/KDDCup09_churn.arff', 'true', 55, 'CHURN', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-07 00:08:02'), -(56, 2, NULL, 'KDDCup09_upselling', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from ACM KDD Cup (http://www.sigkdd.org/kddcup/index.php)\n\nKDD Cup 2009\nhttp://www.kddcup-orange.com\n\nConverted to ARFF format by TunedIT\nCustomer Relationship Management (CRM) is a key element of modern marketing strategies. The KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict the propensity of customers to switch provider (churn), buy new products or services (appetency), or buy upgrades or add-ons proposed to them to make the sale more profitable (up-selling).\nThe most practical way, in a CRM system, to build knowledge on customer is to produce scores. A score (the output of a model) is an evaluation for all instances of a target variable to explain (i.e. churn, appetency or up-selling). Tools which produce scores allow to project, on a given population, quantifiable information. The score is computed using input variables which describe instances. Scores are then used by the information system (IS), for example, to personalize the customer relationship. An industrial customer analysis platform able to build prediction models with a very large number of input variables has been developed by Orange Labs. This platform implements several processing methods for instances and variables selection, prediction and indexation based on an efficient model combined with variable selection regularization and model averaging method. The main characteristic of this platform is its ability to scale on very large datasets with hundreds of thousands of instances and thousands of variables. The rapid and robust detection of the variables that have most contributed to the output prediction can be a key factor in a marketing application.\nUp-selling (wikipedia definition): Up-selling is a sales technique whereby a salesman attempts to have the customer purchase more expensive\nitems, upgrades, or other add-ons in an attempt to make a more profitable sale.\nUp-selling usually involves marketing more profitable services or products, but up-selling can also be simply exposing the customer\nto other options he or she may not have considered previously.\nUp-selling can imply selling something additional, or selling something that is more profitable or otherwise preferable for the seller instead of the original sale.\nThe training set contains 50,000 examples.\nThe first predictive 190 variables are numerical and the last 40 predictive variables are categorical.\nThe last target variable is binary {-1,1}.', 'ARFF', NULL, NULL, NULL, '2014-10-07 00:08:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53997/KDDCup09_upselling.arff', 'true', 56, 'UPSELLING', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-07 00:08:27'), -(57, 2, NULL, 'musk', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDataset from the MLRR repository: http://axon.cs.byu.edu:5000/', 'ARFF', NULL, NULL, NULL, '2014-10-07 00:41:54', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53999/musk.arff', 'true', 57, 'class', 'ID', '\"conformation_name\"', NULL, 'public', NULL, NULL, 'ID is a row id', '2015-04-15 17:37:23'), -(58, 2, NULL, 'MagicTelescope', '1', NULL, '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDataset from the MLRR repository: http://axon.cs.byu.edu:5000/', 'ARFF', NULL, NULL, NULL, '2014-10-07 00:42:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/54003/MagicTelescope.arff', 'true', 58, 'class:', 'ID', NULL, NULL, 'public', NULL, NULL, 'ID is a row id', '2015-04-15 17:41:20'), -(59, 2, NULL, 'Internet-Advertisements', '1', NULL, '**Author**: Nicholas Kushmerick \n**Source**: [UCI](http://archive.ics.uci.edu/ml/datasets/Internet+Advertisements) - 1998 \n**Please cite**: \n\nThis dataset represents a set of possible advertisements on Internet pages. The features encode the geometry of the image (if available) as well as phrases occurring in the URL, the image\'s URL and alt text, the anchor text, and words occurring near the anchor text. The task is to predict whether an image is an advertisement (\"ad\") or not (\"nonad\").\n\nRelevant Papers: N. Kushmerick (1999). \"Learning to remove Internet advertisements\", 3rd Int Conf Autonomous Agents. \nAvailable at: http://rexa.info/paper/2fdc1cee89b7f4f2c9227d6f5d9b05d22c5ab3e9', 'ARFF', '\"Nicholas Kushmerick\"', NULL, NULL, '2014-10-30 11:15:44', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/116567/phpCzcrGG', 'true', 59, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-30 11:15:44'), -(60, 2, NULL, 'Click_prediction_small', '5', NULL, '**Author**: Tencent Inc. \n**Source**: [KDD Cup](https://www.kddcup2012.org/) - 2012 \n**Please cite**: \n\n**0.1% balanced subsample of the original KDD dataset** \n\nThis data is derived from the 2012 KDD Cup. The data is subsampled to 0.1% of the original number of instances, downsampling the majority class (click=0) so that the target feature is reasonably balanced (5 to 1).\n\nThe data is about advertisements shown alongside search results in a search engine, and whether or not people clicked on these ads. \nThe task is to build the best possible model to predict whether a user will click on a given ad.\n\nA search session contains information on user id, the query issued by the user, ads displayed to the user, and target feature indicating whether a user clicked at least one of the ads in this session. The number of ads displayed to a user in a session is called ‘depth’. The order of an ad in the displayed list is called ‘position’. An ad is displayed as a short text called ‘title’, followed by a slightly longer text called ’description’, and a URL called ‘display URL’. \nTo construct this dataset each session was split into multiple instances. Each instance describes an ad displayed under a certain setting (‘depth’, ‘position’). Instances with the same user id, ad id, query, and setting are merged. Each ad and each user have some additional properties located in separate data files that can be looked up using ids in the instances.\n\nThe dataset has the following features: \n* Click – binary variable indicating whether a user clicked on at least one ad. \n* Impression - the number of search sessions in which AdID was impressed by UserID who issued Query.\n* Url_hash - URL is hashed for anonymity\n* AdID \n* AdvertiserID - some advertisers consistently optimize their ads, so the title and description of their ads are more attractive than those of others’ ads.\n* Depth - number of ads displayed to a user in a session\n* Position - order of an ad in the displayed list\n* QueryID - is the key of the data file \'queryid_tokensid.txt\'. (follow the link to the original KDD Cup page, track 2)\n* KeywordID - is the key of \'purchasedkeyword_tokensid.txt\' (follow the link to the original KDD Cup page, track 2)\n* TitleID - is the key of \'titleid_tokensid.txt\'\n* DescriptionID - is the key of \'descriptionid_tokensid.txt\' (follow the link to the original KDD Cup page, track 2)\n* UserID – is also the key of \'userid_profile.txt\' (follow the link to the original KDD Cup page, track 2). 0 is a special value denoting that the user could be identified.', 'ARFF', NULL, NULL, NULL, '2014-11-27 01:18:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/184157/phpfGCaQC', 'true', 60, 'click', NULL, '\"url_hash\",\"query_id\"', NULL, 'public', NULL, NULL, NULL, '2014-11-27 01:26:36'), -(61, 64, NULL, 'artificial-characters', '1', NULL, '**Author**: H. Altay Guvenir, Burak Acar, Haldun Muderrisoglu \n\n**Source**: UCI\n\n**Please cite**: \n\nDataset artificially generated by using first order theory which describes structure of ten capital letters of English alphabet', 'ARFF', NULL, NULL, NULL, '2015-05-21 20:58:53', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586212/phpPQrHPH', 'true', 61, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 20:58:53'), -(62, 64, NULL, 'bank-marketing', '1', NULL, '**Author**: Paulo Cortez, Sérgio Moro \n**Source**: UCI \n**Please cite**: S. Moro, R. Laureano and P. Cortez. Using Data Mining for Bank Direct Marketing: An Application of the CRISP-DM Methodology. In P. Novais et al. (Eds.), Proceedings of the European Simulation and Modelling Conference - ESM\'2011, pp. 117-121, Guimarães, Portugal, October, 2011. EUROSIS. \n\nAvailable at: [pdf] http://hdl.handle.net/1822/14838\n [bib] http://www3.dsi.uminho.pt/pcortez/bib/2011-esm-1.txt\n \n1. Title: Bank Marketing\n \n2. Sources\n Created by: Paulo Cortez (Univ. Minho) and Sérgio Moro (ISCTE-IUL) @ 2012\n \n3. Past Usage:\n \n The full dataset was described and analyzed in:\n \n S. Moro, R. Laureano and P. Cortez. Using Data Mining for Bank Direct Marketing: An Application of the CRISP-DM Methodology. In P. Novais et al. (Eds.), Proceedings of the European Simulation and Modelling Conference - ESM\'2011, pp. 117-121, Guimarães, Portugal, October, 2011. EUROSIS.\n\n4. Relevant Information:\n\nThe data is related with direct marketing campaigns of a Portuguese banking institution. The marketing campaigns were based on phone calls. Often, more than one contact to the same client was required, in order to access if the product (bank term deposit) would be (or not) subscribed. \n\nThe classification goal is to predict if the client will subscribe a term deposit (variable y).\n\n5. Attribute information:\n \nFor more information, read [Moro et al., 2011].\n\nInput variables:\n# bank client data:\n1 - age (numeric)\n2 - job : type of job (categorical: \"admin.\",\"unknown\",\"unemployed\",\"management\",\"housemaid\",\"entrepreneur\", \"student\",\"blue-collar\",\"self-employed\",\"retired\",\"technician\",\"services\") \n3 - marital : marital status (categorical: \"married\",\"divorced\",\"single\"; note: \"divorced\" means divorced or widowed)\n4 - education (categorical: \"unknown\",\"secondary\",\"primary\",\"tertiary\")\n5 - default: has credit in default? (binary: \"yes\",\"no\")\n6 - balance: average yearly balance, in euros (numeric) \n7 - housing: has housing loan? (binary: \"yes\",\"no\")\n8 - loan: has personal loan? (binary: \"yes\",\"no\")\n# related with the last contact of the current campaign:\n9 - contact: contact communication type (categorical: \"unknown\",\"telephone\",\"cellular\") \n10 - day: last contact day of the month (numeric)\n11 - month: last contact month of year (categorical: \"jan\", \"feb\", \"mar\", ..., \"nov\", \"dec\")\n12 - duration: last contact duration, in seconds (numeric)\n# other attributes:\n13 - campaign: number of contacts performed during this campaign and for this client (numeric, includes last contact)\n14 - pdays: number of days that passed by after the client was last contacted from a previous campaign (numeric, -1 means client was not previously contacted)\n15 - previous: number of contacts performed before this campaign and for this client (numeric)\n16 - poutcome: outcome of the previous marketing campaign (categorical: \"unknown\",\"other\",\"failure\",\"success\")\n \nOutput variable (desired target):\n17 - y - has the client subscribed a term deposit? (binary: \"yes\",\"no\")\n', 'ARFF', NULL, NULL, NULL, '2015-05-21 22:16:49', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586218/phpkIxskf', 'true', 62, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 22:16:49'), -(63, 64, NULL, 'banknote-authentication', '1', NULL, '**Author**: Volker Lohweg \n**Source**: UCI\n**Please cite**: \n\nSource:\n\nOwner of database: Volker Lohweg (University of Applied Sciences, Ostwestfalen-Lippe, volker.lohweg \'@\' hs-owl.de) \n\nDonor of database: Helene Doerksen (University of Applied Sciences, Ostwestfalen-Lippe, helene.doerksen \'@\' hs-owl.de) . Date received: August, 2012 \n\nData Set Information:\n \nData were extracted from images that were taken from genuine and forged banknote-like specimens. For digitization, an industrial camera usually used for print inspection was used. The final images have 400x 400 pixels. Due to the object lens and distance to the investigated object gray-scale pictures with a resolution of about 660 dpi were gained. Wavelet Transform tool were used to extract features from images.\n\nAttribute Information:\n \n1. variance of Wavelet Transformed image (continuous) \n2. skewness of Wavelet Transformed image (continuous) \n3. curtosis of Wavelet Transformed image (continuous) \n4. entropy of image (continuous) \n5. class (integer)', 'ARFF', '\"Volker Lohweg\"', NULL, NULL, '2015-05-21 22:40:57', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586223/php50jXam', 'true', 63, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-01-18 18:45:44'), -(64, 64, NULL, 'blood-transfusion-service-center', '1', NULL, '**Author**: Prof. I-Cheng Yeh \n**Source**: UCI\n**Please cite**: Yeh, I-Cheng, Yang, King-Jang, and Ting, Tao-Ming, \"Knowledge discovery on RFM model using Bernoulli sequence, \"Expert Systems with Applications, 2008 (doi:10.1016/j.eswa.2008.07.018). \n\nTitle: Blood Transfusion Service Center Data Set\n\nAbstract: Data taken from the Blood Transfusion Service Center in Hsin-Chu City in Taiwan -- this is a classification problem.\n\n-----------------------------------------------------\nDate Donated: 2008-10-03\n-----------------------------------------------------\n \nSource:\n \nOriginal Owner and Donor\nProf. I-Cheng Yeh, Department of Information Management, Chung-Hua University, Hsin Chu, Taiwan 30067, R.O.C.\ne-mail:icyeh \'at\' chu.edu.tw, TEL:886-3-5186511\nDate Donated: October 3, 2008 \n\n-----------------------------------------------------\n \nData Set Information:\n \nTo demonstrate the RFMTC marketing model (a modified version of RFM), this study adopted the donor database of Blood Transfusion Service Center in Hsin-Chu City in Taiwan. The center passes their blood transfusion service bus to one university in Hsin-Chu City to gather blood donated about every three months. To build a FRMTC model, we selected 748 donors at random from the donor database. These 748 donor data, each one included R (Recency - months since last donation), F (Frequency - total number of donation), M (Monetary - total blood donated in c.c.), T (Time - months since first donation), and a binary variable representing whether he/she donated blood in March 2007 (1 stand for donating blood; 0 stands for not donating blood).\n\n-----------------------------------------------------\n \nAttribute Information:\n \nGiven is the variable name, variable type, the measurement unit and a brief description. The \"Blood Transfusion Service Center\" is a classification problem. The order of this listing corresponds to the order of numerals along the rows of the database.\n\nR (Recency - months since last donation),\nF (Frequency - total number of donation),\nM (Monetary - total blood donated in c.c.),\nT (Time - months since first donation), and a binary variable representing whether he/she donated blood in March 2007 (1 stand for donating blood; 0 stands for not donating blood).\n \nCitation Request:\n \nNOTE: Reuse of this database is unlimited with retention of copyright notice for Prof. I-Cheng Yeh and the following published paper:\n\nYeh, I-Cheng, Yang, King-Jang, and Ting, Tao-Ming, \"Knowledge discovery on RFM model using Bernoulli sequence, \"Expert Systems with Applications, 2008 (doi:10.1016/j.eswa.2008.07.018).', 'ARFF', NULL, NULL, NULL, '2015-05-21 22:49:48', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586225/php0iVrYT', 'true', 64, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 21:02:59'), -(65, 64, NULL, 'cardiotocography', '1', NULL, '**Author**: J. P. Marques de Sá, J. Bernardes, D. Ayers de Campos. \n**Source**: UCI \n**Please cite**: \n\n* Source:\n\nMarques de Sá, J.P., jpmdesa \'@\' gmail.com, Biomedical Engineering Institute, Porto, Portugal. \nBernardes, J., joaobern \'@\' med.up.pt, Faculty of Medicine, University of Porto, Portugal. \nAyres de Campos, D., sisporto \'@\' med.up.pt, Faculty of Medicine, University of Porto, Portugal.\n\n\n* Data Set Information:\n\n2126 fetal cardiotocograms (CTGs) were automatically processed and the respective diagnostic features measured. The CTGs were also classified by three expert obstetricians and a consensus classification label assigned to each of them. Classification was both with respect to a morphologic pattern (A, B, C. ...) and to a fetal state (N, S, P). Therefore the dataset can be used either for 10-class or 3-class experiments.\n\n\n* Attribute Information:\n\nLB - FHR baseline (beats per minute) \nAC - # of accelerations per second \nFM - # of fetal movements per second \nUC - # of uterine contractions per second \nDL - # of light decelerations per second \nDS - # of severe decelerations per second \nDP - # of prolongued decelerations per second \nASTV - percentage of time with abnormal short term variability \nMSTV - mean value of short term variability \nALTV - percentage of time with abnormal long term variability \nMLTV - mean value of long term variability \nWidth - width of FHR histogram \nMin - minimum of FHR histogram \nMax - Maximum of FHR histogram \nNmax - # of histogram peaks \nNzeros - # of histogram zeros \nMode - histogram mode \nMean - histogram mean \nMedian - histogram median \nVariance - histogram variance \nTendency - histogram tendency \nCLASS - FHR pattern class code (1 to 10) \nNSP - fetal state class code (N=normal; S=suspect; P=pathologic)\n\n\n* Relevant Papers:\n\nAyres de Campos et al. (2000) SisPorto 2.0 A Program for Automated Analysis of Cardiotocograms. J Matern Fetal Med 5:311-318 ', 'ARFF', NULL, NULL, NULL, '2015-05-21 23:05:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586231/php9HX2u8', 'true', 65, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:49:14'), -(66, 64, NULL, 'climate-model-simulation-crashes', '1', NULL, '**Author**: \n**Source**: UCI\n\n**Please cite**: \n\nSource:\n\nD. Lucas (ddlucas .at. alum.mit.edu), Lawrence Livermore National Laboratory; R. Klein (rklein .at. astron.berkeley.edu), Lawrence Livermore National Laboratory & U.C. Berkeley; J. Tannahill (tannahill1 .at. llnl.gov), Lawrence Livermore National Laboratory; D. Ivanova (ivanova2 .at. llnl.gov), Lawrence Livermore National Laboratory; S. Brandon (brandon1 .at. llnl.gov), Lawrence Livermore National Laboratory; D. Domyancic (domyancic1 .at. llnl.gov), Lawrence Livermore National Laboratory; Y. Zhang (zhang24 .at. llnl.gov), Lawrence Livermore National Laboratory .\n\nThis data was constructed using LLNL\'s UQ Pipeline, was created under the auspices of the US Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344, was funded by LLNL\'s Uncertainty Quantification Strategic Initiative Laboratory Directed Research and Development Project under tracking code 10-SI-013, and is released under UCRL number LLNL-MISC-633994.\n\n\nData Set Information:\n\nThis dataset contains records of simulation crashes encountered during climate model uncertainty quantification (UQ) ensembles. Ensemble members were constructed using a Latin hypercube method in LLNL\'s UQ Pipeline software system to sample the uncertainties of 18 model parameters within the Parallel Ocean Program (POP2) component of the Community Climate System Model (CCSM4). Three separate Latin hypercube ensembles were conducted, each containing 180 ensemble members. 46 out of the 540 simulations failed for numerical reasons at combinations of parameter values. The goal is to use classification to predict simulation outcomes (fail or succeed) from input parameter values, and to use sensitivity analysis and feature selection to determine the causes of simulation crashes. Further details about the data and methods are given in the publication \'Failure Analysis of Parameter-Induced Simulation Crashes in Climate Models,\' Geoscientific Model Development ([Web Link]).\n\n\nAttribute Information:\n\nThe goal is to predict climate model simulation outcomes (column 21, fail or succeed) given scaled values of climate model input parameters (columns 3-20). \n\nColumn 1: Latin hypercube study ID (study 1 to study 3) \nColumn 2: simulation ID (run 1 to run 180) \nColumns 3-20: values of 18 climate model parameters scaled in the interval [0, 1] \nColumn 21: simulation outcome (0 = failure, 1 = success)\n\nRelevant Papers:\n\nLucas, D. D., Klein, R., Tannahill, J., Ivanova, D., Brandon, S., Domyancic, D., and Zhang, Y.: Failure analysis of parameter-induced simulation crashes in climate models, Geosci. Model Dev. Discuss., 6, 585-623, [Web Link], 2013.', 'ARFF', NULL, NULL, NULL, '2015-05-21 23:11:45', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586232/phpXeun7q', 'true', 66, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:49:00'), -(67, 64, NULL, 'cnae-9', '1', NULL, '**Author**: Patrick Marques Ciarelli, Elias Oliviera \n**Source**: UCI\n\n**Please cite**: \n\nSource:\n\nPatrick Marques Ciarelli, pciarelli \'@\' lcad.inf.ufes.br, Department of Electrical Engineering, Federal University of Espirito Santo \nElias Oliveira, elias \'@\' lcad.inf.ufes.br, Department of Information Science, Federal University of Espirito Santo\n\n\nData Set Information:\n\nThis is a data set containing 1080 documents of free text business descriptions of Brazilian companies categorized into a \nsubset of 9 categories cataloged in a table called National Classification of Economic Activities (Classificação Nacional de \nAtividade Econômicas - CNAE). The original texts were pre-processed to obtain the current data set: initially, it was kept only \nletters and then it was removed prepositions of the texts. Next, the words were transformed to their canonical form. Finally, \neach document was represented as a vector, where the weight of each word is its frequency in the document. This data set is \nhighly sparse (99.22% of the matrix is filled with zeros).\n\n\nAttribute Information:\n\nIn the data set there are 857 attributes, 1 attributes with the class of instance and 856 with word frequency: \n1. category: range 1 - 9 (integer) \n2 - 857. word frequency: (integer)\n\n\nRelevant Papers:\n\nPatrick Marques Ciarelli, Elias Oliveira, \'Agglomeration and Elimination of Terms for Dimensionality Reduction\', \nNinth International Conference on Intelligent Systems Design and Applications, pp.547-552, 2009 \n\nPatrick Marques Ciarelli, Elias Oliveira, Evandro O. T. Salles, \'An Evolving System Based on Probabilistic Neural Network\', \nBrazilian Symposium on Artificial Neural Network, 2010', 'ARFF', NULL, NULL, NULL, '2015-05-21 23:19:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586233/phpmcGu2X', 'true', 67, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 23:19:32'), -(68, 64, NULL, 'eeg-eye-state', '1', NULL, '**Author**: Oliver Roesler, it12148\'@\'lehre.dhbw-stuttgart.de \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/EEG+Eye+State), Baden-Wuerttemberg, Cooperative State University (DHBW), Stuttgart, Germany \n**Please cite**: \n\nAll data is from one continuous EEG measurement with the Emotiv EEG Neuroheadset. The duration of the measurement was 117 seconds. The eye state was detected via a camera during the EEG measurement and added later manually to the file after analysing the video frames. \'1\' indicates the eye-closed and \'0\' the eye-open state. All values are in chronological order with the first measured value at the top of the data.\n', 'ARFF', NULL, NULL, NULL, '2015-05-22 16:40:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1587924/phplE7q6h', 'true', 68, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:42:10'), -(69, 64, NULL, 'first-order-theorem-proving', '1', NULL, '**Author**: James P Bridge, Sean B Holden and Lawrence C Paulson \n \n**Source**: UCI \n\n**Please cite**: James P Bridge, Sean B Holden and Lawrence C Paulson . Machine learning for first-order theorem proving: learning to select a good heuristic. Journal of Automated Reasoning, Springer 2012/13. \n\nSource:\n\nJames P Bridge, Sean B Holden and Lawrence C Paulson \n\nUniversity of Cambridge \nComputer Laboratory \nWilliam Gates Building \n15 JJ Thomson Avenue \nCambridge CB3 0FD \nUK \n\n+44 (0)1223 763500 \nforename.surname \'@\' cl.cam.ac.uk\n\n\nData Set Information:\n\nSee the file dataset file.\n\n\nAttribute Information:\n\nThe attributes are a mixture of static and dynamic features derived from theorems to be proved. See the paper for full details.\n', 'ARFF', NULL, NULL, NULL, '2015-05-22 17:30:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1587932/phpPbCMyg', 'true', 69, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:36:55'), -(70, 64, NULL, 'gas-drift', '1', NULL, '**Author**: Alexander Vergara\n\n**Source**: UCI \n\n**Please cite**: Alexander Vergara and Shankar Vembu and Tuba Ayhan and Margaret A. Ryan and Margie L. Homer and Ramón Huerta, Chemical gas sensor drift compensation using classifier ensembles, Sensors and Actuators B: Chemical (2012) doi: 10.1016/j.snb.2012.01.074. \n\nTitle: Gas Sensor Array Drift Dataset Data Set\n\nSource:\n\nCreators: Alexander Vergara (vergara \'@\' ucsd.edu) \nBioCircutis Institute \nUniversity of California San Diego \nSan Diego, California, USA \nDonors of the Dataset: Alexander Vergara (vergara \'@\' ucsd.edu) \nRamon Huerta (rhuerta \'@\' ucsd.edu) \n\n\nData Set Information:\n\nThis archive contains 13910 measurements from 16 chemical sensors utilized in simulations for drift compensation in a discrimination task of 6 gases at various levels of concentrations. The goal is to achieve good performance (or as low degradation as possible) over time, as reported in the paper mentioned below in Section 2: Data collection. The primary purpose of providing this dataset is to make it freely accessible on-line to the chemo-sensor research community and artificial intelligence to develop strategies to cope with sensor/concept drift. The dataset can be used exclusively for research purposes. Commercial purposes are fully excluded.\nThe dataset was gathered within January 2007 to February 2011 (36 months) in a gas delivery platform facility situated at the ChemoSignals Laboratory in the BioCircuits Institute, University of California San Diego. Being completely operated by a fully computerized environment —controlled by a LabVIEW–National Instruments software on a PC fitted with the appropriate serial data acquisition boards. The measurement system platform provides versatility for obtaining the desired concentrations of the chemical substances of interest with high accuracy and in a highly reproducible manner, minimizing thereby the common mistakes caused by human intervention and making it possible to exclusively concentrate on the chemical sensors for compensating real drift.\nThe resulting dataset comprises recordings from six distinct pure gaseous substances, namely Ammonia, Acetaldehyde, Acetone, Ethylene, Ethanol, and Toluene, each dosed at a wide variety of concentration values ranging from 5 to 1000 ppmv. See Tables 1 and 2 of the below cited manuscript for details on the gas identity name, concentration values, and time distribution sequence of the measurement recordings considered in this dataset.\n\nBatch10.dat was updated on 10/14/2013 to correct some corrupted values in the last 120 lines of the file.\n\nAn extension of this dataset with the concentration values is available at Gas Sensor Array Drift Dataset at Different Concentrations Data Set [Web Link]\n\n\nAttribute Information:\n\nThe response of the said sensors is read-out in the form of the resistance across the active layer of each sensor; hence each measurement produced a 16-channel time series, each of which represented by an aggregate of features reflecting all the dynamic processes occurring at the sensor surface in reaction to the chemical substance being evaluated. In particular, two distinct types of features were considered in the creation of this dataset: (i) The so-called steady-state feature (ΔR), defined as the difference of the maximal resistance change and the baseline and its normalized version expressed by the ratio of the maximal resistance and the baseline values when the chemical vapor is present in the test chamber. And (ii), an aggregate of features reflecting the sensor dynamics of the increasing/decaying transient portion of the sensor response during the entire measurement procedure under controlled conditions, namely the exponential moving average (emaα). These aggregate of features is a transform, borrowed from the field of econometrics originally introduced to the chemo-sensing community by Muezzinoglu et al. (2009), that converts the said transient portion into a real scalar, by estimating the maximum value —minimum for the decaying portion of the sensor response— of its exponential moving average (emaα), with an initial condition set to zero and a scalar smoothing parameter of the operator, α, that defines both the quality of the feature and the time of its occurrence along the time series the scalar, set to range between 0 and 1. In particular, three different values for α were set to obtain three different feature values from the pre-recorded rising portion of the sensor response and three additional features with the same α values but for the decaying portion of the sensor response, covering thus the entire sensor response dynamics. For a more detailed analysis and discussion on these features as well as a graphical illustration of them please refer to Section 2.3 and Figure 2, respectively of the annotated manuscript.\nOnce the abovementioned features are calculated, one is to form a feature vector containing the 8 features extracted from each particular sensor multiplied by the 16 sensors considered here. In the end, the resulting 128-dimensional feature vector containing all the features indicated above (8 features × 16 sensors) is organized as follows:\nΔR_1, |ΔR|_1, EMAi0.001_1, EMAi0.01_1, EMAi0.1_1, EMAd0.001_1, EMAd0.01_1, EMAd0.1_1, ΔR_2, |ΔR|_2, EMAi0.001_2, EMAi0.01_2, EMAi0.1_2, EMAd0.001_2, EMAd0.01_2, EMAd0.1_2,..., ΔR_16, |ΔR|_16, EMAi0.001_16, EMAi0.01_16, EMAi0.1_16, EMAd0.001_16, EMAd0.01_16, EMAd0.1_16,\n\nwhere: “ΔR_1” and “|ΔR|_1” is the ΔR and the normalized ΔR feature, respectively, “EMAi0.001_1”, “EMAi0.01_1”, and “EMAi0.1_1”, the emaα of the rising transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, and “EMAd0.001_1”, “EMAd0.01_1”, and “EMAd0.1_1”, the emaα of the decaying transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, all corresponding to sensor # 1; “ΔR_2” and “|ΔR|_2” is the ΔR and the normalized ΔR feature, respectively, “EMAi0.001_2”, “EMAi0.01_2”, and “EMAi0.1_2”, the emaα of the rising transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, and “EMAd0.001_2”, “EMAd0.01_2”, and “EMAd0.1_2”, the emaα of the decaying transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, all corresponding to sensor # 2; and so forth up until sensor # 16, forming thus the 128-dimensional feature vector that is to be fetched to the classifiers for training.\nFor processing purposes, the data is organized into ten batches, each containing the number of measurements per class and month indicated in the table below. This reorganization of data was done to ensure having a sufficient and as uniformly distributed as possible number of experiments in each class and month when training the classifier.\n\nDataset organization details. Each row corresponds to months that were combined to form a batch:\nBatch ID Month IDs\nBatch 1 Months 1 and 2\nBatch 2 Months 3, 4, 8, 9 and 10\nBatch 3 Months 11, 12, and 13\nBatch 4 Months 14 and 15\nBatch 5 Month 16\nBatch 6 Months 17, 18, 19, and 20\nBatch 7 Month 21\nBatch 8 Months 22 and 23\nBatch 9 Months 24 and 30\nBatch 10 Month 36\n\nThe data format follows the same coding style as in libsvm, in which one indicates the class each data point belongs to (1: Ethanol; 2: Ethylene; 3:Ammonia; 4: Acetaldehyde; 5: Acetone; 6: Toluene), and, then, the collection of features in a format x:v, where x stands for the feature number and v for the actual value of the feature. For example, in \n\n1 1:15596.162100 2:1.868245 3:2.371604 4:2.803678 5:7.512213 … 128:-2.654529 \n\nThe number “1” stands for the class number (in this case Ethanol), whereas the remaining 128 columns list the actual feature values for each measurement recording organized as described above. \nFinally, to make the results presented in the associated article reproducible for the reader, please use the following parameter values in the training task:\n• folds: 10\n• log2c = -5, 10, 1\n• log2g = -10, 5, 1\n• Scale the features in the training set appropriately to lie between -1 and +1.\n• And use the following cross validation parameters:\n\nBatch C Gamma (ɤ) Rate\n1 256.0 0.03125 98.8764\n2 64.0 0.00390625 99.7588\n3 128.0 0.03125 100.0\n4 1.0 0.25 100.0\n5 2.0 0.015625 99.4924\n6 256.0 0.0009765625 99.5217\n7 64.0 0.0625 99.9723\n8 1024.0 0.0078125 99.6599\n9 2.0 0.00390625 100.0', 'ARFF', NULL, NULL, NULL, '2015-05-22 20:11:33', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1588715/phpbL6t4U', 'true', 70, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 20:11:33'), -(71, 64, NULL, 'har', '1', NULL, '**Author**: Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto and Xavier Parra\n\n**Source**: UCI\n\n**Please cite**: Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. A Public Domain Dataset for Human Activity Recognition Using Smartphones. 21th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, ESANN 2013. Bruges, Belgium 24-26 April 2013. \n\nTitle: Human Activity Recognition Using Smartphones\n\nAbstract: Human Activity Recognition database built from the recordings of 30 subjects performing activities of daily living (ADL) while carrying a waist-mounted smartphone with embedded inertial sensors.\n\nSource:\n\nJorge L. Reyes-Ortiz(1,2), Davide Anguita(1), Alessandro Ghio(1), Luca Oneto(1) and Xavier Parra(2)\n1 - Smartlab - Non-Linear Complex Systems Laboratory DITEN - Università degli Studi di Genova, Genoa (I-16145), Italy. \n2 - CETpD - Technical Research Centre for Dependency Care and Autonomous Living Universitat Politècnica de Catalunya (BarcelonaTech). Vilanova i la Geltrú (08800), Spain, activityrecognition \'@\' smartlab.ws\n\n\nData Set Information:\n\nThe experiments have been carried out with a group of 30 volunteers within an age bracket of 19-48 years. Each person performed six activities (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded accelerometer and gyroscope, we captured 3-axial linear acceleration and 3-axial angular velocity at a constant rate of 50Hz. The experiments have been video-recorded to label the data manually. The obtained dataset has been randomly partitioned into two sets, where 70% of the volunteers was selected for generating the training data and 30% the test data. \n\nThe sensor signals (accelerometer and gyroscope) were pre-processed by applying noise filters and then sampled in fixed-width sliding windows of 2.56 sec and 50% overlap (128 readings/window). The sensor acceleration signal, which has gravitational and body motion components, was separated using a Butterworth low-pass filter into body acceleration and gravity. The gravitational force is assumed to have only low frequency components, therefore a filter with 0.3 Hz cutoff frequency was used. From each window, a vector of features was obtained by calculating variables from the time and frequency domain.\n\nCheck the README.txt file for further details about this dataset. \n\nA video of the experiment including an example of the 6 recorded activities with one of the participants can be seen in the following link: [Web Link]\n\n\nAttribute Information:\n\nFor each record in the dataset it is provided: \n- Triaxial acceleration from the accelerometer (total acceleration) and the estimated body acceleration. \n- Triaxial Angular velocity from the gyroscope. \n- A 561-feature vector with time and frequency domain variables. \n- Its activity label. \n- An identifier of the subject who carried out the experiment.\n\n\nRelevant Papers:\n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012 \n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra, Jorge L. Reyes-Ortiz. Energy Efficient Smartphone-Based Activity Recognition using Fixed-Point Arithmetic. Journal of Universal Computer Science. Special Issue in Ambient Assisted Living: Home Care. Volume 19, Issue 9. May 2013\n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. 4th International Workshop of Ambient Assited Living, IWAAL 2012, Vitoria-Gasteiz, Spain, December 3-5, 2012. Proceedings. Lecture Notes in Computer Science 2012, pp 216-223. \n\nJorge Luis Reyes-Ortiz, Alessandro Ghio, Xavier Parra-Llanas, Davide Anguita, Joan Cabestany, Andreu Català. Human Activity and Motion Disorder Recognition: Towards Smarter Interactive Cognitive Environments. 21th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, ESANN 2013. Bruges, Belgium 24-26 April 2013.\n\n', 'ARFF', NULL, NULL, NULL, '2015-05-22 20:38:11', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1589271/php88ZB4Q', 'true', 71, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 20:38:11'), -(72, 64, NULL, 'hill-valley', '1', NULL, '**Author**: Lee Graham, Franz Oppacher\n**Source**: UCI\n\n**Please cite**: \n\n1. Source:\n\nLee Graham (lee \'@\' stellaralchemy.com) \n\nFranz Oppacher (oppacher \'@\' scs.carleton.ca) \nCarleton University, Department of Computer Science \nIntelligent Systems Research Unit \n1125 Colonel By Drive, Ottawa, Ontario, Canada, K1S5B6 \n\n\n2. Attribute Information:\n\n1-100: Labeled “X##”. Floating point values (numeric) \n101: Labeled “class”. Binary {0, 1} representing {valley, hill} ', 'ARFF', NULL, NULL, NULL, '2015-05-22 21:11:58', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590101/php3isjYz', 'true', 72, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 21:11:58'), -(73, 64, NULL, 'ilpd', '1', NULL, '**Author**: Bendi Venkata Ramana, M. Surendra Prasad Babu, N. B. Venkateswarlu \n \n**Source**: UCI \n\n**Please cite**: \n\nSource:\n\n1. Bendi Venkata Ramana, \nramana.bendi \'@\' gmail.com \nAssociate Professor, \nDepartment of Information Technology, \nAditya Instutute of Technology and Management, \nTekkali - 532201, Andhra Pradesh, India. \n\n2. Prof. M. Surendra Prasad Babu \ndrmsprasadbabu \'@\' yahoo.co.in \nDeptartment of Computer Science & Systems Engineering, \nAndhra University College of Engineering, \nVisakhapatnam-530 003 Andhra Pradesh, India. \n\n3.Prof. N. B. Venkateswarlu \nvenkat_ritch \'@\' yahoo.com \nDepartment of Computer Science and Engineering, \nAditya Instutute of Technology and Management, \nTekkali - 532201, Andhra Pradesh, India.\n\n\nData Set Information:\n\nThis data set contains 416 liver patient records and 167 non liver patient records.The data set was collected from north east of Andhra Pradesh, India. Selector is a class label used to divide into groups(liver patient or not). This data set contains 441 male patient records and 142 female patient records. \n\nAny patient whose age exceeded 89 is listed as being of age \"90\".\n\nAttribute Information:\n\n1. Age Age of the patient \n2. Gender Gender of the patient \n3. TB Total Bilirubin \n4. DB Direct Bilirubin \n5. Alkphos Alkaline Phosphotase \n6. Sgpt Alamine Aminotransferase \n7. Sgot Aspartate Aminotransferase \n8. TP Total Protiens \n9. ALB Albumin \n10. A/G Ratio Albumin and Globulin Ratio \n11. Selector field used to split the data into two sets (labeled by the experts) \n\n\nRelevant Papers:\n\n1. Bendi Venkata Ramana, Prof. M. S. Prasad Babu and Prof. N. B. Venkateswarlu, “A Critical Comparative Study of Liver Patients from USA and INDIA: An Exploratory Analysis”, International Journal of Computer Science Issues, ISSN :1694-0784, May 2012. \n2. Bendi Venkata Ramana, Prof. M. S. Prasad Babu and Prof. N. B. Venkateswarlu, “A Critical Study of Selected Classification Algorithms for Liver Disease Diagnosis”, International Journal of Database Management Systems (IJDMS), Vol.3, No.2, ISSN : 0975-5705, PP 101-114, May 2011.', 'ARFF', NULL, NULL, NULL, '2015-05-22 22:40:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590565/phpOJxGL9', 'true', 73, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:32:35'), -(74, 64, NULL, 'madelon', '1', NULL, '**Author**: Isabelle Guyon \n**Source**: UCI \n**Please cite**: Isabelle Guyon, Steve R. Gunn, Asa Ben-Hur, Gideon Dror, 2004. Result analysis of the NIPS 2003 feature selection challenge.\n\nAbstract: \n\nMADELON is an artificial dataset, which was part of the NIPS 2003 feature selection challenge. This is a two-class classification problem with continuous input variables. The difficulty is that the problem is multivariate and highly non-linear.\n\nSource:\n\nIsabelle Guyon \nClopinet \n955 Creston Road \nBerkeley, CA 90708 \nisabelle \'@\' clopinet.com \n\n\nData Set Information:\n\nMADELON is an artificial dataset containing data points grouped in 32 clusters placed on the vertices of a five dimensional hypercube and randomly labeled +1 or -1. The five dimensions constitute 5 informative features. 15 linear combinations of those features were added to form a set of 20 (redundant) informative features. Based on those 20 features one must separate the examples into the 2 classes (corresponding to the +-1 labels). We added a number of distractor feature called \'probes\' having no predictive power. The order of the features and patterns were randomized. \n\nThis dataset is one of five datasets used in the NIPS 2003 feature selection challenge. Our website is still open for post-challenge submissions. All details about the preparation of the data are found in our technical report: Design of experiments for the NIPS 2003 variable selection benchmark, Isabelle Guyon, July 2003. Such information was made available only after the end of the challenge. \n\nThe data are split into training, validation, and test set. Target values are provided only for the 2 first sets. Test set performance results are obtained by submitting prediction results to: [Web Link]. \n\nThe data are in the following format: \ndataname.param: Parameters and statistics about the data \ndataname.feat: Identities of the features (in the order the features are found in the data). \ndataname_train.data: Training set (a space-delimited regular matrix, patterns in lines, features in columns). \ndataname_valid.data: Validation set. \ndataname_test.data: Test set. \ndataname_train.labels: Labels (truth values of the classes) for training examples. \ndataname_valid.labels: Validation set labels (withheld during the benchmark, but provided now). \ndataname_test.labels: Test set labels (withheld, so the data can still be use as a benchmark). \n\n\nAttribute Information:\nWe do not provide attribute information, to avoid biasing the feature selection process.\n\n\nRelevant Papers:\n\nThe best challenge entrants wrote papers collected in the book: \nIsabelle Guyon, Steve Gunn, Masoud Nikravesh, Lofti Zadeh (Eds.), Feature Extraction, Foundations and Applications. Studies in Fuzziness and Soft Computing. Physica-Verlag, Springer.\n\nSee also: \nIsabelle Guyon, et al, 2007. Competitive baseline methods set new standards for the NIPS 2003 feature selection benchmark. Pattern Recognition Letters 28 (2007) 1438–1444. \n\nand the associated technical report: \nIsabelle Guyon, et al. 2006. Feature selection with the CLOP package. Technical Report.\n', 'ARFF', NULL, NULL, NULL, '2015-05-22 23:46:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590986/phpfLuQE4', 'true', 74, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 23:46:18'), -(75, 64, NULL, 'nomao', '1', NULL, '**Author**: \n**Source**: UCI\n**Please cite**: \n\nRelevant Papers: Laurent Candillier and Vincent Lemaire. Design and Analysis of the Nomao Challenge - Active Learning in the Real-World. In: Proceedings of the ALRA : Active Learning in Real-world Applications, Workshop ECML-PKDD 2012, Friday, September 28, 2012, Bristol, UK.\n\n1. Data set title:\nNomao Data Set \n\n\n2. Abstract: \nNomao collects data about places (name, phone, localization...) from many sources. Deduplication consists in detecting what data refer to the same place. Instances in the dataset compare 2 spots.\n\n3. Data Set Characteristics: \n\n- Univariate\n- Area: Computer\n- Attribute Characteristics: Real\n- Associated Tasks: Classification\n- Missing Values?: Yes\n\n\n4. Source:\n\n(a) Original owner of database (name / phone / snail address / email address) \nNomao / 00 33 5 62 48 33 90 / 1 avenue Jean Rieux, 31500 Toulouse / challenge \'@\' nomao.com \n(b) Donor of database (name / phone / snail address / email address) \nLaurent Candillier / - / 1 avenue Jean Rieux, 31500 Toulouse / laurent \'@\' nomao.com\n\n\n5. Data Set Information:\n\nThe dataset has been enriched during the Nomao Challenge: organized along with the ALRA workshop (Active Learning in Real-world Applications): held at the ECML-PKDD 2012 conference.', 'ARFF', NULL, NULL, NULL, '2015-05-25 19:09:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592278/phpDYCOet', 'true', 75, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-25 19:09:04'), -(76, 64, NULL, 'ozone-level-8hr', '1', NULL, '**Author**: Kun Zhang, Wei Fan, XiaoJing Yuan\n\n**Source**: UCI\n\n**Please cite**: \n\n\n1 . Abstract: \nTwo ground ozone level data sets are included in this collection. One is the eight hour peak set (eighthr.data), the other is the one hour peak set (onehr.data). Those data were collected from 1998 to 2004 at the Houston, Galveston and Brazoria area.\n\n2. Source:\n\nKun Zhang, zhang.kun05 \'@\' gmail.com, Department of Computer Science, Xavier University of Lousiana \nWei Fan, wei.fan \'@\' gmail.com, IBM T.J.Watson Research \nXiaoJing Yuan, xyuan \'@\' uh.edu, Engineering Technology Department, College of Technology, University of Houston \n\n\n3. Data Set Information:\n\nAll the attribute start with T means the temperature measured at different time throughout the day; and those starts with WS indicate the wind speed at various time. \n\nWSR_PK: continuous. peek wind speed -- resultant (meaning average of wind vector) \nWSR_AV: continuous. average wind speed \nT_PK: continuous. Peak T \nT_AV: continuous. Average T \nT85: continuous. T at 850 hpa level (or about 1500 m height) \nRH85: continuous. Relative Humidity at 850 hpa \nU85: continuous. (U wind - east-west direction wind at 850 hpa) \nV85: continuous. V wind - N-S direction wind at 850 \nHT85: continuous. Geopotential height at 850 hpa, it is about the same as height at low altitude \nT70: continuous. T at 700 hpa level (roughly 3100 m height) \n\nRH70: continuous. \nU70: continuous. \nV70: continuous. \nHT70: continuous. \n\nT50: continuous. T at 500 hpa level (roughly at 5500 m height) \n\nRH50: continuous. \nU50: continuous. \nV50: continuous. \nHT50: continuous. \n\nKI: continuous. K-Index [Web Link] \nTT: continuous. T-Totals [Web Link] \nSLP: continuous. Sea level pressure \nSLP_: continuous. SLP change from previous day \n\nPrecp: continuous. -- precipitation\n\n\n4. Attribute Information:\n\nThe following are specifications for several most important attributes that are highly valued by Texas Commission on Environmental Quality (TCEQ). More details can be found in the two relevant papers. \n\nO 3 - Local ozone peak prediction \nUpwind - Upwind ozone background level \nEmFactor - Precursor emissions related factor \nTmax - Maximum temperature in degrees F \nTb - Base temperature where net ozone production begins (50 F) \nSRd - Solar radiation total for the day \nWSa - Wind speed near sunrise (using 09-12 UTC forecast mode) \nWSp - Wind speed mid-day (using 15-21 UTC forecast mode) \n\n\n5. Relevant Papers:\n\nForecasting skewed biased stochastic ozone days: analyses, solutions and beyond, Knowledge and Information Systems, Vol. 14, No. 3, 2008. \n\nIt Discusses details about the dataset, its use as well as various experiments (both cross-validation and streaming) using many state-of-the-art methods. \nA shorter version of the paper (does not contain some detailed experiments as the journal paper above) is in: \nForecasting Skewed Biased Stochastic Ozone Days: Analyses and Solutions. ICDM 2006: 753-764 \n\n', 'ARFF', NULL, NULL, NULL, '2015-05-25 19:22:29', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592279/phpdReP6S', 'true', 76, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:25:43'), -(77, 64, NULL, 'phoneme', '1', NULL, '**Author**: \n**Source**: KEEL\n**Please cite**: \n\n* Title:\n\nPhoneme dataset\n\n* Abstract:\n\nThe aim of this dataset is to distinguish between nasal (class 0) and oral sounds (class 1). The class distribution is 3,818 samples in class 0 and 1,586 samples in class 1. The phonemes are transcribed as follows: sh as in she, dcl as in dark, iy as the vowel in she, aa as the vowel in dark, and ao as the first vowel in water.\n\n* Attributes information:\n\n@relation phoneme\n@attribute Aa real [-1.7, 4.107]\n@attribute Ao real [-1.327, 4.378]\n@attribute Dcl real [-1.823, 3.199]\n@attribute Iy real [-1.581, 2.826]\n@attribute Sh real [-1.284, 2.719]\n@attribute Class {0, 1}\n@inputs Aa, Ao, Dcl, Iy, Sh\n@outputs Class', 'ARFF', NULL, NULL, NULL, '2015-05-25 19:34:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592281/php8Mz7BG', 'true', 77, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:25:20'), -(78, 64, NULL, 'one-hundred-plants-margin', '1', NULL, '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \n\n**Source**: UCI \n\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \n\n1. One-hundred plant species leaves data set (class = margin).\n \n2. Sources:\n (a) Original owners of colour Leaves Samples:\n\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\n The colour images are not included in this submission.\n The Leaves were collected in the Royal Botanic Gardens, Kew, UK.\n email: james.cope@kingston.ac.uk\n \n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\n\n (c) Date received 03/12/2012\n\n3. Past Usage:\n\n (a) This is a new data set, provisional paper: \n\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\n\n (b) Previous parts of the data set relate to feature extraction of leaves from: \n\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\n Plant texture classification using gabor cooccurrences.\n Advances in Visual Computing,\n pages 669ñ677, 2010.\n\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\n Shape and texture based plant leaf classification. In\n Advanced Concepts for Intelligent Vision Systems,\n pages 345ñ353. Springer, 2010.\n\n4. Relevant Information Paragraph:\n The data directory contains the binary images (masks) of the leaf samples. The colour images are not included.\n The data set features are organised as the following:\n * \'data_Sha_64.txt\'\n * \'data_Tex_64.txt\'\n * [THIS DATASET]\'data_Mar_64.txt\'\n\n One file for each 64-element feature vectors. Each row begins with the class label.\n The remaining 64 elements is the feature vector.\n\n5. Number of Instances\n\n 1600 samples each of three features (16 samples per leaf class).\n\n6. Number of Attributes\n\n Three 64 element feature vectors per sample.\n\n7. Vectors\n There are three features: Shape, Margin and Texture. As discussed in the paper(s) above.\n For Each feature, a 64 element vector is given per sample of leaf.\n These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin).\n\n8. Missing Attribute Values: none\n\n9. Class Distribution: 16 instances per class', 'ARFF', NULL, NULL, NULL, '2015-05-25 20:51:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592283/phpCsX3fx', 'true', 78, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:21:22'), -(79, 64, NULL, 'one-hundred-plants-shape', '1', NULL, '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \n\n**Source**: UCI \n\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \n\n1. One-hundred plant species leaves data set (class = shape).\n \n2. Sources:\n (a) Original owners of colour Leaves Samples:\n\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\n The colour images are not included in this submission.\n The Leaves were collected in the Royal Botanic Gardens, Kew, UK.\n email: james.cope@kingston.ac.uk\n \n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\n\n (c) Date received 03/12/2012\n\n3. Past Usage:\n\n (a) This is a new data set, provisional paper: \n\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\n\n (b) Previous parts of the data set relate to feature extraction of leaves from: \n\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\n Plant texture classification using gabor cooccurrences.\n Advances in Visual Computing,\n pages 669ñ677, 2010.\n\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\n Shape and texture based plant leaf classification. In\n Advanced Concepts for Intelligent Vision Systems,\n pages 345ñ353. Springer, 2010.\n\n4. Relevant Information Paragraph:\n The data directory contains the binary images (masks) of the leaf samples. The colour images are not included.\n The data set features are organised as the following:\n * [THIS DATASET]\'data_Sha_64.txt\'\n * \'data_Tex_64.txt\'\n * \'data_Mar_64.txt\'\n\n One file for each 64-element feature vectors. Each row begins with the class label.\n The remaining 64 elements is the feature vector.\n\n5. Number of Instances\n\n 1600 samples each of three features (16 samples per leaf class).\n\n6. Number of Attributes\n\n Three 64 element feature vectors per sample.\n\n7. Vectors\n There are three features: Shape, Margin and Texture. As discussed in the paper(s) above.\n For Each feature, a 64 element vector is given per sample of leaf.\n These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin).\n\n8. Missing Attribute Values: none\n\n9. Class Distribution: 16 instances per class', 'ARFF', NULL, NULL, NULL, '2015-05-25 20:58:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592284/php0FyS2T', 'true', 79, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:21:11'), -(80, 64, NULL, 'one-hundred-plants-texture', '1', NULL, '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/One-hundred+plant+species+leaves+data+set) - 2012 \r\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \r\n\r\n**One-hundred plant species leaves data set (class = texture)** \r\nThe data directory contains the binary images (masks) of the leaf samples. The colour images are not included. There are three features: Shape, Margin and Texture. As discussed in the paper(s) above. For Each feature, a 64 element vector is given per sample of leaf. These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin). The colour images are not included in this submission. The Leaves were collected in the Royal Botanic Gardens, Kew, UK. email: james.cope@kingston.ac.uk\r\n\r\n**Sources** \r\n (a) Original owners of colour Leaves Samples:\r\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\r\n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\r\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\r\n (c) Date received 03/12/2012\r\n\r\n**Usage**\r\n (a) This is a new data set, provisional paper: \r\n\r\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\r\n\r\n (b) Previous parts of the data set relate to feature extraction of leaves from: \r\n\r\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\r\n Plant texture classification using gabor cooccurrences.\r\n Advances in Visual Computing,\r\n pages 669ñ677, 2010.\r\n\r\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\r\n Shape and texture based plant leaf classification. In\r\n Advanced Concepts for Intelligent Vision Systems,\r\n pages 345ñ353. Springer, 2010.', 'ARFF', NULL, NULL, NULL, '2015-05-25 20:59:55', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592285/phpoOxxNn', 'true', 80, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:20:59'), -(81, 64, NULL, 'qsar-biodeg', '1', NULL, '**Author**: \n**Source**: UCI \n**Please cite**: Mansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878 \n\n\nQSAR biodegradation Data Set \n\n* Abstract: \n\nData set containing values for 41 attributes (molecular descriptors) used to classify 1055 chemicals into 2 classes (ready and not ready biodegradable).\n\n\n* Source:\n\nKamel Mansouri, Tine Ringsted, Davide Ballabio (davide.ballabio \'@\' unimib.it), Roberto Todeschini, Viviana Consonni, Milano Chemometrics and QSAR Research Group (http://michem.disat.unimib.it/chm/), Università degli Studi Milano – Bicocca, Milano (Italy)\n\n\n* Data Set Information:\n\nThe QSAR biodegradation dataset was built in the Milano Chemometrics and QSAR Research Group (Università degli Studi Milano – Bicocca, Milano, Italy). The research leading to these results has received funding from the European Community’s Seventh Framework Programme [FP7/2007-2013] under Grant Agreement n. 238701 of Marie Curie ITN Environmental Chemoinformatics (ECO) project. \nThe data have been used to develop QSAR (Quantitative Structure Activity Relationships) models for the study of the relationships between chemical structure and biodegradation of molecules. Biodegradation experimental values of 1055 chemicals were collected from the webpage of the National Institute of Technology and Evaluation of Japan (NITE). Classification models were developed in order to discriminate ready (356) and not ready (699) biodegradable molecules by means of three different modelling methods: k Nearest Neighbours, Partial Least Squares Discriminant Analysis and Support Vector Machines. Details on attributes (molecular descriptors) selected in each model can be found in the quoted reference: Mansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878.\n\n\n* Attribute Information:\n\n41 molecular descriptors and 1 experimental class: \n1) SpMax_L: Leading eigenvalue from Laplace matrix \n2) J_Dz(e): Balaban-like index from Barysz matrix weighted by Sanderson electronegativity \n3) nHM: Number of heavy atoms \n4) F01[N-N]: Frequency of N-N at topological distance 1 \n5) F04[C-N]: Frequency of C-N at topological distance 4 \n6) NssssC: Number of atoms of type ssssC \n7) nCb-: Number of substituted benzene C(sp2) \n8) C%: Percentage of C atoms \n9) nCp: Number of terminal primary C(sp3) \n10) nO: Number of oxygen atoms \n11) F03[C-N]: Frequency of C-N at topological distance 3 \n12) SdssC: Sum of dssC E-states \n13) HyWi_B(m): Hyper-Wiener-like index (log function) from Burden matrix weighted by mass \n14) LOC: Lopping centric index \n15) SM6_L: Spectral moment of order 6 from Laplace matrix \n16) F03[C-O]: Frequency of C - O at topological distance 3 \n17) Me: Mean atomic Sanderson electronegativity (scaled on Carbon atom) \n18) Mi: Mean first ionization potential (scaled on Carbon atom) \n19) nN-N: Number of N hydrazines \n20) nArNO2: Number of nitro groups (aromatic) \n21) nCRX3: Number of CRX3 \n22) SpPosA_B(p): Normalized spectral positive sum from Burden matrix weighted by polarizability \n23) nCIR: Number of circuits \n24) B01[C-Br]: Presence/absence of C - Br at topological distance 1 \n25) B03[C-Cl]: Presence/absence of C - Cl at topological distance 3 \n26) N-073: Ar2NH / Ar3N / Ar2N-Al / R..N..R \n27) SpMax_A: Leading eigenvalue from adjacency matrix (Lovasz-Pelikan index) \n28) Psi_i_1d: Intrinsic state pseudoconnectivity index - type 1d \n29) B04[C-Br]: Presence/absence of C - Br at topological distance 4 \n30) SdO: Sum of dO E-states \n31) TI2_L: Second Mohar index from Laplace matrix \n32) nCrt: Number of ring tertiary C(sp3) \n33) C-026: R--CX--R \n34) F02[C-N]: Frequency of C - N at topological distance 2 \n35) nHDon: Number of donor atoms for H-bonds (N and O) \n36) SpMax_B(m): Leading eigenvalue from Burden matrix weighted by mass \n37) Psi_i_A: Intrinsic state pseudoconnectivity index - type S average \n38) nN: Number of Nitrogen atoms \n39) SM6_B(m): Spectral moment of order 6 from Burden matrix weighted by mass \n40) nArCOOR: Number of esters (aromatic) \n41) nX: Number of halogen atoms \n42) experimental class: ready biodegradable (RB) and not ready biodegradable (NRB)\n\n\n* Relevant Papers:\n\nMansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878\n', 'ARFF', NULL, NULL, NULL, '2015-05-25 21:14:53', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592286/phpGUrE90', 'true', 81, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:20:47'), -(82, 64, NULL, 'wall-robot-navigation', '1', NULL, '**Author**: Ananda Freire, Marcus Veloso and Guilherme Barreto \n**Source**: UCI \n**Please cite**: \n\n* Dataset Title: \n\nWall-Following Robot Navigation Data Data Set \n\n* Abstract: \n\nThe data were collected as the SCITOS G5 robot navigates through the room following the wall in a clockwise direction, for 4 rounds, using 24 ultrasound sensors arranged circularly around its \'waist\'.\n\n* Source:\n\n(a) Creators: Ananda Freire, Marcus Veloso and Guilherme Barreto \nDepartment of Teleinformatics Engineering \nFederal University of Ceará \nFortaleza, Ceará, Brazil \n\n(b) Donors of database: Ananda Freire (anandalf \'@\' gmail.com) \nGuilherme Barreto (guilherme \'@\' deti.ufc.br)\n\n* Data Set Information:\n\nThe provided file contain the raw values of the measurements of all 24 ultrasound sensors and the corresponding class label. Sensor readings are sampled at a rate of 9 samples per second. \n\nIt is worth mentioning that the 24 ultrasound readings and the simplified distances were collected at the same time step, so each file has the same number of rows (one for each sampling time step). \n\nThe wall-following task and data gathering were designed to test the hypothesis that this apparently simple navigation task is indeed a non-linearly separable classification task. Thus, linear classifiers, such as the Perceptron network, are not able to learn the task and command the robot around the room without collisions. Nonlinear neural classifiers, such as the MLP network, are able to learn the task and command the robot successfully without collisions. \n\nIf some kind of short-term memory mechanism is provided to the neural classifiers, their performances are improved in general. For example, if past inputs are provided together with current sensor readings, even the Perceptron becomes able to learn the task and command the robot successfully. If a recurrent neural network, such as the Elman network, is used to learn the task, the resulting dynamical classifier is able to learn the task using less hidden neurons than the MLP network. \n\n* Attribute Information:\n\nNumber of Attributes: sensor_readings_24.data: 24 numeric attributes and the class. \n\nFor Each Attribute: \n-- File sensor_readings_24.data: \n1. US1: ultrasound sensor at the front of the robot (reference angle: 180°) - (numeric: real) \n2. US2: ultrasound reading (reference angle: -165°) - (numeric: real) \n3. US3: ultrasound reading (reference angle: -150°) - (numeric: real) \n4. US4: ultrasound reading (reference angle: -135°) - (numeric: real) \n5. US5: ultrasound reading (reference angle: -120°) - (numeric: real) \n6. US6: ultrasound reading (reference angle: -105°) - (numeric: real) \n7. US7: ultrasound reading (reference angle: -90°) - (numeric: real) \n8. US8: ultrasound reading (reference angle: -75°) - (numeric: real) \n9. US9: ultrasound reading (reference angle: -60°) - (numeric: real) \n10. US10: ultrasound reading (reference angle: -45°) - (numeric: real) \n11. US11: ultrasound reading (reference angle: -30°) - (numeric: real) \n12. US12: ultrasound reading (reference angle: -15°) - (numeric: real) \n13. US13: reading of ultrasound sensor situated at the back of the robot (reference angle: 0°) - (numeric: real) \n14. US14: ultrasound reading (reference angle: 15°) - (numeric: real) \n15. US15: ultrasound reading (reference angle: 30°) - (numeric: real) \n16. US16: ultrasound reading (reference angle: 45°) - (numeric: real) \n17. US17: ultrasound reading (reference angle: 60°) - (numeric: real) \n18. US18: ultrasound reading (reference angle: 75°) - (numeric: real) \n19. US19: ultrasound reading (reference angle: 90°) - (numeric: real) \n20. US20: ultrasound reading (reference angle: 105°) - (numeric: real) \n21. US21: ultrasound reading (reference angle: 120°) - (numeric: real) \n22. US22: ultrasound reading (reference angle: 135°) - (numeric: real) \n23. US23: ultrasound reading (reference angle: 150°) - (numeric: real) \n24. US24: ultrasound reading (reference angle: 165°) - (numeric: real) \n25. Class: {Move-Forward, Slight-Right-Turn, Sharp-Right-Turn, Slight-Left-Turn} \n\n\n* Relevant Papers:\n\nAnanda L. Freire, Guilherme A. Barreto, Marcus Veloso and Antonio T. Varela (2009), \n\'Short-Term Memory Mechanisms in Neural Network Learning of Robot Navigation \nTasks: A Case Study\'. Proceedings of the 6th Latin American Robotics Symposium (LARS\'2009), \nValparaíso-Chile, pages 1-6, DOI: 10.1109/LARS.2009.5418323\n', 'ARFF', NULL, NULL, NULL, '2015-05-25 21:50:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592289/phpVeNa5j', 'true', 82, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:19:18'), -(83, 64, NULL, 'semeion', '1', NULL, '**Author**: Semeion Research Center of Sciences of Communication \n**Source**: UCI \n**Please cite**: Semeion Research Center of Sciences of Communication, via Sersale 117, 00128 Rome, Italy \nTattile Via Gaetano Donizetti, 1-3-5,25030 Mairano (Brescia), Italy. \n\n* Title: \nSemeion Handwritten Digit Data Set \n\n* Abstract: \n1593 handwritten digits from around 80 persons were scanned, stretched in a rectangular box 16x16 in a gray scale of 256 values.\n\n\n* Source:\n\nThe dataset was created by Tactile Srl, Brescia, Italy (http://www.tattile.it) and donated in 1994 to Semeion Research Center of Sciences of Communication, Rome, Italy (http://www.semeion.it), for machine learning research. \n\nFor any questions, e-mail Massimo Buscema (m.buscema \'@\' semeion.it) or Stefano Terzi (s.terzi \'@\' semeion.it)\n\n\n* Data Set Information:\n\n1593 handwritten digits from around 80 persons were scanned, stretched in a rectangular box 16x16 in a gray scale of 256 values.Then each pixel of each image was scaled into a bolean (1/0) value using a fixed threshold. \n\nEach person wrote on a paper all the digits from 0 to 9, twice. The commitment was to write the digit the first time in the normal way (trying to write each digit accurately) and the second time in a fast way (with no accuracy). \n\nThe best validation protocol for this dataset seems to be a 5x2CV, 50% Tune (Train +Test) and completly blind 50% Validation\n\n\n* Attribute Information:\n\nThis dataset consists of 1593 records (rows) and 256 attributes (columns). Each record represents a handwritten digit, orginally scanned with a resolution of 256 grays scale (28). Each pixel of the each original scanned image was first stretched, and after scaled between 0 and 1 (setting to 0 every pixel whose value was under tha value 127 of the grey scale (127 included) and setting to 1 each pixel whose orinal value in the grey scale was over 127). Finally, each binary image was scaled again into a 16x16 square box (the final 256 binary attributes).\n\n\n* Relevant Papers:\n\nM Buscema, MetaNet: The Theory of Independent Judges, in Substance Use & Misuse 33(2)1998, pp 439-461.', 'ARFF', NULL, NULL, NULL, '2015-05-25 22:22:34', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592293/phptd5jYj', 'true', 83, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:18:33'), -(84, 64, NULL, 'steel-plates-fault', '1', NULL, '**Author**: Semeion, Research Center of Sciences of Communication, Rome, Italy. \n**Source**: UCI \n**Please cite**: Dataset provided by Semeion, Research Center of Sciences of Communication, Via Sersale 117, 00128, Rome, Italy. \n(www.semeion.it) \n\n\n* Title: Steel Plates Faults Data Set \n\n* Abstract: \n\nA dataset of steel plates\' faults, classified into 7 different types. The goal was to train machine learning for automatic pattern recognition.\n\n* Source:\n\nSemeion, Research Center of Sciences of Communication, Via Sersale 117, 00128, Rome, Italy. \nwww.semeion.it\n\n\n* Data Set Information:\n\nType of dependent variables (7 Types of Steel Plates Faults): \n1.Pastry \n2.Z_Scratch \n3.K_Scatch \n4.Stains \n5.Dirtiness \n6.Bumps \n7.Other_Faults \n\n\nAttribute Information:\n\n27 independent variables: \nX_Minimum \nX_Maximum \nY_Minimum \nY_Maximum \nPixels_Areas \nX_Perimeter \nY_Perimeter \nSum_of_Luminosity \nMinimum_of_Luminosity \nMaximum_of_Luminosity \nLength_of_Conveyer \nTypeOfSteel_A300 \nTypeOfSteel_A400 \nSteel_Plate_Thickness \nEdges_Index \nEmpty_Index \nSquare_Index \nOutside_X_Index \nEdges_X_Index \nEdges_Y_Index \nOutside_Global_Index \nLogOfAreas \nLog_X_Index \nLog_Y_Index \nOrientation_Index \nLuminosity_Index \nSigmoidOfAreas \n\n\n* Relevant Papers:\n\n1.M Buscema, S Terzi, W Tastle, A New Meta-Classifier,in NAFIPS 2010, Toronto (CANADA),26-28 July 2010, 978-1-4244-7858-6/10 ©2010 IEEE \n2.M Buscema, MetaNet: The Theory of Independent Judges, in Substance Use & Misuse, 33(2), 439-461,1998\n\n', 'ARFF', NULL, NULL, NULL, '2015-05-25 22:42:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592296/php9xWOpn', 'true', 84, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:17:37'), -(85, 64, NULL, 'tamilnadu-electricity', '1', NULL, '**Author**: K.Kalyani. \n**Source**: UCI \n**Please cite**: \n\n* Title: Tamilnadu Electricity Board Hourly Readings Data Set \n\n* Abstract: \n\nThis data can be effectively produced the result to fewer parameter of the Load profile can be reduced in the Database\n\n* Source:\n\nK.Kalyani ,kkalyanims \'@\' gmail.com,T.U.K Arts College,Karanthai,Thanjavur.\n\n\n* Data Set Information:\n\nCollect the real time readings for residential,commercial,industrial,agriculure,to find the accuracy consumption in Tamil Nadu Around Thanajvur.\n\n\n* Attribute Information:\n\nforkva,forkw,type,sector,service\n\n\n* Relevant Papers:\n\nEfficient Electricity Utilization By IHBMO\n', 'ARFF', NULL, NULL, NULL, '2015-05-25 22:52:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592297/phpvFYBg2', 'true', 85, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:17:26'), -(86, 64, NULL, 'wdbc', '1', NULL, '**Author**: William H. Wolberg, W. Nick Street, Olvi L. Mangasarian \n**Source**: UCI \n**Please cite**: \n\n* Title: \n\nBreast Cancer Wisconsin (Diagnostic) Data Set (WDBC)\n\n* Abstract: \n\nDiagnostic Wisconsin Breast Cancer Database\n\n* Source:\n\nCreators: \n\n1. Dr. William H. Wolberg, General Surgery Dept. \nUniversity of Wisconsin, Clinical Sciences Center \nMadison, WI 53792 \nwolberg \'@\' eagle.surgery.wisc.edu \n\n2. W. Nick Street, Computer Sciences Dept. \nUniversity of Wisconsin, 1210 West Dayton St., Madison, WI 53706 \nstreet \'@\' cs.wisc.edu 608-262-6619 \n\n3. Olvi L. Mangasarian, Computer Sciences Dept. \nUniversity of Wisconsin, 1210 West Dayton St., Madison, WI 53706 \nolvi \'@\' cs.wisc.edu \n\nDonor: Nick Street\n\n* Data Set Information:\n\nFeatures are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image. A few of the images can be found at [Web Link] \n\nSeparating plane described above was obtained using Multisurface Method-Tree (MSM-T) [K. P. Bennett, \"Decision Tree Construction Via Linear Programming.\" Proceedings of the 4th Midwest Artificial Intelligence and Cognitive Science Society, pp. 97-101, 1992], a classification method which uses linear programming to construct a decision tree. Relevant features were selected using an exhaustive search in the space of 1-4 features and 1-3 separating planes. \n\nThe actual linear program used to obtain the separating plane in the 3-dimensional space is that described in: [K. P. Bennett and O. L. Mangasarian: \"Robust Linear Programming Discrimination of Two Linearly Inseparable Sets\", Optimization Methods and Software 1, 1992, 23-34]. \n\nThis database is also available through the UW CS ftp server: \nftp ftp.cs.wisc.edu \ncd math-prog/cpo-dataset/machine-learn/WDBC/\n\n\n* Attribute Information:\n\n1) ID number \n2) Diagnosis (M = malignant, B = benign) \n3-32) \n\nTen real-valued features are computed for each cell nucleus: \n\na) radius (mean of distances from center to points on the perimeter) \nb) texture (standard deviation of gray-scale values) \nc) perimeter \nd) area \ne) smoothness (local variation in radius lengths) \nf) compactness (perimeter^2 / area - 1.0) \ng) concavity (severity of concave portions of the contour) \nh) concave points (number of concave portions of the contour) \ni) symmetry \nj) fractal dimension (\"coastline approximation\" - 1)\n\n\n* Relevant Papers:\n\nW.N. Street, W.H. Wolberg and O.L. Mangasarian. Nuclear feature extraction for breast tumor diagnosis. IS&T/SPIE 1993 International Symposium on Electronic Imaging: Science and Technology, volume 1905, pages 861-870, San Jose, CA, 1993. \n[Web Link] \n\nO.L. Mangasarian, W.N. Street and W.H. Wolberg. Breast cancer diagnosis and prognosis via linear programming. Operations Research, 43(4), pages 570-577, July-August 1995. \n[Web Link] \n\nW.H. Wolberg, W.N. Street, and O.L. Mangasarian. Machine learning techniques to diagnose breast cancer from fine-needle aspirates. Cancer Letters 77 (1994) 163-171. \n\nW.H. Wolberg, W.N. Street, and O.L. Mangasarian. Image analysis and machine learning applied to breast cancer diagnosis and prognosis. Analytical and Quantitative Cytology and Histology, Vol. 17 No. 2, pages 77-87, April 1995. \n\nW.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. Computerized breast cancer diagnosis and prognosis from fine needle aspirates. Archives of Surgery 1995;130:511-516. \n\nW.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. Computer-derived nuclear features distinguish malignant from benign breast cytology. Human Pathology, 26:792--796, 1995. \n\n', 'ARFF', NULL, NULL, NULL, '2015-05-26 16:24:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592318/phpAmSP4g', 'true', 86, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:15:56'), -(87, 64, NULL, 'micro-mass', '2', '2', '**Author**: Pierre Mahé, Jean-Baptiste Veyrieras \n**Source**: [original](http://www.openml.org/d/1514) - UCI \n**Please cite**: \n\n* Dataset Title: MicroMass - Pure (pure spectra version) \n\n* Abstract: \nA dataset to explore machine learning approaches for the identification of microorganisms from mass-spectrometry data. \n\n* Source:\n\nPierre Mahé, pierre.mahe \'@\' biomerieux.com, bioMérieux\nJean-Baptiste Veyrieras, jean-baptiste.veyrieras \'@\' biomerieux.com, bioMérieux\n\n* Data Set Information:\n\nThis MALDI-TOF dataset consists in:\nA) A reference panel of 20 Gram positive and negative bacterial species covering 9 genera among which several species are known to be hard to discriminate by mass spectrometry (MALDI-TOF). Each species was represented by 11 to 60 mass spectra obtained from 7 to 20 bacterial strains, constituting altogether a dataset of 571 spectra obtained from 213 strains. The spectra were obtained according to the standard culture-based workflow used in clinical routine in which the microorganism was first grown on an agar plate for 24 to 48 hours, before a portion of colony was picked, spotted on a MALDI slide and a mass spectrum was acquired. \nB) Based on this reference panel, a dedicated in vitro mock-up mixture dataset was constituted. For that purpose we considered 10 pairs of species of various taxonomic proximity:\n* 4 mixtures, labelled A, B, C and D, involved species that belong to the same genus, \n* 2 mixtures, labelled E and F, involved species that belong to distinct genera, but to the same Gram type, \n* 4 mixtures, labelled G, H, I and J, involved species that belong to distinct Gram types. \nEach mixture was represented by 2 pairs of strains, which were mixed according to the following 9 concentration ratios : 1:0, 10:1, 5:1, 2:1, 1:1, 1:2, 1:5, 1:10, 0:1. Two replicate spectra were acquired for each concentration ratio and each couple of strains, leading altogether to a dataset of 360 spectra, among which 80 are actually pure sample spectra.\n\n* Relevant Papers:\n\nMahé et al. (2014). Automatic identification of mixed bacterial species fingerprints in a MALDI-TOF mass-spectrum. Bioinformatics.\n\nVervier et al., A benchmark of support vector machines strategies for microbial identification by mass-spectrometry data, submitted\n\n\n\n\n\n', 'ARFF', '\"Pierre Mahé\",\"Jean-Baptiste Veyrieras\"', NULL, NULL, '2015-06-01 16:57:25', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1593707/phpHyLSNF', 'true', 87, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://www.openml.org/d/1514', NULL, '2015-06-01 16:57:25'), -(88, 64, NULL, 'wilt', '1', NULL, '**Author**: Brian Johnson \n**Source**: [UCI] (https://archive.ics.uci.edu/ml/datasets/Wilt) \n**Please cite**: Johnson, B., Tateishi, R., Hoan, N., 2013. A hybrid pansharpening approach and multiscale object-based image analysis for mapping diseased pine and oak trees. International Journal of Remote Sensing, 34 (20), 6969-6982. \n\n\n* Dataset: \nWilt Data Set \n\n* Abstract: \nHigh-resolution Remote Sensing data set (Quickbird). Small number of training samples of diseased trees, large number for other land cover. Testing data set from stratified random sample of image.\n\n* Source:\n \nBrian Johnson; \nInstitute for Global Environmental Strategies; \n2108-11 Kamiyamaguchi, Hayama, Kanagawa,240-0115 Japan; \nEmail: Johnson \'@\' iges.or.jp \n\n\n* Data Set Information: \n\nThis data set contains some training and testing data from a remote sensing study by Johnson et al. (2013) that involved detecting diseased trees in Quickbird imagery. There are few training samples for the \'diseased trees\' class (74) and many for \'other land cover\' class (4265). \n\nThe data set consists of image segments, generated by segmenting the pansharpened image. The segments contain spectral information from the Quickbird multispectral image bands and texture information from the panchromatic (Pan) image band. The testing data set is for the row with “Segmentation scale 15” segments and “original multi-spectral image” Spectral information in Table 2 of the reference (i.e. row 5). Please see the reference below for more information on the data set, and please cite the reference if you use this data set. Enjoy! \n\n* Attribute Information:\n\nclass: \'w\' (diseased trees), \'n\' (all other land cover) \nGLCM_Pan: GLCM mean texture (Pan band) \nMean_G: Mean green value \nMean_R: Mean red value \nMean_NIR: Mean NIR value \nSD_Pan: Standard deviation (Pan band) \n\n\n* Relevant Papers:\n\nJohnson, B., Tateishi, R., Hoan, N., 2013. A hybrid pansharpening approach and multiscale object-based image analysis for mapping diseased pine and oak trees. International Journal of Remote Sensing, 34 (20), 6969-6982.\n', 'ARFF', NULL, NULL, NULL, '2015-06-01 23:34:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1675983/phpnThNfi', 'true', 88, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-10-08 14:43:09'), -(89, 2, NULL, 'adult', '2', '2', '**Author**: Ronny Kohavi and Barry Becker \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Adult) - 1996-05-01 \n**Please cite**: Ron Kohavi, \"Scaling Up the Accuracy of Naive-Bayes Classifiers: a Decision-Tree Hybrid\", Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, 1996 \n\n**Note: this is the original version from the UCI repository, with training and test sets merged.**\n\nPrediction task is to determine whether a person makes over 50K a year. Extraction was done by Barry Becker from the 1994 Census database. A set of reasonably clean records was extracted using the following conditions: ((AAGE>16) && (AGI>100) && (AFNLWGT>1)&& (HRSWK>0))\n\nRonny Kohavi and Barry Becker. Data Mining and Visualization, Silicon Graphics. \ne-mail: ronnyk \'@\' live.com for questions. \n', 'ARFF', NULL, NULL, NULL, '2015-06-09 16:39:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1595261/phpMawTba', 'true', 89, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'added target attribute', '2015-06-09 16:56:26'), -(90, 2, NULL, 'Bioresponse', '1', NULL, 'Data from the Kaggle Bioresponse challenge:\nhttps://www.kaggle.com/c/bioresponse\n\nThe objective of the competition is to help us build as good a model as possible so that we can, as optimally as this data allows, relate molecular information, to an actual biological response.\n\nWe have shared the data in the comma separated values (CSV) format. Each row in this data set represents a molecule. The first column contains experimental data describing an actual biological response; the molecule was seen to elicit this response (1), or not (0). The remaining columns represent molecular descriptors (d1 through d1776), these are calculated properties that can capture some of the characteristics of the molecule - for example size, shape, or elemental constitution. The descriptor matrix has been normalized.\n\nThe original training and test set were merged.', 'ARFF', NULL, NULL, NULL, '2015-11-04 23:59:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1681097/phpSSK7iA', 'true', 90, 'target', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-04 23:59:56'), -(91, 2, NULL, 'Amazon_employee_access', '1', NULL, 'Data from the Kaggle Amazon Employee Access Challenge:\nhttps://www.kaggle.com/c/amazon-employee-access-challenge\n\nWhen an employee at any company starts work, they first need to obtain the computer access necessary to fulfill their role. This access may allow an employee to read/manipulate resources through various applications or web portals. It is assumed that employees fulfilling the functions of a given role will access the same or similar resources. It is often the case that employees figure out the access they need as they encounter roadblocks during their daily work (e.g. not able to log into a reporting portal). A knowledgeable supervisor then takes time to manually grant the needed access in order to overcome access obstacles. As employees move throughout a company, this access discovery/recovery cycle wastes a nontrivial amount of time and money.\n\nThere is a considerable amount of data regarding an employee’s role within an organization and the resources to which they have access. Given the data related to current employees and their provisioned access, models can be built that automatically determine access privileges as employees enter and leave roles within a company. These auto-access models seek to minimize the human involvement required to grant or revoke employee access.\n\nThe original training and test set were merged.', 'ARFF', NULL, NULL, NULL, '2015-11-05 00:06:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1681098/phpmPOD5A', 'true', 91, 'target', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-05 00:06:06'), -(92, 874, NULL, 'PhishingWebsites', '1', NULL, '**Author**: Rami Mustafa A Mohammad ( University of Huddersfield\",\"rami.mohammad \'@\' hud.ac.uk\",\"rami.mustafa.a \'@\' gmail.com) Lee McCluskey (University of Huddersfield\",\"t.l.mccluskey \'@\' hud.ac.uk ) Fadi Thabtah (Canadian University of Dubai\",\"fadi \'@\' cud.ac.ae) \n**Source**: UCI \n**Please cite**: Please refer to the Machine Learning Repository\'s citation policy \n\nSource:\n\nRami Mustafa A Mohammad ( University of Huddersfield, rami.mohammad \'@\' hud.ac.uk, rami.mustafa.a \'@\' gmail.com)\nLee McCluskey (University of Huddersfield,t.l.mccluskey \'@\' hud.ac.uk )\n\nFadi Thabtah (Canadian University of Dubai,fadi \'@\' cud.ac.ae)\n\n\nData Set Information:\n\nOne of the challenges faced by our research was the unavailability of reliable training datasets. In fact this challenge faces any researcher in the field. However, although plenty of articles about predicting phishing websites have been disseminated these days, no reliable training dataset has been published publically, may be because there is no agreement in literature on the definitive features that characterize phishing webpages, hence it is difficult to shape a dataset that covers all possible features. \nIn this dataset, we shed light on the important features that have proved to be sound and effective in predicting phishing websites. In addition, we propose some new features.\n\n\nAttribute Information:\n\nFor Further information about the features see the features file in the data folder.\n\n\nRelevant Papers:\n\nMohammad, Rami, McCluskey, T.L. and Thabtah, Fadi (2012) An Assessment of Features Related to Phishing Websites using an Automated Technique. In: International Conferece For Internet Technology And Secured Transactions. ICITST 2012 . IEEE, London, UK, pp. 492-497. ISBN 978-1-4673-5325-0\n\nMohammad, Rami, Thabtah, Fadi Abdeljaber and McCluskey, T.L. (2014) Predicting phishing websites based on self-structuring neural network. Neural Computing and Applications, 25 (2). pp. 443-458. ISSN 0941-0643\n\nMohammad, Rami, McCluskey, T.L. and Thabtah, Fadi Abdeljaber (2014) Intelligent Rule based Phishing Websites Classification. IET Information Security, 8 (3). pp. 153-160. ISSN 1751-8709\n\n \n\nCitation Request:\n\nPlease refer to the Machine Learning Repository\'s citation policy', 'ARFF', '\"Rami Mustafa A Mohammad ( University of Huddersfield\",\"rami.mohammad \'@\' hud.ac.uk\",\"rami.mustafa.a \'@\' gmail.com) Lee McCluskey (University of Huddersfield\",\"t.l.mccluskey \'@\' hud.ac.uk ) Fadi Thabtah (Canadian University of Dubai\",\"fadi \'@\' cud.ac.ae)\"', NULL, NULL, '2016-02-16 15:30:33', NULL, 'Public', 'Please refer to the Machine Learning Repository\'s citation policy', NULL, 'https://www.openml.org/data/download/1798106/phpV5QYya', 'true', 92, 'Result', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-16 15:30:33'), -(93, 874, NULL, 'GesturePhaseSegmentationProcessed', '1', NULL, '**Author**: enata Cristina Barros Madeo (Madeo\",\"R. C. B.) Priscilla Koch Wagner (Wagner\",\"P. K.) Sarajane Marques Peres (Peres\",\"S. M.) {renata.si\",\"priscilla.wagner\",\"sarajane} at usp.br http://each.uspnet.usp.br/sarajane/ \n**Source**: UCI \n**Please cite**: Please refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers. \n\nSource:\n\nCreators: \nRenata Cristina Barros Madeo (Madeo, R. C. B.) \nPriscilla Koch Wagner (Wagner, P. K.) \nSarajane Marques Peres (Peres, S. M.) \n{renata.si, priscilla.wagner, sarajane} at usp.br \nhttp://each.uspnet.usp.br/sarajane/ \n\nDonor: \nUniversity of Sao Paulo - Brazil\n\n\nData Set Information:\n\nThe dataset is composed by features extracted from 7 videos with people gesticulating, aiming at studying Gesture Phase Segmentation. \nEach video is represented by two files: a raw file, which contains the position of hands, wrists, head and spine of the user in each frame; and a processed file, which contains velocity and acceleration of hands and wrists. See the data set description for more information on the dataset.\n\n\nAttribute Information:\n\nRaw files: 18 numeric attributes (double), a timestamp and a class attribute (nominal). \nProcessed files: 32 numeric attributes (double) and a class attribute (nominal). \nA feature vector with up to 50 numeric attributes can be generated with the two files mentioned above.\n\n\nRelevant Papers:\n\n1. Madeo, R. C. B. ; Lima, C. A. M. ; PERES, S. M. . Gesture Unit Segmentation using Support Vector Machines: Segmenting \nGestures from Rest Positions. In: Symposium on Applied Computing (SAC), 2013, Coimbra. Proceedings of the 28th Annual \nACM Symposium on Applied Computing (SAC), 2013. p. 46-52. \n* In this paper, the videos A1 and A2 were studied. \n\n2. Wagner, P. K. ; PERES, S. M. ; Madeo, R. C. B. ; Lima, C. A. M. ; Freitas, F. A. . Gesture Unit Segmentation Using \nSpatial-Temporal Information and Machine Learning. In: 27th Florida Artificial Intelligence Research Society Conference \n(FLAIRS), 2014, Pensacola Beach. Proceedings of the 27th Florida Artificial Intelligence Research Society Conference \n(FLAIRS). Palo Alto : The AAAI Press, 2014. p. 101-106. \n* In this paper, the videos A1, A2, A3, B1, B3, C1 and C3 were studied. \n\n3. Madeo, R. C. B.. Support Vector Machines and Gesture Analysis: incorporating temporal aspects (in Portuguese). Master \nThesis - Universidade de Sao Paulo, Sao Paulo Researcher Foundation. 2013. \n* In this document, the videos named B1 and B3 in the document correspond to videos C1 and C3 in this dataset. Only \nfive videos were explored in this document: A1, A2, A3, C1 and C3. \n\n4. Wagner, P. K. ; Madeo, R. C. B. ; PERES, S. M. ; Lima, C. A. M. . Segmentaçao de Unidades Gestuais com Multilayer \nPerceptrons (in Portuguese). In: Encontro Nacional de Inteligencia Artificial e Computacional (ENIAC), 2013, Fortaleza. \nAnais do X Encontro Nacional de Inteligencia Artificial e Computacional (ENIAC), 2013. \n* In this paper, the videos A1, A2 and A3 were studied.\n\n\n\nCitation Request:\n\nPlease refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers.', 'ARFF', '\"enata Cristina Barros Madeo (Madeo\",\"R. C. B.) Priscilla Koch Wagner (Wagner\",\"P. K.) Sarajane Marques Peres (Peres\",\"S. M.) {renata.si\",\"priscilla.wagner\",\"sarajane} at usp.br http://each.uspnet.usp.br/sarajane/\"', NULL, NULL, '2016-02-17 11:42:33', NULL, 'Public', 'Please refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers.', NULL, 'https://www.openml.org/data/download/1798765/phpYLeydd', 'true', 93, 'Phase', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-20 13:08:52'), -(94, 874, NULL, 'MiceProtein', '1', NULL, '**Author**: lara Higuera Department of Software Engineering and Artificial Intelligence\",\"Faculty of Informatics and the Department of Biochemistry and Molecular Biology\",\"Faculty of Chemistry\",\"University Complutense\",\"Madrid\",\"Spain. Email: clarahiguera \'@\' ucm.es Katheleen J. Gardiner\",\"creator and owner of the protein expression data\",\"is currently with the Linda Crnic Institute for Down Syndrome\",\"Department of Pediatrics\",\"Department of Biochemistry and Molecular Genetics\",\"Human Medical Genetics and Genomics\",\"and Neuroscience Programs\",\"University of Colorado\",\"School of Medicine\",\"Aurora\",\"Colorado\",\"USA. Email: katheleen.gardiner \'@\' ucdenver.edu Krzysztof J. Cios is currently with the Department of Computer Science\",\"Virginia Commonwealth University\",\"Richmond\",\"Virginia\",\"USA\",\"and IITiS Polish Academy of Sciences\",\"Poland. Email: kcios \'@\' vcu.edu \n**Source**: UCI \n**Please cite**: Higuera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126 \n\nAbstract: Expression levels of 77 proteins measured in the cerebral cortex of 8 classes of control and Down syndrome mice exposed to context fear conditioning, a task used to assess associative learning.\nSource:\n\nClara Higuera Department of Software Engineering and Artificial Intelligence, Faculty of Informatics and the Department of Biochemistry and Molecular Biology, Faculty of Chemistry, University Complutense, Madrid, Spain. \nEmail: clarahiguera \'@\' ucm.es \n\nKatheleen J. Gardiner, creator and owner of the protein expression data, is currently with the Linda Crnic Institute for Down Syndrome, Department of Pediatrics, Department of Biochemistry and Molecular Genetics, Human Medical Genetics and Genomics, and Neuroscience Programs, University of Colorado, School of Medicine, Aurora, Colorado, USA. \nEmail: katheleen.gardiner \'@\' ucdenver.edu \n\nKrzysztof J. Cios is currently with the Department of Computer Science, Virginia Commonwealth University, Richmond, Virginia, USA, and IITiS Polish Academy of Sciences, Poland. \nEmail: kcios \'@\' vcu.edu \n\n\nData Set Information:\n\nThe data set consists of the expression levels of 77 proteins/protein modifications that produced detectable signals in the nuclear fraction of cortex. There are 38 control mice and 34 trisomic mice (Down syndrome), for a total of 72 mice. In the experiments, 15 measurements were registered of each protein per sample/mouse. Therefore, for control mice, there are 38x15, or 570 measurements, and for trisomic mice, there are 34x15, or 510 measurements. The dataset contains a total of 1080 measurements per protein. Each measurement can be considered as an independent sample/mouse. \n\nThe eight classes of mice are described based on features such as genotype, behavior and treatment. According to genotype, mice can be control or trisomic. According to behavior, some mice have been stimulated to learn (context-shock) and others have not (shock-context) and in order to assess the effect of the drug memantine in recovering the ability to learn in trisomic mice, some mice have been injected with the drug and others have not. \n\nClasses: \nc-CS-s: control mice, stimulated to learn, injected with saline (9 mice) \nc-CS-m: control mice, stimulated to learn, injected with memantine (10 mice) \nc-SC-s: control mice, not stimulated to learn, injected with saline (9 mice) \nc-SC-m: control mice, not stimulated to learn, injected with memantine (10 mice) \n\nt-CS-s: trisomy mice, stimulated to learn, injected with saline (7 mice) \nt-CS-m: trisomy mice, stimulated to learn, injected with memantine (9 mice) \nt-SC-s: trisomy mice, not stimulated to learn, injected with saline (9 mice) \nt-SC-m: trisomy mice, not stimulated to learn, injected with memantine (9 mice) \n\nThe aim is to identify subsets of proteins that are discriminant between the classes. \n\n\nAttribute Information:\n\n1 Mouse ID \n2..78 Values of expression levels of 77 proteins; the names of proteins are followed by “_n” indicating that they were measured in the nuclear fraction. For example: DYRK1A_n \n79 Genotype: control (c) or trisomy (t) \n80 Treatment type: memantine (m) or saline (s) \n81 Behavior: context-shock (CS) or shock-context (SC) \n82 Class: c-CS-s, c-CS-m, c-SC-s, c-SC-m, t-CS-s, t-CS-m, t-SC-s, t-SC-m \n\n\nRelevant Papers:\n\nThe posted data were analyzed by: \nHiguera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126 \n\nThe data are a subset of the data analyzed by: \nAhmed MM, Dhanasekaran AR, Block A, Tong S, Costa ACS, Stasko M, et al. (2015) Protein Dynamics Associated with Failed and Rescued Learning in the Ts65Dn Mouse Model of Down Syndrome. PLoS ONE 10(3): e0119491. [Web Link] \n\n\n\n\nCitation Request:\n\nHiguera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126', 'ARFF', '\"lara Higuera Department of Software Engineering and Artificial Intelligence\",\"Faculty of Informatics and the Department of Biochemistry and Molecular Biology\",\"Faculty of Chemistry\",\"University Complutense\",\"Madrid\",\"Spain. Email: clarahiguera \'@\' ucm.es Katheleen J. Gardiner\",\"creator and owner of the protein expression data\",\"is currently with the Linda Crnic Institute for Down Syndrome\",\"Department of Pediatrics\",\"Department of Biochemistry and Molecular Genetics\",\"Human Medical Genetics and Genomics\",\"and Neuroscience Programs\",\"University of Colorado\",\"School of Medicine\",\"Aurora\",\"Colorado\",\"USA. Email: katheleen.gardiner \'@\' ucdenver.edu Krzysztof J. Cios is currently with the Department of Computer Science\",\"Virginia Commonwealth University\",\"Richmond\",\"Virginia\",\"USA\",\"and IITiS Polish Academy of Sciences\",\"Poland. Email: kcios \'@\' vcu.edu\"', NULL, NULL, '2016-02-17 14:32:49', NULL, 'Public', 'Higuera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126', NULL, 'https://www.openml.org/data/download/1804243/phpO6CpB2', 'true', 94, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-21 21:09:16'), -(95, 2, NULL, 'cylinder-bands', '2', '2', '**Author**: Bob Evans, RR Donnelley & Sons Co. \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Cylinder+Bands) - August, 1995 \n**Please cite**: \n\n**Cylinder bands** \nProcess delays known as cylinder banding in rotogravure printing were substantially mitigated using control rules discovered by decision tree induction.\n \nAttribute Information:\n> \n 1. timestamp: numeric;19500101 - 21001231 \n 2. cylinder number: nominal \n 3. customer: nominal; \n 4. job number: nominal; \n 5. grain screened: nominal; yes, no \n 6. ink color: nominal; key, type \n 7. proof on ctd ink: nominal; yes, no \n 8. blade mfg: nominal; benton, daetwyler, uddeholm \n 9. cylinder division: nominal; gallatin, warsaw, mattoon \n 10. paper type: nominal; uncoated, coated, super \n 11. ink type: nominal; uncoated, coated, cover \n 12. direct steam: nominal; use; yes, no * \n 13. solvent type: nominal; xylol, lactol, naptha, line, other \n 14. type on cylinder: nominal; yes, no \n 15. press type: nominal; use; 70 wood hoe, 70 motter, 70 albert, 94 motter \n 16. press: nominal; 821, 802, 813, 824, 815, 816, 827, 828 \n 17. unit number: nominal; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 \n 18. cylinder size: nominal; catalog, spiegel, tabloid \n 19. paper mill location: nominal; north us, south us, canadian, \n scandanavian, mid european \n 20. plating tank: nominal; 1910, 1911, other \n 21. proof cut: numeric; 0-100 \n 22. viscosity: numeric; 0-100 \n 23. caliper: numeric; 0-1.0 \n 24. ink temperature: numeric; 5-30 \n 25. humifity: numeric; 5-120 \n 26. roughness: numeric; 0-2 \n 27. blade pressure: numeric; 10-75 \n 28. varnish pct: numeric; 0-100 \n 29. press speed: numeric; 0-4000 \n 30. ink pct: numeric; 0-100 \n 31. solvent pct: numeric; 0-100 \n 32. ESA Voltage: numeric; 0-16 \n 33. ESA Amperage: numeric; 0-10 \n 34. wax: numeric ; 0-4.0 \n 35. hardener: numeric; 0-3.0 \n 36. roller durometer: numeric; 15-120 \n 37. current density: numeric; 20-50 \n 38. anode space ratio: numeric; 70-130 \n 39. chrome content: numeric; 80-120 \n 40. band type: nominal; class; band, no band \n\nNotes: \n* cylinder number is an identifier and should be ignored when modelling the data', 'ARFF', NULL, NULL, NULL, '2016-03-30 22:09:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1854224/phpAz9Len', 'true', 95, 'band_type', NULL, '\"timestamp\",\"cylinder_number\"', NULL, 'public', NULL, NULL, NULL, '2016-03-30 22:09:17'), -(96, 2, NULL, 'cjs', '3', NULL, '**Author**: Dr. Fernando Camacho \n**Source**: Unknown - 1995 \n**Please cite**: Camacho, F. and Arron, G. (1995) Effects of the regulators paclobutrazol and flurprimidol on the growth of terminal sprouts formed on trimmed silver maple trees. Canadian Journal of Statistics 3(23).\n\nData on tree growth used in the Case Study published in the September, 1995 issue of the Canadian Journal of Statistics. This data set was been provided by Dr. Fernando Camacho, Ontario Hydro Technologies, 800 Kipling Ave, Toronto Canada M3Z 5S4. It forms the basis of the Case Study in Data Analysis published in the Canadian Journal of Statistics, September 1995. It can be freely used for noncommercial purposes, as long as proper acknowledgement to the source and to the Canadian Journal of Statistics is made.\n\n\nDescription\n\n\nThe effects of the Growth Regulators Paclobutrazol (PP 333)\nand Flurprimidol (EL-500) on the Number and Length of Internodes\nin Terminal Sprouts Formed on Trimmed Silver Maple Trees.\n \nIntroduction:\n \nThe trimming of trees under distribution lines on city streets and\nin rural areas is a major problem and expense for electrical\nutilities. Such operations are routinely performed at intervals of\none to eight years depending upon the individual species growth rate\nand the amount of clearance required. Ontario Hydro trims about\n500,000 trees per year at a cost of about $25 per tree.\n \nMuch effort has been spent in developing chemicals for the horticultural\nindustry to retard the growth of woody and herbaceous plants. Recently,\na group of new growth regulators was introduced which was shown to be\neffective in controlling the growth of trees without producing\nnoticeable injury symptoms. In this group are PP 333 ( common name\npaclobutrazol) (2RS, 3RS - 1 -(4-chlorophenyl) - 4,4 - dimethyl - 2 -\n(1,2,4-triazol-l-yl) pentan - 3- ol and EL-500 (common name flurprimidol\nand composition alpha - (1-methylethyl) - alpha - [4-(trifluromethoxyl)\nphenyl] - 5- pyrimidine - methanol). Both EL-500 and PP-333 have been\nreported to control excessive sprout growth in a number of species\nwhen applied as a foliar spray, as a soil drench, or by trunk injection.\nSprout length is a function of both the number of internodes and\nthe length of the individual internodes in the sprout. While there\nhave been many reports that both PP 333 and EL-500 cause a reduction\nin the length of internodes formed in sprouts on woody plants treated\nwith the growth regulators, there has been but one report that EL-500\napplication to apple trees resulted in a reduction of the number\nof internodes formed per sprout.\n \nThe purpose of the present study was to investigate the length of the\nterminal sprouts, the length of the individual internodes in those\nsprouts, and the number of internodes in trimmed silver maple trees\nfollowing trunk injection with the growth regulators PP 333 and EL-500.\n \nExperimental Details.\n \nMultistemmed 12-year-old silver maple trees growing at Wesleyville,\nOntario were trunk injected with methanolic solutions of EL-500\nand PP-333 in May of 1985 using a third generation Asplundh\ntree injector.\n \nTwo different application rates (20 g/L and 4 g/L) were used for each\nchemical. The volume of solution (and hence the amount of active\ningredient) injected into each tree was determined from the diameter\nof the tree, using the formula: vol(mL) = (dbh)*(dbh)*.492 where dbh\nis the diameter at breast height. Two sets of control trees were\nincluded in the experiment. In one set, tree received no injection\n(control) and in a second set, the trees were injected with\nmethanol, the carrier in the growth regulator solutions. Ten trees,\nchosen at random, were used in each of the control and experimental\nsets. Prior to injection, all the trees were trimmed by a forestry\ncrew, with their heights being reduced by about one third.\n \nIn January 1987, twenty months after the trees were injected, between\nsix and eight limbs were removed at random from the bottom two-thirds\nof the canopy of each of the ten trees in each experimental and control\nset. The limbs were returned to the laboratory and the length of all\nthe terminal sprouts, the lengths of the individual internodes, and\nthe number of internodes recorded. Between one and 25 terminal\nsprouts were found on each limb collected. Sprouts which had a\nlength of 1 cm or less were recorded as being 1 cm in length.\nIn such spouts, the internode lengths were not measured, but were\ncalculated from the total length of the sprout and the number\nof internodes counted. Internode lengths were then expressed to one\ndecimal place. In two instances, one of the ten trees in a set\ncould not be sampled because limb removal would have jeopardized the\nhealth of the tree over the long-term.\n \nData set:\n \nEach of the records represents a terminal sprout and contains the\nfollowing information:\n N the sprout number\n TR treatment 1 control\n 2 methanol control\n 3 PP 333 20g/L\n 4 PP 333 4g/L\n 5 EL 500 20g/L\n 6 EL 500 4g/L\n TREE tree id\n BR branch id\n TL total sprout length (cm)\n IN number of internodes on the sprout\n INTER a list of the lengths of the internodes in the sprout,\n starting from the base of the sprout (129 entries)\n \nSprouts 1868 to 1879 do not have branch identification data.', 'ARFF', NULL, NULL, NULL, '2016-04-11 18:32:46', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1910442/phpDAC5gS', 'true', 96, 'TR', 'N', NULL, NULL, 'public', NULL, NULL, NULL, '2016-04-11 18:32:46'), -(97, 64, NULL, 'dresses-sales', '2', NULL, '**Author**: Muhammad Usman & Adeel Ahmed \r\n**Source**: origin source at [UCI](https://archive.ics.uci.edu/ml/datasets/Dresses_Attribute_Sales) \r\n**Please cite**: \r\n\r\n####1. Summary\r\n\r\nThis dataset contain attributes of dresses and their recommendations according to their sales.Sales are monitor on the basis of alternate days. \r\n\r\nThe attributes present analyzed are: Style, Price, Rating, Size, Season, NeckLine, SleeveLength, waiseline, Material, FabricType, Decoration, Pattern, Type, Recommendation.\r\n\r\nContact:\r\n```\r\nMuhammad Usman & Adeel Ahmed, usman.madspot \'@\' gmail.com adeel.ahmed92 \'@\' gmail.com, Air University, Students at Air University.\r\n```\r\n\r\n####2: Attribute Information:\r\n\r\n```\r\nStyle: Bohemia,brief,casual,cute,fashion,flare,novelty,OL,party,sexy,vintage,work. \r\nPrice:Low,Average,Medium,High,Very-High \r\nRating:1-5 \r\nSize:S,M,L,XL,Free \r\nSeason:Autumn,winter,Spring,Summer \r\nNeckLine:O-neck,backless,board-neck,Bowneck,halter,mandarin-collor,open,peterpan-collor,ruffled,scoop,slash-neck,square-collar,sweetheart,turndowncollar,V-neck. \r\nSleeveLength:full,half,halfsleeves,butterfly,sleveless,short,threequarter,turndown,null \r\nwaiseline:dropped,empire,natural,princess,null. \r\nMaterial:wool,cotton,mix etc \r\nFabricType:shafoon,dobby,popline,satin,knitted,jersey,flannel,corduroy etc \r\nDecoration:applique,beading,bow,button,cascading,crystal,draped,embroridary,feathers,flowers etc \r\nPattern type: solid,animal,dot,leapard etc \r\nRecommendation:0,1 \r\n```\r\n', 'ARFF', NULL, NULL, NULL, '2016-04-11 19:57:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1910507/phpcFPMhq', 'true', 97, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-04-11 19:57:27'), -(98, 64, NULL, 'LED-display-domain-7digit', '1', '1', '1. Title of Database: LED display domain\n\n2. Sources:\n (a) Breiman,L., Friedman,J.H., Olshen,R.A., & Stone,C.J. (1984). \n Classification and Regression Trees. Wadsworth International\n Group: Belmont, California. (see pages 43-49).\n (b) Donor: David Aha \n (c) Date: 11/10/1988\n\n3. Past Usage: (many)\n 1. CART book (above):\n -- Optimal Bayes classification rate: 74%\n -- CART decision tree algorithm: 71% (resubstitution estimate)\n -- Nearest Neighbor Algorithm: 71%\n -- 200 training and 5000 test instances\n \n 2. Quinlan,J.R. (1987). Simplifying Decision Trees. In International\n Journal of Man-Machine Studies (to appear).\n -- C4 decision tree algorithm: 72.6% (using pessimistic pruning)\n -- 2000 training and 500 test instances\n 3. Tan,M. & Eshelman,L. (1988). Using Weighted Networks to Represent\n Classification Knowledge in Noisy Domains. In Proceedings of the\n 5th International Conference on Machine Learning, 121-134, Ann\n Arbor, Michigan: Morgan Kaufmann. \n -- IWN system: 73.3% (using the And-OR classification algorithm)\n -- 400 training and 500 test cases\n\n4. Relevant Information Paragraph:\n This simple domain contains 7 Boolean attributes and 10 concepts,\n the set of decimal digits. Recall that LED displays contain 7\n light-emitting diodes -- hence the reason for 7 attributes. The\n problem would be easy if not for the introduction of noise. In\n this case, each attribute value has the 10% probability of having\n its value inverted. \n\n It\'s valuable to know the optimal Bayes rate for these databases.\n In this case, the misclassification rate is 26% (74% classification\n accuracy).\n \n5. Number of Instances: 500. But in the original URL you can find a C script and run it choosing the number of instances to be generated.\n\n6. Number of Attributes: 7 (all Boolean-valued)\n\n7. Attribute Information:\n -- All attribute values are either 0 or 1, according to whether\n the corresponding light is on or not for the decimal digit.\n -- Each attribute (excluding the class attribute, which is an\n integer ranging between 0 and 9 inclusive) has a 10% percent\n chance of being inverted.\n\n8. Missing Attribute Values: None\n\n9. Class Distribution: 10% (Theoretical)\n -- Each concept (digit) has the same theoretical probability\n distribution. The program randomly selects the attribute.', 'ARFF', NULL, NULL, NULL, '2016-07-29 20:36:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4535757/phpSj3fWL', 'true', 98, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://sci2s.ugr.es/keel/dataset.php?cod=63, https://archive.ics.uci.edu/ml/datasets/LED+Display+Domain', NULL, '2016-07-29 20:36:10'), -(99, 64, NULL, 'texture', '1', '1', '**Author**: Laboratory of Image Processing and Pattern Recognition (INPG-LTIRF), Grenoble - France. \r\n**Source**: [original](https://www.elen.ucl.ac.be/neural-nets/Research/Projects/ELENA/databases/REAL/texture/) - ELENA project \r\n**Please cite**: \r\n\r\n####1. Summary\r\n\r\nThis database was generated by the Laboratory of Image Processing and Pattern Recognition (INPG-LTIRF) in the development of the Esprit project ELENA No. 6891 and the Esprit working group ATHOS No. 6620.\r\n```\r\n (a) Original source:\r\n\r\n P. Brodatz \"Textures: A Photographic Album for Artists and Designers\",\r\n Dover Publications,Inc.,New York, 1966.\r\n\r\n (b) Creation: Laboratory of Image Processing and Pattern Recognition\r\n\r\n Institut National Polytechnique de Grenoble INPG\r\n Laboratoire de Traitement d\'Image et de Reconnaissance de Formes LTIRF\r\n Av. Felix Viallet, 46\r\n F-38031 Grenoble Cedex\r\n France\r\n\r\n (c) Contact: Dr. A. Guerin-Dugue, INPG-LTIRF, guerin@tirf.inpg.fr\r\n```\r\n\r\n####2. Past Usage:\r\n\r\nThis database has a private usage at the TIRF laboratory. It has been created in order to study the textures discrimination with high order statistics.\r\n\r\n```\r\nA.Guerin-Dugue, C. Aviles-Cruz, \"High Order Statistics from Natural Textured Images\",\r\nIn ATHOS workshop on System Identification and High Order Statistics, Sophia-Antipolis, France, September 1993.\r\n\r\nGuerin-Dugue, A. and others, Deliverable R3-B4-P - Task B4: Benchmarks, Technical report,\r\nElena-NervesII \"Enhanced Learning for Evolutive Neural Architecture\", ESPRIT-Basic Research Project Number 6891,\r\nJune 1995.\r\n```\r\n\r\n####3. Relevant Information:\r\n\r\nThe aim is to distinguish between 11 different textures (Grass lawn, Pressed calf leather, Handmade paper, Raffia looped to a high pile, Cotton canvas, ...), each pattern (pixel) being characterised by 40 attributes built by the estimation of fourth order modified moments in four orientations: 0, 45, 90 and 135 degrees.\r\n\r\nA statistical method based on the extraction of fourth order moments for the characterization of natural micro-textures was developed called \"fourth order modified moments\" (mm4) [Guerin93], this method measures the deviation from first-order Gauss-Markov process, for each texture. The features were estimated in four directions to take into account the possible orientations of the textures (0, 45, 90 and 135 degrees). Only correlation between the current pixel, the first neighbourhood and the second neighbourhood are taken into account. This small neighbourhood is adapted to the fine grain property of the textures.\r\n\r\nThe data set contains 11 classes of 500 instances and each class refers to a type of texture in the Brodatz album.\r\n\r\nThe database dimension is 40 plus one for the class label. The 40 attributes were build respectively by the estimation of the following fourth order modified moments in four orientations: 0, 45, 90 and 135 degrees: mm4(000), mm4(001), mm4(002), mm4(011), mm4(012), mm4(022), mm4(111), mm4(112), mm4(122) and mm4(222).\r\n\r\n!! Patterns are always sorted by class and are presented in the increasing order of their class label in each dataset relative to the texture database (texture.dat, texture_CR.dat, texture_PCA.dat, texture_DFA.dat)\r\n\r\n####4. Class:\r\n\r\nThe class label is a code for the following classes:\r\n```\r\n Class Class label\r\n 2 Grass lawn (D09) \r\n 3 Pressed calf leather (D24) \r\n 4 Handmade paper (D57) \r\n 6 Raffia looped to a high pile: (D84) \r\n 7 Cotton canvas (D77) \r\n 8 Pigskin (D92) \r\n 9 Beach sand: (D28) \r\n 10 Beach sand (D29) \r\n 12 Oriental straw cloth (D53) \r\n 13 Oriental straw cloth (D78) \r\n 14 Oriental grass fiber cloth (D79) \r\n```\r\n\r\n####5. Summary Statistics:\r\n\r\nTable here below provides for each attribute of the database the dynamic (Min and Max values), the mean value and the standard deviation.\r\n\r\n```\r\nAttribute Min Max Mean Standard \r\n deviation \r\n\r\n 1 -1.4495 0.7741 -1.0983 0.2034\r\n 2 -1.2004 0.3297 -0.5867 0.2055\r\n 3 -1.3099 0.3441 -0.5838 0.3135\r\n 4 -1.1104 0.5878 -0.4046 0.2302\r\n 5 -1.0534 0.4387 -0.3307 0.2360\r\n 6 -1.0029 0.4515 -0.2422 0.2225\r\n 7 -1.2076 0.5246 -0.6026 0.2003\r\n 8 -1.0799 0.3980 -0.4322 0.2210\r\n 9 -1.0570 0.4369 -0.3317 0.2361\r\n 10 -1.2580 0.3546 -0.5978 0.3268\r\n 11 -1.4495 0.7741 -1.0983 0.2034\r\n 12 -1.0831 0.3715 -0.5929 0.2056\r\n 13 -1.1194 0.6347 -0.4019 0.3368\r\n 14 -1.0182 0.1573 -0.6270 0.1390\r\n 15 -0.9435 0.1642 -0.4482 0.1952\r\n 16 -0.9944 0.0357 -0.5763 0.1587\r\n 17 -1.1722 0.0201 -0.7331 0.1955\r\n 18 -1.0174 0.1155 -0.4919 0.2335\r\n 19 -1.0044 0.0833 -0.4727 0.2257\r\n 20 -1.1800 0.4392 -0.4831 0.3484\r\n 21 -1.4495 0.7741 -1.0983 0.2034\r\n 22 -1.2275 0.5963 -0.7363 0.2220\r\n 23 -1.3412 0.4464 -0.7771 0.3290\r\n 24 -1.1774 0.6882 -0.5770 0.2646\r\n 25 -1.1369 0.4098 -0.5085 0.2538\r\n 26 -1.1099 0.3725 -0.4038 0.2515\r\n 27 -1.2393 0.6120 -0.7279 0.2278\r\n 28 -1.1540 0.4221 -0.5863 0.2446\r\n 29 -1.1323 0.3916 -0.5090 0.2526\r\n 30 -1.4224 0.4718 -0.7708 0.3264\r\n 31 -1.4495 0.7741 -1.0983 0.2034\r\n 32 -1.1789 0.5647 -0.6463 0.1890\r\n 33 -1.1473 0.6755 -0.4919 0.3304\r\n 34 -1.1228 0.3132 -0.6435 0.1441\r\n 35 -1.0145 0.3396 -0.4918 0.1922\r\n 36 -1.0298 0.1560 -0.5934 0.1704\r\n 37 -1.2534 0.0899 -0.7795 0.1641\r\n 38 -1.0966 0.1944 -0.5541 0.2111\r\n 39 -1.0765 0.2019 -0.5230 0.2015\r\n 40 -1.2155 0.4647 -0.5677 0.3091\r\n```\r\n\r\nThe dynamic of the attributes is in [-1.45 - 0.775]. The database resulting from the centering and reduction by attribute of the Texture database is on the ftp server in the `REAL/texture/texture_CR.dat.Z\' file.\r\n\r\n####6. Confusion matrix.\r\n\r\nThe following confusion matrix of the k_NN classifier was obtained with a Leave_One_Out error counting method on the texture_CR.dat database. k was set to 1 in order to reach the minimum mean error rate : 1.0 +/- 0.8%.\r\n\r\n```\r\n Class 2 3 4 6 7 8 9 10 12 13 14 \r\n 2 97.0 1.0 0.4 0.0 0.0 0.0 1.6 0.0 0.0 0.0 0.0 \r\n 3 0.2 99.0 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.0 0.4 \r\n 4 1.0 0.0 98.8 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.0 \r\n 6 0.0 0.0 0.0 99.4 0.0 0.0 0.0 0.6 0.0 0.0 0.0 \r\n 7 0.0 0.0 0.0 0.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 \r\n 8 0.0 0.0 0.0 0.0 0.0 98.6 0.0 1.4 0.0 0.0 0.0 \r\n 9 0.4 0.0 0.2 0.0 0.0 0.2 98.8 0.4 0.0 0.0 0.0 \r\n 10 0.0 0.0 0.0 0.0 0.0 1.4 0.0 98.6 0.0 0.0 0.0 \r\n 12 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100.0 0.0 0.0 \r\n 13 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.8 0.2 \r\n 14 0.0 0.4 0.0 0.0 0.0 0.4 0.0 0.0 0.2 0.0 99.0 \r\n```\r\n\r\n7. Result of the Principal Component Analysis:\r\n\r\nThe Principal Components Analysis is a very classical method in pattern recognition [Duda73]. PCA reduces the sample dimension in a linear way for the best representation in lower dimensions keeping the maximum of inertia. The best axe for the representation is however not necessary the best axe for the discrimination. After PCA, features are selected according to the percentage of initial inertia which is covered by the different axes and the number of features is determined according to the percentage of initial inertia to keep for the classification process.\r\n\r\nThis selection method has been applied on the texture_CR database. When quasi-linear correlations exists between some initial features, these redundant dimensions are removed by PCA and this preprocessing is then recommended. In this case, before a PCA, the determinant of the data covariance matrix is near zero; this database is thus badly conditioned for all process which use this information (the quadratic classifier for example).\r\n\r\nThe following file is available for the texture database: \'\'texture_PCA.dat.Z\'\', it is the projection of the \'\'texture_CR\'\' database on its principal components (sorted in a decreasing order of the related inertia percentage; so, if you desire to work on the database projected on its x first principal components you only have to keep the x first attributes of the texture_PCA.dat database and the class labels (last attribute)).\r\n\r\nTable here below provides the inertia percentages associated to the eigenvalues corresponding to the principal component axis sorted in the decreasing order of the associated inertia percentage. 99.85 percent of the total database inertia will remain if the 20 first principal components are kept.\r\n\r\n```\r\n Eigen Value Inertia Cumulated\r\n value percentage inertia\r\n\r\n 1 30.267500000 75.6687000000 75.6687000000 \r\n 2 3.6512500000 9.1281300000 84.7969000000 \r\n 3 2.2937000000 5.7342400000 90.5311000000 \r\n 4 1.7039700000 4.2599300000 94.7910000000 \r\n 5 0.6716540000 1.6791300000 96.4702000000 \r\n 6 0.5015290000 1.2538200000 97.7240000000 \r\n 7 0.1922830000 0.4807070000 98.2047000000 \r\n 8 0.1561070000 0.3902670000 98.5950000000 \r\n 9 0.1099570000 0.2748920000 98.8699000000 \r\n 10 0.0890891000 0.2227230000 99.0926000000 \r\n 11 0.0656016000 0.1640040000 99.2566000000 \r\n 12 0.0489988000 0.1224970000 99.3791000000 \r\n 13 0.0433819000 0.1084550000 99.4875000000 \r\n 14 0.0345022000 0.0862554000 99.5738000000 \r\n 15 0.0299203000 0.0748007000 99.6486000000 \r\n 16 0.0248857000 0.0622141000 99.7108000000 \r\n 17 0.0167901000 0.0419752000 99.7528000000 \r\n 18 0.0161633000 0.0404083000 99.7932000000 \r\n 19 0.0128898000 0.0322246000 99.8254000000 \r\n 20 0.0113884000 0.0284710000 99.8539000000 \r\n 21 0.0078481400 0.0196204000 99.8735000000 \r\n 22 0.0071527800 0.0178820000 99.8914000000 \r\n 23 0.0067661400 0.0169153000 99.9083000000 \r\n 24 0.0053149500 0.0132874000 99.9216000000 \r\n 25 0.0051102600 0.0127757000 99.9344000000 \r\n 26 0.0047116600 0.0117792000 99.9461000000 \r\n 27 0.0036193700 0.0090484300 99.9552000000 \r\n 28 0.0033222000 0.0083054900 99.9635000000 \r\n 29 0.0030722400 0.0076806100 99.9712000000 \r\n 30 0.0026373300 0.0065933300 99.9778000000 \r\n 31 0.0020996800 0.0052492000 99.9830000000 \r\n 32 0.0019376500 0.0048441200 99.9879000000 \r\n 33 0.0015642300 0.0039105700 99.9918000000 \r\n 34 0.0009679080 0.0024197700 99.9942000000 \r\n 35 0.0009578000 0.0023945000 99.9966000000 \r\n 36 0.0007379780 0.0018449400 99.9984000000 \r\n 37 0.0006280250 0.0015700600 100.000000000\r\n 38 0.0000000040 0.0000000099 100.000000000 \r\n 39 0.0000000001 0.0000000003 100.000000000 \r\n 40 0.0000000008 0.0000000019 100.000000000 \r\n\r\n```\r\n\r\nThis matrix can be found in the texture_EV.dat file.\r\n\r\nThe Discriminant Factorial Analysis (DFA) can be applied to a learning database where each learning sample belongs to a particular class [Duda73]. The number of discriminant features selected by DFA is fixed in function of the number of classes (c) and of the number of input dimensions (d); this number is equal to the minimum between d and c-1. In the usual case where d is greater than c, the output dimension is fixed equal to the number of classes minus one and the discriminant axes are selected in order to maximize the between-variance and to minimize the within-variance of the classes.\r\n\r\nThe discrimination power (ratio of the projected between-variance over the projected within-variance) is not the same for each discriminant axis: this ratio decreases for each axis. So for a problem with many classes, this preprocessing will not be always efficient as the last output features will not be so discriminant. This analysis uses the information of the inverse of the global covariance matrix, so the covariance matrix must be well conditioned (for example, a preliminary PCA must be applied to remove the linearly correlated dimensions).\r\n\r\nThe Discriminant Factorial Analysis (DFA) has been applied on the 18 first principal components of the texture_PCA database (thus by keeping only the 18 first attributes of these databases before to apply the DFA preprocessing) in order to build the texture_DFA.dat.Z database file, having 10 dimensions (the texture database having 11 classes). In the case of the texture database, experiments shown that a DFA preprocessing is very useful and most of the time improved the classifiers performances.\r\n\r\n[Duda73] Duda, R.O. and Hart, P.E.,Pattern Classification and Scene Analysis, John Wiley & Sons, 1973.\r\n', 'ARFF', NULL, NULL, NULL, '2016-07-29 21:03:14', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4535764/phpBDgUyY', 'true', 99, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://sci2s.ugr.es/keel/dataset.php?cod=72', NULL, '2016-07-29 21:03:14'), -(100, 2, NULL, 'Australian', '3', '2', '**Author**: Confidential. Donated by Ross Quinlan \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Statlog+(Australian+Credit+Approval))/LibSVM - 2014-11-14 \r\n**Please cite**: \r\n\r\nThis is the famous Australian dataset, retrieved 2014-11-14 from the libSVM site.\r\nIt was normalized.\r\n\r\nThe original version is from [UCI](https://archive.ics.uci.edu/ml/datasets/Statlog+(Australian+Credit+Approval)).\r\n\r\nThis file concerns credit card applications. All attribute names and values have been changed to meaningless symbols to protect confidentiality of the data. \r\n\r\nThis dataset is interesting because there is a good mix of attributes -- continuous, nominal with small numbers of values, and nominal with larger numbers of values. There are also a few missing values. \r\n\r\n\r\nSource: Statlog / Australian\r\n# of classes: 2\r\n# of data: 690\r\n# of features: 14', 'ARFF', NULL, NULL, NULL, '2016-09-21 15:43:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4599631/phpjP8PU3', 'true', 100, 'Y', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-09-21 15:43:02'), -(101, 2, NULL, 'UNIX_user_data', '1', NULL, '**Author**: Terran Lane (terran@ecn.purdue.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/UNIX+User+Data) - Date unknown \n**Please cite**: \n\nThis file contains 9 sets of sanitized user data drawn from the command histories of 8 UNIX computer users at Purdue over the course of up to 2 years (USER0 and USER1 were generated by the same person, working on different platforms and different projects). The data is drawn from tcsh(1) history files and has been parsed and sanitized to remove filenames, user names, directory structures, web addresses, host names, and other possibly identifying items. Command names, flags, and shell metacharacters have been preserved. Additionally, **SOF** and **EOF** tokens have been inserted at the start and end of\nshell sessions, respectively. Sessions are concatenated by date order and tokens appear in the order issued within the shell session, but no timestamps are included in this data. For example, the two sessions:\n\ncd ~/private/docs \nls -laF | more \ncat foo.txt bar.txt zorch.txt > somewhere \nexit \n\ncd ~/games/ \nxquake & \nfg \nvi scores.txt \nmailx john_doe@somewhere.com \nexit \n\nwould be represented by the token stream \n\n**SOF** \ncd \n\\<1\\> (one \"file name\" argument) \nls \n-laF \n| \nmore \ncat \n\\<3\\> (three \"file\" arguments)\n\\> \n\\<1\\> \nexit \n**EOF** \n**SOF** \ncd \n\\<1\\> \nxquake \n& \nfg \nvi \n\\<1\\> \nmailx \n\\<1\\> \nexit \n**EOF**\n\nThis data is made available under conditions of anonymity for the contributing users and may be used for research purposes only. Summaries and research results employing this data may be published, but literal tokens or token sequences from the data may not be published except with express consent of the originators of the data. No portion of this data may be released with or included in a commercial product, nor may any portion of this data be sold or redistributed for profit or as part of of a profit-making endeavor.', 'ARFF', NULL, NULL, NULL, '2014-09-27 10:55:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52413/UNIX_user_data.arff', 'true', 101, 'user', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-27 10:55:59'), -(102, 402, NULL, 'fourclass_scale', '1', NULL, '**Author**: Tin Kam Ho and Eugene M. Kleinberg. \nlibSVM\",\"AAD group \n**Source**: [original](http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html) - Date unknown \n**Please cite**: \n\n#Dataset from the LIBSVM data repository.\n\nPreprocessing: transform to two-class', 'Sparse_ARFF', '\"Tin Kam Ho and Eugene M. Kleinberg.\"', '\"libSVM\",\"AAD group\"', NULL, '2015-06-02 11:17:44', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1594035/phpeLklTK', 'true', 102, 'class', NULL, NULL, NULL, 'public', NULL, 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html', NULL, '2015-06-02 11:17:44'), -(103, 1, 0, 'kin8nm', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis is data set is concerned with the forward kinematics of an 8 link\n robot arm. Among the existing variants of this data set we have used\n the variant 8nm, which is known to be highly non-linear and medium\n noisy.\n\n Original source: DELVE repository of data. \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 8192 cases, 9 attributes (0 nominal, 9 continuous).', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3626/dataset_2175_kin8nm.arff', 'true', 103, 'y', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:04'), -(104, 1, 0, 'mbagrade', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3627/dataset_2176_mbagrade.arff', 'true', 104, 'grade_point_average', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:07'), -(105, 1, 0, 'wisconsin', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Wisconsin Prognostic Breast Cancer (WPBC)\n \n 2. Source Information\n \n a) Creators: \n \n Dr. William H. Wolberg, General Surgery Dept., University of\n Wisconsin, Clinical Sciences Center, Madison, WI 53792\n wolberg@eagle.surgery.wisc.edu\n \n W. Nick Street, Computer Sciences Dept., University of\n Wisconsin, 1210 West Dayton St., Madison, WI 53706\n street@cs.wisc.edu 608-262-6619\n \n Olvi L. Mangasarian, Computer Sciences Dept., University of\n Wisconsin, 1210 West Dayton St., Madison, WI 53706\n olvi@cs.wisc.edu \n \n b) Donor: Nick Street\n \n c) Date: December 1995\n \n 3. Past Usage:\n \n Various versions of this data have been used in the following\n publications: \n \n (i) W. N. Street, O. L. Mangasarian, and W.H. Wolberg. \n An inductive learning approach to prognostic prediction. \n In A. Prieditis and S. Russell, editors, Proceedings of the\n Twelfth International Conference on Machine Learning, pages\n 522--530, San Francisco, 1995. Morgan Kaufmann.\n \n (ii) O.L. Mangasarian, W.N. Street and W.H. Wolberg. \n Breast cancer diagnosis and prognosis via linear programming. \n Operations Research, 43(4), pages 570-577, July-August 1995. \n \n (iii) W.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. \n Computerized breast cancer diagnosis and prognosis from fine\n needle aspirates. Archives of Surgery 1995;130:511-516. \n \n (iv) W.H. Wolberg, W.N. Street, and O.L. Mangasarian. \n Image analysis and machine learning applied to breast cancer\n diagnosis and prognosis. Analytical and Quantitative Cytology\n and Histology, Vol. 17 No. 2, pages 77-87, April 1995.\n \n (v) W.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. \n Computer-derived nuclear ``grade\'\' and breast cancer prognosis. \n Analytical and Quantitative Cytology and Histology, Vol. 17,\n pages 257-264, 1995. \n \n See also:\n http://www.cs.wisc.edu/~olvi/uwmp/mpml.html\n http://www.cs.wisc.edu/~olvi/uwmp/cancer.html\n \n Results:\n \n Two possible learning problems:\n \n 1) Predicting field 2, outcome: R = recurrent, N = nonrecurrent\n - Dataset should first be filtered to reflect a particular\n endpoint; e.g., recurrences before 24 months = positive,\n nonrecurrence beyond 24 months = negative.\n - 86.3% accuracy estimated accuracy on 2-year recurrence using\n previous version of this data. Learning method: MSM-T (see\n below) in the 4-dimensional space of Mean Texture, Worst Area,\n Worst Concavity, Worst Fractal Dimension.\n \n 2) Predicting Time To Recur (field 3 in recurrent records)\n - Estimated mean error 13.9 months using Recurrence Surface\n Approximation. (See references (i) and (ii) above)\n \n 4. Relevant information\n \n Each record represents follow-up data for one breast cancer\n case. These are consecutive patients seen by Dr. Wolberg\n since 1984, and include only those cases exhibiting invasive\n breast cancer and no evidence of distant metastases at the\n time of diagnosis. \n \n The first 30 features are computed from a digitized image of a\n fine needle aspirate (FNA) of a breast mass. They describe\n characteristics of the cell nuclei present in the image.\n A few of the images can be found at\n http://www.cs.wisc.edu/~street/images/\n \n The separation described above was obtained using\n Multisurface Method-Tree (MSM-T) [K. P. Bennett, \"Decision Tree\n Construction Via Linear Programming.\" Proceedings of the 4th\n Midwest Artificial Intelligence and Cognitive Science Society,\n pp. 97-101, 1992], a classification method which uses linear\n programming to construct a decision tree. Relevant features\n were selected using an exhaustive search in the space of 1-4\n features and 1-3 separating planes.\n \n The actual linear program used to obtain the separating plane\n in the 3-dimensional space is that described in:\n [K. P. Bennett and O. L. Mangasarian: \"Robust Linear\n Programming Discrimination of Two Linearly Inseparable Sets\",\n Optimization Methods and Software 1, 1992, 23-34].\n \n The Recurrence Surface Approximation (RSA) method is a linear\n programming model which predicts Time To Recur using both\n recurrent and nonrecurrent cases. See references (i) and (ii)\n above for details of the RSA method. \n \n This database is also available through the UW CS ftp server:\n \n ftp ftp.cs.wisc.edu\n cd math-prog/cpo-dataset/machine-learn/WPBC/\n \n 5. Number of instances: 198\n \n 6. Number of attributes: 34 (ID, outcome, 32 real-valued input features)\n \n 7. Attribute information\n \n 1) ID number\n 2) Outcome (R = recur, N = nonrecur)\n 3) Time (recurrence time if field 2 = R, disease-free time if \n field 2 = N)\n 4-33) Ten real-valued features are computed for each cell nucleus:\n \n a) radius (mean of distances from center to points on the perimeter)\n b) texture (standard deviation of gray-scale values)\n c) perimeter\n d) area\n e) smoothness (local variation in radius lengths)\n f) compactness (perimeter^2 / area - 1.0)\n g) concavity (severity of concave portions of the contour)\n h) concave points (number of concave portions of the contour)\n i) symmetry \n j) fractal dimension (\"coastline approximation\" - 1)\n \n Several of the papers listed above contain detailed descriptions of\n how these features are computed. \n \n The mean, standard error, and \"worst\" or largest (mean of the three\n largest values) of these features were computed for each image,\n resulting in 30 features. For instance, field 4 is Mean Radius, field\n 14 is Radius SE, field 24 is Worst Radius.\n \n Values for features 4-33 are recoded with four significant digits.\n \n 34) Tumor size - diameter of the excised tumor in centimeters\n 35) Lymph node status - number of positive axillary lymph nodes\n observed at time of surgery\n \n 8. Missing attribute values: \n Lymph node status is missing in 4 cases.\n \n 9. Class distribution: 151 nonrecur, 47 recur\n\n-----------------------------------------------------------------------------------------------------------\n Luis Torgo\'s version: (reconstructed)\n - removed the four instances with unknown values of the last attribute\n - exchanged the attribute position of attributes n.3 (Time) and n.35\n (Lymph node).\n - removed the attribute outcome as it is the class attribute if the\n problem is treated as a classification one\n-----------------------------------------------------------------------------------------------------------', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3628/dataset_2177_wisconsin.arff', 'true', 105, 'time', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:10'), -(106, 1, 0, 'vineyard', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3629/dataset_2178_vineyard.arff', 'true', 106, 'lugs_1991', 'row_number', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:12'), -(107, 1, 0, 'bolts', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n \n SUMMARY:\n \n Data from an experiment on the affects of machine adjustments on\n the time to count bolts. Data appear as the STATS (Issue 10) Challenge.\n \n DATA:\n \n Submitted by W. Robert Stephenson, Iowa State University\n email: wrstephe@iastate.edu\n \n A manufacturer of automotive accessories provides hardware, e.g. nuts,\n bolts, washers and screws, to fasten the accessory to the car or truck.\n Hardware is counted and packaged automatically. Specifically, bolts\n are dumped into a large metal dish. A plate that forms the bottom of\n the dish rotates counterclockwise. This rotation forces bolts to the\n outside of the dish and up along a narrow ledge. Due to the vibration\n of the dish caused by the spinning bottom plate, some bolts fall off \n the ledge and back into the dish. The ledge spirals up to a point \n where the bolts are allowed to drop into a pan on a conveyor belt. \n As a bolt drops, it passes by an electronic eye that counts it. When \n the electronic counter reaches the preset number of bolts, the\n rotation is stopped and the conveyor belt is moved forward. \n \n There are several adjustments on the machine that affect its operation. \n These include; a speed setting that controls the speed of rotation\n (SPEED1) of the plate at the bottom of the dish, a total number of \n bolts (TOTAL) to be counted, a second speed setting (SPEED2) that is \n used to change the speed of rotation (usually slowing it down) for the\n last few bolts, the number of bolts to be counted at this second speed\n (NUMBER2), and the sensitivity of the electronic eye (SENS). The \n sensitivity setting is to insure that the correct number of bolts are \n counted. Too few bolts packaged causes customer complaints. Too many\n bolts packaged increases costs. For each run conducted in this \n experiment the correct number of bolts was counted. From an\n engineering standpoint if the correct number of bolts is counted, the \n sensitivity should not affect the time to count bolts. The measured \n response is the time (TIME), in seconds, it takes to count the desired\n number of bolts. In order to put times on a equal footing the\n response to be analyzed is the time to count 20 bolts (T20BOLT).\n Below are the data for 40 combinations of settings. RUN is the order \n in which the data were collected.\n \n Analyze the data. What adjustments have the greatest effect on the \n time to count 20 bolts? How would you adjust the machine to get\n the shortest time to count 20 bolts? Are there any unusual features\n to the data?\n \n The data description and data may be freely used for non-commercial\n purposes and can be freely distributed. Copyright remains with the\n author and STATS Magazine.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:14', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3630/dataset_2179_bolts.arff', 'true', 107, 'T20BOLT', 'RUN', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:14'), -(108, 1, 0, 'cleveland', '1', '1', '**Author**: Andras Janosi, M.D. \nDonor: David W. Aha (aha@ics.uci.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Heart+Disease) - July 1988 \n**Please cite**: The author request that any publications resulting from the use of the data include the name of the author.\n\n**Heart Disease Databases: Cleveland** \nThis database contains 76 attributes, but all published experiments refer to using a subset of 14 of them. In particular, the Cleveland database is the only one that has been used by ML researchers to this date. The \"goal\" field refers to the presence of heart disease in the patient. It is integer valued from 0 (no presence) to 4. Experiments with the Cleveland database have concentrated on simply attempting to distinguish presence (values 1,2,3,4) from absence (value 0). \n \nThe names and social security numbers of the patients were recently removed from the database, replaced with dummy values.\nOne file has been \"processed\", that one containing the Cleveland database. \n \nAttribute documentation: \n>\n 1 id: patient identification number\n 2 ccf: social security number (I replaced this with a dummy value of 0)\n 3 age: age in years\n 4 sex: sex (1 = male; 0 = female)\n 5 painloc: chest pain location (1 = substernal; 0 = otherwise)\n 6 painexer (1 = provoked by exertion; 0 = otherwise)\n 7 relrest (1 = relieved after rest; 0 = otherwise)\n 8 pncaden (sum of 5, 6, and 7)\n 9 cp: chest pain type\n -- Value 1: typical angina\n -- Value 2: atypical angina\n -- Value 3: non-anginal pain\n -- Value 4: asymptomatic\n 10 trestbps: resting blood pressure (in mm Hg on admission to the \n hospital)\n 11 htn\n 12 chol: serum cholestoral in mg/dl\n 13 smoke: I believe this is 1 = yes; 0 = no (is or is not a smoker)\n 14 cigs (cigarettes per day)\n 15 years (number of years as a smoker)\n 16 fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)\n 17 dm (1 = history of diabetes; 0 = no such history)\n 18 famhist: family history of coronary artery disease (1 = yes; 0 = no)\n 19 restecg: resting electrocardiographic results\n -- Value 0: normal\n -- Value 1: having ST-T wave abnormality (T wave inversions and/or ST \n elevation or depression of > 0.05 mV)\n -- Value 2: showing probable or definite left ventricular hypertrophy\n by Estes\' criteria\n 20 ekgmo (month of exercise ECG reading)\n 21 ekgday(day of exercise ECG reading)\n 22 ekgyr (year of exercise ECG reading)\n 23 dig (digitalis used furing exercise ECG: 1 = yes; 0 = no)\n 24 prop (Beta blocker used during exercise ECG: 1 = yes; 0 = no)\n 25 nitr (nitrates used during exercise ECG: 1 = yes; 0 = no)\n 26 pro (calcium channel blocker used during exercise ECG: 1 = yes; 0 = no)\n 27 diuretic (diuretic used used during exercise ECG: 1 = yes; 0 = no)\n 28 proto: exercise protocol\n 1 = Bruce \n 2 = Kottus\n 3 = McHenry\n 4 = fast Balke\n 5 = Balke\n 6 = Noughton \n 7 = bike 150 kpa min/min (Not sure if \"kpa min/min\" is what was \n written!)\n 8 = bike 125 kpa min/min \n 9 = bike 100 kpa min/min\n 10 = bike 75 kpa min/min\n 11 = bike 50 kpa min/min\n 12 = arm ergometer\n 29 thaldur: duration of exercise test in minutes\n 30 thaltime: time when ST measure depression was noted\n 31 met: mets achieved\n 32 thalach: maximum heart rate achieved\n 33 thalrest: resting heart rate\n 34 tpeakbps: peak exercise blood pressure (first of 2 parts)\n 35 tpeakbpd: peak exercise blood pressure (second of 2 parts)\n 36 dummy\n 37 trestbpd: resting blood pressure\n 38 exang: exercise induced angina (1 = yes; 0 = no)\n 39 xhypo: (1 = yes; 0 = no)\n 40 oldpeak = ST depression induced by exercise relative to rest\n 41 slope: the slope of the peak exercise ST segment\n -- Value 1: upsloping\n -- Value 2: flat\n -- Value 3: downsloping\n 42 rldv5: height at rest\n 43 rldv5e: height at peak exercise\n 44 ca: number of major vessels (0-3) colored by flourosopy\n 45 restckm: irrelevant\n 46 exerckm: irrelevant\n 47 restef: rest raidonuclid (sp?) ejection fraction\n 48 restwm: rest wall (sp?) motion abnormality\n 0 = none\n 1 = mild or moderate\n 2 = moderate or severe\n 3 = akinesis or dyskmem (sp?)\n 49 exeref: exercise radinalid (sp?) ejection fraction\n 50 exerwm: exercise wall (sp?) motion \n 51 thal: 3 = normal; 6 = fixed defect; 7 = reversable defect\n 52 thalsev: not used\n 53 thalpul: not used\n 54 earlobe: not used\n 55 cmo: month of cardiac cath (sp?) (perhaps \"call\")\n 56 cday: day of cardiac cath (sp?)\n 57 cyr: year of cardiac cath (sp?)\n 58 num: diagnosis of heart disease (angiographic disease status)\n -- Value 0: < 50% diameter narrowing\n -- Value 1: > 50% diameter narrowing\n (in any major vessel: attributes 59 through 68 are vessels)\n 59 lmt\n 60 ladprox\n 61 laddist\n 62 diag\n 63 cxmain\n 64 ramus\n 65 om1\n 66 om2\n 67 rcaprox\n 68 rcadist\n 69 lvx1: not used\n 70 lvx2: not used\n 71 lvx3: not used\n 72 lvx4: not used\n 73 lvf: not used\n 74 cathef: not used\n 75 junk: not used\n 76 name: last name of patient \n (I replaced this with the dummy string \"name\")', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3631/dataset_2180_cleveland.arff', 'true', 108, 'num', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:17'), -(109, 1, 0, 'auto_price', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis data set consists of three types of entities:\n (a) the specification of an auto in terms of various characteristics;\n (b) its assigned insurance risk rating,;\n (c) its normalized losses in use as compared to other cars. \n The second rating corresponds to the degree to which the auto is more risky than its price indicates. Cars are initially\n assigned a risk factor symbol associated with its price. Then, if it is more risky (or less), this symbol is adjusted by\n moving it up (or down) the scale. Actuarians call this process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.The third factor is the relative average loss payment per insured vehicle year.\n This value is normalized for all autos within a particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car per year.\n - Note: Several of the attributes in the database could be used as a \"class\" attribute.\n The original data (from the UCI repository) (http://www.ics.uci.edu/~mlearn/MLSummary.html) has 205 instances\n described by 26 attributes :\n - 15 continuous\n - 1 integer\n - 10 nominal\n The following provides more information on these attributes:\n \n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback,convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n The original data also has some missing attribute values denoted by \"?\" : \n \n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4\n \n I\'ve changed the original data in the following way :\n - All instances with unknowns were removed giving 159 instances.\n - The goal variable is \"price\"\n - All nominal attributes (10) were removed.\n \n Original source: UCI machine learning repository. (http://www.ics.uci.edu/~mlearn/MLSummary.html). \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 159 cases; 14 continuous variables; 1 nominal vars..', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:20', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3632/dataset_2181_auto_price.arff', 'true', 109, 'price', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:20'), -(110, 1, 0, 'autoMpg', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identifier attribute deleted.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n 1. Title: Auto-Mpg Data\n \n 2. Sources:\n (a) Origin: This dataset was taken from the StatLib library which is\n maintained at Carnegie Mellon University. The dataset was \n used in the 1983 American Statistical Association Exposition.\n (c) Date: July 7, 1993\n \n 3. Past Usage:\n - See 2b (above)\n - Quinlan,R. (1993). Combining Instance-Based and Model-Based Learning.\n In Proceedings on the Tenth International Conference of Machine \n Learning, 236-243, University of Massachusetts, Amherst. Morgan\n Kaufmann.\n \n 4. Relevant Information:\n \n This dataset is a slightly modified version of the dataset provided in\n the StatLib library. In line with the use by Ross Quinlan (1993) in\n predicting the attribute \"mpg\", 8 of the original instances were removed \n because they had unknown values for the \"mpg\" attribute. The original \n dataset is available in the file \"auto-mpg.data-original\".\n \n \"The data concerns city-cycle fuel consumption in miles per gallon,\n to be predicted in terms of 3 multivalued discrete and 5 continuous\n attributes.\" (Quinlan, 1993)\n \n 5. Number of Instances: 398\n \n 6. Number of Attributes: 9 including the class attribute\n \n 7. Attribute Information:\n \n 1. mpg: continuous\n 2. cylinders: multi-valued discrete\n 3. displacement: continuous\n 4. horsepower: continuous\n 5. weight: continuous\n 6. acceleration: continuous\n 7. model year: multi-valued discrete\n 8. origin: multi-valued discrete\n 9. car name: string (unique for each instance)\n \n 8. Missing Attribute Values: horsepower has 6 missing values', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:22', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3633/dataset_2182_autoMpg.arff', 'true', 110, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:22'), -(111, 1, 0, 'cpu_act', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe Computer Activity databases are a collection of computer systems\n activity measures. The data was collected from a Sun Sparcstation\n 20/712 with 128 Mbytes of memory running in a multi-user university\n department. Users would typically be doing a large variety of tasks\n ranging from accessing the internet, editing files or running very\n cpu-bound programs. The data was collected continuously on two\n separate occasions. On both occassions, system activity was gathered\n every 5 seconds. The final dataset is taken from both occasions with\n equal numbers of observations coming from each collection epoch.\n \n System measures used:\n 1. lread - Reads (transfers per second ) between system memory and user memory.\n 2. lwrite - writes (transfers per second) between system memory and user memory.\n 3. scall - Number of system calls of all types per second.\n 4. sread - Number of system read calls per second.\n 5. swrite - Number of system write calls per second . \n 6. fork - Number of system fork calls per second. \n 7. exec - Number of system exec calls per second. \n 8. rchar - Number of characters transferred per second by system read calls.\n 9. wchar - Number of characters transfreed per second by system write calls. \n 10. pgout - Number of page out requests per second.\n 11. ppgout - Number of pages, paged out per second. \n 12. pgfree - Number of pages per second placed on the free list. \n 13. pgscan - Number of pages checked if they can be freed per second.\n 14. atch - Number of page attaches (satisfying a page fault by reclaiming a page in memory) per second.\n 15. pgin - Number of page-in requests per second.\n 16. ppgin - Number of pages paged in per second.\n 17. pflt - Number of page faults caused by protection errors (copy-on-writes). \n 18. vflt - Number of page faults caused by address translation. \n 19. runqsz - Process run queue size.\n 20. freemem - Number of memory pages available to user processes.\n 21. freeswap - Number of disk blocks available for page swapping. \n 22. usr - Portion of time (%) that cpus run in user mode.\n 23. sys - Portion of time (%) that cpus run in system mode.\n 24. wio - Portion of time (%) that cpus are idle waiting for block IO.\n 25. idle - Portion of time (%) that cpus are otherwise idle.\n \n The two different regression tasks obtained from these databases are:\n \n CompAct \n Predict usr, the portion of time that cpus run in user mode from all attributes 1-21.\n \n CompAct(s) \n Predict usr using a restricted number (excluding the paging information (10-18)\n \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original source: DELVE repository of data. \n Characteristics: 8192 cases, 22 continuous attributes', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3634/dataset_2183_cpu_act.arff', 'true', 111, 'usr', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:32'), -(112, 1, 0, 'delta_elevators', '1', '1', '**Author**: Rui Camacho (rcamacho@garfield.fe.up.pt) \n**Source**: [Regression datasets collection Luis Torgo](http://www.dcc.fc.up.pt/~ltorgo/Regression/DataSets.html) \n**Please cite**: \n\nThis data set is also obtained from the task of controlling the ailerons of a F16 aircraft, although the target variable and attributes are different from the ailerons domain. The target variable here is a variation instead of an absolute value, and there was some pre-selection of the attributes.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:39', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52348/openml_phpmlDSTj', 'true', 112, 'Se', NULL, NULL, NULL, 'public', NULL, NULL, 'set target feature', '2014-09-22 16:13:44'), -(113, 1, 0, 'fruitfly', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identifier attribute deleted.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: Sexual activity and the lifespan of male fruitflies\n TYPE: Designed (almost factorial) experiment\n SIZE: 125 observations, 5 variables\n \n DESCRIPTIVE ABSTRACT:\n A cost of increased reproduction in terms of reduced longevity has been\n shown for female fruitflies, but not for males. The flies used were an\n outbred stock. Sexual activity was manipulated by supplying individual\n males with one or eight receptive virgin females per day. The\n longevity of these males was compared with that of two control types.\n The first control consisted of two sets of individual males kept with\n one or eight newly inseminated females. Newly inseminated females will\n not usually remate for at least two days, and thus served as a control\n for any effect of competition with the male for food or space. The\n second control was a set of individual males kept with no females.\n There were 25 males in each of the five groups, which were treated\n identically in number of anaesthetizations (using CO2) and provision of\n fresh food medium.\n \n SOURCE:\n Figure 2 in the article \"Sexual Activity and the Lifespan of Male\n Fruitflies\" by Linda Partridge and Marion Farquhar. _Nature_, 294,\n 580-581, 1981.\n \n VARIABLE DESCRIPTIONS:\n Columns Variable Description\n ------- -------- -----------\n 1- 2 ID Serial No. (1-25) within each group of 25\n (the order in which data points were abstracted)\n \n 4 PARTNERS Number of companions (0, 1 or 8)\n \n 6 TYPE Type of companion\n 0: newly pregnant female\n 1: virgin female\n 9: not applicable (when PARTNERS=0)\n \n 8- 9 LONGEVITY Lifespan, in days\n \n 11-14 THORAX Length of thorax, in mm (x.xx)\n \n 16-17 SLEEP Percentage of each day spent sleeping\n \n \n SPECIAL NOTES:\n `Compliance\' of the males in the two experimental groups was documented\n as follows: On two days per week throughout the life of each\n experimental male, the females that had been supplied as virgins to\n that male were kept and examined for fertile eggs. The insemination\n rate declined from approximately 7 females/day at age one week to just\n under 2/day at age eight weeks in the males supplied with eight virgin\n females per day, and from just under 1/day at age one week to\n approximately 0.6/day at age eight weeks in the males supplied with one\n virgin female per day. These `compliance\' data were not supplied for\n individual males, but the authors say that \"There were no significant\n differences between the individual males within each experimental\n group.\"\n \n STORY BEHIND THE DATA:\n James Hanley found this dataset in _Nature_ and was attracted by the\n way the raw data were presented in classical analysis of covariance\n style in Figure 2. He read the data points from the graphs and brought\n them to the attention of a colleague with whom he was teaching the\n applied statistics course. Dr. Liddell thought that with only three\n explanatory variables (THORAX, plus PARTNERS and TYPE to describe the\n five groups), it would not be challenging enough as a data-analysis\n project. He suggested adding another variable. James Hanley added\n SLEEP, a variable not mentioned in the published article. Teachers can\n contact us about the construction of this variable. (We prefer to\n divulge the details at the end of the data-analysis project.)\n \n Further discussion of the background and pedagogical use of this\n dataset can be found in Hanley (1983) and in Hanley and Shapiro\n (1994). To obtain the Hanley and Shapiro article, send the one-line\n e-mail message:\n send jse/v2n1/datasets.hanley\n to the address archive@jse.stat.ncsu.edu\n \n PEDAGOGICAL NOTES:\n This has been the most successful and the most memorable dataset we\n have used in an \"applications of statistics\" course, which we have\n taught for ten years. The most common analysis techniques have been\n analysis of variance, classical analysis of covariance, and multiple\n regression. Because the variable THORAX is so strong (it explains\n about 1/3 of the variance in LONGEVITY), it is important to consider it\n to increase the precision of between-group contrasts. When students\n first check and find that the distributions of thorax length, and in\n particular, the mean thorax length, are very similar in the different\n groups, many of them are willing to say (in epidemiological\n terminology) that THORAX is not a confounding variable, and that it can\n be omitted from the analysis.\n \n There is usually lively discussion about the primary contrast. The\n five groups and their special structure allow opportunities for\n students to understand and verbalize what we mean by the term\n \"statistical interaction.\"\n \n There is also much debate as to whether one should take the SLEEP\n variable into account. Some students say that it is an `intermediate\'\n variable. Some students formally test the mean level of SLEEP across\n groups, find one pair where there is a statistically significant\n difference, and want to treat it as a confounding variable. A few\n students muse about how it was measured.\n \n There is heteroscedasticity in the LONGEVITY variable.\n \n One very observant student (now a professor) argued that THORAX cannot\n be used as a predictor or explanatory variable for the LONGEVITY\n outcome since fruitflies who die young may not be fully grown, i.e., it\n is also an intermediate variable. One Ph.D. student who had studied\n entomology assured us that fruitflies do not grow longer after birth;\n therefore, the THORAX length is not time-dependent!\n \n Curiously, the dataset has seldom been analyzed using techniques from\n survival analysis. The fact that there are no censored observations is\n not really an excuse, and one could easily devise a way to introduce\n censoring of LONGEVITY.\n \n REFERENCES:\n Hanley, J. A. (1983), \"Appropriate Uses of Multivariate Analysis,\"\n _Annual Review of Public Health_, 4, 155-180.\n \n Hanley, J. A., and Shapiro, S. H. (1994), \"Sexual Activity and the\n Lifespan of Male Fruitflies: A Dataset That Gets Attention,\" _Journal\n of Statistics Education_, Volume 2, Number 1.\n \n SUBMITTED BY:\n James A. Hanley and Stanley H. Shapiro\n Department of Epidemiology and Biostatistics\n McGill University\n 1020 Pine Avenue West\n Montreal, Quebec, H3A 1A2\n Canada\n tel: +1 (514) 398-6270 (JH) \n +1 (514) 398-6272 (SS)\n fax: +1 (514) 398-4503\n INJH@musicb.mcgill.ca, StanS@epid.lan.mcgill.ca', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:42', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3636/dataset_2185_fruitfly.arff', 'true', 113, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:42'), -(114, 1, 0, 'pbc', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Case number deleted. X treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: PBC Data\n SIZE: 418 observations, 20 variables\n \n \n \n DESCRIPTIVE ABSTRACT:\n \n Below is a description of the variables recorded from the Mayo Clinic trial \n in primary biliary cirrhosis (PBC) of the liver conducted between 1974 and \n 1984. A total of 424 PBC patients, referred to Mayo Clinic during\n that ten-year interval, met eligibility criteria for the randomized placebo \n controlled trial of the drug D-penicillamine. The first 312 cases in the data \n set participated in the randomized trial, and contain largely complete data. \n The additional 112 cases did not participate in the clinical trial, but \n consented to have basic measurements recorded and to be followed for survival.\n Six of those cases were lost to follow-up shortly after diagnosis, so there \n are data here on an additional 106 cases as well as the 312 randomized \n participants. Missing data items are denoted by \".\". At least one space \n separates each variable in the .DAT file. Censoring was due to liver \n transplantation for twenty-five subjects with the following case numbers: \n 5, 105, 111, 120, 125, 158, 183, 241, 246, 247, 254, 263, 264, 265, 274, \n 288, 291, 295, 297, 345, 361, 362, 375, 380, 383.\n \n \n \n SOURCE: Counting Processes and Survival Analysis by T. Fleming & \n D. Harrington, (1991), published by John Wiley & Sons.\n \n \n \n VARIABLE DESCRIPTIONS:\n \n The data are in free format. That is, at least one blank space separates\n each variable. The variables contained in the .DAT are:\n \n \n N: Case number.\n X: The number of days between registration and the earlier of\n death, liver transplantation, or study analysis time in July, 1986.\n D: 1 if X is time to death, 0 if time to censoring\n Z1: Treatment Code, 1 = D-penicillamine, 2 = placebo.\n Z2: Age in years. For the first 312 cases, age was calculated by\n dividing the number of days between birth and study registration by 365.\n Z3: Sex, 0 = male, 1 = female.\n Z4: Presence of ascites, 0 = no, 1 = yes.\n Z5: Presence of hepatomegaly, 0 = no, 1 = yes.\n Z6: Presence of spiders 0 = no, 1 = Yes.\n Z7: Presence of edema, 0 = no edema and no diuretic therapy for\n edema; 0.5 = edema present for which no diuretic therapy was given, or \n edema resolved with diuretic therapy; 1 = edema despite diuretic therapy\n Z8: Serum bilirubin, in mg/dl.\n Z9: Serum cholesterol, in mg/dl.\n Z10: Albumin, in gm/dl.\n Z11: Urine copper, in mg/day.\n Z12: Alkaline phosphatase, in U/liter.\n Z13: SGOT, in U/ml.\n Z14: Triglycerides, in mg/dl.\n Z15: Platelet count; coded value is number of platelets\n per-cubic-milliliter of blood divided by 1000.\n Z16: Prothrombin time, in seconds.\n Z17: Histologic stage of disease, graded 1, 2, 3, or 4.\n \n \n \n \n STORY BEHIND THE DATA:\n \n Between January, 1974 and May, 1984, the Mayo Clinic conducted a\n double-blinded randomized trial in primary biliary cirrhosis of the liver\n (PBC), comparing the drug D-penicillamine (DPCA) with a placebo. There\n were 424 patients who met the eligibility criteria seen at the Clinic while\n the trial was open for patient registration. Both the treating physician and\n the patient agreed to participate in the randomized trial in 312 of the 424\n cases. The date of randomization and a large number of clinical, biochemical,\n serologic, and histologic parameters were recorded for each of the 312\n clinical trial patients. The data from the trial were analyzed in 1986 for\n presentation in the clinical literature. For that analysis, disease and \n survival status as of July, 1986, were recorded for as many patients as \n possible. By that date, 125 of the 312 patients had died, with only 11 \n not attributable to PBC. Eight patients had been lost to follow up, and 19 \n had undergone liver transplantation. \n \n PBC is a rare but fatal chronic liver disease of unknown cause,\n with a prevalence of about 50-cases-per-million population. The primary\n pathologic event appears to be the destruction of interlobular bile ducts,\n which may be mediated by immunologic mechanisms. The data discussed here are\n important in two respects. First, controlled clinical trials are difficult to\n complete in rare diseases, and this case series of patients uniformly\n diagnosed, treated, and followed is the largest existing for PBC. The\n treatment comparison in this trial is more precise than in similar trials\n having fewer participants and avoids the bias that may arise in comparing\n a case series to historical controls. Second, the data present an\n opportunity to study the natural history of the disease. We will see that, \n despite the immunosuppressive properties of DPCA, there are no detectable\n differences between the distributions of survival times for the DPCA and\n placebo treatment groups. This suggests that these groups can be combined\n in studying the association between survival time from randomization and\n clinical and other measurements. In the early to mid 1980s, the rate of \n successful liver transplant increased substantially, and transplant has \n become an effective therapy for PBC. The Mayo Clinic data set is therefore \n one of the last allowing a study of the natural history of PBC in patients \n who were treated with only supportive care or its equivalent. The PBC data \n can be used to: estimate a survival distribution; test for differences \n between two groups; and estimate covariate effects via a regression\n model.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:46', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3637/dataset_2186_pbc.arff', 'true', 114, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:46'), -(115, 1, 0, 'pol', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis is a commercial application described in Weiss & Indurkhya (1995). \n The data describes a telecommunication problem. No further information\n is available.\n \n Characteristics: (10000+5000) cases, 49 continuous attributes \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original Source: The data in the original format can be obtained \n from http://www.cs.su.oz.au/~nitin', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3638/dataset_2187_pol.arff', 'true', 115, 'foo', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:01'), -(116, 1, 0, 'autoHorse', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Horsepower treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n 1. Title: 1985 Auto Imports Database\n \n 2. Source Information:\n -- Creator/Donor: Jeffrey C. Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n -- Date: 19 May 1987\n -- Sources:\n 1) 1985 Model Import Car and Truck Specifications, 1985 Ward\'s\n Automotive Yearbook.\n 2) Personal Auto Manuals, Insurance Services Office, 160 Water\n Street, New York, NY 10038 \n 3) Insurance Collision Report, Insurance Institute for Highway\n Safety, Watergate 600, Washington, DC 20037\n\n 3. Past Usage:\n -- Kibler,~D., Aha,~D.~W., & Albert,~M. (1989). Instance-based prediction\n of real-valued attributes. {it Computational Intelligence}, {it 5},\n 51--57.\n -- Predicted price of car using all numeric and Boolean attributes\n -- Method: an instance-based learning (IBL) algorithm derived from a\n localized k-nearest neighbor algorithm. Compared with a\n linear regression prediction...so all instances\n with missing attribute values were discarded. This resulted with\n a training set of 159 instances, which was also used as a test\n set (minus the actual instance during testing).\n -- Results: Percent Average Deviation Error of Prediction from Actual\n -- 11.84% for the IBL algorithm\n -- 14.12% for the resulting linear regression equation\n \n 4. Relevant Information:\n -- Description\n This data set consists of three types of entities: (a) the\n specification of an auto in terms of various characteristics, (b)\n its assigned insurance risk rating, (c) its normalized losses in use\n as compared to other cars. The second rating corresponds to the\n degree to which the auto is more risky than its price indicates.\n Cars are initially assigned a risk factor symbol associated with its\n price. Then, if it is more risky (or less), this symbol is\n adjusted by moving it up (or down) the scale. Actuarians call this\n process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.\n \n The third factor is the relative average loss payment per insured\n vehicle year. This value is normalized for all autos within a\n particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car\n per year.\n \n -- Note: Several of the attributes in the database could be used as a\n \"class\" attribute.\n \n 5. Number of Instances: 205\n \n 6. Number of Attributes: 26 total\n -- 15 continuous\n -- 1 integer\n -- 10 nominal\n \n 7. Attribute Information: \n Attribute: Attribute Range:\n ------------------ -----------------------------------------------\n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback, convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n 8. Missing Attribute Values: (denoted by \"?\")\n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4%', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3639/dataset_2188_autoHorse.arff', 'true', 116, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:04'), -(117, 1, 0, 'lowbwt', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identification code deleted. \n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: LOW BIRTH WEIGHT DATA\n KEYWORDS: Logistic Regression\n SIZE: 189 observations, 11 variables\n \n NOTE:\n These data come from Appendix 1 of Hosmer and Lemeshow (1989).\n These data are copyrighted and must be acknowledged and used accordingly.\n \n DESCRIPTIVE ABSTRACT:\n The goal of this study was to identify risk factors associated with\n giving birth to a low birth weight baby (weighing less than 2500 grams).\n Data were collected on 189 women, 59 of which had low birth weight babies\n and 130 of which had normal birth weight babies. Four variables which were\n thought to be of importance were age, weight of the subject at her last\n menstrual period, race, and the number of physician visits during the first\n trimester of pregnancy.\n \n \n SOURCE:\n Data were collected at Baystate Medical Center, Springfield,\n Massachusetts, during 1986.\n \n \n NOTE:\n This data set consists of the complete data. A paired data set\n created from this low birth weight data may be found in plowbwt.dat and\n a 3 to 1 matched data set created from the low birth weight data may be\n found in mlowbwt.dat.\n \n \n \n Table: Code Sheet for the Variables in the Low Birth Weight Data Set.\n \n Columns Variable Abbreviation\n -----------------------------------------------------------------------------\n 2-4 Identification Code ID\n \n 10 Low Birth Weight (0 = Birth Weight ge 2500g, LOW\n l = Birth Weight < 2500g)\n \n 17-18 Age of the Mother in Years AGE\n \n 23-25 Weight in Pounds at the Last Menstrual Period LWT\n \n 32 Race (1 = White, 2 = Black, 3 = Other) RACE\n \n 40 Smoking Status During Pregnancy (1 = Yes, 0 = No) SMOKE\n \n 48 History of Premature Labor (0 = None, 1 = One, etc.) PTL\n \n 55 History of Hypertension (1 = Yes, 0 = No) HT\n \n 61 Presence of Uterine Irritability (1 = Yes, 0 = No) UI\n \n 67 Number of Physician Visits During the First Trimester FTV\n (0 = None, 1 = One, 2 = Two, etc.)\n \n 73-76 Birth Weight in Grams BWT\n -----------------------------------------------------------------------------\n \n PEDAGOGICAL NOTES:\n These data have been used as an example of fitting a multiple\n logistic regression model.\n \n STORY BEHIND THE DATA:\n Low birth weight is an outcome that has been of concern to physicians\n for years. This is due to the fact that infant mortality rates and birth\n defect rates are very high for low birth weight babies. A woman\'s behavior\n during pregnancy (including diet, smoking habits, and receiving prenatal care)\n can greatly alter the chances of carrying the baby to term and, consequently,\n of delivering a baby of normal birth weight.\n The variables identified in the code sheet given in the table have been\n shown to be associated with low birth weight in the obstetrical literature. The\n goal of the current study was to ascertain if these variables were important\n in the population being served by the medical center where the data were\n collected.\n \n \n References:\n \n 1. Hosmer and Lemeshow, Applied Logistic Regression, Wiley, (1989).', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3640/dataset_2189_lowbwt.arff', 'true', 117, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:07'), -(118, 1, 0, 'cholesterol', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Cholesterol treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Publication Request: \n >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n This file describes the contents of the heart-disease directory.\n \n This directory contains 4 databases concerning heart disease diagnosis.\n All attributes are numeric-valued. The data was collected from the\n four following locations:\n \n 1. Cleveland Clinic Foundation (cleveland.data)\n 2. Hungarian Institute of Cardiology, Budapest (hungarian.data)\n 3. V.A. Medical Center, Long Beach, CA (long-beach-va.data)\n 4. University Hospital, Zurich, Switzerland (switzerland.data)\n \n Each database has the same instance format. While the databases have 76\n raw attributes, only 14 of them are actually used. Thus I\'ve taken the\n liberty of making 2 copies of each database: one with all the attributes\n and 1 with the 14 attributes actually used in past experiments.\n \n The authors of the databases have requested:\n \n ...that any publications resulting from the use of the data include the \n names of the principal investigator responsible for the data collection\n at each institution. They would be:\n \n 1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.\n 2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.\n 3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.\n 4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation:\n Robert Detrano, M.D., Ph.D.\n \n Thanks in advance for abiding by this request.\n \n David Aha\n July 22, 1988\n >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n \n 1. Title: Heart Disease Databases\n \n 2. Source Information:\n (a) Creators: \n -- 1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.\n -- 2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.\n -- 3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.\n -- 4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation:\n Robert Detrano, M.D., Ph.D.\n (b) Donor: David W. Aha (aha@ics.uci.edu) (714) 856-8779 \n (c) Date: July, 1988\n \n 3. Past Usage:\n 1. Detrano,~R., Janosi,~A., Steinbrunn,~W., Pfisterer,~M., Schmid,~J.,\n Sandhu,~S., Guppy,~K., Lee,~S., & Froelicher,~V. (1989). {it \n International application of a new probability algorithm for the \n diagnosis of coronary artery disease.} {it American Journal of \n Cardiology}, {it 64},304--310.\n -- International Probability Analysis \n -- Address: Robert Detrano, M.D.\n Cardiology 111-C\n V.A. Medical Center\n 5901 E. 7th Street\n Long Beach, CA 90028\n -- Results in percent accuracy: (for 0.5 probability threshold)\n Data Name: CDF CADENZA\n -- Hungarian 77 74\n Long beach 79 77\n Swiss 81 81\n -- Approximately a 77% correct classification accuracy with a\n logistic-regression-derived discriminant function\n 2. David W. Aha & Dennis Kibler\n -- \n \n \n -- Instance-based prediction of heart-disease presence with the \n Cleveland database\n -- NTgrowth: 77.0% accuracy\n -- C4: 74.8% accuracy\n 3. John Gennari\n -- Gennari, J.~H., Langley, P, & Fisher, D. (1989). Models of\n incremental concept formation. {it Artificial Intelligence, 40},\n 11--61.\n -- Results: \n -- The CLASSIT conceptual clustering system achieved a 78.9% accuracy\n on the Cleveland database.\n \n 4. Relevant Information:\n This database contains 76 attributes, but all published experiments\n refer to using a subset of 14 of them. In particular, the Cleveland\n database is the only one that has been used by ML researchers to \n this date. The \"goal\" field refers to the presence of heart disease\n in the patient. It is integer valued from 0 (no presence) to 4.\n Experiments with the Cleveland database have concentrated on simply\n attempting to distinguish presence (values 1,2,3,4) from absence (value\n 0). \n \n The names and social security numbers of the patients were recently \n removed from the database, replaced with dummy values.\n \n One file has been \"processed\", that one containing the Cleveland \n database. All four unprocessed files also exist in this directory.\n \n 5. Number of Instances: \n Database: # of instances:\n Cleveland: 303\n Hungarian: 294\n Switzerland: 123\n Long Beach VA: 200\n \n 6. Number of Attributes: 76 (including the predicted attribute)\n \n 7. Attribute Information:\n -- Only 14 used\n -- 1. #3 (age) \n -- 2. #4 (sex) \n -- 3. #9 (cp) \n -- 4. #10 (trestbps) \n -- 5. #12 (chol) \n -- 6. #16 (fbs) \n -- 7. #19 (restecg) \n -- 8. #32 (thalach) \n -- 9. #38 (exang) \n -- 10. #40 (oldpeak) \n -- 11. #41 (slope) \n -- 12. #44 (ca) \n -- 13. #51 (thal) \n -- 14. #58 (num) (the predicted attribute)\n \n -- Complete attribute documentation:\n 1 id: patient identification number\n 2 ccf: social security number (I replaced this with a dummy value of 0)\n 3 age: age in years\n 4 sex: sex (1 = male; 0 = female)\n 5 painloc: chest pain location (1 = substernal; 0 = otherwise)\n 6 painexer (1 = provoked by exertion; 0 = otherwise)\n 7 relrest (1 = relieved after rest; 0 = otherwise)\n 8 pncaden (sum of 5, 6, and 7)\n 9 cp: chest pain type\n -- Value 1: typical angina\n -- Value 2: atypical angina\n -- Value 3: non-anginal pain\n -- Value 4: asymptomatic\n 10 trestbps: resting blood pressure (in mm Hg on admission to the \n hospital)\n 11 htn\n 12 chol: serum cholestoral in mg/dl\n 13 smoke: I believe this is 1 = yes; 0 = no (is or is not a smoker)\n 14 cigs (cigarettes per day)\n 15 years (number of years as a smoker)\n 16 fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)\n 17 dm (1 = history of diabetes; 0 = no such history)\n 18 famhist: family history of coronary artery disease (1 = yes; 0 = no)\n 19 restecg: resting electrocardiographic results\n -- Value 0: normal\n -- Value 1: having ST-T wave abnormality (T wave inversions and/or ST \n elevation or depression of > 0.05 mV)\n -- Value 2: showing probable or definite left ventricular hypertrophy\n by Estes\' criteria\n 20 ekgmo (month of exercise ECG reading)\n 21 ekgday(day of exercise ECG reading)\n 22 ekgyr (year of exercise ECG reading)\n 23 dig (digitalis used furing exercise ECG: 1 = yes; 0 = no)\n 24 prop (Beta blocker used during exercise ECG: 1 = yes; 0 = no)\n 25 nitr (nitrates used during exercise ECG: 1 = yes; 0 = no)\n 26 pro (calcium channel blocker used during exercise ECG: 1 = yes; 0 = no)\n 27 diuretic (diuretic used used during exercise ECG: 1 = yes; 0 = no)\n 28 proto: exercise protocol\n 1 = Bruce \n 2 = Kottus\n 3 = McHenry\n 4 = fast Balke\n 5 = Balke\n 6 = Noughton \n 7 = bike 150 kpa min/min (Not sure if \"kpa min/min\" is what was \n written!)\n 8 = bike 125 kpa min/min \n 9 = bike 100 kpa min/min\n 10 = bike 75 kpa min/min\n 11 = bike 50 kpa min/min\n 12 = arm ergometer\n 29 thaldur: duration of exercise test in minutes\n 30 thaltime: time when ST measure depression was noted\n 31 met: mets achieved\n 32 thalach: maximum heart rate achieved\n 33 thalrest: resting heart rate\n 34 tpeakbps: peak exercise blood pressure (first of 2 parts)\n 35 tpeakbpd: peak exercise blood pressure (second of 2 parts)\n 36 dummy\n 37 trestbpd: resting blood pressure\n 38 exang: exercise induced angina (1 = yes; 0 = no)\n 39 xhypo: (1 = yes; 0 = no)\n 40 oldpeak = ST depression induced by exercise relative to rest\n 41 slope: the slope of the peak exercise ST segment\n -- Value 1: upsloping\n -- Value 2: flat\n -- Value 3: downsloping\n 42 rldv5: height at rest\n 43 rldv5e: height at peak exercise\n 44 ca: number of major vessels (0-3) colored by flourosopy\n 45 restckm: irrelevant\n 46 exerckm: irrelevant\n 47 restef: rest raidonuclid (sp?) ejection fraction\n 48 restwm: rest wall (sp?) motion abnormality\n 0 = none\n 1 = mild or moderate\n 2 = moderate or severe\n 3 = akinesis or dyskmem (sp?)\n 49 exeref: exercise radinalid (sp?) ejection fraction\n 50 exerwm: exercise wall (sp?) motion \n 51 thal: 3 = normal; 6 = fixed defect; 7 = reversable defect\n 52 thalsev: not used\n 53 thalpul: not used\n 54 earlobe: not used\n 55 cmo: month of cardiac cath (sp?) (perhaps \"call\")\n 56 cday: day of cardiac cath (sp?)\n 57 cyr: year of cardiac cath (sp?)\n 58 num: diagnosis of heart disease (angiographic disease status)\n -- Value 0: < 50% diameter narrowing\n -- Value 1: > 50% diameter narrowing\n (in any major vessel: attributes 59 through 68 are vessels)\n 59 lmt\n 60 ladprox\n 61 laddist\n 62 diag\n 63 cxmain\n 64 ramus\n 65 om1\n 66 om2\n 67 rcaprox\n 68 rcadist\n 69 lvx1: not used\n 70 lvx2: not used\n 71 lvx3: not used\n 72 lvx4: not used\n 73 lvf: not used\n 74 cathef: not used\n 75 junk: not used\n 76 name: last name of patient \n (I replaced this with the dummy string \"name\")\n \n 9. Missing Attribute Values: Several. Distinguished with value -9.0.\n \n 10. Class Distribution:\n Database: 0 1 2 3 4 Total\n Cleveland: 164 55 36 35 13 303\n Hungarian: 188 37 26 28 15 294\n Switzerland: 8 48 32 30 5 123\n Long Beach VA: 51 56 41 42 10 200', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3641/dataset_2190_cholesterol.arff', 'true', 118, 'chol', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:10'), -(119, 1, 0, 'sleep', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n Data from which conclusions were drawn in the article \"Sleep in \n Mammals: Ecological and Constitutional Correlates\" by Allison, T. and \n Cicchetti, D. (1976), _Science_, November 12, vol. 194, pp. 732-734. \n Includes brain and body weight, life span, gestation time, time \n sleeping, and predation and danger indices for 62 mammals.\n \n \n \n Variables below (from left to right) for Mammals Data Set:\n \n species of animal\n \n body weight in kg\n \n brain weight in g\n \n slow wave (\"nondreaming\") sleep (hrs/day)\n \n paradoxical (\"dreaming\") sleep (hrs/day)\n \n total sleep (hrs/day) (sum of slow wave and paradoxical sleep)\n \n maximum life span (years)\n \n gestation time (days)\n \n predation index (1-5)\n 1 = minimum (least likely to be preyed upon)\n 5 = maximum (most likely to be preyed upon)\n \n sleep exposure index (1-5)\n 1 = least exposed (e.g. animal sleeps in a \n well-protected den)\n 5 = most exposed\n \n overall danger index (1-5)\n (based on the above two indices and other information)\n 1 = least danger (from other animals)\n 5 = most danger (from other animals)\n \n Note: Missing values denoted by -999.0\n \n \n For more details, see\n \n Allison, Truett and Cicchetti, Domenic V. (1976), \"Sleep in Mammals: \n Ecological and Constitutional Correlates\", _Science_, November 12, \n vol. 194, pp. 732-734.\n \n The above data set can be freely used for non-commercial purposes and \n can be freely distributed (permission in writing obtained from Dr. \n Truett Allison).\n \n Submitted by Roger Johnson\n rwjohnso@silver.sdsmt.edu\n\n Total sleep treated as the class attribute. Attributes for slow\n wave and paradoxical sleep have been deleted. (The animal\'s\n name has also been deleted.)', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3642/dataset_2191_sleep.arff', 'true', 119, 'danger_index', NULL, NULL, NULL, 'public', NULL, NULL, 'corrected target', '2014-10-06 22:07:54'), -(120, 1, 0, 'triazines', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe problem is to learn a regression equation/rule/tree to predict the\n activity from the descriptive structural attributes. The data and\n methodology is described in detail in: - King, Ross .D., Hurst,\n Jonathan. D., and Sternberg, Michael.J.E. A comparison of artificial\n intelligence methods for modelling QSARs Applied Artificial\n Intelligence, 1994 (in press). - Hurst, Jonathan. D., King, Ross\n .D. and Sternberg, Michael.J.E. Quantitative Structure-Activity\n Relationships by neural networks and inductive logic programming:\n 2. The inhibition of dihydrofolate reductase by triazines. Journal of\n Computer Aided Molecular Design, 1994 (in press).\n \n Original source: ?. \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 186 cases; 61 continuous variables', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:16', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3643/dataset_2192_triazines.arff', 'true', 120, 'activity', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:16'), -(121, 1, 0, 'autoPrice', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n All nominal attributes and instances with missing values are deleted.\n Price treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n 1. Title: 1985 Auto Imports Database\n \n 2. Source Information:\n -- Creator/Donor: Jeffrey C. Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n -- Date: 19 May 1987\n -- Sources:\n 1) 1985 Model Import Car and Truck Specifications, 1985 Ward\'s\n Automotive Yearbook.\n 2) Personal Auto Manuals, Insurance Services Office, 160 Water\n Street, New York, NY 10038 \n 3) Insurance Collision Report, Insurance Institute for Highway\n Safety, Watergate 600, Washington, DC 20037\n\n 3. Past Usage:\n -- Kibler,~D., Aha,~D.~W., & Albert,~M. (1989). Instance-based prediction\n of real-valued attributes. {it Computational Intelligence}, {it 5},\n 51--57.\n -- Predicted price of car using all numeric and Boolean attributes\n -- Method: an instance-based learning (IBL) algorithm derived from a\n localized k-nearest neighbor algorithm. Compared with a\n linear regression prediction...so all instances\n with missing attribute values were discarded. This resulted with\n a training set of 159 instances, which was also used as a test\n set (minus the actual instance during testing).\n -- Results: Percent Average Deviation Error of Prediction from Actual\n -- 11.84% for the IBL algorithm\n -- 14.12% for the resulting linear regression equation\n \n 4. Relevant Information:\n -- Description\n This data set consists of three types of entities: (a) the\n specification of an auto in terms of various characteristics, (b)\n its assigned insurance risk rating, (c) its normalized losses in use\n as compared to other cars. The second rating corresponds to the\n degree to which the auto is more risky than its price indicates.\n Cars are initially assigned a risk factor symbol associated with its\n price. Then, if it is more risky (or less), this symbol is\n adjusted by moving it up (or down) the scale. Actuarians call this\n process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.\n \n The third factor is the relative average loss payment per insured\n vehicle year. This value is normalized for all autos within a\n particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car\n per year.\n \n -- Note: Several of the attributes in the database could be used as a\n \"class\" attribute.\n \n 5. Number of Instances: 205\n \n 6. Number of Attributes: 26 total\n -- 15 continuous\n -- 1 integer\n -- 10 nominal\n \n 7. Attribute Information: \n Attribute: Attribute Range:\n ------------------ -----------------------------------------------\n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback, convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n 8. Missing Attribute Values: (denoted by \"?\")\n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4%', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3644/dataset_2193_autoPrice.arff', 'true', 121, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:18'), -(122, 1, 0, 'detroit', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n This is the data set called `DETROIT\' in the book `Subset selection in\n regression\' by Alan J. Miller published in the Chapman & Hall series of\n monographs on Statistics & Applied Probability, no. 40. The data are\n unusual in that a subset of three predictors can be found which gives a\n very much better fit to the data than the subsets found from the Efroymson\n stepwise algorithm, or from forward selection or backward elimination.\n \n The original data were given in appendix A of `Regression analysis and its\n application: A data-oriented approach\' by Gunst & Mason, Statistics\n textbooks and monographs no. 24, Marcel Dekker. It has caused problems\n because some copies of the Gunst & Mason book do not contain all of the data,\n and because Miller does not say which variables he used as predictors and\n which is the dependent variable. (HOM was the dependent variable, and the\n predictors were FTP ... WE)\n \n The data were collected by J.C. Fisher and used in his paper: \"Homicide in\n Detroit: The Role of Firearms\", Criminology, vol.14, 387-400 (1976)\n \n \n The data are on the homicide rate in Detroit for the years 1961-1973.\n FTP - Full-time police per 100,000 population\n UEMP - % unemployed in the population\n MAN - number of manufacturing workers in thousands\n LIC - Number of handgun licences per 100,000 population\n GR - Number of handgun registrations per 100,000 population\n CLEAR - % homicides cleared by arrests\n WM - Number of white males in the population\n NMAN - Number of non-manufacturing workers in thousands\n GOV - Number of government workers in thousands\n HE - Average hourly earnings\n WE - Average weekly earnings\n \n HOM - Number of homicides per 100,000 of population\n ACC - Death rate in accidents per 100,000 population\n ASR - Number of assaults per 100,000 population\n \n N.B. Each case takes two lines.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:21', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3645/dataset_2194_detroit.arff', 'true', 122, 'ASR', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:21'), -(123, 1, 0, 'quake', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:24', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3646/dataset_2195_quake.arff', 'true', 123, 'richter', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:24'), -(124, 1, 0, 'cloud', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n These data are those collected in a cloud-seeding experiment in Tasmania\n between mid-1964 and January 1971. Their analysis, using regression\n techniques and permutation tests, is discussed in:\n \n Miller, A.J., Shaw, D.E., Veitch, L.G. & Smith, E.J. (1979).\n `Analyzing the results of a cloud-seeding experiment in Tasmania\',\n Communications in Statistics - Theory & Methods, vol.A8(10),\n 1017-1047.\n \n The rainfalls are period rainfalls in inches. TE and TW are the east and\n west target areas respectively, while NC, SC and NWC are the corresponding\n rainfalls in the north, south and north-west control areas respectively.\n S = seeded, U = unseeded.\n\n Rain in eastern target region is being treated\n as the class attribute. (Attribute for rain\n in the western target region has been deleted.)', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:26', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3647/dataset_2196_cloud.arff', 'true', 124, 'TE', 'period', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:26'), -(125, 1, 0, 'longley', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n The infamous Longley data, \"An appraisal of least-squares programs from\n the point of view of the user\", JASA, 62(1967) p819-841.\n\n Variables are: Number of people employed (usually the y variable)\n GNP implicit price deflator\n GNP\n Unemployed\n Armed forces\n Non-institutionalized population >=14 years of age\n Year\n\n Employment is being treated as the class\n attribute.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3648/dataset_2197_longley.arff', 'true', 125, 'employed', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:28'), -(126, 1, 0, 'diabetes_numeric', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis data set concerns the study of the factors affecting patterns of\n insulin-dependent diabetes mellitus in children. The objective is to\n investigate the dependence of the level of serum C-peptide on the\n various other factors in order to understand the patterns of residual\n insulin secretion. The response measurement is the logarithm of\n C-peptide concentration (pmol/ml) at the diagnosis, and the predictor\n measurements age and base deficit, a measure of acidity.\n\n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original source: Book Generalized Additive Models (p.304) by Hastie &\n Tibshirani, Chapman & Hall. \n Characteristics: 43 cases; 3 continuous variables', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:30', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3649/dataset_2198_diabetes_numeric.arff', 'true', 126, 'c_peptide', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:30'), -(127, 1, 0, 'pharynx', '1', '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Case number deleted. \n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Name: Pharynx (A clinical Trial in the Trt. of Carcinoma of the Oropharynx).\n SIZE: 195 observations, 13 variables.\n \n \n \n DESCRIPTIVE ABSTRACT:\n \n The .dat file gives the data for a part of a large clinical trial\n carried out by the Radiation Therapy Oncology Group in the United States. \n The full study included patients with squamous carcinoma of 15 sites in \n the mouth and throat, with 16 participating institutions, though only data \n on three sites in the oropharynx reported by the six largest institutions \n are considered here. Patients entering the study were randomly assigned to \n one of two treatment groups, radiation therapy alone or radiation therapy \n together with a chemotherapeutic agent. One objective of the study was to \n compare the two treatment policies with respect to patient survival.\n \n \n \n SOURCE: The Statistical Analysis of Failure Time Data, by JD Kalbfleisch\n & RL Prentice, (1980), Published by John Wiley & Sons \n \n \n \n VARIABLE DESCRIPTIONS:\n \n The data are in free format. That is, at least one blank space separates \n each variable in the .dat file. The variables are as follows:\n \n \n Case: Case Number\n Inst: Participating Institution\n sex: 1=male, 2=female\n Treatment: 1=standard, 2=test\n Grade: 1=well differentiated, 2=moderately differentiated, \n 3=poorly differentiated, 9=missing\n Age: In years at time of diagnosis\n Condition: 1=no disability, 2=restricted work, 3=requires assistance with\n self care, 4=bed confined, 9=missing\n Site: 1=faucial arch, 2=tonsillar fossa, 3=posterior pillar,\n 4=pharyngeal tongue, 5=posterior wall\n T staging: 1=primary tumor measuring 2 cm or less in largest diameter,\n 2=primary tumor measuring 2 cm to 4 cm in largest diameter with\n minimal infiltration in depth, 3=primary tumor measuring more \n than 4 cm, 4=massive invasive tumor\n N staging: 0=no clinical evidence of node metastases, 1=single positive\n node 3 cm or less in diameter, not fixed, 2=single positive\n node more than 3 cm in diameter, not fixed, 3=multiple\n positive nodes or fixed positive nodes \n Entry Date: Date of study entry: Day of year and year\n Status: 0=censored, 1=dead\n Time: Survival time in days from day of diagnosis \n \n \n \n \n \n \n STORY BEHIND THE DATA:\n \n Approximately 30% of the survival times are censored owing primarily to \n patients surviving to the time of analysis. Some patients were lost\n to follow-up because the patient moved or transferred to an institution not\n participating in the study, though these cases were relatively rare. From \n a statistical point of view, an important feature of these data is the \n considerable lack of homogeneity between individuals being studied. \n Of course, as part of the study design, certain criteria for patient \n eligibility had to be met which eliminated extremes in the extent of disease, \n but still many factors are not controlled.\n \n This study included measurements of many covariates which would be expected \n to relate to survival experience. Six such variables are given in the data \n (sex, T staging, N staging, age, general condition, and grade). The site \n of the primary tumor and possible differences between participating \n institutions require consideration as well.\n \n The T,N staging classification gives a measure of the extent of the tumor at \n the primary site and at regional lymph nodes. T=1, refers to a small primary \n tumor, 2 centimeters or less in largest diameter, whereas T=4 is a massive \n tumor with extension to adjoining tissue. T=2 and T=3 refer to intermediate\n cases. N=0 refers to there being no clinical evidence of a lymph node \n metastasis and N=1, N=2, N=3 indicate, in increasing magnitude, the extent of \n existing lymph node involvement. Patients with classifications T=1,N=0; \n T=1,N=1; T=2,N=0; or T=2,N=1, or with distant metastases were excluded \n from study.\n \n The variable general condition gives a measure of the functional capacity of \n the patient at the time of diagnosis (1 refers to no disability whereas\n 4 denotes bed confinement; 2 and 3 measure intermediate levels). The variable\n grade is a measure of the degree of differentiation of the tumor (the degree\n to which the tumor cell resembles the host cell) from 1 (well differentiated) \n to 3 (poorly differentiated)\n \n In addition to the primary question whether the combined treatment mode is\n preferable to the conventional radiation therapy, it is of considerable \n interest to determine the extent to which the several covariates relate to\n subsequent survival. It is also imperative in answering the primary question \n to adjust the survivals for possible imbalance that may be present in the \n study with regard to the other covariates. Such problems are similar to those \n encountered in the classical theory of linear regression and the analysis of \n covariance. Again, the need to accommodate censoring is an important \n distinguishing point. In many situations it is also important to develop \n nonparametric and robust procedures since there is frequently little empirical\n or theoretical work to support a particular family of failure time \n distributions.', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3650/dataset_2199_pharynx.arff', 'true', 127, 'class', NULL, '\"Entry\"', NULL, 'public', NULL, NULL, 'set ignore feature', '2014-10-05 00:03:24'), -(128, 1, 0, 'iris', '1', '1', '', 'ARFF', 'R.A. Fisher', NULL, '1936', '2014-04-06 23:23:39', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/61/dataset_61_iris.arff', 'true', 128, 'class', NULL, NULL, 'http://digital.library.adelaide.edu.au/dspace/handle/2440/15227', 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/Iris', NULL, '2014-04-06 23:23:39'), -(129, 1, NULL, 'iris-challenge', '1', '1', '', 'ARFF', NULL, NULL, NULL, '2018-05-29 19:06:15', NULL, 'CC0', NULL, NULL, 'https://www.openml.org/data/download/19330175/iris-challenge.arff', 'true', 129, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2018-05-29 19:06:15'), -(130, 16, 0, 'iris', '2', '1', '', 'ARFF', 'R.A. Fisher', NULL, '1936', '2014-04-06 23:23:39', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/61/dataset_61_iris.arff', 'true', 130, 'class', NULL, NULL, 'http://digital.library.adelaide.edu.au/dspace/handle/2440/15227', 'private', NULL, 'https://archive.ics.uci.edu/ml/datasets/Iris', NULL, '2014-04-06 23:23:39'); - +INSERT INTO `dataset` (`did`, `uploader`, `source`, `name`, `version`, `version_label`, `format`, `creator`, `contributor`, `collection_date`, `upload_date`, `language`, `licence`, `citation`, `collection`, `url`, `isOriginal`, `file_id`, `default_target_attribute`, `row_id_attribute`, `ignore_attribute`, `paper_url`, `visibility`, `original_data_id`, `original_data_url`, `update_comment`, `last_update`) VALUES +(1, 1, 0, 'anneal', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:24', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1666876/phpFsFYVN', 'true', 1, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'Restoring dataset file', '2015-09-02 00:49:04'), +(2, 1, 0, 'kr-vs-kp', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3/dataset_3_kr-vs-kp.arff', 'true', 2, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:28'), +(3, 1, 0, 'letter', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:41', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/6/dataset_6_letter.arff', 'true', 3, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:41'), +(4, 1, 0, 'balance-scale', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:19:55', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/11/dataset_11_balance-scale.arff', 'true', 4, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:19:55'), +(5, 1, 0, 'mfeat-factors', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/12/dataset_12_mfeat-factors.arff', 'true', 5, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:04'), +(6, 1, 0, 'mfeat-fourier', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/14/dataset_14_mfeat-fourier.arff', 'true', 6, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:17'), +(7, 1, 0, 'breast-w', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:20', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52350/openml_phpJNxH0q', 'true', 7, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, 'added special attributes', '2014-09-21 23:04:47'), +(8, 1, 0, 'mfeat-karhunen', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:30', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/16/dataset_16_mfeat-karhunen.arff', 'true', 8, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:30'), +(9, 1, 0, 'mfeat-morphological', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/18/dataset_18_mfeat-morphological.arff', 'true', 9, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:37'), +(10, 1, 0, 'mfeat-pixel', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:48', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/20/dataset_20_mfeat-pixel.arff', 'true', 10, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:48'), +(11, 1, 0, 'car', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:20:52', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/21/dataset_21_car.arff', 'true', 11, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:20:52'), +(12, 1, 0, 'mfeat-zernike', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:00', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/22/dataset_22_mfeat-zernike.arff', 'true', 12, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:00'), +(13, 1, 0, 'cmc', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/23/dataset_23_cmc.arff', 'true', 13, 'Contraceptive_method_used', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:03'), +(14, 1, 0, 'mushroom', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:11', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/24/dataset_24_mushroom.arff', 'true', 14, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:11'), +(15, 1, 0, 'optdigits', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:34', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/28/dataset_28_optdigits.arff', 'true', 15, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:34'), +(16, 1, 0, 'credit-a', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:38', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/29/dataset_29_credit-a.arff', 'true', 16, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:38'), +(17, 1, 0, 'credit-g', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:47', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/31/dataset_31_credit-g.arff', 'true', 17, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:47'), +(18, 1, 0, 'pendigits', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:21:54', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/32/dataset_32_pendigits.arff', 'true', 18, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:21:54'), +(19, 1, 0, 'segment', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/36/dataset_36_segment.arff', 'true', 19, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:10'), +(20, 1, 0, 'diabetes', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:13', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/37/dataset_37_diabetes.arff', 'true', 20, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:13'), +(21, 1, 0, 'sick', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:19', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/38/dataset_38_sick.arff', 'true', 21, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:19'), +(22, 1, 0, 'soybean', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/42/dataset_42_soybean.arff', 'true', 22, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:32'), +(23, 1, 0, 'spambase', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:41', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/44/dataset_44_spambase.arff', 'true', 23, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:41'), +(24, 1, 0, 'splice', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:49', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/46/dataset_46_splice.arff', 'true', 24, 'Class', NULL, 'Instance_name', NULL, 'public', NULL, NULL, 'Instance_name is an identifier and should be ignored for modelling', '2014-09-19 17:06:29'), +(25, 1, 0, 'tic-tac-toe', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:22:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/50/dataset_50_tic-tac-toe.arff', 'true', 25, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:22:59'), +(26, 1, 0, 'vehicle', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:23:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/54/dataset_54_vehicle.arff', 'true', 26, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:23:10'), +(27, 1, 0, 'waveform-5000', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-06 23:23:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/60/dataset_60_waveform-5000.arff', 'true', 27, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-06 23:23:37'), +(28, 1, 0, 'electricity', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-10 02:42:23', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/2419/electricity-normalized.arff', 'true', 28, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-10 02:42:23'), +(29, 1, 0, 'satimage', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:14:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3619/dataset_186_satimage.arff', 'true', 29, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:14:59'), +(30, 1, 0, 'abalone', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:15:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3620/dataset_187_abalone.arff', 'true', 30, 'Class_number_of_rings', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:15:04'), +(31, 1, 0, 'eucalyptus', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:15:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3625/dataset_194_eucalyptus.arff', 'true', 31, 'Utility', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:15:28'), +(32, 94, 0, 'isolet', '1', NULL, 'ARFF', NULL, NULL, '1994', '2014-08-20 20:59:05', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52405/phpB0xrNj', 'true', 32, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'all numeric variables declared as factors before', '2014-09-25 23:26:09'), +(33, 2, 0, 'vowel', '2', '2', 'ARFF', '\"Peter Turney\"', '\"\"', '', '2014-08-22 16:57:30', NULL, 'Public', '', NULL, 'https://www.openml.org/data/download/52210/phpd8EoD9', 'true', 33, 'Class', '', NULL, '', 'public', NULL, 'http://www.openml.org/d/58', NULL, '2014-08-22 16:57:30'), +(34, 94, 0, 'scene', '1', '', 'ARFF', '\"\"', '\"\"', '', '2014-08-25 11:43:22', NULL, 'Public', '', NULL, 'https://www.openml.org/data/download/1390080/phpuZu33P', 'true', 34, 'Urban', '', NULL, '', 'public', NULL, '', 'removed ranges after the definition of a numerical attribute', '2015-04-15 22:22:58'), +(35, 2, 0, 'monks-problems-1', '1', NULL, 'ARFF', '\"Sebastian Thrun\"', NULL, 'October 1992', '2014-08-26 17:11:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52236/phpAyyBys', 'true', 35, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:11:18'), +(36, 2, 0, 'monks-problems-2', '1', NULL, 'ARFF', '\"Sebastian Thrun\"', NULL, 'October 1992', '2014-08-26 17:29:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52237/php4fATLZ', 'true', 36, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:29:02'), +(37, 2, 0, 'monks-problems-3', '1', NULL, 'ARFF', '\"Sebastian Thrun\"', NULL, NULL, '2014-08-26 17:41:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52238/phphZierv', 'true', 37, 'class', NULL, NULL, NULL, 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems', NULL, '2014-08-26 17:41:07'), +(38, 2, NULL, 'JapaneseVowels', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-27 10:56:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52415/JapaneseVowels.arff', 'true', 38, 'speaker', NULL, NULL, NULL, 'public', NULL, NULL, 'set target feature', '2014-09-27 11:19:36'), +(39, 2, NULL, 'synthetic_control', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-27 10:56:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52417/synthetic_control.arff', 'true', 39, 'class', 'index', NULL, NULL, 'public', NULL, NULL, 'set index feature', '2014-09-27 11:35:53'), +(40, 2, NULL, 'irish', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-28 23:50:51', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52563/irish.arff', 'true', 40, 'Leaving_Certificate', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:50:51'), +(41, 2, NULL, 'analcatdata_authorship', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52570/analcatdata_authorship.arff', 'true', 41, 'Author', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:06'), +(42, 2, NULL, 'analcatdata_dmft', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:25', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52581/analcatdata_dmft.arff', 'true', 42, 'Prevention', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:25'), +(43, 2, NULL, 'profb', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52582/profb.arff', 'true', 43, 'Home/Away', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-28 23:51:27'), +(44, 2, NULL, 'collins', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-28 23:51:43', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52590/collins.arff', 'true', 44, 'Corp.Genre', 'Counter', '\"Text\"', NULL, 'public', NULL, NULL, 'attribute counter is a row id', '2015-04-15 17:08:50'), +(45, 2, NULL, 'sylva_agnostic', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:55:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53919/sylva_agnostic.arff', 'true', 45, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:55:56'), +(46, 2, NULL, 'gina_agnostic', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:56:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53921/gina_agnostic.arff', 'true', 46, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:56:01'), +(47, 2, NULL, 'ada_agnostic', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:56:15', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53926/ada_agnostic.arff', 'true', 47, 'label', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:56:15'), +(48, 2, NULL, 'mozilla4', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53929/mozilla4.arff', 'true', 48, 'state', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:07'), +(49, 2, NULL, 'pc4', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53932/pc4.arff', 'true', 49, 'c', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:12'), +(50, 2, NULL, 'pc3', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:13', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53933/pc3.arff', 'true', 50, 'c', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:13'), +(51, 2, NULL, 'jm1', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:19', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53936/jm1.arff', 'true', 51, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:19'), +(52, 2, NULL, 'kc2', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:36', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53946/kc2.arff', 'true', 52, 'problems', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:36'), +(53, 2, NULL, 'kc1', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:43', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53950/kc1.arff', 'true', 53, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:43'), +(54, 2, NULL, 'pc1', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-06 23:57:45', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53951/pc1.arff', 'true', 54, 'defects', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-06 23:57:45'), +(55, 2, NULL, 'KDDCup09_churn', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-07 00:08:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53995/KDDCup09_churn.arff', 'true', 55, 'CHURN', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-07 00:08:02'), +(56, 2, NULL, 'KDDCup09_upselling', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-07 00:08:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53997/KDDCup09_upselling.arff', 'true', 56, 'UPSELLING', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-07 00:08:27'), +(57, 2, NULL, 'musk', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-07 00:41:54', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/53999/musk.arff', 'true', 57, 'class', 'ID', '\"conformation_name\"', NULL, 'public', NULL, NULL, 'ID is a row id', '2015-04-15 17:37:23'), +(58, 2, NULL, 'MagicTelescope', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-10-07 00:42:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/54003/MagicTelescope.arff', 'true', 58, 'class:', 'ID', NULL, NULL, 'public', NULL, NULL, 'ID is a row id', '2015-04-15 17:41:20'), +(59, 2, NULL, 'Internet-Advertisements', '1', NULL, 'ARFF', '\"Nicholas Kushmerick\"', NULL, NULL, '2014-10-30 11:15:44', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/116567/phpCzcrGG', 'true', 59, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-10-30 11:15:44'), +(60, 2, NULL, 'Click_prediction_small', '5', NULL, 'ARFF', NULL, NULL, NULL, '2014-11-27 01:18:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/184157/phpfGCaQC', 'true', 60, 'click', NULL, '\"url_hash\",\"query_id\"', NULL, 'public', NULL, NULL, NULL, '2014-11-27 01:26:36'), +(61, 64, NULL, 'artificial-characters', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 20:58:53', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586212/phpPQrHPH', 'true', 61, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 20:58:53'), +(62, 64, NULL, 'bank-marketing', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 22:16:49', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586218/phpkIxskf', 'true', 62, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 22:16:49'), +(63, 64, NULL, 'banknote-authentication', '1', NULL, 'ARFF', '\"Volker Lohweg\"', NULL, NULL, '2015-05-21 22:40:57', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586223/php50jXam', 'true', 63, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-01-18 18:45:44'), +(64, 64, NULL, 'blood-transfusion-service-center', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 22:49:48', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586225/php0iVrYT', 'true', 64, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 21:02:59'), +(65, 64, NULL, 'cardiotocography', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 23:05:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586231/php9HX2u8', 'true', 65, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:49:14'), +(66, 64, NULL, 'climate-model-simulation-crashes', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 23:11:45', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586232/phpXeun7q', 'true', 66, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:49:00'), +(67, 64, NULL, 'cnae-9', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-21 23:19:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1586233/phpmcGu2X', 'true', 67, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-21 23:19:32'), +(68, 64, NULL, 'eeg-eye-state', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 16:40:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1587924/phplE7q6h', 'true', 68, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:42:10'), +(69, 64, NULL, 'first-order-theorem-proving', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 17:30:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1587932/phpPbCMyg', 'true', 69, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:36:55'), +(70, 64, NULL, 'gas-drift', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 20:11:33', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1588715/phpbL6t4U', 'true', 70, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 20:11:33'), +(71, 64, NULL, 'har', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 20:38:11', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1589271/php88ZB4Q', 'true', 71, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 20:38:11'), +(72, 64, NULL, 'hill-valley', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 21:11:58', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590101/php3isjYz', 'true', 72, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 21:11:58'), +(73, 64, NULL, 'ilpd', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 22:40:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590565/phpOJxGL9', 'true', 73, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:32:35'), +(74, 64, NULL, 'madelon', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-22 23:46:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1590986/phpfLuQE4', 'true', 74, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-22 23:46:18'), +(75, 64, NULL, 'nomao', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 19:09:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592278/phpDYCOet', 'true', 75, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-05-25 19:09:04'), +(76, 64, NULL, 'ozone-level-8hr', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 19:22:29', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592279/phpdReP6S', 'true', 76, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:25:43'), +(77, 64, NULL, 'phoneme', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 19:34:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592281/php8Mz7BG', 'true', 77, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:25:20'), +(78, 64, NULL, 'one-hundred-plants-margin', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 20:51:03', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592283/phpCsX3fx', 'true', 78, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:21:22'), +(79, 64, NULL, 'one-hundred-plants-shape', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 20:58:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592284/php0FyS2T', 'true', 79, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:21:11'), +(80, 64, NULL, 'one-hundred-plants-texture', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 20:59:55', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592285/phpoOxxNn', 'true', 80, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:20:59'), +(81, 64, NULL, 'qsar-biodeg', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 21:14:53', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592286/phpGUrE90', 'true', 81, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:20:47'), +(82, 64, NULL, 'wall-robot-navigation', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 21:50:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592289/phpVeNa5j', 'true', 82, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:19:18'), +(83, 64, NULL, 'semeion', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 22:22:34', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592293/phptd5jYj', 'true', 83, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:18:33'), +(84, 64, NULL, 'steel-plates-fault', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 22:42:40', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592296/php9xWOpn', 'true', 84, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:17:37'), +(85, 64, NULL, 'tamilnadu-electricity', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-25 22:52:37', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592297/phpvFYBg2', 'true', 85, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:17:26'), +(86, 64, NULL, 'wdbc', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-05-26 16:24:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1592318/phpAmSP4g', 'true', 86, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-09 20:15:56'), +(87, 64, NULL, 'micro-mass', '2', '2', 'ARFF', '\"Pierre Mahé\",\"Jean-Baptiste Veyrieras\"', NULL, NULL, '2015-06-01 16:57:25', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1593707/phpHyLSNF', 'true', 87, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://www.openml.org/d/1514', NULL, '2015-06-01 16:57:25'), +(88, 64, NULL, 'wilt', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-06-01 23:34:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1675983/phpnThNfi', 'true', 88, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-10-08 14:43:09'), +(89, 2, NULL, 'adult', '2', '2', 'ARFF', NULL, NULL, NULL, '2015-06-09 16:39:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1595261/phpMawTba', 'true', 89, 'class', NULL, NULL, NULL, 'public', NULL, NULL, 'added target attribute', '2015-06-09 16:56:26'), +(90, 2, NULL, 'Bioresponse', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-11-04 23:59:56', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1681097/phpSSK7iA', 'true', 90, 'target', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-04 23:59:56'), +(91, 2, NULL, 'Amazon_employee_access', '1', NULL, 'ARFF', NULL, NULL, NULL, '2015-11-05 00:06:06', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1681098/phpmPOD5A', 'true', 91, 'target', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2015-11-05 00:06:06'), +(92, 874, NULL, 'PhishingWebsites', '1', NULL, 'ARFF', '\"Rami Mustafa A Mohammad ( University of Huddersfield\",\"rami.mohammad \'@\' hud.ac.uk\",\"rami.mustafa.a \'@\' gmail.com) Lee McCluskey (University of Huddersfield\",\"t.l.mccluskey \'@\' hud.ac.uk ) Fadi Thabtah (Canadian University of Dubai\",\"fadi \'@\' cud.ac.ae)\"', NULL, NULL, '2016-02-16 15:30:33', NULL, 'Public', 'Please refer to the Machine Learning Repository\'s citation policy', NULL, 'https://www.openml.org/data/download/1798106/phpV5QYya', 'true', 92, 'Result', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-16 15:30:33'), +(93, 874, NULL, 'GesturePhaseSegmentationProcessed', '1', NULL, 'ARFF', '\"enata Cristina Barros Madeo (Madeo\",\"R. C. B.) Priscilla Koch Wagner (Wagner\",\"P. K.) Sarajane Marques Peres (Peres\",\"S. M.) {renata.si\",\"priscilla.wagner\",\"sarajane} at usp.br http://each.uspnet.usp.br/sarajane/\"', NULL, NULL, '2016-02-17 11:42:33', NULL, 'Public', 'Please refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers.', NULL, 'https://www.openml.org/data/download/1798765/phpYLeydd', 'true', 93, 'Phase', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-20 13:08:52'), +(94, 874, NULL, 'MiceProtein', '1', NULL, 'ARFF', '\"lara Higuera Department of Software Engineering and Artificial Intelligence\",\"Faculty of Informatics and the Department of Biochemistry and Molecular Biology\",\"Faculty of Chemistry\",\"University Complutense\",\"Madrid\",\"Spain. Email: clarahiguera \'@\' ucm.es Katheleen J. Gardiner\",\"creator and owner of the protein expression data\",\"is currently with the Linda Crnic Institute for Down Syndrome\",\"Department of Pediatrics\",\"Department of Biochemistry and Molecular Genetics\",\"Human Medical Genetics and Genomics\",\"and Neuroscience Programs\",\"University of Colorado\",\"School of Medicine\",\"Aurora\",\"Colorado\",\"USA. Email: katheleen.gardiner \'@\' ucdenver.edu Krzysztof J. Cios is currently with the Department of Computer Science\",\"Virginia Commonwealth University\",\"Richmond\",\"Virginia\",\"USA\",\"and IITiS Polish Academy of Sciences\",\"Poland. Email: kcios \'@\' vcu.edu\"', NULL, NULL, '2016-02-17 14:32:49', NULL, 'Public', 'Higuera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126', NULL, 'https://www.openml.org/data/download/1804243/phpO6CpB2', 'true', 94, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-02-21 21:09:16'), +(95, 2, NULL, 'cylinder-bands', '2', '2', 'ARFF', NULL, NULL, NULL, '2016-03-30 22:09:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1854224/phpAz9Len', 'true', 95, 'band_type', NULL, '\"timestamp\",\"cylinder_number\"', NULL, 'public', NULL, NULL, NULL, '2016-03-30 22:09:17'), +(96, 2, NULL, 'cjs', '3', NULL, 'ARFF', NULL, NULL, NULL, '2016-04-11 18:32:46', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1910442/phpDAC5gS', 'true', 96, 'TR', 'N', NULL, NULL, 'public', NULL, NULL, NULL, '2016-04-11 18:32:46'), +(97, 64, NULL, 'dresses-sales', '2', NULL, 'ARFF', NULL, NULL, NULL, '2016-04-11 19:57:27', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1910507/phpcFPMhq', 'true', 97, 'Class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-04-11 19:57:27'), +(98, 64, NULL, 'LED-display-domain-7digit', '1', '1', 'ARFF', NULL, NULL, NULL, '2016-07-29 20:36:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4535757/phpSj3fWL', 'true', 98, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://sci2s.ugr.es/keel/dataset.php?cod=63, https://archive.ics.uci.edu/ml/datasets/LED+Display+Domain', NULL, '2016-07-29 20:36:10'), +(99, 64, NULL, 'texture', '1', '1', 'ARFF', NULL, NULL, NULL, '2016-07-29 21:03:14', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4535764/phpBDgUyY', 'true', 99, 'Class', NULL, NULL, NULL, 'public', NULL, 'http://sci2s.ugr.es/keel/dataset.php?cod=72', NULL, '2016-07-29 21:03:14'), +(100, 2, NULL, 'Australian', '3', '2', 'ARFF', NULL, NULL, NULL, '2016-09-21 15:43:02', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/4599631/phpjP8PU3', 'true', 100, 'Y', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2016-09-21 15:43:02'), +(101, 2, NULL, 'UNIX_user_data', '1', NULL, 'ARFF', NULL, NULL, NULL, '2014-09-27 10:55:59', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52413/UNIX_user_data.arff', 'true', 101, 'user', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-09-27 10:55:59'), +(102, 402, NULL, 'fourclass_scale', '1', NULL, 'Sparse_ARFF', '\"Tin Kam Ho and Eugene M. Kleinberg.\"', '\"libSVM\",\"AAD group\"', NULL, '2015-06-02 11:17:44', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/1594035/phpeLklTK', 'true', 102, 'class', NULL, NULL, NULL, 'public', NULL, 'http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html', NULL, '2015-06-02 11:17:44'), +(103, 1, 0, 'kin8nm', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3626/dataset_2175_kin8nm.arff', 'true', 103, 'y', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:04'), +(104, 1, 0, 'mbagrade', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3627/dataset_2176_mbagrade.arff', 'true', 104, 'grade_point_average', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:07'), +(105, 1, 0, 'wisconsin', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3628/dataset_2177_wisconsin.arff', 'true', 105, 'time', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:10'), +(106, 1, 0, 'vineyard', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3629/dataset_2178_vineyard.arff', 'true', 106, 'lugs_1991', 'row_number', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:12'), +(107, 1, 0, 'bolts', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:14', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3630/dataset_2179_bolts.arff', 'true', 107, 'T20BOLT', 'RUN', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:14'), +(108, 1, 0, 'cleveland', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:17', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3631/dataset_2180_cleveland.arff', 'true', 108, 'num', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:17'), +(109, 1, 0, 'auto_price', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:20', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3632/dataset_2181_auto_price.arff', 'true', 109, 'price', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:20'), +(110, 1, 0, 'autoMpg', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:22', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3633/dataset_2182_autoMpg.arff', 'true', 110, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:22'), +(111, 1, 0, 'cpu_act', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3634/dataset_2183_cpu_act.arff', 'true', 111, 'usr', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:32'), +(112, 1, 0, 'delta_elevators', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:39', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/52348/openml_phpmlDSTj', 'true', 112, 'Se', NULL, NULL, NULL, 'public', NULL, NULL, 'set target feature', '2014-09-22 16:13:44'), +(113, 1, 0, 'fruitfly', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:42', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3636/dataset_2185_fruitfly.arff', 'true', 113, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:42'), +(114, 1, 0, 'pbc', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:16:46', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3637/dataset_2186_pbc.arff', 'true', 114, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:16:46'), +(115, 1, 0, 'pol', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:01', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3638/dataset_2187_pol.arff', 'true', 115, 'foo', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:01'), +(116, 1, 0, 'autoHorse', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:04', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3639/dataset_2188_autoHorse.arff', 'true', 116, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:04'), +(117, 1, 0, 'lowbwt', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:07', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3640/dataset_2189_lowbwt.arff', 'true', 117, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:07'), +(118, 1, 0, 'cholesterol', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:10', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3641/dataset_2190_cholesterol.arff', 'true', 118, 'chol', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:10'), +(119, 1, 0, 'sleep', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:12', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3642/dataset_2191_sleep.arff', 'true', 119, 'danger_index', NULL, NULL, NULL, 'public', NULL, NULL, 'corrected target', '2014-10-06 22:07:54'), +(120, 1, 0, 'triazines', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:16', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3643/dataset_2192_triazines.arff', 'true', 120, 'activity', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:16'), +(121, 1, 0, 'autoPrice', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:18', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3644/dataset_2193_autoPrice.arff', 'true', 121, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:18'), +(122, 1, 0, 'detroit', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:21', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3645/dataset_2194_detroit.arff', 'true', 122, 'ASR', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:21'), +(123, 1, 0, 'quake', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:24', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3646/dataset_2195_quake.arff', 'true', 123, 'richter', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:24'), +(124, 1, 0, 'cloud', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:26', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3647/dataset_2196_cloud.arff', 'true', 124, 'TE', 'period', NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:26'), +(125, 1, 0, 'longley', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:28', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3648/dataset_2197_longley.arff', 'true', 125, 'employed', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:28'), +(126, 1, 0, 'diabetes_numeric', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:30', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3649/dataset_2198_diabetes_numeric.arff', 'true', 126, 'c_peptide', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2014-04-23 13:17:30'), +(127, 1, 0, 'pharynx', '1', '1', 'ARFF', NULL, NULL, NULL, '2014-04-23 13:17:32', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/3650/dataset_2199_pharynx.arff', 'true', 127, 'class', NULL, '\"Entry\"', NULL, 'public', NULL, NULL, 'set ignore feature', '2014-10-05 00:03:24'), +(128, 1, 0, 'iris', '1', '1', 'ARFF', 'R.A.Fisher', NULL, '1937', '2014-04-06 23:23:39', 'English', 'Public', 'The use of multiple measurements in taxonomic problems', NULL, 'https://www.openml.org/data/download/61/dataset_61_iris.arff', 'true', 128, 'class', NULL, NULL, 'http://digital.library.adelaide.edu.au/dspace/handle/2440/15227', 'public', NULL, 'https://archive.ics.uci.edu/ml/datasets/Iris', NULL, '2014-04-06 23:23:39'), +(129, 1, NULL, 'iris-challenge', '1', '1', 'ARFF', NULL, NULL, NULL, '2018-05-29 19:06:15', NULL, 'CC0', NULL, NULL, 'https://www.openml.org/data/download/19330175/iris-challenge.arff', 'true', 129, 'class', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2018-05-29 19:06:15'), +(130, 16, 0, 'iris', '2', '1', 'ARFF', 'R.A. Fisher', NULL, '1936', '2014-04-06 23:23:39', NULL, 'Public', NULL, NULL, 'https://www.openml.org/data/download/61/dataset_61_iris.arff', 'true', 130, 'class', NULL, NULL, 'http://digital.library.adelaide.edu.au/dspace/handle/2440/15227', 'private', NULL, 'https://archive.ics.uci.edu/ml/datasets/Iris', NULL, '2014-04-06 23:23:39'), +(131, 1, 0, 'web_questionsQA', '1', '1', 'ARFF', 'Hamburg Uni', NULL, NULL, '2023-06-15 23:23:39', NULL, 'Public', NULL, NULL, 'https://api.openml.org/data/v1/download/22116555/web_questions.arff', 'true', 131, 'answers', NULL, NULL, NULL, 'public', NULL, NULL, NULL, '2023-06-15 23:23:39'); diff --git a/data/sql/dataset_description.sql b/data/sql/dataset_description.sql new file mode 100644 index 000000000..4674261dd --- /dev/null +++ b/data/sql/dataset_description.sql @@ -0,0 +1,132 @@ +INSERT INTO `dataset_description` (`did`, `version`, `description`, `uploader`) VALUES +(1, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Annealing Data\n \n 2. Source Information: donated by David Sterling and Wray Buntine.\n \n 3. Past Usage: unknown\n \n 4. Relevant Information:\n -- Explanation: I suspect this was left by Ross Quinlan in 1987 at the\n 4th Machine Learning Workshop. I\'d have to check with Jeff Schlimmer\n to double check this.\n \n 5. Number of Instances: 798\n \n 6. Number of Attributes: 38\n -- 6 continuously-valued\n -- 3 integer-valued\n -- 29 nominal-valued\n \n 7. Attribute Information:\n 1. family: --,GB,GK,GS,TN,ZA,ZF,ZH,ZM,ZS\n 2. product-type: C, H, G\n 3. steel: -,R,A,U,K,M,S,W,V\n 4. carbon: continuous\n 5. hardness: continuous\n 6. temper_rolling: -,T\n 7. condition: -,S,A,X\n 8. formability: -,1,2,3,4,5\n 9. strength: continuous\n 10. non-ageing: -,N\n 11. surface-finish: P,M,-\n 12. surface-quality: -,D,E,F,G\n 13. enamelability: -,1,2,3,4,5\n 14. bc: Y,-\n 15. bf: Y,-\n 16. bt: Y,-\n 17. bw/me: B,M,-\n 18. bl: Y,-\n 19. m: Y,-\n 20. chrom: C,-\n 21. phos: P,-\n 22. cbond: Y,-\n 23. marvi: Y,-\n 24. exptl: Y,-\n 25. ferro: Y,-\n 26. corr: Y,-\n 27. blue/bright/varn/clean: B,R,V,C,-\n 28. lustre: Y,-\n 29. jurofm: Y,-\n 30. s: Y,-\n 31. p: Y,-\n 32. shape: COIL, SHEET\n 33. thick: continuous\n 34. width: continuous\n 35. len: continuous\n 36. oil: -,Y,N\n 37. bore: 0000,0500,0600,0760\n 38. packing: -,1,2,3\n classes: 1,2,3,4,5,U\n \n -- The \'-\' values are actually \'not_applicable\' values rather than\n \'missing_values\' (and so can be treated as legal discrete\n values rather than as showing the absence of a discrete value).\n \n 8. Missing Attribute Values: Signified with \"?\"\n Attribute: Number of instances missing its value:\n 1 0\n 2 0\n 3 70\n 4 0\n 5 0\n 6 675\n 7 271\n 8 283\n 9 0\n 10 703\n 11 790\n 12 217\n 13 785\n 14 797\n 15 680\n 16 736\n 17 609\n 18 662\n 19 798\n 20 775\n 21 791\n 22 730\n 23 798\n 24 796\n 25 772\n 26 798\n 27 793\n 28 753\n 29 798\n 30 798\n 31 798\n 32 0\n 33 0\n 34 0\n 35 0\n 36 740\n 37 0\n 38 789\n 39 0\n \n 9. Distribution of Classes\n Class Name: Number of Instances:\n 1 8\n 2 88\n 3 608\n 4 0\n 5 60\n U 34\n ---\n 798', 1), +(2, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Chess End-Game -- King+Rook versus King+Pawn on a7\n (usually abbreviated KRKPA7). The pawn on a7 means it is one square\n away from queening. It is the King+Rook\'s side (white) to move.\n \n 2. Sources:\n (a) Database originally generated and described by Alen Shapiro.\n (b) Donor/Coder: Rob Holte (holte@uottawa.bitnet). The database\n was supplied to Holte by Peter Clark of the Turing Institute\n in Glasgow (pete@turing.ac.uk).\n (c) Date: 1 August 1989\n \n 3. Past Usage:\n - Alen D. Shapiro (1983,1987), \"Structured Induction in Expert Systems\",\n Addison-Wesley. This book is based on Shapiro\'s Ph.D. thesis (1983)\n at the University of Edinburgh entitled \"The Role of Structured\n Induction in Expert Systems\".\n - Stephen Muggleton (1987), \"Structuring Knowledge by Asking Questions\",\n pp.218-229 in \"Progress in Machine Learning\", edited by I. Bratko\n and Nada Lavrac, Sigma Press, Wilmslow, England SK9 5BB.\n - Robert C. Holte, Liane Acker, and Bruce W. Porter (1989),\n \"Concept Learning and the Problem of Small Disjuncts\",\n Proceedings of IJCAI. Also available as technical report AI89-106,\n Computer Sciences Department, University of Texas at Austin,\n Austin, Texas 78712.\n \n 4. Relevant Information:\n The dataset format is described below. Note: the format of this\n database was modified on 2/26/90 to conform with the format of all\n the other databases in the UCI repository of machine learning databases.\n \n 5. Number of Instances: 3196 total\n \n 6. Number of Attributes: 36\n \n 7. Attribute Summaries:\n Classes (2): -- White-can-win (\"won\") and White-cannot-win (\"nowin\").\n I believe that White is deemed to be unable to win if the Black pawn\n can safely advance.\n Attributes: see Shapiro\'s book.\n \n 8. Missing Attributes: -- none\n \n 9. Class Distribution:\n In 1669 of the positions (52%), White can win.\n In 1527 of the positions (48%), White cannot win.\n \n The format for instances in this database is a sequence of 37 attribute values.\n Each instance is a board-descriptions for this chess endgame. The first\n 36 attributes describe the board. The last (37th) attribute is the\n classification: \"win\" or \"nowin\". There are 0 missing values.\n A typical board-description is\n \n f,f,f,f,f,f,f,f,f,f,f,f,l,f,n,f,f,t,f,f,f,f,f,f,f,t,f,f,f,f,f,f,f,t,t,n,won\n \n The names of the features do not appear in the board-descriptions.\n Instead, each feature correponds to a particular position in the\n feature-value list. For example, the head of this list is the value\n for the feature \"bkblk\". The following is the list of features, in\n the order in which their values appear in the feature-value list:\n \n [bkblk,bknwy,bkon8,bkona,bkspr,bkxbq,bkxcr,bkxwp,blxwp,bxqsq,cntxt,dsopp,dwipd,\n hdchk,katri,mulch,qxmsq,r2ar8,reskd,reskr,rimmx,rkxwp,rxmsq,simpl,skach,skewr,\n skrxp,spcop,stlmt,thrsk,wkcti,wkna8,wknck,wkovl,wkpos,wtoeg]\n \n In the file, there is one instance (board position) per line.\n \n \n Num Instances: 3196\n Num Attributes: 37\n Num Continuous: 0 (Int 0 / Real 0)\n Num Discrete: 37\n Missing values: 0 / 0.0%\n\n name type enum ints real missing distinct (1)\n 1 \'bkblk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 2 \'bknwy\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 3 \'bkon8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 4 \'bkona\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 5 \'bkspr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 6 \'bkxbq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 7 \'bkxcr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 8 \'bkxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 9 \'blxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 10 \'bxqsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 11 \'cntxt\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 12 \'dsopp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 13 \'dwipd\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 14 \'hdchk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 15 \'katri\' Enum 100% 0% 0% 0 / 0% 3 / 0% 0% \n 16 \'mulch\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 17 \'qxmsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 18 \'r2ar8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 19 \'reskd\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 20 \'reskr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 21 \'rimmx\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 22 \'rkxwp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 23 \'rxmsq\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 24 \'simpl\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 25 \'skach\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 26 \'skewr\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 27 \'skrxp\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 28 \'spcop\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 29 \'stlmt\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 30 \'thrsk\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 31 \'wkcti\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 32 \'wkna8\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 33 \'wknck\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 34 \'wkovl\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 35 \'wkpos\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 36 \'wtoeg\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 37 \'class\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0%', 1), +(3, '1', '**Author**: David J. Slate \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Letter+Recognition) - 01-01-1991 \r\n**Please cite**: P. W. Frey and D. J. Slate. \"Letter Recognition Using Holland-style Adaptive Classifiers\". Machine Learning 6(2), 1991 \r\n\r\n1. TITLE: \r\n Letter Image Recognition Data \r\n \r\n The objective is to identify each of a large number of black-and-white\r\n rectangular pixel displays as one of the 26 capital letters in the English\r\n alphabet. The character images were based on 20 different fonts and each\r\n letter within these 20 fonts was randomly distorted to produce a file of\r\n 20,000 unique stimuli. Each stimulus was converted into 16 primitive\r\n numerical attributes (statistical moments and edge counts) which were then\r\n scaled to fit into a range of integer values from 0 through 15. We\r\n typically train on the first 16000 items and then use the resulting model\r\n to predict the letter category for the remaining 4000. See the article\r\n cited above for more details.', 1), +(4, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Balance Scale Weight & Distance Database\n\n2. Source Information: \n (a) Source: Generated to model psychological experiments reported\n by Siegler, R. S. (1976). Three Aspects of Cognitive\n Development. Cognitive Psychology, 8, 481-520.\n (b) Donor: Tim Hume (hume@ics.uci.edu)\n (c) Date: 22 April 1994\n\n3. Past Usage: (possibly different formats of this data)\n - Publications\n 1. Klahr, D., & Siegler, R.S. (1978). The Representation of\n Children\'s Knowledge. In H. W. Reese & L. P. Lipsitt (Eds.),\n Advances in Child Development and Behavior, pp. 61-116. New\n York: Academic Press \n 2. Langley,P. (1987). A General Theory of Discrimination\n Learning. In D. Klahr, P. Langley, & R. Neches (Eds.),\n Production System Models of Learning and Development, pp.\n 99-161. Cambridge, MA: MIT Press\n 3. Newell, A. (1990). Unified Theories of Cognition.\n Cambridge, MA: Harvard University Press\n 4. McClelland, J.L. (1988). Parallel Distibuted Processing:\n Implications for Cognition and Development. Technical\n Report AIP-47, Department of Psychology, Carnegie-Mellon\n University \n 5. Shultz, T., Mareschal, D., & Schmidt, W. (1994). Modeling\n Cognitive Development on Balance Scale Phenomena. Machine\n Learning, Vol. 16, pp. 59-88.\n\n4. Relevant Information: \n This data set was generated to model psychological\n experimental results. Each example is classified as having the\n balance scale tip to the right, tip to the left, or be\n balanced. The attributes are the left weight, the left\n distance, the right weight, and the right distance. The\n correct way to find the class is the greater of \n (left-distance * left-weight) and (right-distance *\n right-weight). If they are equal, it is balanced.\n\n5. Number of Instances: 625 (49 balanced, 288 left, 288 right)\n\n6. Number of Attributes: 4 (numeric) + class name = 5\n\n7. Attribute Information:\n 1. Class Name: 3 (L, B, R)\n 2. Left-Weight: 5 (1, 2, 3, 4, 5)\n 3. Left-Distance: 5 (1, 2, 3, 4, 5)\n 4. Right-Weight: 5 (1, 2, 3, 4, 5)\n 5. Right-Distance: 5 (1, 2, 3, 4, 5)\n\n8. Missing Attribute Values: \n none\n\n9. Class Distribution: \n 1. 46.08 percent are L\n 2. 07.84 percent are B\n 3. 46.08 percent are R', 1), +(5, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(6, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(7, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n', 1), +(8, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(9, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (0 - 9)\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class \'0\', followed by sets of 200 patterns\n for each of the classes \'1\' - \'9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(10, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(11, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Car Evaluation Database\n \n 2. Sources:\n (a) Creator: Marko Bohanec\n (b) Donors: Marko Bohanec (marko.bohanec@ijs.si)\n Blaz Zupan (blaz.zupan@ijs.si)\n (c) Date: June, 1997\n \n 3. Past Usage:\n \n The hierarchical decision model, from which this dataset is\n derived, was first presented in \n \n M. Bohanec and V. Rajkovic: Knowledge acquisition and explanation for\n multi-attribute decision making. In 8th Intl Workshop on Expert\n Systems and their Applications, Avignon, France. pages 59-78, 1988.\n \n Within machine-learning, this dataset was used for the evaluation\n of HINT (Hierarchy INduction Tool), which was proved to be able to\n completely reconstruct the original hierarchical model. This,\n together with a comparison with C4.5, is presented in\n \n B. Zupan, M. Bohanec, I. Bratko, J. Demsar: Machine learning by\n function decomposition. ICML-97, Nashville, TN. 1997 (to appear)\n \n 4. Relevant Information Paragraph:\n \n Car Evaluation Database was derived from a simple hierarchical\n decision model originally developed for the demonstration of DEX\n (M. Bohanec, V. Rajkovic: Expert system for decision\n making. Sistemica 1(1), pp. 145-157, 1990.). The model evaluates\n cars according to the following concept structure:\n \n CAR car acceptability\n . PRICE overall price\n . . buying buying price\n . . maint price of the maintenance\n . TECH technical characteristics\n . . COMFORT comfort\n . . . doors number of doors\n . . . persons capacity in terms of persons to carry\n . . . lug_boot the size of luggage boot\n . . safety estimated safety of the car\n \n Input attributes are printed in lowercase. Besides the target\n concept (CAR), the model includes three intermediate concepts:\n PRICE, TECH, COMFORT. Every concept is in the original model\n related to its lower level descendants by a set of examples (for\n these examples sets see http://www-ai.ijs.si/BlazZupan/car.html).\n \n The Car Evaluation Database contains examples with the structural\n information removed, i.e., directly relates CAR to the six input\n attributes: buying, maint, doors, persons, lug_boot, safety.\n \n Because of known underlying concept structure, this database may be\n particularly useful for testing constructive induction and\n structure discovery methods.\n \n 5. Number of Instances: 1728\n (instances completely cover the attribute space)\n \n 6. Number of Attributes: 6\n \n 7. Attribute Values:\n \n buying v-high, high, med, low\n maint v-high, high, med, low\n doors 2, 3, 4, 5-more\n persons 2, 4, more\n lug_boot small, med, big\n safety low, med, high\n \n 8. Missing Attribute Values: none\n \n 9. Class Distribution (number of instances per class)\n \n class N N[%]\n -----------------------------\n unacc 1210 (70.023 %) \n acc 384 (22.222 %) \n good 69 ( 3.993 %) \n v-good 65 ( 3.762 %) \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(12, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe multi-feature digit dataset\n -------------------------------\n \n Oowned and donated by:\n ----------------------\n \n Robert P.W. Duin\n Department of Applied Physics \n Delft University of Technology \n P.O. Box 5046, 2600 GA Delft\n The Netherlands\n \n email: duin@ph.tn.tudelft.nl\n http : //www.ph.tn.tudelft.nl/~duin\n tel +31 15 2786143\n \n Usage\n -----\n A slightly different version of the database is used in\n \n M. van Breukelen, R.P.W. Duin, D.M.J. Tax, and J.E. den Hartog, Handwritten\n digit recognition by combined classifiers, Kybernetika, vol. 34, no. 4,\n 1998, 381-386.\n \n M. van Breukelen and R.P.W. Duin, Neural Network Initialization by Combined\n Classifiers, in: A.K. Jain, S. Venkatesh, B.C. Lovell (eds.), ICPR\'98,\n Proc. 14th Int. Conference on Pattern Recognition (Brisbane, Aug. 16-20),\n \n The database as it is is used in:\n \n A.K. Jain, R.P.W. Duin, J. Mao, Statisitcal Pattern Recognition: A Review,\n in preparation\n \n Description\n -----------\n \n This dataset consists of features of handwritten numerals (`0\'--`9\')\n extracted from a collection of Dutch utility maps. 200 patterns per\n class (for a total of 2,000 patterns) have been digitized in binary\n images. These digits are represented in terms of the following six\n feature sets (files): \n \n 1. mfeat-fou: 76 Fourier coefficients of the character shapes; \n 2. mfeat-fac: 216 profile correlations; \n 3. mfeat-kar: 64 Karhunen-Love coefficients; \n 4. mfeat-pix: 240 pixel averages in 2 x 3 windows; \n 5. mfeat-zer: 47 Zernike moments; \n 6. mfeat-mor: 6 morphological features. \n \n In each file the 2000 patterns are stored in ASCI on 2000 lines. The\n first 200 patterns are of class `0\', followed by sets of 200 patterns\n for each of the classes `1\' - `9\'. Corresponding patterns in different\n feature sets (files) correspond to the same original character.\n \n The source image dataset is lost. Using the pixel-dataset (mfeat-pix)\n sampled versions of the original images may be obtained (15 x 16 pixels).\n \n Total number of instances:\n --------------------------\n 2000 (200 instances per class)\n \n Total number of attributes:\n ---------------------------\n 649 (distributed over 6 datasets,see above)\n \n no missing attributes\n \n Total number of classes:\n ------------------------\n 10\n \n Format:\n ------\n 6 files, see above.\n Each file contains 2000 lines, one for each instance.\n Attributes are SPACE separated and can be loaded by Matlab as\n > load filename\n No missing attributes. Some are integer, others are real.\n \n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(13, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Contraceptive Method Choice\n \n 2. Sources:\n (a) Origin: This dataset is a subset of the 1987 National Indonesia\n Contraceptive Prevalence Survey\n (b) Creator: Tjen-Sien Lim (limt@stat.wisc.edu)\n (c) Donor: Tjen-Sien Lim (limt@stat.wisc.edu)\n (c) Date: June 7, 1997\n \n 3. Past Usage:\n Lim, T.-S., Loh, W.-Y. & Shih, Y.-S. (1999). A Comparison of\n Prediction Accuracy, Complexity, and Training Time of Thirty-three\n Old and New Classification Algorithms. Machine Learning. Forthcoming.\n (ftp://ftp.stat.wisc.edu/pub/loh/treeprogs/quest1.7/mach1317.pdf or\n (http://www.stat.wisc.edu/~limt/mach1317.pdf)\n \n 4. Relevant Information:\n This dataset is a subset of the 1987 National Indonesia Contraceptive\n Prevalence Survey. The samples are married women who were either not \n pregnant or do not know if they were at the time of interview. The \n problem is to predict the current contraceptive method choice \n (no use, long-term methods, or short-term methods) of a woman based \n on her demographic and socio-economic characteristics.\n \n 5. Number of Instances: 1473\n \n 6. Number of Attributes: 10 (including the class attribute)\n \n 7. Attribute Information:\n \n 1. Wife\'s age (numerical)\n 2. Wife\'s education (categorical) 1=low, 2, 3, 4=high\n 3. Husband\'s education (categorical) 1=low, 2, 3, 4=high\n 4. Number of children ever born (numerical)\n 5. Wife\'s religion (binary) 0=Non-Islam, 1=Islam\n 6. Wife\'s now working? (binary) 0=Yes, 1=No\n 7. Husband\'s occupation (categorical) 1, 2, 3, 4\n 8. Standard-of-living index (categorical) 1=low, 2, 3, 4=high\n 9. Media exposure (binary) 0=Good, 1=Not good\n 10. Contraceptive method used (class attribute) 1=No-use \n 2=Long-term\n 3=Short-term\n \n 8. Missing Attribute Values: None\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(14, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Mushroom Database\n \n 2. Sources: \n (a) Mushroom records drawn from The Audubon Society Field Guide to North\n American Mushrooms (1981). G. H. Lincoff (Pres.), New York: Alfred\n A. Knopf\n (b) Donor: Jeff Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n (c) Date: 27 April 1987\n \n 3. Past Usage:\n 1. Schlimmer,J.S. (1987). Concept Acquisition Through Representational\n Adjustment (Technical Report 87-19). Doctoral disseration, Department\n of Information and Computer Science, University of California, Irvine.\n --- STAGGER: asymptoted to 95% classification accuracy after reviewing\n 1000 instances.\n 2. Iba,W., Wogulis,J., & Langley,P. (1988). Trading off Simplicity\n and Coverage in Incremental Concept Learning. In Proceedings of \n the 5th International Conference on Machine Learning, 73-79.\n Ann Arbor, Michigan: Morgan Kaufmann. \n -- approximately the same results with their HILLARY algorithm \n 3. In the following references a set of rules (given below) were\n learned for this data set which may serve as a point of\n comparison for other researchers.\n \n Duch W, Adamczak R, Grabczewski K (1996) Extraction of logical rules\n from training data using backpropagation networks, in: Proc. of the\n The 1st Online Workshop on Soft Computing, 19-30.Aug.1996, pp. 25-30,\n available on-line at: http://www.bioele.nuee.nagoya-u.ac.jp/wsc1/\n \n Duch W, Adamczak R, Grabczewski K, Ishikawa M, Ueda H, Extraction of\n crisp logical rules using constrained backpropagation networks -\n comparison of two new approaches, in: Proc. of the European Symposium\n on Artificial Neural Networks (ESANN\'97), Bruge, Belgium 16-18.4.1997,\n pp. xx-xx\n \n Wlodzislaw Duch, Department of Computer Methods, Nicholas Copernicus\n University, 87-100 Torun, Grudziadzka 5, Poland\n e-mail: duch@phys.uni.torun.pl\n WWW http://www.phys.uni.torun.pl/kmk/\n \n Date: Mon, 17 Feb 1997 13:47:40 +0100\n From: Wlodzislaw Duch \n Organization: Dept. of Computer Methods, UMK\n \n I have attached a file containing logical rules for mushrooms.\n It should be helpful for other people since only in the last year I\n have seen about 10 papers analyzing this dataset and obtaining quite\n complex rules. We will try to contribute other results later.\n \n With best regards, Wlodek Duch\n ________________________________________________________________\n \n Logical rules for the mushroom data sets.\n \n Logical rules given below seem to be the simplest possible for the\n mushroom dataset and therefore should be treated as benchmark results.\n \n Disjunctive rules for poisonous mushrooms, from most general\n to most specific:\n \n P_1) odor=NOT(almond.OR.anise.OR.none)\n 120 poisonous cases missed, 98.52% accuracy\n \n P_2) spore-print-color=green\n 48 cases missed, 99.41% accuracy\n \n P_3) odor=none.AND.stalk-surface-below-ring=scaly.AND.\n (stalk-color-above-ring=NOT.brown) \n 8 cases missed, 99.90% accuracy\n \n P_4) habitat=leaves.AND.cap-color=white\n 100% accuracy \n \n Rule P_4) may also be\n \n P_4\') population=clustered.AND.cap_color=white\n \n These rule involve 6 attributes (out of 22). Rules for edible\n mushrooms are obtained as negation of the rules given above, for\n example the rule:\n \n odor=(almond.OR.anise.OR.none).AND.spore-print-color=NOT.green\n \n gives 48 errors, or 99.41% accuracy on the whole dataset.\n \n Several slightly more complex variations on these rules exist,\n involving other attributes, such as gill_size, gill_spacing,\n stalk_surface_above_ring, but the rules given above are the simplest\n we have found.\n \n \n 4. Relevant Information:\n This data set includes descriptions of hypothetical samples\n corresponding to 23 species of gilled mushrooms in the Agaricus and\n Lepiota Family (pp. 500-525). Each species is identified as\n definitely edible, definitely poisonous, or of unknown edibility and\n not recommended. This latter class was combined with the poisonous\n one. The Guide clearly states that there is no simple rule for\n determining the edibility of a mushroom; no rule like ``leaflets\n three, let it be\'\' for Poisonous Oak and Ivy.\n \n 5. Number of Instances: 8124\n \n 6. Number of Attributes: 22 (all nominally valued)\n \n 7. Attribute Information: (classes: edible=e, poisonous=p)\n 1. cap-shape: bell=b,conical=c,convex=x,flat=f,\n knobbed=k,sunken=s\n 2. cap-surface: fibrous=f,grooves=g,scaly=y,smooth=s\n 3. cap-color: brown=n,buff=b,cinnamon=c,gray=g,green=r,\n pink=p,purple=u,red=e,white=w,yellow=y\n 4. bruises?: bruises=t,no=f\n 5. odor: almond=a,anise=l,creosote=c,fishy=y,foul=f,\n musty=m,none=n,pungent=p,spicy=s\n 6. gill-attachment: attached=a,descending=d,free=f,notched=n\n 7. gill-spacing: close=c,crowded=w,distant=d\n 8. gill-size: broad=b,narrow=n\n 9. gill-color: black=k,brown=n,buff=b,chocolate=h,gray=g,\n green=r,orange=o,pink=p,purple=u,red=e,\n white=w,yellow=y\n 10. stalk-shape: enlarging=e,tapering=t\n 11. stalk-root: bulbous=b,club=c,cup=u,equal=e,\n rhizomorphs=z,rooted=r,missing=?\n 12. stalk-surface-above-ring: ibrous=f,scaly=y,silky=k,smooth=s\n 13. stalk-surface-below-ring: ibrous=f,scaly=y,silky=k,smooth=s\n 14. stalk-color-above-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,\n pink=p,red=e,white=w,yellow=y\n 15. stalk-color-below-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,\n pink=p,red=e,white=w,yellow=y\n 16. veil-type: partial=p,universal=u\n 17. veil-color: brown=n,orange=o,white=w,yellow=y\n 18. ring-number: none=n,one=o,two=t\n 19. ring-type: cobwebby=c,evanescent=e,flaring=f,large=l,\n none=n,pendant=p,sheathing=s,zone=z\n 20. spore-print-color: black=k,brown=n,buff=b,chocolate=h,green=r,\n orange=o,purple=u,white=w,yellow=y\n 21. population: abundant=a,clustered=c,numerous=n,\n scattered=s,several=v,solitary=y\n 22. habitat: grasses=g,leaves=l,meadows=m,paths=p,\n urban=u,waste=w,woods=d\n \n 8. Missing Attribute Values: 2480 of them (denoted by \"?\"), all for\n attribute #11.\n \n 9. Class Distribution: \n -- edible: 4208 (51.8%)\n -- poisonous: 3916 (48.2%)\n -- total: 8124 instances', 1), +(15, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Optical Recognition of Handwritten Digits\n \n 2. Source:\n E. Alpaydin, C. Kaynak\n Department of Computer Engineering\n Bogazici University, 80815 Istanbul Turkey\n alpaydin@boun.edu.tr\n July 1998\n \n 3. Past Usage:\n C. Kaynak (1995) Methods of Combining Multiple Classifiers and Their\n Applications to Handwritten Digit Recognition, \n MSc Thesis, Institute of Graduate Studies in Science and \n Engineering, Bogazici University.\n \n E. Alpaydin, C. Kaynak (1998) Cascading Classifiers, Kybernetika,\n to appear. ftp://ftp.icsi.berkeley.edu/pub/ai/ethem/kyb.ps.Z\n \n 4. Relevant Information:\n We used preprocessing programs made available by NIST to extract\n normalized bitmaps of handwritten digits from a preprinted form. From\n a total of 43 people, 30 contributed to the training set and different\n 13 to the test set. 32x32 bitmaps are divided into nonoverlapping \n blocks of 4x4 and the number of on pixels are counted in each block.\n This generates an input matrix of 8x8 where each element is an \n integer in the range 0..16. This reduces dimensionality and gives \n invariance to small distortions.\n \n For info on NIST preprocessing routines, see \n M. D. Garris, J. L. Blue, G. T. Candela, D. L. Dimmick, J. Geist, \n P. J. Grother, S. A. Janet, and C. L. Wilson, NIST Form-Based \n Handprint Recognition System, NISTIR 5469, 1994.\n \n 5. Number of Instances\n optdigits.tra Training 3823\n optdigits.tes Testing 1797\n \n The way we used the dataset was to use half of training for \n actual training, one-fourth for validation and one-fourth\n for writer-dependent testing. The test set was used for \n writer-independent testing and is the actual quality measure.\n \n 6. Number of Attributes\n 64 input+1 class attribute\n \n 7. For Each Attribute:\n All input attributes are integers in the range 0..16.\n The last attribute is the class code 0..9\n \n 8. Missing Attribute Values\n None\n \n 9. Class Distribution\n Class: No of examples in training set\n 0: 376\n 1: 389\n 2: 380\n 3: 389\n 4: 387\n 5: 376\n 6: 377\n 7: 387\n 8: 380\n 9: 382\n \n Class: No of examples in testing set\n 0: 178\n 1: 182\n 2: 177\n 3: 183\n 4: 181\n 5: 182\n 6: 181\n 7: 179\n 8: 174\n 9: 180\n \n Accuracy on the testing set with k-nn \n using Euclidean distance as the metric\n \n k = 1 : 98.00\n k = 2 : 97.38\n k = 3 : 97.83\n k = 4 : 97.61\n k = 5 : 97.89\n k = 6 : 97.77\n k = 7 : 97.66\n k = 8 : 97.66\n k = 9 : 97.72\n k = 10 : 97.55\n k = 11 : 97.89', 1), +(16, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Credit Approval\n \n 2. Sources: \n (confidential)\n Submitted by quinlan@cs.su.oz.au\n \n 3. Past Usage:\n \n See Quinlan,\n * \"Simplifying decision trees\", Int J Man-Machine Studies 27,\n Dec 1987, pp. 221-234.\n * \"C4.5: Programs for Machine Learning\", Morgan Kaufmann, Oct 1992\n \n 4. Relevant Information:\n \n This file concerns credit card applications. All attribute names\n and values have been changed to meaningless symbols to protect\n confidentiality of the data.\n \n This dataset is interesting because there is a good mix of\n attributes -- continuous, nominal with small numbers of\n values, and nominal with larger numbers of values. There\n are also a few missing values.\n \n 5. Number of Instances: 690\n \n 6. Number of Attributes: 15 + class attribute\n \n 7. Attribute Information:\n \n A1: b, a.\n A2: continuous.\n A3: continuous.\n A4: u, y, l, t.\n A5: g, p, gg.\n A6: c, d, cc, i, j, k, m, r, q, w, x, e, aa, ff.\n A7: v, h, bb, j, n, z, dd, ff, o.\n A8: continuous.\n A9: t, f.\n A10: t, f.\n A11: continuous.\n A12: t, f.\n A13: g, p, s.\n A14: continuous.\n A15: continuous.\n A16: +,- (class attribute)\n \n 8. Missing Attribute Values:\n 37 cases (5%) have one or more missing values. The missing\n values from particular attributes are:\n \n A1: 12\n A2: 12\n A4: 6\n A5: 6\n A6: 9\n A7: 9\n A14: 13\n \n 9. Class Distribution\n \n +: 307 (44.5%)\n -: 383 (55.5%)', 1), +(17, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDescription of the German credit dataset.\n \n 1. Title: German Credit data\n \n 2. Source Information\n \n Professor Dr. Hans Hofmann \n Institut f\"ur Statistik und \"Okonometrie \n Universit\"at Hamburg \n FB Wirtschaftswissenschaften \n Von-Melle-Park 5 \n 2000 Hamburg 13 \n \n 3. Number of Instances: 1000\n \n Two datasets are provided. the original dataset, in the form provided\n by Prof. Hofmann, contains categorical/symbolic attributes and\n is in the file \"german.data\". \n \n For algorithms that need numerical attributes, Strathclyde University \n produced the file \"german.data-numeric\". This file has been edited \n and several indicator variables added to make it suitable for \n algorithms which cannot cope with categorical variables. Several\n attributes that are ordered categorical (such as attribute 17) have\n been coded as integer. This was the form used by StatLog.\n \n \n 6. Number of Attributes german: 20 (7 numerical, 13 categorical)\n Number of Attributes german.numer: 24 (24 numerical)\n \n \n 7. Attribute description for german\n \n Attribute 1: (qualitative)\n Status of existing checking account\n A11 : ... < 0 DM\n A12 : 0 <= ... < 200 DM\n A13 : ... >= 200 DM /\n salary assignments for at least 1 year\n A14 : no checking account\n \n Attribute 2: (numerical)\n Duration in month\n \n Attribute 3: (qualitative)\n Credit history\n A30 : no credits taken/\n all credits paid back duly\n A31 : all credits at this bank paid back duly\n A32 : existing credits paid back duly till now\n A33 : delay in paying off in the past\n A34 : critical account/\n other credits existing (not at this bank)\n \n Attribute 4: (qualitative)\n Purpose\n A40 : car (new)\n A41 : car (used)\n A42 : furniture/equipment\n A43 : radio/television\n A44 : domestic appliances\n A45 : repairs\n A46 : education\n A47 : (vacation - does not exist?)\n A48 : retraining\n A49 : business\n A410 : others\n \n Attribute 5: (numerical)\n Credit amount\n \n Attibute 6: (qualitative)\n Savings account/bonds\n A61 : ... < 100 DM\n A62 : 100 <= ... < 500 DM\n A63 : 500 <= ... < 1000 DM\n A64 : .. >= 1000 DM\n A65 : unknown/ no savings account\n \n Attribute 7: (qualitative)\n Present employment since\n A71 : unemployed\n A72 : ... < 1 year\n A73 : 1 <= ... < 4 years \n A74 : 4 <= ... < 7 years\n A75 : .. >= 7 years\n \n Attribute 8: (numerical)\n Installment rate in percentage of disposable income\n \n Attribute 9: (qualitative)\n Personal status and sex\n A91 : male : divorced/separated\n A92 : female : divorced/separated/married\n A93 : male : single\n A94 : male : married/widowed\n A95 : female : single\n \n Attribute 10: (qualitative)\n Other debtors / guarantors\n A101 : none\n A102 : co-applicant\n A103 : guarantor\n \n Attribute 11: (numerical)\n Present residence since\n \n Attribute 12: (qualitative)\n Property\n A121 : real estate\n A122 : if not A121 : building society savings agreement/\n life insurance\n A123 : if not A121/A122 : car or other, not in attribute 6\n A124 : unknown / no property\n \n Attribute 13: (numerical)\n Age in years\n \n Attribute 14: (qualitative)\n Other installment plans \n A141 : bank\n A142 : stores\n A143 : none\n \n Attribute 15: (qualitative)\n Housing\n A151 : rent\n A152 : own\n A153 : for free\n \n Attribute 16: (numerical)\n Number of existing credits at this bank\n \n Attribute 17: (qualitative)\n Job\n A171 : unemployed/ unskilled - non-resident\n A172 : unskilled - resident\n A173 : skilled employee / official\n A174 : management/ self-employed/\n highly qualified employee/ officer\n \n Attribute 18: (numerical)\n Number of people being liable to provide maintenance for\n \n Attribute 19: (qualitative)\n Telephone\n A191 : none\n A192 : yes, registered under the customers name\n \n Attribute 20: (qualitative)\n foreign worker\n A201 : yes\n A202 : no\n \n \n \n 8. Cost Matrix\n \n This dataset requires use of a cost matrix (see below)\n \n \n 1 2\n ----------------------------\n 1 0 1\n -----------------------\n 2 5 0\n \n (1 = Good, 2 = Bad)\n \n the rows represent the actual classification and the columns\n the predicted classification.\n \n It is worse to class a customer as good when they are bad (5), \n than it is to class a customer as bad when they are good (1).\n \n\n\n\n\n Relabeled values in attribute checking_status\n From: A11 To: \'<0\' \n From: A12 To: \'0<=X<200\' \n From: A13 To: \'>=200\' \n From: A14 To: \'no checking\' \n\n\n Relabeled values in attribute credit_history\n From: A30 To: \'no credits/all paid\'\n From: A31 To: \'all paid\' \n From: A32 To: \'existing paid\' \n From: A33 To: \'delayed previously\'\n From: A34 To: \'critical/other existing credit\'\n\n\n Relabeled values in attribute purpose\n From: A40 To: \'new car\' \n From: A41 To: \'used car\' \n From: A42 To: furniture/equipment \n From: A43 To: radio/tv \n From: A44 To: \'domestic appliance\'\n From: A45 To: repairs \n From: A46 To: education \n From: A47 To: vacation \n From: A48 To: retraining \n From: A49 To: business \n From: A410 To: other \n\n\n Relabeled values in attribute savings_status\n From: A61 To: \'<100\' \n From: A62 To: \'100<=X<500\' \n From: A63 To: \'500<=X<1000\' \n From: A64 To: \'>=1000\' \n From: A65 To: \'no known savings\' \n\n\n Relabeled values in attribute employment\n From: A71 To: unemployed \n From: A72 To: \'<1\' \n From: A73 To: \'1<=X<4\' \n From: A74 To: \'4<=X<7\' \n From: A75 To: \'>=7\' \n\n\n Relabeled values in attribute personal_status\n From: A91 To: \'male div/sep\' \n From: A92 To: \'female div/dep/mar\'\n From: A93 To: \'male single\' \n From: A94 To: \'male mar/wid\' \n From: A95 To: \'female single\' \n\n\n Relabeled values in attribute other_parties\n From: A101 To: none \n From: A102 To: \'co applicant\' \n From: A103 To: guarantor \n\n\n Relabeled values in attribute property_magnitude\n From: A121 To: \'real estate\' \n From: A122 To: \'life insurance\' \n From: A123 To: car \n From: A124 To: \'no known property\' \n\n\n Relabeled values in attribute other_payment_plans\n From: A141 To: bank \n From: A142 To: stores \n From: A143 To: none \n\n\n Relabeled values in attribute housing\n From: A151 To: rent \n From: A152 To: own \n From: A153 To: \'for free\' \n\n\n Relabeled values in attribute job\n From: A171 To: \'unemp/unskilled non res\'\n From: A172 To: \'unskilled resident\'\n From: A173 To: skilled \n From: A174 To: \'high qualif/self emp/mgmt\'\n\n\n Relabeled values in attribute own_telephone\n From: A191 To: none \n From: A192 To: yes \n\n\n Relabeled values in attribute foreign_worker\n From: A201 To: yes \n From: A202 To: no \n\n\n Relabeled values in attribute class\n From: 1 To: good \n From: 2 To: bad', 1), +(18, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Pen-Based Recognition of Handwritten Digits\n \n 2. Source:\n E. Alpaydin, F. Alimoglu\n Department of Computer Engineering\n Bogazici University, 80815 Istanbul Turkey\n alpaydin@boun.edu.tr\n July 1998\n \n 3. Past Usage:\n F. Alimoglu (1996) Combining Multiple Classifiers for Pen-Based\n Handwritten Digit Recognition, \n MSc Thesis, Institute of Graduate Studies in Science and \n Engineering, Bogazici University.\n http://www.cmpe.boun.edu.tr/~alimoglu/alimoglu.ps.gz\n \n F. Alimoglu, E. Alpaydin, \"Methods of Combining Multiple Classifiers \n Based on Different Representations for Pen-based Handwriting\n Recognition,\" Proceedings of the Fifth Turkish Artificial \n Intelligence and Artificial Neural Networks Symposium (TAINN 96), \n June 1996, Istanbul, Turkey.\n http://www.cmpe.boun.edu.tr/~alimoglu/tainn96.ps.gz\n \n \n 4. Relevant Information:\n \n We create a digit database by collecting 250 samples from 44 writers.\n The samples written by 30 writers are used for training,\n cross-validation and writer dependent testing, and the digits \n written by the other 14 are used for writer independent testing. This\n database is also available in the UNIPEN format.\n \n We use a WACOM PL-100V pressure sensitive tablet with an integrated \n LCD display and a cordless stylus. The input and display areas are\n located in the same place. Attached to the serial port of an Intel \n 486 based PC, it allows us to collect handwriting samples. The tablet\n sends $x$ and $y$ tablet coordinates and pressure level values of the\n pen at fixed time intervals (sampling rate) of 100 miliseconds. \n \n These writers are asked to write 250 digits in random order inside \n boxes of 500 by 500 tablet pixel resolution. Subject are monitored \n only during the first entry screens. Each screen contains five boxes\n with the digits to be written displayed above. Subjects are told to\n write only inside these boxes. If they make a mistake or are unhappy\n with their writing, they are instructed to clear the content of a box \n by using an on-screen button. The first ten digits are ignored \n because most writers are not familiar with this type of input devices,\n but subjects are not aware of this. \n \n In our study, we use only ($x, y$) coordinate information. The stylus\n pressure level values are ignored. First we apply normalization to \n make our representation invariant to translations and scale \n distortions. The raw data that we capture from the tablet consist of\n integer values between 0 and 500 (tablet input box resolution). The \n new coordinates are such that the coordinate which has the maximum \n range varies between 0 and 100. Usually $x$ stays in this range, since\n most characters are taller than they are wide. \n \n In order to train and test our classifiers, we need to represent \n digits as constant length feature vectors. A commonly used technique\n leading to good results is resampling the ( x_t, y_t) points. \n Temporal resampling (points regularly spaced in time) or spatial\n resampling (points regularly spaced in arc length) can be used here. \n Raw point data are already regularly spaced in time but the distance\n between them is variable. Previous research showed that spatial\n resampling to obtain a constant number of regularly spaced points \n on the trajectory yields much better performance, because it provides \n a better alignment between points. Our resampling algorithm uses \n simple linear interpolation between pairs of points. The resampled\n digits are represented as a sequence of T points ( x_t, y_t )_{t=1}^T,\n regularly spaced in arc length, as opposed to the input sequence, \n which is regularly spaced in time.\n \n So, the input vector size is 2*T, two times the number of points\n resampled. We considered spatial resampling to T=8,12,16 points in our\n experiments and found that T=8 gave the best trade-off between \n accuracy and complexity.\n \n \n 5. Number of Instances\n pendigits.tra Training 7494\n pendigits.tes Testing 3498\n \n The way we used the dataset was to use first half of training for \n actual training, one-fourth for validation and one-fourth\n for writer-dependent testing. The test set was used for \n writer-independent testing and is the actual quality measure.\n \n 6. Number of Attributes\n 16 input+1 class attribute\n \n 7. For Each Attribute:\n All input attributes are integers in the range 0..100.\n The last attribute is the class code 0..9\n \n 8. Missing Attribute Values\n None\n \n 9. Class Distribution\n Class: No of examples in training set\n 0: 780\n 1: 779\n 2: 780\n 3: 719\n 4: 780\n 5: 720\n 6: 720\n 7: 778\n 8: 719\n 9: 719\n Class: No of examples in testing set\n 0: 363\n 1: 364\n 2: 364\n 3: 336\n 4: 364\n 5: 335\n 6: 336\n 7: 364\n 8: 336\n 9: 336\n \n Accuracy on the testing set with k-nn \n using Euclidean distance as the metric\n \n k = 1 : 97.74\n k = 2 : 97.37\n k = 3 : 97.80\n k = 4 : 97.66\n k = 5 : 97.60\n k = 6 : 97.57\n k = 7 : 97.54\n k = 8 : 97.54\n k = 9 : 97.46\n k = 10 : 97.48\n k = 11 : 97.34', 1), +(19, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Image Segmentation data\n \n 2. Source Information\n -- Creators: Vision Group, University of Massachusetts\n -- Donor: Vision Group (Carla Brodley, brodley@cs.umass.edu)\n -- Date: November, 1990\n \n 3. Past Usage: None yet published\n \n 4. Relevant Information:\n \n The instances were drawn randomly from a database of 7 outdoor \n images. The images were handsegmented to create a classification\n for every pixel. \n \n Each instance is a 3x3 region.\n \n 5. Number of Instances: Training data: 210 Test data: 2100\n \n 6. Number of Attributes: 19 continuous attributes\n \n 7. Attribute Information:\n \n 1. region-centroid-col: the column of the center pixel of the region.\n 2. region-centroid-row: the row of the center pixel of the region.\n 3. region-pixel-count: the number of pixels in a region = 9.\n 4. short-line-density-5: the results of a line extractoin algorithm that \n counts how many lines of length 5 (any orientation) with\n low contrast, less than or equal to 5, go through the region.\n 5. short-line-density-2: same as short-line-density-5 but counts lines\n of high contrast, greater than 5.\n 6. vedge-mean: measure the contrast of horizontally\n adjacent pixels in the region. There are 6, the mean and \n standard deviation are given. This attribute is used as\n a vertical edge detector.\n 7. vegde-sd: (see 6)\n 8. hedge-mean: measures the contrast of vertically adjacent\n pixels. Used for horizontal line detection. \n 9. hedge-sd: (see 8).\n 10. intensity-mean: the average over the region of (R + G + B)/3\n 11. rawred-mean: the average over the region of the R value.\n 12. rawblue-mean: the average over the region of the B value.\n 13. rawgreen-mean: the average over the region of the G value.\n 14. exred-mean: measure the excess red: (2R - (G + B))\n 15. exblue-mean: measure the excess blue: (2B - (G + R))\n 16. exgreen-mean: measure the excess green: (2G - (R + B))\n 17. value-mean: 3-d nonlinear transformation\n of RGB. (Algorithm can be found in Foley and VanDam, Fundamentals\n of Interactive Computer Graphics)\n 18. saturatoin-mean: (see 17)\n 19. hue-mean: (see 17)\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: \n \n Classes: brickface, sky, foliage, cement, window, path, grass.\n \n 30 instances per class for training data.\n 300 instances per class for test data.\n \n\n\n\n\n Relabeled values in attribute class\n From: 1 To: brickface \n From: 2 To: sky \n From: 3 To: foliage \n From: 4 To: cement \n From: 5 To: window \n From: 6 To: path \n From: 7 To: grass', 1), +(20, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Pima Indians Diabetes Database\n \n 2. Sources:\n (a) Original owners: National Institute of Diabetes and Digestive and\n Kidney Diseases\n (b) Donor of database: Vincent Sigillito (vgs@aplcen.apl.jhu.edu)\n Research Center, RMI Group Leader\n Applied Physics Laboratory\n The Johns Hopkins University\n Johns Hopkins Road\n Laurel, MD 20707\n (301) 953-6231\n (c) Date received: 9 May 1990\n \n 3. Past Usage:\n 1. Smith,~J.~W., Everhart,~J.~E., Dickson,~W.~C., Knowler,~W.~C., &\n Johannes,~R.~S. (1988). Using the ADAP learning algorithm to forecast\n the onset of diabetes mellitus. In {it Proceedings of the Symposium\n on Computer Applications and Medical Care} (pp. 261--265). IEEE\n Computer Society Press.\n \n The diagnostic, binary-valued variable investigated is whether the\n patient shows signs of diabetes according to World Health Organization\n criteria (i.e., if the 2 hour post-load plasma glucose was at least \n 200 mg/dl at any survey examination or if found during routine medical\n care). The population lives near Phoenix, Arizona, USA.\n \n Results: Their ADAP algorithm makes a real-valued prediction between\n 0 and 1. This was transformed into a binary decision using a cutoff of \n 0.448. Using 576 training instances, the sensitivity and specificity\n of their algorithm was 76% on the remaining 192 instances.\n \n 4. Relevant Information:\n Several constraints were placed on the selection of these instances from\n a larger database. In particular, all patients here are females at\n least 21 years old of Pima Indian heritage. ADAP is an adaptive learning\n routine that generates and executes digital analogs of perceptron-like\n devices. It is a unique algorithm; see the paper for details.\n \n 5. Number of Instances: 768\n \n 6. Number of Attributes: 8 plus class \n \n 7. For Each Attribute: (all numeric-valued)\n 1. Number of times pregnant\n 2. Plasma glucose concentration a 2 hours in an oral glucose tolerance test\n 3. Diastolic blood pressure (mm Hg)\n 4. Triceps skin fold thickness (mm)\n 5. 2-Hour serum insulin (mu U/ml)\n 6. Body mass index (weight in kg/(height in m)^2)\n 7. Diabetes pedigree function\n 8. Age (years)\n 9. Class variable (0 or 1)\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: (class value 1 is interpreted as \"tested positive for\n diabetes\")\n \n Class Value Number of instances\n 0 500\n 1 268\n \n 10. Brief statistical analysis:\n \n Attribute number: Mean: Standard Deviation:\n 1. 3.8 3.4\n 2. 120.9 32.0\n 3. 69.1 19.4\n 4. 20.5 16.0\n 5. 79.8 115.2\n 6. 32.0 7.9\n 7. 0.5 0.3\n 8. 33.2 11.8\n \n \n\n\n\n\n Relabeled values in attribute \'class\'\n From: 0 To: tested_negative \n From: 1 To: tested_positive', 1), +(21, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n;\n ; Thyroid disease records supplied by the Garavan Institute and J. Ross\n ; Quinlan, New South Wales Institute, Syndney, Australia.\n ;\n ; 1987.\n ;\n \n sick, negative. | classes\n \n age: continuous.\n sex: M, F.\n on thyroxine: f, t.\n query on thyroxine: f, t.\n on antithyroid medication: f, t.\n sick: f, t.\n pregnant: f, t.\n thyroid surgery: f, t.\n I131 treatment: f, t.\n query hypothyroid: f, t.\n query hyperthyroid: f, t.\n lithium: f, t.\n goitre: f, t.\n tumor: f, t.\n hypopituitary: f, t.\n psych: f, t.\n TSH measured: f, t.\n TSH: continuous.\n T3 measured: f, t.\n T3: continuous.\n TT4 measured: f, t.\n TT4: continuous.\n T4U measured: f, t.\n T4U: continuous.\n FTI measured: f, t.\n FTI: continuous.\n TBG measured: f, t.\n TBG: continuous.\n referral source: WEST, STMW, SVHC, SVI, SVHD, other.\n \n\n Num Instances: 3772\n Num Attributes: 30\n Num Continuous: 7 (Int 1 / Real 6)\n Num Discrete: 23\n Missing values: 6064 / 5.4%\n\n name type enum ints real missing distinct (1)\n 1 \'age\' Int 0% 100% 0% 1 / 0% 93 / 2% 0% \n 2 \'sex\' Enum 96% 0% 0% 150 / 4% 2 / 0% 0% \n 3 \'on thyroxine\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 4 \'query on thyroxine\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 5 \'on antithyroid medicati Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 6 \'sick\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 7 \'pregnant\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 8 \'thyroid surgery\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 9 \'I131 treatment\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 10 \'query hypothyroid\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 11 \'query hyperthyroid\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 12 \'lithium\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 13 \'goitre\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 14 \'tumor\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 15 \'hypopituitary\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 16 \'psych\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 17 \'TSH measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 18 \'TSH\' Real 0% 11% 79% 369 / 10% 287 / 8% 2% \n 19 \'T3 measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 20 \'T3\' Real 0% 9% 71% 769 / 20% 69 / 2% 0% \n 21 \'TT4 measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 22 \'TT4\' Real 0% 94% 0% 231 / 6% 241 / 6% 1% \n 23 \'T4U measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 24 \'T4U\' Real 0% 2% 87% 387 / 10% 146 / 4% 1% \n 25 \'FTI measured\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0% \n 26 \'FTI\' Real 0% 90% 0% 385 / 10% 234 / 6% 2% \n 27 \'TBG measured\' Enum 100% 0% 0% 0 / 0% 1 / 0% 0% \n 28 \'TBG\' Real 0% 0% 0% 3772 /100% 0 / 0% 0% \n 29 \'referral source\' Enum 100% 0% 0% 0 / 0% 5 / 0% 0% \n 30 \'Class\' Enum 100% 0% 0% 0 / 0% 2 / 0% 0%', 1), +(22, '1', '**Author**: R.S. Michalski and R.L. Chilausky (Donors: Ming Tan & Jeff Schlimmer) \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Soybean+(Large)) - 1988 \r\n**Please cite**: R.S. Michalski and R.L. Chilausky \"Learning by Being Told and Learning from Examples: An Experimental Comparison of the Two Methods of Knowledge Acquisition in the Context of Developing an Expert System for Soybean Disease Diagnosis\", International Journal of Policy Analysis and Information Systems, Vol. 4, No. 2, 1980. \r\n\r\n**Large Soybean Database** \r\nThis is the large soybean database from the UCI repository, with its training and test database combined into a single file. There are 19 classes, only the first 15 of which have been used in prior work. The folklore seems to be that the last four classes are unjustified by the data since they have so few examples. There are 35 categorical attributes, some nominal and some ordered. The value \'dna\' means does not apply. The values for attributes are encoded numerically, with the first value encoded as \'0\', the second as \'1\', and so forth. An unknown values is encoded as \'?\'.', 1), +(23, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: SPAM E-mail Database\n \n 2. Sources:\n (a) Creators: Mark Hopkins, Erik Reeber, George Forman, Jaap Suermondt\n Hewlett-Packard Labs, 1501 Page Mill Rd., Palo Alto, CA 94304\n (b) Donor: George Forman (gforman at nospam hpl.hp.com) 650-857-7835\n (c) Generated: June-July 1999\n \n 3. Past Usage:\n (a) Hewlett-Packard Internal-only Technical Report. External forthcoming.\n (b) Determine whether a given email is spam or not.\n (c) ~7% misclassification error.\n False positives (marking good mail as spam) are very undesirable.\n If we insist on zero false positives in the training/testing set,\n 20-25% of the spam passed through the filter.\n \n 4. Relevant Information:\n The \"spam\" concept is diverse: advertisements for products/web\n sites, make money fast schemes, chain letters, pornography...\n Our collection of spam e-mails came from our postmaster and \n individuals who had filed spam. Our collection of non-spam \n e-mails came from filed work and personal e-mails, and hence\n the word \'george\' and the area code \'650\' are indicators of \n non-spam. These are useful when constructing a personalized \n spam filter. One would either have to blind such non-spam \n indicators or get a very wide collection of non-spam to \n generate a general purpose spam filter.\n \n For background on spam:\n Cranor, Lorrie F., LaMacchia, Brian A. Spam! \n Communications of the ACM, 41(8):74-83, 1998.\n \n 5. Number of Instances: 4601 (1813 Spam = 39.4%)\n \n 6. Number of Attributes: 58 (57 continuous, 1 nominal class label)\n \n 7. Attribute Information:\n The last column of \'spambase.data\' denotes whether the e-mail was \n considered spam (1) or not (0), i.e. unsolicited commercial e-mail. \n Most of the attributes indicate whether a particular word or\n character was frequently occuring in the e-mail. The run-length\n attributes (55-57) measure the length of sequences of consecutive \n capital letters. For the statistical measures of each attribute, \n see the end of this file. Here are the definitions of the attributes:\n \n 48 continuous real [0,100] attributes of type word_freq_WORD \n = percentage of words in the e-mail that match WORD,\n i.e. 100 * (number of times the WORD appears in the e-mail) / \n total number of words in e-mail. A \"word\" in this case is any \n string of alphanumeric characters bounded by non-alphanumeric \n characters or end-of-string.\n \n 6 continuous real [0,100] attributes of type char_freq_CHAR\n = percentage of characters in the e-mail that match CHAR,\n i.e. 100 * (number of CHAR occurences) / total characters in e-mail\n \n 1 continuous real [1,...] attribute of type capital_run_length_average\n = average length of uninterrupted sequences of capital letters\n \n 1 continuous integer [1,...] attribute of type capital_run_length_longest\n = length of longest uninterrupted sequence of capital letters\n \n 1 continuous integer [1,...] attribute of type capital_run_length_total\n = sum of length of uninterrupted sequences of capital letters\n = total number of capital letters in the e-mail\n \n 1 nominal {0,1} class attribute of type spam\n = denotes whether the e-mail was considered spam (1) or not (0), \n i.e. unsolicited commercial e-mail. \n \n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution:\n Spam 1813 (39.4%)\n Non-Spam 2788 (60.6%)\n \n \n Attribute Statistics:\n Min: Max: Average: Std.Dev: Coeff.Var_%: \n 1 0 4.54 0.10455 0.30536 292 \n 2 0 14.28 0.21301 1.2906 606 \n 3 0 5.1 0.28066 0.50414 180 \n 4 0 42.81 0.065425 1.3952 2130 \n 5 0 10 0.31222 0.67251 215 \n 6 0 5.88 0.095901 0.27382 286 \n 7 0 7.27 0.11421 0.39144 343 \n 8 0 11.11 0.10529 0.40107 381 \n 9 0 5.26 0.090067 0.27862 309 \n 10 0 18.18 0.23941 0.64476 269 \n 11 0 2.61 0.059824 0.20154 337 \n 12 0 9.67 0.5417 0.8617 159 \n 13 0 5.55 0.09393 0.30104 320 \n 14 0 10 0.058626 0.33518 572 \n 15 0 4.41 0.049205 0.25884 526 \n 16 0 20 0.24885 0.82579 332 \n 17 0 7.14 0.14259 0.44406 311 \n 18 0 9.09 0.18474 0.53112 287 \n 19 0 18.75 1.6621 1.7755 107 \n 20 0 18.18 0.085577 0.50977 596 \n 21 0 11.11 0.80976 1.2008 148 \n 22 0 17.1 0.1212 1.0258 846 \n 23 0 5.45 0.10165 0.35029 345 \n 24 0 12.5 0.094269 0.44264 470 \n 25 0 20.83 0.5495 1.6713 304 \n 26 0 16.66 0.26538 0.88696 334 \n 27 0 33.33 0.7673 3.3673 439 \n 28 0 9.09 0.12484 0.53858 431 \n 29 0 14.28 0.098915 0.59333 600 \n 30 0 5.88 0.10285 0.45668 444 \n 31 0 12.5 0.064753 0.40339 623 \n 32 0 4.76 0.047048 0.32856 698 \n 33 0 18.18 0.097229 0.55591 572 \n 34 0 4.76 0.047835 0.32945 689 \n 35 0 20 0.10541 0.53226 505 \n 36 0 7.69 0.097477 0.40262 413 \n 37 0 6.89 0.13695 0.42345 309 \n 38 0 8.33 0.013201 0.22065 1670 \n 39 0 11.11 0.078629 0.43467 553 \n 40 0 4.76 0.064834 0.34992 540 \n 41 0 7.14 0.043667 0.3612 827 \n 42 0 14.28 0.13234 0.76682 579 \n 43 0 3.57 0.046099 0.22381 486 \n 44 0 20 0.079196 0.62198 785 \n 45 0 21.42 0.30122 1.0117 336 \n 46 0 22.05 0.17982 0.91112 507 \n 47 0 2.17 0.0054445 0.076274 1400 \n 48 0 10 0.031869 0.28573 897 \n 49 0 4.385 0.038575 0.24347 631 \n 50 0 9.752 0.13903 0.27036 194 \n 51 0 4.081 0.016976 0.10939 644 \n 52 0 32.478 0.26907 0.81567 303 \n 53 0 6.003 0.075811 0.24588 324 \n 54 0 19.829 0.044238 0.42934 971 \n 55 1 1102.5 5.1915 31.729 611 \n 56 1 9989 52.173 194.89 374 \n 57 1 15841 283.29 606.35 214 \n 58 0 1 0.39404 0.4887 124 \n \n \n This file: \'spambase.DOCUMENTATION\' at the UCI Machine Learning Repository\n http://www.ics.uci.edu/~mlearn/MLRepository.html\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(24, '1', '**Author**: Genbank \nDonor: G. Towell, M. Noordewier, and J. Shavlik \n**Source**: [Genbank 64.1](genbank.bio.net) - 1/1/92 \n**Please cite**: \n\nPrimate splice-junction gene sequences (DNA) with associated imperfect domain theory. All examples taken from Genbank 64.1. Categories \"ei\" and \"ie\" include every \"split-gene\" for primates in Genbank 64.1. Non-splice examples taken from sequences known not to include a splicing site.\n \nProblem Description: \nSplice junctions are points on a DNA sequence at which \'superfluous\' DNA is removed during the process of protein creation in higher organisms. The problem posed in this dataset is to recognize, given a sequence of DNA, the boundaries between exons (the parts of the DNA sequence retained after splicing) and introns (the parts of the DNA sequence that are spliced out). This problem consists of two subtasks: recognizing exon/intron boundaries (referred to as EI sites), and recognizing intron/exon boundaries (IE sites). (In the biological community, IE borders are referred to a \'\'acceptors\'\' while EI borders are referred to as \'\'donors\'\'.)\n \nThis dataset has been developed to help evaluate a \"hybrid\" learning algorithm (KBANN) that uses examples to inductively refine preexisting knowledge.\n \nAttributes: \n>\n 1 One of {n ei ie}, indicating the class.\n 2 The instance name.\n 3-62 The remaining 60 fields are the sequence, starting at \n position -30 and ending at position +30. Each of\n these fields is almost always filled by one of \n {a, g, t, c}. Other characters indicate ambiguity among\n the standard characters according to the following table:\n character: meaning\n D: A or G or T\n N: A or G or C or T\n S: C or G\n R: A or G\n\nNotes: \n* Instance_name is an identifier and should be ignored for modelling', 1), +(25, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Tic-Tac-Toe Endgame database\n \n 2. Source Information\n -- Creator: David W. Aha (aha@cs.jhu.edu)\n -- Donor: David W. Aha (aha@cs.jhu.edu)\n -- Date: 19 August 1991\n \n 3. Known Past Usage: \n 1. Matheus,~C.~J., & Rendell,~L.~A. (1989). Constructive\n induction on decision trees. In {it Proceedings of the\n Eleventh International Joint Conference on Artificial Intelligence} \n (pp. 645--650). Detroit, MI: Morgan Kaufmann.\n -- CITRE was applied to 100-instance training and 200-instance test\n sets. In a study using various amounts of domain-specific\n knowledge, its highest average accuracy was 76.7% (using the\n final decision tree created for testing).\n \n 2. Matheus,~C.~J. (1990). Adding domain knowledge to SBL through\n feature construction. In {it Proceedings of the Eighth National\n Conference on Artificial Intelligence} (pp. 803--808). \n Boston, MA: AAAI Press.\n -- Similar experiments with CITRE, includes learning curves up\n to 500-instance training sets but used _all_ instances in the\n database for testing. Accuracies reached above 90%, but specific\n values are not given (see Chris\'s dissertation for more details).\n \n 3. Aha,~D.~W. (1991). Incremental constructive induction: An instance-based\n approach. In {it Proceedings of the Eighth International Workshop\n on Machine Learning} (pp. 117--121). Evanston, ILL: Morgan Kaufmann.\n -- Used 70% for training, 30% of the instances for testing, evaluated\n over 10 trials. Results reported for six algorithms:\n -- NewID: 84.0%\n -- CN2: 98.1% \n -- MBRtalk: 88.4%\n -- IB1: 98.1% \n -- IB3: 82.0%\n -- IB3-CI: 99.1%\n -- Results also reported when adding an additional 10 irrelevant \n ternary-valued attributes; similar _relative_ results except that\n IB1\'s performance degraded more quickly than the others.\n \n 4. Relevant Information:\n \n This database encodes the complete set of possible board configurations\n at the end of tic-tac-toe games, where \"x\" is assumed to have played\n first. The target concept is \"win for x\" (i.e., true when \"x\" has one\n of 8 possible ways to create a \"three-in-a-row\"). \n \n Interestingly, this raw database gives a stripped-down decision tree\n algorithm (e.g., ID3) fits. However, the rule-based CN2 algorithm, the\n simple IB1 instance-based learning algorithm, and the CITRE \n feature-constructing decision tree algorithm perform well on it.\n \n 5. Number of Instances: 958 (legal tic-tac-toe endgame boards)\n \n 6. Number of Attributes: 9, each corresponding to one tic-tac-toe square\n \n 7. Attribute Information: (x=player x has taken, o=player o has taken, b=blank)\n \n 1. top-left-square: {x,o,b}\n 2. top-middle-square: {x,o,b}\n 3. top-right-square: {x,o,b}\n 4. middle-left-square: {x,o,b}\n 5. middle-middle-square: {x,o,b}\n 6. middle-right-square: {x,o,b}\n 7. bottom-left-square: {x,o,b}\n 8. bottom-middle-square: {x,o,b}\n 9. bottom-right-square: {x,o,b}\n 10. Class: {positive,negative}\n \n 8. Missing Attribute Values: None\n \n 9. Class Distribution: About 65.3% are positive (i.e., wins for \"x\")\n\n Information about the dataset\n CLASSTYPE: nominal\n CLASSINDEX: last', 1), +(26, '1', '**Author**: Peter Mowforth \n**Source**: UCI - \n**Please cite**: Siebert,JP. Turing Institute Research Memorandum TIRM-87-018 \"Vehicle Recognition Using Rule Based Methods\" (March 1987) \n\n NAME\n vehicle silhouettes\n \n PURPOSE\n to classify a given silhouette as one of four types of vehicle,\n using a set of features extracted from the silhouette. The\n vehicle may be viewed from one of many different angles. \n \n PROBLEM TYPE\n classification\n \n SOURCE\n Drs.Pete Mowforth and Barry Shepherd\n Turing Institute\n George House\n 36 North Hanover St.\n Glasgow\n G1 2AD\n \n CONTACT\n Alistair Sutherland\n Statistics Dept.\n Strathclyde University\n Livingstone Tower\n 26 Richmond St.\n GLASGOW G1 1XH\n Great Britain\n \n Tel: 041 552 4400 x3033\n \n Fax: 041 552 4711 \n \n e-mail: alistair@uk.ac.strathclyde.stams\n \n HISTORY\n This data was originally gathered at the TI in 1986-87 by\n JP Siebert. It was partially financed by Barr and Stroud Ltd.\n The original purpose was to find a method of distinguishing\n 3D objects within a 2D image by application of an ensemble of\n shape feature extractors to the 2D silhouettes of the objects.\n Measures of shape features extracted from example silhouettes\n of objects to be discriminated were used to generate a class-\n ification rule tree by means of computer induction.\n This object recognition strategy was successfully used to \n discriminate between silhouettes of model cars, vans and buses\n viewed from constrained elevation but all angles of rotation.\n The rule tree classification performance compared favourably\n to MDC (Minimum Distance Classifier) and k-NN (k-Nearest Neigh-\n bour) statistical classifiers in terms of both error rate and\n computational efficiency. An investigation of these rule trees\n generated by example indicated that the tree structure was \n heavily influenced by the orientation of the objects, and grouped\n similar object views into single decisions.\n \n DESCRIPTION\n The features were extracted from the silhouettes by the HIPS\n (Hierarchical Image Processing System) extension BINATTS, which \n extracts a combination of scale independent features utilising\n both classical moments based measures such as scaled variance,\n skewness and kurtosis about the major/minor axes and heuristic\n measures such as hollows, circularity, rectangularity and\n compactness.\n Four \"Corgie\" model vehicles were used for the experiment:\n a double decker bus, Cheverolet van, Saab 9000 and an Opel Manta 400.\n This particular combination of vehicles was chosen with the \n expectation that the bus, van and either one of the cars would\n be readily distinguishable, but it would be more difficult to\n distinguish between the cars.\n The images were acquired by a camera looking downwards at the\n model vehicle from a fixed angle of elevation (34.2 degrees\n to the horizontal). The vehicles were placed on a diffuse\n backlit surface (lightbox). The vehicles were painted matte black\n to minimise highlights. The images were captured using a CRS4000\n framestore connected to a vax 750. All images were captured with\n a spatial resolution of 128x128 pixels quantised to 64 greylevels.\n These images were thresholded to produce binary vehicle silhouettes,\n negated (to comply with the processing requirements of BINATTS) and\n thereafter subjected to shrink-expand-expand-shrink HIPS modules to\n remove \"salt and pepper\" image noise.\n The vehicles were rotated and their angle of orientation was measured\n using a radial graticule beneath the vehicle. 0 and 180 degrees\n corresponded to \"head on\" and \"rear\" views respectively while 90 and\n 270 corresponded to profiles in opposite directions. Two sets of\n 60 images, each set covering a full 360 degree rotation, were captured\n for each vehicle. The vehicle was rotated by a fixed angle between \n images. These datasets are known as e2 and e3 respectively.\n A further two sets of images, e4 and e5, were captured with the camera \n at elevations of 37.5 degs and 30.8 degs respectively. These sets\n also contain 60 images per vehicle apart from e4.van which contains\n only 46 owing to the difficulty of containing the van in the image\n at some orientations.\n \n ATTRIBUTES\n \n COMPACTNESS (average perim)**2/area\n \n CIRCULARITY (average radius)**2/area\n \n DISTANCE CIRCULARITY area/(av.distance from border)**2\n \n RADIUS RATIO (max.rad-min.rad)/av.radius\n \n PR.AXIS ASPECT RATIO (minor axis)/(major axis)\n \n MAX.LENGTH ASPECT RATIO (length perp. max length)/(max length)\n \n SCATTER RATIO (inertia about minor axis)/(inertia about major axis)\n \n ELONGATEDNESS area/(shrink width)**2\n \n PR.AXIS RECTANGULARITY area/(pr.axis length*pr.axis width)\n \n MAX.LENGTH RECTANGULARITY area/(max.length*length perp. to this)\n \n SCALED VARIANCE (2nd order moment about minor axis)/area\n ALONG MAJOR AXIS\n \n SCALED VARIANCE (2nd order moment about major axis)/area\n ALONG MINOR AXIS \n \n SCALED RADIUS OF GYRATION (mavar+mivar)/area\n \n SKEWNESS ABOUT (3rd order moment about major axis)/sigma_min**3\n MAJOR AXIS\n \n SKEWNESS ABOUT (3rd order moment about minor axis)/sigma_maj**3\n MINOR AXIS\n \n KURTOSIS ABOUT (4th order moment about major axis)/sigma_min**4\n MINOR AXIS \n \n KURTOSIS ABOUT (4th order moment about minor axis)/sigma_maj**4\n MAJOR AXIS\n \n HOLLOWS RATIO (area of hollows)/(area of bounding polygon)\n \n Where sigma_maj**2 is the variance along the major axis and\n sigma_min**2 is the variance along the minor axis, and\n \n area of hollows= area of bounding poly-area of object \n \n The area of the bounding polygon is found as a side result of\n the computation to find the maximum length. Each individual\n length computation yields a pair of calipers to the object\n orientated at every 5 degrees. The object is propagated into\n an image containing the union of these calipers to obtain an\n image of the bounding polygon. \n \n NUMBER OF CLASSES\n \n 4 OPEL, SAAB, BUS, VAN\n \n NUMBER OF EXAMPLES\n \n Total no. = 946\n \n No. in each class\n \n opel 240\n saab 240\n bus 240\n van 226\n \n \n 100 examples are being kept by Strathclyde for validation.\n So StatLog partners will receive 846 examples.\n \n NUMBER OF ATTRIBUTES\n \n No. of atts. = 18', 1), +(27, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Waveform Database Generator (written in C)\n \n 2. Source:\n (a) Breiman,L., Friedman,J.H., Olshen,R.A., & Stone,C.J. (1984). \n Classification and Regression Trees. Wadsworth International\n Group: Belmont, California. (see pages 43-49).\n (b) Donor: David Aha \n (c) Date: 11/10/1988\n \n 3. Past Usage:\n 1. CART book (above):\n -- Optimal Bayes classification rate: 86% accuracy\n -- CART decision tree algorithm: 72%\n -- Nearest Neighbor Algorithm: 78%\n -- 300 training and 5000 test instances\n \n 4. Relevant Information:\n -- 3 classes of waves\n -- 21 attributes, all of which include noise\n -- See the book for details (49-55, 169)\n -- waveform.data.Z contains 5000 instances\n \n 5. Number of Instances: chosen by user\n \n 6. Number of Attributes:\n -- 21 attributes with continuous values between 0 and 6\n \n 7. Attribute Information:\n -- Each class is generated from a combination of 2 of 3 \"base\" waves\n -- Each instance is generated f added noise (mean 0, variance 1) in \n each attribute\n -- See the book for details (49-55, 169)\n \n 8. Missing Attribute Values: none\n \n 9. Class Distribution: 33% for each of 3 classes', 1), +(28, '1', '**Author**: M. Harries, J. Gama, A. Bifet \n**Source**: [Gama](http://www.inescporto.pt/~jgama/ales/ales_5.html) - 2009 \n**Please cite**: \n\n**Electricity** is a widely used dataset described by M. Harries and analysed by Gama. This data was collected from the Australian New South Wales Electricity Market. In this market, prices are not fixed and are affected by demand and supply of the market. They are set every five minutes. The ELEC dataset contains 45, 312 instances. The class label identifies the change of the price relative to a moving average of the last 24 hours.', 1), +(29, '1', '**Author**: Ashwin Srinivasan, Department of Statistics and Data Modeling, University of Strathclyde \r\n**Source**: https://archive.ics.uci.edu/ml/datasets/Statlog+(Landsat+Satellite)\r\n**Please cite**: \r\n\r\nThe database consists of the multi-spectral values of pixels in 3x3 neighbourhoods in a satellite image, and the classification associated with the central pixel in each neighbourhood. The aim is to predict this classification, given the multi-spectral values. In the sample database, the class of a pixel is coded as a number.', 1), +(30, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title of Database: Abalone data\n \n 2. Sources:\n \n (a) Original owners of database:\n Marine Resources Division\n Marine Research Laboratories - Taroona\n Department of Primary Industry and Fisheries, Tasmania\n GPO Box 619F, Hobart, Tasmania 7001, Australia\n (contact: Warwick Nash +61 02 277277, wnash@dpi.tas.gov.au)\n \n (b) Donor of database:\n Sam Waugh (Sam.Waugh@cs.utas.edu.au)\n Department of Computer Science, University of Tasmania\n GPO Box 252C, Hobart, Tasmania 7001, Australia\n \n (c) Date received: December 1995\n \n \n 3. Past Usage:\n \n Sam Waugh (1995) \"Extending and benchmarking Cascade-Correlation\", PhD\n thesis, Computer Science Department, University of Tasmania.\n \n -- Test set performance (final 1044 examples, first 3133 used for training):\n 24.86% Cascade-Correlation (no hidden nodes)\n 26.25% Cascade-Correlation (5 hidden nodes)\n 21.5% C4.5\n 0.0% Linear Discriminate Analysis\n 3.57% k=5 Nearest Neighbour\n (Problem encoded as a classification task)\n \n -- Data set samples are highly overlapped. Further information is required\n to separate completely using affine combinations. Other restrictions\n to data set examined.\n \n David Clark, Zoltan Schreter, Anthony Adams \"A Quantitative Comparison of\n Dystal and Backpropagation\", submitted to the Australian Conference on\n Neural Networks (ACNN\'96). Data set treated as a 3-category classification\n problem (grouping ring classes 1-8, 9 and 10, and 11 on).\n \n -- Test set performance (3133 training, 1044 testing as above):\n 64% Backprop\n 55% Dystal\n -- Previous work (Waugh, 1995) on same data set:\n 61.40% Cascade-Correlation (no hidden nodes)\n 65.61% Cascade-Correlation (5 hidden nodes)\n 59.2% C4.5\n 32.57% Linear Discriminate Analysis\n 62.46% k=5 Nearest Neighbour\n \n \n 4. Relevant Information Paragraph:\n \n Predicting the age of abalone from physical measurements. The age of\n abalone is determined by cutting the shell through the cone, staining it,\n and counting the number of rings through a microscope -- a boring and\n time-consuming task. Other measurements, which are easier to obtain, are\n used to predict the age. Further information, such as weather patterns\n and location (hence food availability) may be required to solve the problem.\n \n From the original data examples with missing values were removed (the\n majority having the predicted value missing), and the ranges of the\n continuous values have been scaled for use with an ANN (by dividing by 200).\n \n Data comes from an original (non-machine-learning) study:\n \n Warwick J Nash, Tracy L Sellers, Simon R Talbot, Andrew J Cawthorn and\n Wes B Ford (1994) \"The Population Biology of Abalone (_Haliotis_\n species) in Tasmania. I. Blacklip Abalone (_H. rubra_) from the North\n Coast and Islands of Bass Strait\", Sea Fisheries Division, Technical\n Report No. 48 (ISSN 1034-3288)\n \n \n 5. Number of Instances: 4177\n \n \n 6. Number of Attributes: 8\n \n \n 7. Attribute information:\n \n Given is the attribute name, attribute type, the measurement unit and a\n brief description. The number of rings is the value to predict: either\n as a continuous value or as a classification problem.\n \n Name Data Type Meas. Description\n ---- --------- ----- -----------\n Sex nominal M, F, and I (infant)\n Length continuous mm Longest shell measurement\n Diameter continuous mm perpendicular to length\n Height continuous mm with meat in shell\n Whole weight continuous grams whole abalone\n Shucked weight continuous grams weight of meat\n Viscera weight continuous grams gut weight (after bleeding)\n Shell weight continuous grams after being dried\n Rings integer +1.5 gives the age in years\n \n Statistics for numeric domains:\n \n Length Diam Height Whole Shucked Viscera Shell Rings\n Min 0.075 0.055 0.000 0.002 0.001 0.001 0.002 1\n Max 0.815 0.650 1.130 2.826 1.488 0.760 1.005 29\n Mean 0.524 0.408 0.140 0.829 0.359 0.181 0.239 9.934\n SD 0.120 0.099 0.042 0.490 0.222 0.110 0.139 3.224\n Correl 0.557 0.575 0.557 0.540 0.421 0.504 0.628 1.0\n \n \n 8. Missing Attribute Values: None\n \n \n 9. Class Distribution:\n \n Class Examples\n ----- --------\n 1 1\n 2 1\n 3 15\n 4 57\n 5 115\n 6 259\n 7 391\n 8 568\n 9 689\n 10 634\n 11 487\n 12 267\n 13 203\n 14 126\n 15 103\n 16 67\n 17 58\n 18 42\n 19 32\n 20 26\n 21 14\n 22 6\n 23 9\n 24 2\n 25 1\n 26 1\n 27 2\n 29 1\n ----- ----\n Total 4177\n \n Num Instances: 4177\n Num Attributes: 9\n Num Continuous: 8 (Int 1 / Real 7)\n Num Discrete: 1\n Missing values: 0 / 0.0%\n\n name type enum ints real missing distinct (1)\n 1 \'Sex\' Enum 100% 0% 0% 0 / 0% 3 / 0% 0% \n 2 \'Length\' Real 0% 0% 100% 0 / 0% 134 / 3% 0% \n 3 \'Diameter\' Real 0% 0% 100% 0 / 0% 111 / 3% 0% \n 4 \'Height\' Real 0% 0% 100% 0 / 0% 51 / 1% 0% \n 5 \'Whole weight\' Real 0% 0% 100% 0 / 0% 2429 / 58% 31% \n 6 \'Shucked weight\' Real 0% 0% 100% 0 / 0% 1515 / 36% 10% \n 7 \'Viscera weight\' Real 0% 0% 100% 0 / 0% 880 / 21% 3% \n 8 \'Shell weight\' Real 0% 0% 100% 0 / 0% 926 / 22% 8% \n 9 \'Class_Rings\' Int 0% 100% 0% 0 / 0% 28 / 1% 0%', 1), +(31, '1', '**Author**: Bruce Bulloch \n**Source**: [WEKA Dataset Collection](http://www.cs.waikato.ac.nz/ml/weka/datasets.html) \n**Please cite**: \n\n**Eucalyptus Soil Conservation** \nThe objective was to determine which seedlots in a species are best for soil conservation in seasonally dry hill country. Determination is found by measurement of height, diameter by height, survival, and other contributing factors. \n \nIt is important to note that eucalypt trial methods changed over time; earlier trials included mostly 15 - 30cm tall seedling grown in peat plots and the later trials have included mostly three replications of eight trees grown. This change may contribute to less significant results.\n\nExperimental data recording procedures which require noting include:\n - instances with no data recorded due to experimental recording procedures\n require that the absence of a species from one replicate at a site was\n treated as a missing value, but if absent from two or more replicates at a\n site the species was excluded from the site\'s analyses.\n - missing data for survival, vigour, insect resistance, stem form, crown form\n and utility especially for the data recorded at the Morea Station; this \n could indicate the death of species in these areas or a lack in collection\n of data. \n\n Attribute Information: \n 1. Abbrev - site abbreviation - enumerated\n 2. Rep - site rep - integer\n 3. Locality - site locality in the North Island - enumerated\n 4. Map_Ref - map location in the North Island - enumerated\n 5. Latitude - latitude approximation - enumerated\n 6. Altitude - altitude approximation - integer\n 7. Rainfall - rainfall (mm pa) - integer\n 8. Frosts - frosts (deg. c) - integer\n 9. Year - year of planting - integer\n 10. Sp - species code - enumerated\n 11. PMCno - seedlot number - integer\n 12. DBH - best diameter base height (cm) - real\n 13. Ht - height (m) - real\n 14. Surv - survival - integer\n 15. Vig - vigour - real\n 16. Ins_res - insect resistance - real\n 17. Stem_Fm - stem form - real\n 18. Crown_Fm - crown form - real\n 19. Brnch_Fm - branch form - real\n Class:\n 20. Utility - utility rating - enumerated\n\n Class Distribution:\n none - 180\n low - 107\n average - 130\n good - 214\n best - 105\n\n Contact: Bruce Bulloch, 128 Cook Street, Palmerston North, New Zealand', 1), +(32, '1', '**Author**: Ron Cole and Mark Fanty (cole@cse.ogi.edu, fanty@cse.ogi.edu) \n**Donor**: Tom Dietterich (tgd@cs.orst.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/ISOLET) - 1994 \n**Please cite**: \n\n**ISOLET (Isolated Letter Speech Recognition)** \nThis data set was generated as follows. 150 subjects spoke the name of each letter of the alphabet twice. Hence, we have 52 training examples from each speaker. The speakers are grouped into sets of 30 speakers each, 4 groups can serve as trainings set, the last group as the test set.\n\nYou will note that 3 examples are missing. I believe they were dropped due to difficulties in recording.\n\nI believe this is a good domain for a noisy, perceptual task. It is also a very good domain for testing the scaling abilities of algorithms. For example, C4.5 on this domain is slower than backpropagation!\n\nPast Usage:\n* Fanty, M., Cole, R. (1991). Spoken letter recognition. In Lippman, R. P., Moody, J., and Touretzky, D. S. (Eds). Advances in Neural Information Processing Systems 3. San Mateo, CA: Morgan Kaufmann.\nGoal: Predict which letter-name was spoken, a simple classification task. 95.9% correct classification using the OPT backpropagation implementation. Training on isolet1+2+3+4, testing on isolet5. Network architecture: 56 hidden units, 26 output units (one-per-class).\n\n* Dietterich, T. G., Bakiri, G. (1991) Error-correcting output codes: A general method for improving multiclass inductive learning programs. Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI-91), Anaheim, CA: AAAI Press.\nGoal: same as above. 95.83% correct using OPT backpropagation. (Architecture: 78 hidden units, 26 output units, one-per-class). 96.73% correct using a 30-bit error-correcting output code with OPT (Architecture: 156 hidden units, 30 output units).\n\n**Attributes** \nAll attributes are continuous, real-valued attributes scaled into the range -1.0 to 1.0. The features are described in the paper by Cole and Fanty cited above. The features include spectral coefficients; contour features, sonorant features, pre-sonorant features, and post-sonorant features. Exact order of appearance of the features is not known.', 94), +(33, '1', '**Author**: Peter Turney (peter@ai.iit.nrc.ca) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/machine-learning-databases/undocumented/connectionist-bench/vowel/) - date unknown \n**Please cite**: \n\n**Vowel Recognition Data** \nIn my work on context-sensitive learning, I used the \"Deterding Vowel Recognition Data\", but I found it necessary to reformulate the data. Implicit in the original data is contextual information on the speaker\'s gender and identity. For my work, it was necessary to make this information explicit. This dataset adds the speaker\'s sex and identity as new features. \n\nNotes: \n* This is version 2. Version 1 is hidden because it includes a feature dividing the data in train and test set. In OpenML this information is explicitly available in the corresponding task.', 2), +(34, '1', '**Author**: \n \n**Source**: Unknown - \n**Please cite**: \n\nScene recognition dataset\n\nSource:\nMatthew R. Boutell, Jiebo Luo, Xipeng Shen, and Christopher M. Brown.\nLearning multi-label scene classification.\nPattern Recognition, 37(9):1757-1771, 2004. \n\n1: Description.\nScenes data set contains characteristics about images and thier classes. One image can belong to one or more classes.\n\n2: Type: Multi label \n3: Origin: Real world\n4: Instances: 2407\n5: Features: 294\n6: Labels: 6 \n7: Missing values: No', 94), +(35, '1', '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - October 1992 \n**Please cite**: \n\nThe Monk\'s Problems: Problem 1\n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992\n\n4. Relevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set.\n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 8. \n\nTarget Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 2), +(36, '1', '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - October 1992 \n**Please cite**: \n\nThe Monk\'s Problems: Problem 2 \n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992 \n\nRelevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set. \n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 \n\n8. Target Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 2), +(37, '1', '**Author**: Sebastian Thrun \n**Source**: [original](https://archive.ics.uci.edu/ml/datasets/MONK\'s+Problems) - \n**Please cite**: \n\nThe Monk\'s Problems: Problem 3 \n\nThis is a merged version of the separate train and test set which are usually distributed. On OpenML this train-test split can be found as one of the possible tasks. \n\nSources: \n(a) Donor: Sebastian Thrun School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA E-mail: thrun@cs.cmu.edu \n(b) Date: October 1992 \n\nRelevant Information: The MONK\'s problem were the basis of a first international comparison of learning algorithms. The result of this comparison is summarized in \"The MONK\'s Problems - A Performance Comparison of Different Learning algorithms\" by S.B. Thrun, J. Bala, E. Bloedorn, I. Bratko, B. Cestnik, J. Cheng, K. De Jong, S. Dzeroski, S.E. Fahlman, D. Fisher, R. Hamann, K. Kaufman, S. Keller, I. Kononenko, J. Kreuziger, R.S. Michalski, T. Mitchell, P. Pachowicz, Y. Reich H. Vafaie, W. Van de Welde, W. Wenzel, J. Wnek, and J. Zhang has been published as Technical Report CS-CMU-91-197, Carnegie Mellon University in Dec. 1991. One significant characteristic of this comparison is that it was performed by a collection of researchers, each of whom was an advocate of the technique they tested (often they were the creators of the various methods). In this sense, the results are less biased than in comparisons performed by a single person advocating a specific learning method, and more accurately reflect the generalization behavior of the learning techniques as applied by knowledgeable users. There are three MONK\'s problems. The domains for all MONK\'s problems are the same (described below). One of the MONK\'s problems has noise added. For each problem, the domain has been partitioned into a train and test set. \n\nAttribute information: \n1. class: 0, 1 \n2. a1: 1, 2, 3 \n3. a2: 1, 2, 3 \n4. a3: 1, 2 \n5. a4: 1, 2, 3 \n6. a5: 1, 2, 3, 4 \n7. a6: 1, 2 \n\nTarget Concepts associated to the MONK\'s problem: \nMONK-1: (a1 = a2) or (a5 = 1) \nMONK-2: EXACTLY TWO of {a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1} \nMONK-3: (a5 = 3 and a4 = 1) or (a5 /= 4 and a2 /= 3) (5% class noise added to the training set)', 2), +(38, '1', '**Author**: Mineichi Kudo, Jun Toyama, Masaru Shimbo ({mine,jun,shimbo}@main.eng.hokudai.ac.jp) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Japanese+Vowels) - 2000 \n**Please cite**: \n\n**Japanese vowels** \nThis dataset records 640 time series of 12 LPC cepstrum coefficients taken from nine male speakers.\n\nThe data was collected for examining our newly developed classifier for multidimensional curves (multidimensional time series). Nine male speakers uttered two Japanese vowels /ae/ successively. For each utterance, with the analysis parameters described below, we applied 12-degree linear prediction analysis to it to obtain a discrete-time series with 12 LPC cepstrum coefficients. This means that one utterance by a speaker forms a time series whose length is in the range 7-29 and each point of a time series is of 12 features (12 coefficients).\n\nSimilar data are available for different utterances /ei/, /iu/, /uo/, /oa/ in addition to /ae/. Please contact the donor if you are interested in using this data.\n\nThe number of the time series is 640 in total. We used one set of 270 time series for training and the other set of 370 time series for testing.\n\nAnalysis parameters: \n* Sampling rate : 10kHz\n* Frame length : 25.6 ms\n* Shift length : 6.4ms\n* Degree of LPC coefficients : 12\n\nEach line represents 12 LPC coefficients in the increasing order separated by spaces. This corresponds to one analysis\nframe. Lines are organized into blocks, which are a set of 7-29 lines separated by blank lines and corresponds to a single speech utterance of /ae/ with 7-29 frames.\n\nEach speaker is a set of consecutive blocks. In ae.train there are 30 blocks for each speaker. Blocks 1-30 represent speaker 1, blocks 31-60 represent speaker 2, and so on up to speaker 9. In ae.test, speakers 1 to 9 have the corresponding number of blocks: 31 35 88 44 29 24 40 50 29. Thus, blocks 1-31 represent speaker 1 (31 utterances of /ae/), blocks 32-66 represent speaker 2 (35 utterances of /ae/), and so on.\n\n**Past Usage**\n\nM. Kudo, J. Toyama and M. Shimbo. (1999). \"Multidimensional Curve Classification Using Passing-Through Regions\". Pattern Recognition Letters, Vol. 20, No. 11--13, pages 1103--1111.\n\nIf you publish any work using the dataset, please inform the donor. Use for commercial purposes requires donor permission.\n\nReferences \n\n1. http://ips9.main.eng.hokudai.ac.jp/index_e.html\n2. mailto:mine@main.eng.hokudai.ac.jp\n3. mailto:jun@main.eng.hokudai.ac.jp\n4. mailto:shimbo@main.eng.hokudai.ac.jp\n5. http://kdd.ics.uci.edu/\n6. http://www.ics.uci.edu/\n7. http://www.uci.edu/', 2), +(39, '1', '**Author**: Dr Robert Alcock (rob@skyblue.csd.auth.gr) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Synthetic+Control+Chart+Time+Series) - 1999 \n**Please cite**: \n\n**Synthetic Control Chart Time Series** \nThis data consists of synthetically generated control charts. This dataset contains 600 examples of control charts synthetically generated by the process in Alcock and Manolopoulos (1999). There are six different classes of control charts:\n\n1. Normal\n2. Cyclic\n3. Increasing trend\n4. Decreasing trend\n5. Upward shift\n6. Downward shift\n\n**Past Usage** \nAlcock R.J. and Manolopoulos Y. Time-Series Similarity Queries Employing a Feature-Based Approach. 7th Hellenic Conference on\nInformatics. August 27-29. Ioannina,Greece 1999.\n\n**References and Further Information** \nD.T. Pham and A.B. Chan \"Control Chart Pattern Recognition using a New Type of Self Organizing Neural Network\" Proc. Instn, Mech, Engrs. Vol 212, No 1, pp 115-127 1998.\n\nReferences \n\n1. http://skyblue.csd.auth.gr/~rob/\n2. mailto:rob@skyblue.csd.auth.gr\n3. http://kdd.ics.uci.edu/\n4. http://www.ics.uci.edu/\n5. http://www.uci.edu/', 2), +(40, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nIrish Educational Transitions Data\n\nBelow are shown data on educational transitions for a sample of 500\nIrish schoolchildren aged 11 in 1967. The data were collected by\nGreaney and Kelleghan (1984), and reanalyzed by Raftery and Hout (1985, 1993).\n\nThe data were also used, in a simplified form, as an example to illustrate\nBayesian model selection methods by Raftery (1988) and Kass and Raftery (1993).\nIn that simplified form, primary terminal leavers and cases with any missing\ndata were removed, leaving 441 cases. The Leaving Certificate variable\nwas used as the dependent variable in a logistic regression analysis.\n\nThe variables shown are as follows:\n\n1. Sex: 1=male; 2=female.\n\n2. DVRT (Drumcondra Verbal Reasoning Test Score).\n\n3. Educational level attained:\n1 Primary terminal leaver\n2 Junior cycle incomplete: vocational school\n3 Junior cycle incomplete: secondary school\n4 Junior cycle terminal leaver: vocational school\n5 Junior cycle terminal leaver: secondary school\n6 Senior cycle incomplete: vocational school\n7 Senior cycle incomplete: secondary school\n8 Senior cycle terminal leaver: vocational school\n9 Senior cycle terminal leaver: secondary school\n10 3rd level incomplete\n11 3rd level complete\n\n4. Leaving Certificate. 1 if Leaving Certificate not taken; 2 if taken.\n\n5. Prestige score for father\'s occupation\n(calculated by Raftery and Hout, 1985). 0 if missing.\n\n6. Type of school: 1=secondary; 2=vocational; 9=primary terminal leaver.\n\nREFERENCES\n\nGreaney, V. and Kelleghan, T. (1984). Equality of Opportunity in Irish\nSchools. Dublin: Educational Company.\n\nKass, R.E. and Raftery, A.E. (1993). Bayes factors and model uncertainty.\nTechnical Report no. 254, Department of Statistics, University of Washington.\nRevised version to appear in Journal of the American Statistical\nAssociation.\n\nRaftery, A.E. (1988). Approximate Bayes factors for generalized linear models.\nTechnical Report no. 121, Department of Statistics, University of Washington.\n\nRaftery, A.E. and Hout, M. (1985). Does Irish education approach the\nmeritocratic ideal? A logistic analysis.\nEconomic and Social Review, 16, 115-140.\n\nRaftery, A.E. and Hout, M. (1993). Maximally maintained inequality:\nExpansion, reform and opportunity in Irish schools.\nSociology of Education, 66, 41-62.\n\n\nOWNERSHIP STATEMENT\n\nThis data belongs to Vincent Greaney and Thomas Kelleghan,\nEducational Research Centre, St. Patrick\'s College, Drumcondra,\nDublin 9, Ireland, who retain the copyright.\n\nIn the form given here, it may be used solely as an example for research\non the development of statistical methods. For any other use of the data,\npermission must be obtained from the owners. Subject to this statement,\npermission is hereby given to StatLib to distribute this data freely.\n\nSubmitted by Adrian Raftery (raftery@stat.washington.edu).\n\nCopyright 1984 Vincent Greaney and Thomas Kelleghan.\n\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: 4', 2), +(41, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nanalcatdata A collection of data sets used in the book \"Analyzing Categorical Data,\"\nby Jeffrey S. Simonoff, Springer-Verlag, New York, 2003. The submission\nconsists of a zip file containing two versions of each of 84 data sets,\nplus this README file. Each data set is given in comma-delimited ASCII\n(.csv) form, and Microsoft Excel (.xls) form.\n\nNOTICE: These data sets may be used freely for scientific, educational and/or\nnoncommercial purposes, provided suitable acknowledgment is given (by citing\nthe above-named reference).\n\nFurther details concerning the book, including information on statistical software\n(including sample S-PLUS/R and SAS code), are available at the web site\n\nhttp://www.stern.nyu.edu/~jsimonof/AnalCatData\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last\n\n\nNote: Quotes, Single-Quotes and Backslashes were removed, Blanks replaced\nwith Underscores', 2), +(42, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nanalcatdata A collection of data sets used in the book \"Analyzing Categorical Data,\"\nby Jeffrey S. Simonoff, Springer-Verlag, New York, 2003. The submission\nconsists of a zip file containing two versions of each of 84 data sets,\nplus this README file. Each data set is given in comma-delimited ASCII\n(.csv) form, and Microsoft Excel (.xls) form.\n\nNOTICE: These data sets may be used freely for scientific, educational and/or\nnoncommercial purposes, provided suitable acknowledgment is given (by citing\nthe above-named reference).\n\nFurther details concerning the book, including information on statistical software\n(including sample S-PLUS/R and SAS code), are available at the web site\n\nhttp://www.stern.nyu.edu/~jsimonof/AnalCatData\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last\n\n\nNote: Quotes, Single-Quotes and Backslashes were removed, Blanks replaced\nwith Underscores', 2), +(43, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nPRO FOOTBALL SCORES (raw data appears after the description below)\n\nHow well do the oddsmakers of Las Vegas predict the outcome of\nprofessional football games? Is there really a home field advantage - if\nso how large is it? Are teams that play the Monday Night game at a\ndisadvantage when they play again the following Sunday? Do teams benefit\nfrom having a \"bye\" week off in the current schedule? These questions and\na host of others can be investigated using this data set.\n\nHal Stern from the Statistics Department at Harvard University has\nmade available his compilation of scores for all National Football League\ngames from the 1989, 1990, and 1991 seasons. Dr. Stern used these data as\npart of his presentation \"Who\'s Number One?\" in the special \"Best of\nBoston\" session at the 1992 Joint Statistics Meetings.\n\nSeveral variables in the data are keyed to the oddsmakers \"point\nspread\" for each game. The point spread is a value assigned before each\ngame to serve as a handicap for whichever is perceived to be the better\nteam. Thus, to win against the point spread, the \"favorite\" team must beat\nthe \"underdog\" team by more points than the spread. The underdog \"wins\"\nagainst the spread if it wins the game outright or manages to lose by fewer\npoints than the spread. In theory, the point spread should represent the\n\"expert\" prediction as to the game\'s outcome. In practice, it more usually\ndenotes a point at which an equal amount of money will be wagered both for\nand against the favored team.\n\nRaw data below contains 672 cases (all 224 regular season games in\neach season and informatino on the following 9 varialbes: .\n\nHome/Away = Favored team is at home (1) or away (0)\nFavorite Points = Points scored by the favored team\nUnderdog Points = Points scored by the underdog team\nPointspread = Oddsmaker\'s points to handicap the favored team\nFavorite Name = Code for favored team\'s name\nUnderdog name = Code for underdog\'s name\nYear = 89, 90, or 91\nWeek = 1, 2, ... 17\nSpecial = Mon.night (M), Sat. (S), Thur. (H), Sun. night (N)\not - denotes an overtime game\n\n\nData were submitted by: Robin Lock (rlock@stlawu.bitnet)\nMathematics Department, St. Lawrence University\n\nData were compiled by: Hal Stern, Dept. of Statistics, Harvard University\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: 1', 2), +(44, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nThe following are data used in an analysis of the Brown and Frown corpora for my doctoral dissertation titled ``Variations in Written English: Characterizing Authors\' Rhetorical Language Choices Across Corpora of Published Texts\" (Completed at Carnegie Mellon Univ, 2003). The source of the corpora was the ICAME CD-ROM (get info at ).\n\nThe data were generated from the texts using tagging and visualization software, Docuscope.\n\nThe first row is the variable names. The genre of each text (assigned by the Brown corpus compilers) is in \'Genre\' column and the corpus is listed in the \'corpus\' column with 1=Brown and 2=Frown corpus.\n\nThe dataset may be freely used and distributed for non-commercial purposes.\n\nJeff Collins 11 July 2003\n\n\n\nInformation about the dataset\nCLASSTYPE: nominal\nCLASSINDEX: last', 2), +(45, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\nModified by TunedIT (converted to ARFF format)\n\n\nSYLVA is the ecology database\n\n\nThe task of SYLVA is to classify forest cover types. The forest cover type for 30 x 30 meter cells is obtained from US Forest Service (USFS) Region 2 Resource Information System (RIS) data. We brought it back to a two-class classification problem (classifying Ponderosa pine vs. everything else). The \"agnostic learning track\" data consists in 216 input variables. Each pattern is composed of 4 records: 2 true records matching the target and 2 records picked at random. Thus 1/2 of the features are distracters.\n\nData type: non-sparse\nNumber of features: 216\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 805 12281 13086 238271607.00\nValid 81 1228 1309 23817234.00\n\n\nThis dataset contains samples from both training and validation datasets.', 2), +(46, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\n\nModified by TunedIT (converted to ARFF format)\n\n\nGINA is digit recognition database\n\nThe task of GINA is handwritten digit recognition. For the \"agnostic learning track\" we chose the problem of separating two-digit odd numbers from two-digit even numbers. Only the unit digit is informative for that task, therefore at least 1/2 of the features are distracters. Additionally, the pixels that are almost always blank were removed and the pixel order was randomized to hide the feature identity. This is a two class classification problem with sparse continuous input variables, in which each class is composed of several clusters. It is a problem with heterogeneous classes.\n\nData type: non-sparse\nNumber of features: 970\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 1550 1603 3153 164947945.00\nValid 155 160 315 16688946.00\n\n\nThis dataset contains samples from both training and validation datasets.', 2), +(47, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from the Agnostic Learning vs. Prior Knowledge Challenge (http://www.agnostic.inf.ethz.ch)\n\nDataset from: http://www.agnostic.inf.ethz.ch/datasets.php\n\n\nModified by TunedIT (converted to ARFF format)\n\n\nADA is the marketing database\n\nThe task of ADA is to discover high revenue people from census data. This is a two-class classification problem. The raw data from the census bureau is known as the Adult database in the UCI machine-learning repository. The 14 original attributes (features) include age, workclass, education,\nmarital status, occupation, native country, etc. It contains continuous, binary and categorical features. This dataset is from the \"agnostic learning track\", i.e. has access to a preprocessed numeric representation eliminating categorical variables, but the identity of the features is not revealed.\n\n\n\nData type: non-sparse\nNumber of features: 48\nNumber of examples and check-sums:\nPos_ex Neg_ex Tot_ex Check_sum\nTrain 1029 3118 4147 6798109.00\nValid 103 312 415 681151.00\n\n\nThis dataset contains samples from both training and validation datasets.', 2), +(48, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promisedata.org/repository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n(c) 2007 A. Gunes Koru\nContact: gkoru AT umbc DOT edu Phone: +1 (410) 455 8843\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\n1. Title: Recurrent event (defect fix) and size data for Mozilla Classes\nThis one includes a binary attribute (event) to show defect fix.\nThe data is at the \"observation\" level. Each modification made to\na C++ class was entered as an observation. A newly added class\ncreated an observation. The observation period was between\nMay 29, 2002 and Feb 22, 2006.\n\n2. Sources\n(a) Creator: A. Gunes Koru\n(b) Date: February 23, 2007\n(c) Contact: gkoru AT umbc DOT edu Phone: +1 (410) 455 8843\n\n3. Donor: A. Gunes Koru\n\n4. Past Usage: This data set was used for:\n\nA. Gunes Koru, Dongsong Zhang, and Hongfang Liu, \"Modeling the\nEffect of Size on Defect Proneness for Open-Source Software\",\nPredictive Models in Software Engineering Workshop, PROMISE 2007,\nMay 20th 2007, Minneapolis, Minnesota, US.\n\nAbstract:\nQuality is becoming increasingly important with the continuous\nadoption of open-source software. Previous research has found that\nthere is generally a positive relationship between module size and\ndefect proneness. Therefore, in open-source software development, it\nis important to monitor module size and understand its impact on\ndefect proneness. However, traditional approaches to quality\nmodeling, which measure specific system snapshots and obtain future\ndefect counts, are not well suited because open-source modules\nusually evolve and their size changes over time. In this study, we\nused Cox proportional hazards modeling with recurrent events to\nstudy the effect of class size on defect-proneness in the Mozilla\nproduct. We found that the effect of size was significant, and we\nquantified this effect on defect proneness.\n\nThe full paper can be downloaded from A. Gunes Koru\'s Website\nhttp://umbc.edu/~gkoru\nby following the Publications link or from the Web site of PROMISE 2007.\n\n5. Features:\n\nThis data set is used to create a conditional Cox Proportional\nHazards Model\n\nid: A numeric identification assigned to each separate C++ class\n(Note that the id\'s do not increment from the first to the last\ndata row)\n\nstart: A time infinitesimally greater than the time of the modification\nthat created this observation (practically, modification time). When a\nclass is introduced to a system, a new observation is entered with start=0\n\nend: Either the time of the next modification, or the end of the\nobservation period, or the time of deletion, whichever comes first.\n\nevent: event is set to 1 if a defect fix takes place\nat the time represented by \'end\', or 0 otherwise. A class deletion\nis handled easily by entering a final observation whose event is set\nto 1 if the class is deleted for corrective maintenance, or 0 otherwise.\n\nsize: It is a time-dependent covariate and its column carries the\nnumber of source Lines of Code of the C++ classes\nat time \'start\'. Blank and comment lines are not counted.\n\nstate: Initially set to 0, and it becomes 1 after the class\nexperiences an event, and remains at 1 thereafter.', 2), +(49, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE data set made publicly available in order to encourage\nrepeatable, verifiable, refutable, and/or improvable predictive models\nof software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC4/ defect prediction\n\n(c) 2007 : Tim Menzies : tim@menzies.us\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\nFor more deatils on this data set, see\nhttp://promisedata.org/repository/data/kc2/kc2.arff', 2), +(50, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE data set made publicly available in order to encourage\nrepeatable, verifiable, refutable, and/or improvable predictive models\nof software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC3/software defect prediction\n\n(c) 2007 : Tim Menzies : tim@menzies.us\nThis data set is distributed under the\nCreative Commons Attribution-Share Alike 3.0 License\nhttp://creativecommons.org/licenses/by-sa/3.0/\n\nYou are free:\n\n* to Share -- copy, distribute and transmit the work\n* to Remix -- to adapt the work\n\nUnder the following conditions:\n\nAttribution. You must attribute the work in the manner specified by\nthe author or licensor (but not in any way that suggests that they endorse\nyou or your use of the work).\n\nShare Alike. If you alter, transform, or build upon this work, you\nmay distribute the resulting work only under the same, similar or a\ncompatible license.\n\n* For any reuse or distribution, you must make clear to others the\nlicense terms of this work.\n* Any of the above conditions can be waived if you get permission from\nthe copyright holder.\n* Apart from the remix rights granted under this license, nothing in\nthis license impairs or restricts the author\'s moral rights.\nFor more deatils on this data set, see\nhttp://promisedata.org/repository/data/kc2/kc2.arff', 2), +(51, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nThis is a PROMISE data set made publicly available in order to encourage repeatable, verifiable, refutable, and/or improvable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please follow the acknowledgment guidelines posted on [the PROMISE repository web page](http://promise.site.uottawa.ca/SERepository).\n\n## Title/Topic\nJM1/software defect prediction\n\n\n## Sources\n* **Creators:** NASA, then the NASA Metrics Data Program, http://mdp.ivv.nasa.gov. \n* **Contacts:** \n * Mike Chapman, Galaxy Global Corporation (Robert.Chapman@ivv.nasa.gov) +1-304-367-8341\n * Pat Callis, NASA, NASA project manager for MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n* **Donor:** Tim Menzies (tim@barmag.net)\n\n* **Date:** December 2nd, 2004\n\n## Past usage\n**_How Good is Your Blind Spot Sampling Policy?_; 2003; Tim Menzies and Justin S. Di Stefano; 2004 IEEE Conference on High Assurance Software Engineering (http://menzies.us/pdf/03blind.pdf).**\n\n### Results:\n* Very simple learners (ROCKY) perform as well in this domain as more sophisticated methods (e.g. J48, model trees, model trees) for predicting detects\n* Many learners have very low false alarm rates.\n* Probability of detection (PD) rises with effort and rarely rises above it.\n* High PDs are associated with high PFs (probability of failure)\n* PD, PF, effort can change significantly while accuracy remains essentially stable\n* With two notable exceptions, detectors learned from one data set (e.g. KC2) have nearly they same properties when applied to another (e.g. PC2, KC2). Exceptions:\n* LinesOfCode measures generate wider inter-data-set variances;\n* Precision\'s inter-data-set variances vary wildly\n\n**_\"Assessing Predictors of Software Defects\"_, T. Menzies and J. DiStefano and A. Orrego and R. Chapman, 2004,**\n**Proceedings, workshop on Predictive Software Models, Chicago, Available from http://menzies.us/pdf/04psm.pdf.**\n\n### Results:\n* From JM1, Naive Bayes generated PDs of 25% with PF of 20%\n* Naive Bayes out-performs J48 for defect detection\n* When learning on more and more data, little improvement is seen after processing 300 examples.\n* PDs are much higher from data collected below the sub-sub-system level.\n* Accuracy is a surprisingly uninformative measure of success for a defect detector. Two detectors with the same accuracy can have widely varying PDs and PFs.\n\n## Relevant information\n* JM1 is written in \"C\" and is a real-time predictive ground system: Uses simulations to generate predictions\n* Data comes from McCabe and Halstead features extractors of source code. These features were defined in the 70s in an attempt to objectively characterize code features that are associated with software quality. The nature of association is under dispute.\n\nNotes on McCabe and Halstead follow.\n\n* The McCabe and Halstead measures are \"module\"-based where a \"module\" is the smallest unit of functionality. In C or Smalltalk, \"modules\" would be called \"function\" or \"method\" respectively.\n\n* Defect detectors can be assessed according to the following measures:\n\n module actually has defects\n +-------------+------------+\n | no | yes |\n +-----+-------------+------------+\n classifier predicts no defects | no | a | b |\n +-----+-------------+------------+\n classifier predicts some defects | yes | c | d |\n +-----+-------------+------------+\n\n\n accuracy = acc = (a+d)/(a+b+c+d\n probability of detection = pd = recall = d/(b+d)\n probability of false alarm = pf = c/(a+c)\n precision = prec = d/(c+d)\n effort = amount of code selected by detector = (c.LOC + d.LOC)/(Total LOC)\n\n\nIdeally, detectors have high PDs, low PFs, and low effort. This ideal state rarely happens:\n\n* PD and effort are linked. The more modules that trigger the detector, the higher the PD. However, effort also gets increases\n* High PD or low PF comes at the cost of high PF or low PD (respectively). This linkage can be seen in a standard receiver operator curve (ROC). Suppose, for example, LOC> x is used as the detector (i.e. we assume large modules have more errors). LOC > x represents a family of detectors. At x=0, EVERY module is predicted to have errors. This detector has a high PD but also a high false alarm rate. At x=0, NO module is predicted to have errors. This detector has a low false alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n* The line pf=pd on the above graph represents the \"no information\" line. If pf=pd then the detector is pretty useless. The better the detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more error-prone. His metrics therefore reflect the pathways within a code module.\n\n @Article{mccabe76,\n title = \"A Complexity Measure\",\n author = \"T.J. McCabe\",\n pages = \"308--320\",\n journal = \"IEEE Transactions on Software Engineering\",\n year = \"1976\",\n volume = \"2\",\n month = \"December\",\n number = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be fault prone. Halstead estimates reading complexity by counting the number of concepts in a module; e.g. number of unique operators.\n\n @Book{halstead77,\n Author = \"M.H. Halstead\",\n Title = \"Elements of Software Science\",\n Publisher = \"Elsevier \",\n Year = 1977}\n\nWe study these static code measures since they are useful, easy to use, and widely used:\n\n* USEFUL: E.g. this data set can generate highly accurate predictors for defects\n* EASY TO USE: Static code measures (e.g. lines of code, the McCabe/Halstead measures) can be automatically and cheaply collected.\n* WIDELY USED: Many researchers use static measures to guide software quality predictions (see the reference list in the above \"blind spot\" paper. Verification and validation (V\\&V) textbooks advise using static code complexity measures to decide which modules are worthy of manual inspections. Further, we know of several large government software contractors that won\'t review software modules _unless_ tools like McCabe predict that they are fault prone. Hence, defect detectors have a major economic impact when they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely criticized. Static code measures are hardly a complete characterization of the internals of a function. Fenton offers an insightful example where the same functionality is achieved using different programming language constructs resulting in different static measurements for that module. Fenton uses this example to argue the uselessness of static code measures.\n\n @Book{fenton97,\n author = \"N.E. Fenton and S.L. Pfleeger\",\n title = {Software metrics: a Rigorous \\& Practical Approach},\n publisher = {International Thompson Press},\n year = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static measures can never be a definite and certain indicator of the presence of a fault. Rather, defect detectors based on static measures are best viewed as probabilistic statements that the frequency of faults tends to increase in code modules that trigger the detector. By definition, such probabilistic statements will are not categorical claims with some a non-zero false alarm rate. The research challenge for data miners is to ensure that these false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics: essential complexity, cyclomatic complexity, design complexity and LOC, Lines of Code.\n\n* Cyclomatic Complexity, or \"v(G)\", measures the number of \"linearly independent paths\". A set of paths is said to be linearly independent if no path in the set is a linear combination of any other paths in the set through a program\'s \"flowgraph\". A flowgraph is a directed graph where each node corresponds to a program statement, and each arc indicates the flow of control from one statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\" where \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in the flowgraph, and \"n\" is the number of nodes in the flowgraph. The standard McCabes rules (\"v(G)\">10), are used to identify fault-prone module.\n* Essential Complexity, or \"ev(G)$\" is the extent to which a flowgraph can be \"reduced\" by decomposing all the subflowgraphs of $G$ that are \"D-structured primes\". Such \"D-structured primes\" are also sometimes referred to as \"proper one-entry one-exit subflowgraphs\" (for a more thorough discussion of D-primes, see the Fenton text referenced above). \"ev(G)\" is calculated using \"ev(G)= v(G) - m\" where $m$ is the number of subflowgraphs of \"G\" that are D-structured primes.\n* Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a module\'s reduced flowgraph. The flowgraph, \"G\", of a module is reduced to eliminate any complexity which does not influence the interrelationship between design modules. According to McCabe, this complexity measurement reflects the modules calling patterns to its immediate subordinate modules.\n* Lines of code is measured according to McCabe\'s line counting conventions.\n\nThe Halstead falls into three groups: the base measures, the derived measures, and lines of code measures.\n\n* Base measures:\n * mu1 = number of unique operators\n * mu2 = number of unique operands\n * N1 = total occurrences of operators\n * N2 = total occurrences of operands\n * length = N = N1 + N2\n * vocabulary = mu = mu1 + mu2\n * Constants set for each function:\n * mu1\' = 2 = potential operator count (just the function name and the \"return\" operator)\n * mu2\' = potential operand count. (the number of arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\" operators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y), \"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique operands (w,x,y).\n\n* Derived measures:\n * P = volume = V = N * log2(mu) (the number of mental comparisons needed to write\na program of length N)\n * V* = volume on minimal implementation = (2 + mu2\')*log2(2 + mu2\')\n * L = program length = V*/N\n * D = difficulty = 1/L\n * L\' = 1/D\n * I = intelligence = L\'*V\'\n * E = effort to write program = V/L\n * T = time to write program = E/18 seconds\n\n## Number of instances\n10885\n\n## Number of attributes\n22 (5 different lines of code measure, 3 McCabe metrics, 4 base Halstead measures, 8 derived Halstead measures, a branch-count, and 1 goal field)\n\n## Attribute Information\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. defects : {false,true} % module has/has not one or more reported defects\n\n## Missing attributes\nNone\n\n## Class Distribution\nThe class value (defects) is discrete\nfalse: 2106 = 19.35%\ntrue: 8779 = 80.65%', 2), +(52, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: KC2/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From KC2, Naive Bayes generated PDs of 50% with PF of 10%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n-- Data from C++ functions. Science data processing; another part\nof the same project as KC1; different personnel than KC1. Shared\nsome third-party software libraries with KC1, but no other software\noverlap.\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 522\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. problems : {no,yes}% module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (problems) is discrete\nyes: 105 = 20.5%\nno: 415 = 79.5%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 2), +(53, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: KC1/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From KC2, Naive Bayes generated PDs of 45% with PF of 10%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n\n-- KC1 is a \"C++\" system implementing storage management for\nreceiving and processing ground data\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 2109\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. problems : {false,true}% module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (problems) is discrete\nyes: 326 = 15.45%\nno: 1783 = 84.54%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 2), +(54, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\n%-*- text -*-\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nThis is a PROMISE Software Engineering Repository data set made publicly\navailable in order to encourage repeatable, verifiable, refutable, and/or\nimprovable predictive models of software engineering.\n\nIf you publish material based on PROMISE data sets then, please\nfollow the acknowledgment guidelines posted on the PROMISE repository\nweb page http://promise.site.uottawa.ca/SERepository .\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n1. Title/Topic: PC1/software defect prediction\n2. Sources:\n\n-- Creators: NASA, then the NASA Metrics Data Program,\n-- http://mdp.ivv.nasa.gov. Contacts: Mike Chapman,\nGalaxy Global Corporation (Robert.Chapman@ivv.nasa.gov)\n+1-304-367-8341; Pat Callis, NASA, NASA project manager\nfor MDP (Patrick.E.Callis@ivv.nasa.gov) +1-304-367-8309\n\n-- Donor: Tim Menzies (tim@barmag.net)\n\n-- Date: December 2 2004\n3. Past usage:\n\n1. How Good is Your Blind Spot Sampling Policy?; 2003; Tim Menzies\nand Justin S. Di Stefano; 2004 IEEE Conference on High Assurance\nSoftware Engineering (http://menzies.us/pdf/03blind.pdf).\n\n-- Results:\n\n-- Very simple learners (ROCKY) perform as well in this domain\nas more sophisticated methods (e.g. J48, model trees, model\ntrees) for predicting detects\n\n-- Many learners have very low false alarm rates.\n\n-- Probability of detection (PD) rises with effort and rarely\nrises above it.\n\n-- High PDs are associated with high PFs (probability of\nfailure)\n\n-- PD, PF, effort can change significantly while accuracy\nremains essentially stable\n\n-- With two notable exceptions, detectors learned from one\ndata set (e.g. KC2) have nearly they same properties when\napplied to another (e.g. PC2, KC2). Exceptions:\n-- LinesOfCode measures generate wider inter-data-set variances;\n-- Precision\'s inter-data-set variances vary wildly\n\n2. \"Assessing Predictors of Software Defects\", T. Menzies and\nJ. DiStefano and A. Orrego and R. Chapman, 2004,\nProceedings, workshop on Predictive Software Models, Chicago,\nAvailable from http://menzies.us/pdf/04psm.pdf.\n-- Results:\n\n-- From JM1, Naive Bayes generated PDs of 20% with PF of 25%\n\n-- Naive Bayes out-performs J48 for defect detection\n\n-- When learning on more and more data, little improvement is\nseen after processing 300 examples.\n\n-- PDs are much higher from data collected below the sub-sub-\nsystem level.\n\n-- Accuracy is a surprisingly uninformative measure of success\nfor a defect detector. Two detectors with the same accuracy\ncan have widely varying PDs and PFs.\n4. Relevant information:\n\n-- Data from C functions. flight software\nfor earth orbiting satellite.\n\n-- Data comes from McCabe and Halstead features extractors of\nsource code. These features were defined in the 70s in an attempt\nto objectively characterize code features that are associated with\nsoftware quality. The nature of association is under dispute.\nNotes on McCabe and Halstead follow.\n\n-- The McCabe and Halstead measures are \"module\"-based where a\n\"module\" is the smallest unit of functionality. In C or Smalltalk,\n\"modules\" would be called \"function\" or \"method\" respectively.\n\n-- Defect detectors can be assessed according to the following measures:\n\nmodule actually has defects\n+-------------+------------+\n| no | yes |\n+-----+-------------+------------+\nclassifier predicts no defects | no | a | b |\n+-----+-------------+------------+\nclassifier predicts some defects | yes | c | d |\n+-----+-------------+------------+\n\naccuracy = acc = (a+d)/(a+b+c+d\nprobability of detection = pd = recall = d/(b+d)\nprobability of false alarm = pf = c/(a+c)\nprecision = prec = d/(c+d)\neffort = amount of code selected by detector\n= (c.LOC + d.LOC)/(Total LOC)\n\nIdeally, detectors have high PDs, low PFs, and low\neffort. This ideal state rarely happens:\n\n-- PD and effort are linked. The more modules that trigger\nthe detector, the higher the PD. However, effort also gets\nincreases\n\n-- High PD or low PF comes at the cost of high PF or low PD\n(respectively). This linkage can be seen in a standard\nreceiver operator curve (ROC). Suppose, for example, LOC> x\nis used as the detector (i.e. we assume large modules have\nmore errors). LOC > x represents a family of detectors. At\nx=0, EVERY module is predicted to have errors. This detector\nhas a high PD but also a high false alarm rate. At x=0, NO\nmodule is predicted to have errors. This detector has a low\nfalse alarm rate but won\'t detect anything at all. At 0 but does not reach it.\n\n-- The line pf=pd on the above graph represents the \"no information\"\nline. If pf=pd then the detector is pretty useless. The better\nthe detector, the more it rises above PF=PD towards the \"sweet spot\".\n\nNOTES ON MCCABE/HALSTEAD\n========================\nMcCabe argued that code with complicated pathways are more\nerror-prone. His metrics therefore reflect the pathways within a\ncode module.\n@Article{mccabe76,\ntitle = \"A Complexity Measure\",\nauthor = \"T.J. McCabe\",\npages = \"308--320\",\njournal = \"IEEE Transactions on Software Engineering\",\nyear = \"1976\",\nvolume = \"2\",\nmonth = \"December\",\nnumber = \"4\"}\n\nHalstead argued that code that is hard to read is more likely to be\nfault prone. Halstead estimates reading complexity by counting the\nnumber of concepts in a module; e.g. number of unique operators.\n@Book{halstead77,\nAuthor = \"M.H. Halstead\",\nTitle = \"Elements of Software Science\",\nPublisher = \"Elsevier \",\nYear = 1977}\n\nWe study these static code measures since they are useful, easy to\nuse, and widely used:\n\n-- USEFUL: E.g. this data set can generate highly accurate\npredictors for defects\n\n-- EASY TO USE: Static code measures (e.g. lines of code, the\nMcCabe/Halstead measures) can be automatically and cheaply\ncollected.\n\n-- WIDELY USED: Many researchers use static measures to guide\nsoftware quality predictions (see the reference list in the above\n\"blind spot\" paper. Verification and validation (V\\&V) textbooks\nadvise using static code complexity measures to decide which\nmodules are worthy of manual inspections. Further, we know of\nseveral large government software contractors that won\'t review\nsoftware modules _unless_ tools like McCabe predict that they are\nfault prone. Hence, defect detectors have a major economic impact\nwhen they may force programmers to rewrite code.\n\nNevertheless, the merits of these metrics has been widely\ncriticized. Static code measures are hardly a complete\ncharacterization of the internals of a function. Fenton offers an\ninsightful example where the same functionality is achieved using\ndifferent programming language constructs resulting in different\nstatic measurements for that module. Fenton uses this example to\nargue the uselessness of static code measures.\n@book{fenton97,\nauthor = \"N.E. Fenton and S.L. Pfleeger\",\ntitle = {Software metrics: a Rigorous \\& Practical Approach},\npublisher = {International Thompson Press},\nyear = {1997}}\n\nAn alternative interpretation of Fenton\'s example is that static\nmeasures can never be a definite and certain indicator of the\npresence of a fault. Rather, defect detectors based on static\nmeasures are best viewed as probabilistic statements that the\nfrequency of faults tends to increase in code modules that trigger\nthe detector. By definition, such probabilistic statements will\nare not categorical claims with some a non-zero false alarm\nrate. The research challenge for data miners is to ensure that\nthese false alarms do not cripple their learned theories.\n\nThe McCabe metrics are a collection of four software metrics:\nessential complexity, cyclomatic complexity, design complexity and\nLOC, Lines of Code.\n\n-- Cyclomatic Complexity, or \"v(G)\", measures the number of\n\"linearly independent paths\". A set of paths is said to be\nlinearly independent if no path in the set is a linear combination\nof any other paths in the set through a program\'s \"flowgraph\". A\nflowgraph is a directed graph where each node corresponds to a\nprogram statement, and each arc indicates the flow of control from\none statement to another. \"v(G)\" is calculated by \"v(G) = e - n + 2\"\nwhere \"G\" is a program\'s flowgraph, \"e\" is the number of arcs in\nthe flowgraph, and \"n\" is the number of nodes in the\nflowgraph. The standard McCabes rules (\"v(G)\">10), are used to\nidentify fault-prone module.\n\n-- Essential Complexity, or \"ev(G)$\" is the extent to which a\nflowgraph can be \"reduced\" by decomposing all the subflowgraphs\nof $G$ that are \"D-structured primes\". Such \"D-structured\nprimes\" are also sometimes referred to as \"proper one-entry\none-exit subflowgraphs\" (for a more thorough discussion of\nD-primes, see the Fenton text referenced above). \"ev(G)\" is\ncalculated using \"ev(G)= v(G) - m\" where $m$ is the number of\nsubflowgraphs of \"G\" that are D-structured primes.\n\n-- Design Complexity, or \"iv(G)\", is the cyclomatic complexity of a\nmodule\'s reduced flowgraph. The flowgraph, \"G\", of a module is\nreduced to eliminate any complexity which does not influence the\ninterrelationship between design modules. According to McCabe,\nthis complexity measurement reflects the modules calling patterns\nto its immediate subordinate modules.\n\n-- Lines of code is measured according to McCabe\'s line counting\nconventions.\n\nThe Halstead falls into three groups: the base measures, the\nderived measures, and lines of code measures.\n\n-- Base measures:\n-- mu1 = number of unique operators\n-- mu2 = number of unique operands\n-- N1 = total occurrences of operators\n-- N2 = total occurrences of operands\n-- length = N = N1 + N2\n-- vocabulary = mu = mu1 + mu2\n-- Constants set for each function:\n-- mu1\' = 2 = potential operator count (just the function\nname and the \"return\" operator)\n-- mu2\' = potential operand count. (the number\nof arguments to the module)\n\nFor example, the expression \"return max(w+x,x+y)\" has \"N1=4\"\noperators \"return, max, +,+)\", \"N2=4\" operands (w,x,x,y),\n\"mu1=3\" unique operators (return, max,+), and \"mu2=3\" unique\noperands (w,x,y).\n\n-- Derived measures:\n-- P = volume = V = N * log2(mu) (the number of mental\ncomparisons needed to write\na program of length N)\n-- V* = volume on minimal implementation\n= (2 + mu2\')*log2(2 + mu2\')\n-- L = program length = V*/N\n-- D = difficulty = 1/L\n-- L\' = 1/D\n-- I = intelligence = L\'*V\'\n-- E = effort to write program = V/L\n-- T = time to write program = E/18 seconds\n5. Number of instances: 1109\n6. Number of attributes: 22 (5 different lines of code measure,\n3 McCabe metrics, 4 base Halstead measures, 8 derived\nHalstead measures, a branch-count, and 1 goal field)\n7. Attribute Information:\n\n1. loc : numeric % McCabe\'s line count of code\n2. v(g) : numeric % McCabe \"cyclomatic complexity\"\n3. ev(g) : numeric % McCabe \"essential complexity\"\n4. iv(g) : numeric % McCabe \"design complexity\"\n5. n : numeric % Halstead total operators + operands\n6. v : numeric % Halstead \"volume\"\n7. l : numeric % Halstead \"program length\"\n8. d : numeric % Halstead \"difficulty\"\n9. i : numeric % Halstead \"intelligence\"\n10. e : numeric % Halstead \"effort\"\n11. b : numeric % Halstead\n12. t : numeric % Halstead\'s time estimator\n13. lOCode : numeric % Halstead\'s line count\n14. lOComment : numeric % Halstead\'s count of lines of comments\n15. lOBlank : numeric % Halstead\'s count of blank lines\n16. lOCodeAndComment: numeric\n17. uniq_Op : numeric % unique operators\n18. uniq_Opnd : numeric % unique operands\n19. total_Op : numeric % total operators\n20. total_Opnd : numeric % total operands\n21: branchCount : numeric % of the flow graph\n22. defects : {false,true} % module has/has not one or more\n% reported defects\n8. Missing attributes: none\n9. Class Distribution: the class value (defects) is discrete\nfalse: 77 = 6.94%\ntrue: 1032 = 93.05%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%', 2), +(55, '1', '**Author**: Orange Telecom \n**Source**: [ACM KDD Cup](http://www.sigkdd.org/kddcup/index.php) - 2009 \n**Please cite**: \n\nThe KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict the propensity of customers to switch provider (churn). \n\nChurn (wikipedia definition): Churn rate is also sometimes called attrition rate. It is one of two primary factors that determine\nthe steady-state level of customers a business will support. In its broadest sense, churn rate is a measure of the number\nof individuals or items moving into or out of a collection over a specific period of time.\n\nThe term is used in many contexts, but is most widely applied in business with respect to a contractual customer base. For instance, it is an important factor for any business with a subscriber-based service model, including mobile telephone networks and pay TV operators. The term is also used to refer to participant turnover in peer-to-peer networks.\n\nThe training set contains 50,000 examples.\nThe first predictive 190 variables are numerical and the last 40 predictive variables are categorical.\nThe last target variable is binary {-1,1}.', 2), +(56, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDatasets from ACM KDD Cup (http://www.sigkdd.org/kddcup/index.php)\n\nKDD Cup 2009\nhttp://www.kddcup-orange.com\n\nConverted to ARFF format by TunedIT\nCustomer Relationship Management (CRM) is a key element of modern marketing strategies. The KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict the propensity of customers to switch provider (churn), buy new products or services (appetency), or buy upgrades or add-ons proposed to them to make the sale more profitable (up-selling).\nThe most practical way, in a CRM system, to build knowledge on customer is to produce scores. A score (the output of a model) is an evaluation for all instances of a target variable to explain (i.e. churn, appetency or up-selling). Tools which produce scores allow to project, on a given population, quantifiable information. The score is computed using input variables which describe instances. Scores are then used by the information system (IS), for example, to personalize the customer relationship. An industrial customer analysis platform able to build prediction models with a very large number of input variables has been developed by Orange Labs. This platform implements several processing methods for instances and variables selection, prediction and indexation based on an efficient model combined with variable selection regularization and model averaging method. The main characteristic of this platform is its ability to scale on very large datasets with hundreds of thousands of instances and thousands of variables. The rapid and robust detection of the variables that have most contributed to the output prediction can be a key factor in a marketing application.\nUp-selling (wikipedia definition): Up-selling is a sales technique whereby a salesman attempts to have the customer purchase more expensive\nitems, upgrades, or other add-ons in an attempt to make a more profitable sale.\nUp-selling usually involves marketing more profitable services or products, but up-selling can also be simply exposing the customer\nto other options he or she may not have considered previously.\nUp-selling can imply selling something additional, or selling something that is more profitable or otherwise preferable for the seller instead of the original sale.\nThe training set contains 50,000 examples.\nThe first predictive 190 variables are numerical and the last 40 predictive variables are categorical.\nThe last target variable is binary {-1,1}.', 2), +(57, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDataset from the MLRR repository: http://axon.cs.byu.edu:5000/', 2), +(58, '1', '**Author**: \n**Source**: Unknown - Date unknown \n**Please cite**: \n\nDataset from the MLRR repository: http://axon.cs.byu.edu:5000/', 2), +(59, '1', '**Author**: Nicholas Kushmerick \n**Source**: [UCI](http://archive.ics.uci.edu/ml/datasets/Internet+Advertisements) - 1998 \n**Please cite**: \n\nThis dataset represents a set of possible advertisements on Internet pages. The features encode the geometry of the image (if available) as well as phrases occurring in the URL, the image\'s URL and alt text, the anchor text, and words occurring near the anchor text. The task is to predict whether an image is an advertisement (\"ad\") or not (\"nonad\").\n\nRelevant Papers: N. Kushmerick (1999). \"Learning to remove Internet advertisements\", 3rd Int Conf Autonomous Agents. \nAvailable at: http://rexa.info/paper/2fdc1cee89b7f4f2c9227d6f5d9b05d22c5ab3e9', 2), +(60, '1', '**Author**: Tencent Inc. \n**Source**: [KDD Cup](https://www.kddcup2012.org/) - 2012 \n**Please cite**: \n\n**0.1% balanced subsample of the original KDD dataset** \n\nThis data is derived from the 2012 KDD Cup. The data is subsampled to 0.1% of the original number of instances, downsampling the majority class (click=0) so that the target feature is reasonably balanced (5 to 1).\n\nThe data is about advertisements shown alongside search results in a search engine, and whether or not people clicked on these ads. \nThe task is to build the best possible model to predict whether a user will click on a given ad.\n\nA search session contains information on user id, the query issued by the user, ads displayed to the user, and target feature indicating whether a user clicked at least one of the ads in this session. The number of ads displayed to a user in a session is called ‘depth’. The order of an ad in the displayed list is called ‘position’. An ad is displayed as a short text called ‘title’, followed by a slightly longer text called ’description’, and a URL called ‘display URL’. \nTo construct this dataset each session was split into multiple instances. Each instance describes an ad displayed under a certain setting (‘depth’, ‘position’). Instances with the same user id, ad id, query, and setting are merged. Each ad and each user have some additional properties located in separate data files that can be looked up using ids in the instances.\n\nThe dataset has the following features: \n* Click – binary variable indicating whether a user clicked on at least one ad. \n* Impression - the number of search sessions in which AdID was impressed by UserID who issued Query.\n* Url_hash - URL is hashed for anonymity\n* AdID \n* AdvertiserID - some advertisers consistently optimize their ads, so the title and description of their ads are more attractive than those of others’ ads.\n* Depth - number of ads displayed to a user in a session\n* Position - order of an ad in the displayed list\n* QueryID - is the key of the data file \'queryid_tokensid.txt\'. (follow the link to the original KDD Cup page, track 2)\n* KeywordID - is the key of \'purchasedkeyword_tokensid.txt\' (follow the link to the original KDD Cup page, track 2)\n* TitleID - is the key of \'titleid_tokensid.txt\'\n* DescriptionID - is the key of \'descriptionid_tokensid.txt\' (follow the link to the original KDD Cup page, track 2)\n* UserID – is also the key of \'userid_profile.txt\' (follow the link to the original KDD Cup page, track 2). 0 is a special value denoting that the user could be identified.', 2), +(61, '1', '**Author**: H. Altay Guvenir, Burak Acar, Haldun Muderrisoglu \n\n**Source**: UCI\n\n**Please cite**: \n\nDataset artificially generated by using first order theory which describes structure of ten capital letters of English alphabet', 64), +(62, '1', '**Author**: Paulo Cortez, Sérgio Moro \n**Source**: UCI \n**Please cite**: S. Moro, R. Laureano and P. Cortez. Using Data Mining for Bank Direct Marketing: An Application of the CRISP-DM Methodology. In P. Novais et al. (Eds.), Proceedings of the European Simulation and Modelling Conference - ESM\'2011, pp. 117-121, Guimarães, Portugal, October, 2011. EUROSIS. \n\nAvailable at: [pdf] http://hdl.handle.net/1822/14838\n [bib] http://www3.dsi.uminho.pt/pcortez/bib/2011-esm-1.txt\n \n1. Title: Bank Marketing\n \n2. Sources\n Created by: Paulo Cortez (Univ. Minho) and Sérgio Moro (ISCTE-IUL) @ 2012\n \n3. Past Usage:\n \n The full dataset was described and analyzed in:\n \n S. Moro, R. Laureano and P. Cortez. Using Data Mining for Bank Direct Marketing: An Application of the CRISP-DM Methodology. In P. Novais et al. (Eds.), Proceedings of the European Simulation and Modelling Conference - ESM\'2011, pp. 117-121, Guimarães, Portugal, October, 2011. EUROSIS.\n\n4. Relevant Information:\n\nThe data is related with direct marketing campaigns of a Portuguese banking institution. The marketing campaigns were based on phone calls. Often, more than one contact to the same client was required, in order to access if the product (bank term deposit) would be (or not) subscribed. \n\nThe classification goal is to predict if the client will subscribe a term deposit (variable y).\n\n5. Attribute information:\n \nFor more information, read [Moro et al., 2011].\n\nInput variables:\n# bank client data:\n1 - age (numeric)\n2 - job : type of job (categorical: \"admin.\",\"unknown\",\"unemployed\",\"management\",\"housemaid\",\"entrepreneur\", \"student\",\"blue-collar\",\"self-employed\",\"retired\",\"technician\",\"services\") \n3 - marital : marital status (categorical: \"married\",\"divorced\",\"single\"; note: \"divorced\" means divorced or widowed)\n4 - education (categorical: \"unknown\",\"secondary\",\"primary\",\"tertiary\")\n5 - default: has credit in default? (binary: \"yes\",\"no\")\n6 - balance: average yearly balance, in euros (numeric) \n7 - housing: has housing loan? (binary: \"yes\",\"no\")\n8 - loan: has personal loan? (binary: \"yes\",\"no\")\n# related with the last contact of the current campaign:\n9 - contact: contact communication type (categorical: \"unknown\",\"telephone\",\"cellular\") \n10 - day: last contact day of the month (numeric)\n11 - month: last contact month of year (categorical: \"jan\", \"feb\", \"mar\", ..., \"nov\", \"dec\")\n12 - duration: last contact duration, in seconds (numeric)\n# other attributes:\n13 - campaign: number of contacts performed during this campaign and for this client (numeric, includes last contact)\n14 - pdays: number of days that passed by after the client was last contacted from a previous campaign (numeric, -1 means client was not previously contacted)\n15 - previous: number of contacts performed before this campaign and for this client (numeric)\n16 - poutcome: outcome of the previous marketing campaign (categorical: \"unknown\",\"other\",\"failure\",\"success\")\n \nOutput variable (desired target):\n17 - y - has the client subscribed a term deposit? (binary: \"yes\",\"no\")\n', 64), +(63, '1', '**Author**: Volker Lohweg \n**Source**: UCI\n**Please cite**: \n\nSource:\n\nOwner of database: Volker Lohweg (University of Applied Sciences, Ostwestfalen-Lippe, volker.lohweg \'@\' hs-owl.de) \n\nDonor of database: Helene Doerksen (University of Applied Sciences, Ostwestfalen-Lippe, helene.doerksen \'@\' hs-owl.de) . Date received: August, 2012 \n\nData Set Information:\n \nData were extracted from images that were taken from genuine and forged banknote-like specimens. For digitization, an industrial camera usually used for print inspection was used. The final images have 400x 400 pixels. Due to the object lens and distance to the investigated object gray-scale pictures with a resolution of about 660 dpi were gained. Wavelet Transform tool were used to extract features from images.\n\nAttribute Information:\n \n1. variance of Wavelet Transformed image (continuous) \n2. skewness of Wavelet Transformed image (continuous) \n3. curtosis of Wavelet Transformed image (continuous) \n4. entropy of image (continuous) \n5. class (integer)', 64), +(64, '1', '**Author**: Prof. I-Cheng Yeh \n**Source**: UCI\n**Please cite**: Yeh, I-Cheng, Yang, King-Jang, and Ting, Tao-Ming, \"Knowledge discovery on RFM model using Bernoulli sequence, \"Expert Systems with Applications, 2008 (doi:10.1016/j.eswa.2008.07.018). \n\nTitle: Blood Transfusion Service Center Data Set\n\nAbstract: Data taken from the Blood Transfusion Service Center in Hsin-Chu City in Taiwan -- this is a classification problem.\n\n-----------------------------------------------------\nDate Donated: 2008-10-03\n-----------------------------------------------------\n \nSource:\n \nOriginal Owner and Donor\nProf. I-Cheng Yeh, Department of Information Management, Chung-Hua University, Hsin Chu, Taiwan 30067, R.O.C.\ne-mail:icyeh \'at\' chu.edu.tw, TEL:886-3-5186511\nDate Donated: October 3, 2008 \n\n-----------------------------------------------------\n \nData Set Information:\n \nTo demonstrate the RFMTC marketing model (a modified version of RFM), this study adopted the donor database of Blood Transfusion Service Center in Hsin-Chu City in Taiwan. The center passes their blood transfusion service bus to one university in Hsin-Chu City to gather blood donated about every three months. To build a FRMTC model, we selected 748 donors at random from the donor database. These 748 donor data, each one included R (Recency - months since last donation), F (Frequency - total number of donation), M (Monetary - total blood donated in c.c.), T (Time - months since first donation), and a binary variable representing whether he/she donated blood in March 2007 (1 stand for donating blood; 0 stands for not donating blood).\n\n-----------------------------------------------------\n \nAttribute Information:\n \nGiven is the variable name, variable type, the measurement unit and a brief description. The \"Blood Transfusion Service Center\" is a classification problem. The order of this listing corresponds to the order of numerals along the rows of the database.\n\nR (Recency - months since last donation),\nF (Frequency - total number of donation),\nM (Monetary - total blood donated in c.c.),\nT (Time - months since first donation), and a binary variable representing whether he/she donated blood in March 2007 (1 stand for donating blood; 0 stands for not donating blood).\n \nCitation Request:\n \nNOTE: Reuse of this database is unlimited with retention of copyright notice for Prof. I-Cheng Yeh and the following published paper:\n\nYeh, I-Cheng, Yang, King-Jang, and Ting, Tao-Ming, \"Knowledge discovery on RFM model using Bernoulli sequence, \"Expert Systems with Applications, 2008 (doi:10.1016/j.eswa.2008.07.018).', 64), +(65, '1', '**Author**: J. P. Marques de Sá, J. Bernardes, D. Ayers de Campos. \n**Source**: UCI \n**Please cite**: \n\n* Source:\n\nMarques de Sá, J.P., jpmdesa \'@\' gmail.com, Biomedical Engineering Institute, Porto, Portugal. \nBernardes, J., joaobern \'@\' med.up.pt, Faculty of Medicine, University of Porto, Portugal. \nAyres de Campos, D., sisporto \'@\' med.up.pt, Faculty of Medicine, University of Porto, Portugal.\n\n\n* Data Set Information:\n\n2126 fetal cardiotocograms (CTGs) were automatically processed and the respective diagnostic features measured. The CTGs were also classified by three expert obstetricians and a consensus classification label assigned to each of them. Classification was both with respect to a morphologic pattern (A, B, C. ...) and to a fetal state (N, S, P). Therefore the dataset can be used either for 10-class or 3-class experiments.\n\n\n* Attribute Information:\n\nLB - FHR baseline (beats per minute) \nAC - # of accelerations per second \nFM - # of fetal movements per second \nUC - # of uterine contractions per second \nDL - # of light decelerations per second \nDS - # of severe decelerations per second \nDP - # of prolongued decelerations per second \nASTV - percentage of time with abnormal short term variability \nMSTV - mean value of short term variability \nALTV - percentage of time with abnormal long term variability \nMLTV - mean value of long term variability \nWidth - width of FHR histogram \nMin - minimum of FHR histogram \nMax - Maximum of FHR histogram \nNmax - # of histogram peaks \nNzeros - # of histogram zeros \nMode - histogram mode \nMean - histogram mean \nMedian - histogram median \nVariance - histogram variance \nTendency - histogram tendency \nCLASS - FHR pattern class code (1 to 10) \nNSP - fetal state class code (N=normal; S=suspect; P=pathologic)\n\n\n* Relevant Papers:\n\nAyres de Campos et al. (2000) SisPorto 2.0 A Program for Automated Analysis of Cardiotocograms. J Matern Fetal Med 5:311-318 ', 64), +(66, '1', '**Author**: \n**Source**: UCI\n\n**Please cite**: \n\nSource:\n\nD. Lucas (ddlucas .at. alum.mit.edu), Lawrence Livermore National Laboratory; R. Klein (rklein .at. astron.berkeley.edu), Lawrence Livermore National Laboratory & U.C. Berkeley; J. Tannahill (tannahill1 .at. llnl.gov), Lawrence Livermore National Laboratory; D. Ivanova (ivanova2 .at. llnl.gov), Lawrence Livermore National Laboratory; S. Brandon (brandon1 .at. llnl.gov), Lawrence Livermore National Laboratory; D. Domyancic (domyancic1 .at. llnl.gov), Lawrence Livermore National Laboratory; Y. Zhang (zhang24 .at. llnl.gov), Lawrence Livermore National Laboratory .\n\nThis data was constructed using LLNL\'s UQ Pipeline, was created under the auspices of the US Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344, was funded by LLNL\'s Uncertainty Quantification Strategic Initiative Laboratory Directed Research and Development Project under tracking code 10-SI-013, and is released under UCRL number LLNL-MISC-633994.\n\n\nData Set Information:\n\nThis dataset contains records of simulation crashes encountered during climate model uncertainty quantification (UQ) ensembles. Ensemble members were constructed using a Latin hypercube method in LLNL\'s UQ Pipeline software system to sample the uncertainties of 18 model parameters within the Parallel Ocean Program (POP2) component of the Community Climate System Model (CCSM4). Three separate Latin hypercube ensembles were conducted, each containing 180 ensemble members. 46 out of the 540 simulations failed for numerical reasons at combinations of parameter values. The goal is to use classification to predict simulation outcomes (fail or succeed) from input parameter values, and to use sensitivity analysis and feature selection to determine the causes of simulation crashes. Further details about the data and methods are given in the publication \'Failure Analysis of Parameter-Induced Simulation Crashes in Climate Models,\' Geoscientific Model Development ([Web Link]).\n\n\nAttribute Information:\n\nThe goal is to predict climate model simulation outcomes (column 21, fail or succeed) given scaled values of climate model input parameters (columns 3-20). \n\nColumn 1: Latin hypercube study ID (study 1 to study 3) \nColumn 2: simulation ID (run 1 to run 180) \nColumns 3-20: values of 18 climate model parameters scaled in the interval [0, 1] \nColumn 21: simulation outcome (0 = failure, 1 = success)\n\nRelevant Papers:\n\nLucas, D. D., Klein, R., Tannahill, J., Ivanova, D., Brandon, S., Domyancic, D., and Zhang, Y.: Failure analysis of parameter-induced simulation crashes in climate models, Geosci. Model Dev. Discuss., 6, 585-623, [Web Link], 2013.', 64), +(67, '1', '**Author**: Patrick Marques Ciarelli, Elias Oliviera \n**Source**: UCI\n\n**Please cite**: \n\nSource:\n\nPatrick Marques Ciarelli, pciarelli \'@\' lcad.inf.ufes.br, Department of Electrical Engineering, Federal University of Espirito Santo \nElias Oliveira, elias \'@\' lcad.inf.ufes.br, Department of Information Science, Federal University of Espirito Santo\n\n\nData Set Information:\n\nThis is a data set containing 1080 documents of free text business descriptions of Brazilian companies categorized into a \nsubset of 9 categories cataloged in a table called National Classification of Economic Activities (Classificação Nacional de \nAtividade Econômicas - CNAE). The original texts were pre-processed to obtain the current data set: initially, it was kept only \nletters and then it was removed prepositions of the texts. Next, the words were transformed to their canonical form. Finally, \neach document was represented as a vector, where the weight of each word is its frequency in the document. This data set is \nhighly sparse (99.22% of the matrix is filled with zeros).\n\n\nAttribute Information:\n\nIn the data set there are 857 attributes, 1 attributes with the class of instance and 856 with word frequency: \n1. category: range 1 - 9 (integer) \n2 - 857. word frequency: (integer)\n\n\nRelevant Papers:\n\nPatrick Marques Ciarelli, Elias Oliveira, \'Agglomeration and Elimination of Terms for Dimensionality Reduction\', \nNinth International Conference on Intelligent Systems Design and Applications, pp.547-552, 2009 \n\nPatrick Marques Ciarelli, Elias Oliveira, Evandro O. T. Salles, \'An Evolving System Based on Probabilistic Neural Network\', \nBrazilian Symposium on Artificial Neural Network, 2010', 64), +(68, '1', '**Author**: Oliver Roesler, it12148\'@\'lehre.dhbw-stuttgart.de \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/EEG+Eye+State), Baden-Wuerttemberg, Cooperative State University (DHBW), Stuttgart, Germany \n**Please cite**: \n\nAll data is from one continuous EEG measurement with the Emotiv EEG Neuroheadset. The duration of the measurement was 117 seconds. The eye state was detected via a camera during the EEG measurement and added later manually to the file after analysing the video frames. \'1\' indicates the eye-closed and \'0\' the eye-open state. All values are in chronological order with the first measured value at the top of the data.\n', 64), +(69, '1', '**Author**: James P Bridge, Sean B Holden and Lawrence C Paulson \n \n**Source**: UCI \n\n**Please cite**: James P Bridge, Sean B Holden and Lawrence C Paulson . Machine learning for first-order theorem proving: learning to select a good heuristic. Journal of Automated Reasoning, Springer 2012/13. \n\nSource:\n\nJames P Bridge, Sean B Holden and Lawrence C Paulson \n\nUniversity of Cambridge \nComputer Laboratory \nWilliam Gates Building \n15 JJ Thomson Avenue \nCambridge CB3 0FD \nUK \n\n+44 (0)1223 763500 \nforename.surname \'@\' cl.cam.ac.uk\n\n\nData Set Information:\n\nSee the file dataset file.\n\n\nAttribute Information:\n\nThe attributes are a mixture of static and dynamic features derived from theorems to be proved. See the paper for full details.\n', 64), +(70, '1', '**Author**: Alexander Vergara\n\n**Source**: UCI \n\n**Please cite**: Alexander Vergara and Shankar Vembu and Tuba Ayhan and Margaret A. Ryan and Margie L. Homer and Ramón Huerta, Chemical gas sensor drift compensation using classifier ensembles, Sensors and Actuators B: Chemical (2012) doi: 10.1016/j.snb.2012.01.074. \n\nTitle: Gas Sensor Array Drift Dataset Data Set\n\nSource:\n\nCreators: Alexander Vergara (vergara \'@\' ucsd.edu) \nBioCircutis Institute \nUniversity of California San Diego \nSan Diego, California, USA \nDonors of the Dataset: Alexander Vergara (vergara \'@\' ucsd.edu) \nRamon Huerta (rhuerta \'@\' ucsd.edu) \n\n\nData Set Information:\n\nThis archive contains 13910 measurements from 16 chemical sensors utilized in simulations for drift compensation in a discrimination task of 6 gases at various levels of concentrations. The goal is to achieve good performance (or as low degradation as possible) over time, as reported in the paper mentioned below in Section 2: Data collection. The primary purpose of providing this dataset is to make it freely accessible on-line to the chemo-sensor research community and artificial intelligence to develop strategies to cope with sensor/concept drift. The dataset can be used exclusively for research purposes. Commercial purposes are fully excluded.\nThe dataset was gathered within January 2007 to February 2011 (36 months) in a gas delivery platform facility situated at the ChemoSignals Laboratory in the BioCircuits Institute, University of California San Diego. Being completely operated by a fully computerized environment —controlled by a LabVIEW–National Instruments software on a PC fitted with the appropriate serial data acquisition boards. The measurement system platform provides versatility for obtaining the desired concentrations of the chemical substances of interest with high accuracy and in a highly reproducible manner, minimizing thereby the common mistakes caused by human intervention and making it possible to exclusively concentrate on the chemical sensors for compensating real drift.\nThe resulting dataset comprises recordings from six distinct pure gaseous substances, namely Ammonia, Acetaldehyde, Acetone, Ethylene, Ethanol, and Toluene, each dosed at a wide variety of concentration values ranging from 5 to 1000 ppmv. See Tables 1 and 2 of the below cited manuscript for details on the gas identity name, concentration values, and time distribution sequence of the measurement recordings considered in this dataset.\n\nBatch10.dat was updated on 10/14/2013 to correct some corrupted values in the last 120 lines of the file.\n\nAn extension of this dataset with the concentration values is available at Gas Sensor Array Drift Dataset at Different Concentrations Data Set [Web Link]\n\n\nAttribute Information:\n\nThe response of the said sensors is read-out in the form of the resistance across the active layer of each sensor; hence each measurement produced a 16-channel time series, each of which represented by an aggregate of features reflecting all the dynamic processes occurring at the sensor surface in reaction to the chemical substance being evaluated. In particular, two distinct types of features were considered in the creation of this dataset: (i) The so-called steady-state feature (ΔR), defined as the difference of the maximal resistance change and the baseline and its normalized version expressed by the ratio of the maximal resistance and the baseline values when the chemical vapor is present in the test chamber. And (ii), an aggregate of features reflecting the sensor dynamics of the increasing/decaying transient portion of the sensor response during the entire measurement procedure under controlled conditions, namely the exponential moving average (emaα). These aggregate of features is a transform, borrowed from the field of econometrics originally introduced to the chemo-sensing community by Muezzinoglu et al. (2009), that converts the said transient portion into a real scalar, by estimating the maximum value —minimum for the decaying portion of the sensor response— of its exponential moving average (emaα), with an initial condition set to zero and a scalar smoothing parameter of the operator, α, that defines both the quality of the feature and the time of its occurrence along the time series the scalar, set to range between 0 and 1. In particular, three different values for α were set to obtain three different feature values from the pre-recorded rising portion of the sensor response and three additional features with the same α values but for the decaying portion of the sensor response, covering thus the entire sensor response dynamics. For a more detailed analysis and discussion on these features as well as a graphical illustration of them please refer to Section 2.3 and Figure 2, respectively of the annotated manuscript.\nOnce the abovementioned features are calculated, one is to form a feature vector containing the 8 features extracted from each particular sensor multiplied by the 16 sensors considered here. In the end, the resulting 128-dimensional feature vector containing all the features indicated above (8 features × 16 sensors) is organized as follows:\nΔR_1, |ΔR|_1, EMAi0.001_1, EMAi0.01_1, EMAi0.1_1, EMAd0.001_1, EMAd0.01_1, EMAd0.1_1, ΔR_2, |ΔR|_2, EMAi0.001_2, EMAi0.01_2, EMAi0.1_2, EMAd0.001_2, EMAd0.01_2, EMAd0.1_2,..., ΔR_16, |ΔR|_16, EMAi0.001_16, EMAi0.01_16, EMAi0.1_16, EMAd0.001_16, EMAd0.01_16, EMAd0.1_16,\n\nwhere: “ΔR_1” and “|ΔR|_1” is the ΔR and the normalized ΔR feature, respectively, “EMAi0.001_1”, “EMAi0.01_1”, and “EMAi0.1_1”, the emaα of the rising transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, and “EMAd0.001_1”, “EMAd0.01_1”, and “EMAd0.1_1”, the emaα of the decaying transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, all corresponding to sensor # 1; “ΔR_2” and “|ΔR|_2” is the ΔR and the normalized ΔR feature, respectively, “EMAi0.001_2”, “EMAi0.01_2”, and “EMAi0.1_2”, the emaα of the rising transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, and “EMAd0.001_2”, “EMAd0.01_2”, and “EMAd0.1_2”, the emaα of the decaying transient portion of the sensor response for α equals to 0.001, 0.01, and 0.1, respectively, all corresponding to sensor # 2; and so forth up until sensor # 16, forming thus the 128-dimensional feature vector that is to be fetched to the classifiers for training.\nFor processing purposes, the data is organized into ten batches, each containing the number of measurements per class and month indicated in the table below. This reorganization of data was done to ensure having a sufficient and as uniformly distributed as possible number of experiments in each class and month when training the classifier.\n\nDataset organization details. Each row corresponds to months that were combined to form a batch:\nBatch ID Month IDs\nBatch 1 Months 1 and 2\nBatch 2 Months 3, 4, 8, 9 and 10\nBatch 3 Months 11, 12, and 13\nBatch 4 Months 14 and 15\nBatch 5 Month 16\nBatch 6 Months 17, 18, 19, and 20\nBatch 7 Month 21\nBatch 8 Months 22 and 23\nBatch 9 Months 24 and 30\nBatch 10 Month 36\n\nThe data format follows the same coding style as in libsvm, in which one indicates the class each data point belongs to (1: Ethanol; 2: Ethylene; 3:Ammonia; 4: Acetaldehyde; 5: Acetone; 6: Toluene), and, then, the collection of features in a format x:v, where x stands for the feature number and v for the actual value of the feature. For example, in \n\n1 1:15596.162100 2:1.868245 3:2.371604 4:2.803678 5:7.512213 … 128:-2.654529 \n\nThe number “1” stands for the class number (in this case Ethanol), whereas the remaining 128 columns list the actual feature values for each measurement recording organized as described above. \nFinally, to make the results presented in the associated article reproducible for the reader, please use the following parameter values in the training task:\n• folds: 10\n• log2c = -5, 10, 1\n• log2g = -10, 5, 1\n• Scale the features in the training set appropriately to lie between -1 and +1.\n• And use the following cross validation parameters:\n\nBatch C Gamma (ɤ) Rate\n1 256.0 0.03125 98.8764\n2 64.0 0.00390625 99.7588\n3 128.0 0.03125 100.0\n4 1.0 0.25 100.0\n5 2.0 0.015625 99.4924\n6 256.0 0.0009765625 99.5217\n7 64.0 0.0625 99.9723\n8 1024.0 0.0078125 99.6599\n9 2.0 0.00390625 100.0', 64), +(71, '1', '**Author**: Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto and Xavier Parra\n\n**Source**: UCI\n\n**Please cite**: Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. A Public Domain Dataset for Human Activity Recognition Using Smartphones. 21th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, ESANN 2013. Bruges, Belgium 24-26 April 2013. \n\nTitle: Human Activity Recognition Using Smartphones\n\nAbstract: Human Activity Recognition database built from the recordings of 30 subjects performing activities of daily living (ADL) while carrying a waist-mounted smartphone with embedded inertial sensors.\n\nSource:\n\nJorge L. Reyes-Ortiz(1,2), Davide Anguita(1), Alessandro Ghio(1), Luca Oneto(1) and Xavier Parra(2)\n1 - Smartlab - Non-Linear Complex Systems Laboratory DITEN - Università degli Studi di Genova, Genoa (I-16145), Italy. \n2 - CETpD - Technical Research Centre for Dependency Care and Autonomous Living Universitat Politècnica de Catalunya (BarcelonaTech). Vilanova i la Geltrú (08800), Spain, activityrecognition \'@\' smartlab.ws\n\n\nData Set Information:\n\nThe experiments have been carried out with a group of 30 volunteers within an age bracket of 19-48 years. Each person performed six activities (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded accelerometer and gyroscope, we captured 3-axial linear acceleration and 3-axial angular velocity at a constant rate of 50Hz. The experiments have been video-recorded to label the data manually. The obtained dataset has been randomly partitioned into two sets, where 70% of the volunteers was selected for generating the training data and 30% the test data. \n\nThe sensor signals (accelerometer and gyroscope) were pre-processed by applying noise filters and then sampled in fixed-width sliding windows of 2.56 sec and 50% overlap (128 readings/window). The sensor acceleration signal, which has gravitational and body motion components, was separated using a Butterworth low-pass filter into body acceleration and gravity. The gravitational force is assumed to have only low frequency components, therefore a filter with 0.3 Hz cutoff frequency was used. From each window, a vector of features was obtained by calculating variables from the time and frequency domain.\n\nCheck the README.txt file for further details about this dataset. \n\nA video of the experiment including an example of the 6 recorded activities with one of the participants can be seen in the following link: [Web Link]\n\n\nAttribute Information:\n\nFor each record in the dataset it is provided: \n- Triaxial acceleration from the accelerometer (total acceleration) and the estimated body acceleration. \n- Triaxial Angular velocity from the gyroscope. \n- A 561-feature vector with time and frequency domain variables. \n- Its activity label. \n- An identifier of the subject who carried out the experiment.\n\n\nRelevant Papers:\n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012 \n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra, Jorge L. Reyes-Ortiz. Energy Efficient Smartphone-Based Activity Recognition using Fixed-Point Arithmetic. Journal of Universal Computer Science. Special Issue in Ambient Assisted Living: Home Care. Volume 19, Issue 9. May 2013\n\nDavide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. 4th International Workshop of Ambient Assited Living, IWAAL 2012, Vitoria-Gasteiz, Spain, December 3-5, 2012. Proceedings. Lecture Notes in Computer Science 2012, pp 216-223. \n\nJorge Luis Reyes-Ortiz, Alessandro Ghio, Xavier Parra-Llanas, Davide Anguita, Joan Cabestany, Andreu Català. Human Activity and Motion Disorder Recognition: Towards Smarter Interactive Cognitive Environments. 21th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, ESANN 2013. Bruges, Belgium 24-26 April 2013.\n\n', 64), +(72, '1', '**Author**: Lee Graham, Franz Oppacher\n**Source**: UCI\n\n**Please cite**: \n\n1. Source:\n\nLee Graham (lee \'@\' stellaralchemy.com) \n\nFranz Oppacher (oppacher \'@\' scs.carleton.ca) \nCarleton University, Department of Computer Science \nIntelligent Systems Research Unit \n1125 Colonel By Drive, Ottawa, Ontario, Canada, K1S5B6 \n\n\n2. Attribute Information:\n\n1-100: Labeled “X##”. Floating point values (numeric) \n101: Labeled “class”. Binary {0, 1} representing {valley, hill} ', 64), +(73, '1', '**Author**: Bendi Venkata Ramana, M. Surendra Prasad Babu, N. B. Venkateswarlu \n \n**Source**: UCI \n\n**Please cite**: \n\nSource:\n\n1. Bendi Venkata Ramana, \nramana.bendi \'@\' gmail.com \nAssociate Professor, \nDepartment of Information Technology, \nAditya Instutute of Technology and Management, \nTekkali - 532201, Andhra Pradesh, India. \n\n2. Prof. M. Surendra Prasad Babu \ndrmsprasadbabu \'@\' yahoo.co.in \nDeptartment of Computer Science & Systems Engineering, \nAndhra University College of Engineering, \nVisakhapatnam-530 003 Andhra Pradesh, India. \n\n3.Prof. N. B. Venkateswarlu \nvenkat_ritch \'@\' yahoo.com \nDepartment of Computer Science and Engineering, \nAditya Instutute of Technology and Management, \nTekkali - 532201, Andhra Pradesh, India.\n\n\nData Set Information:\n\nThis data set contains 416 liver patient records and 167 non liver patient records.The data set was collected from north east of Andhra Pradesh, India. Selector is a class label used to divide into groups(liver patient or not). This data set contains 441 male patient records and 142 female patient records. \n\nAny patient whose age exceeded 89 is listed as being of age \"90\".\n\nAttribute Information:\n\n1. Age Age of the patient \n2. Gender Gender of the patient \n3. TB Total Bilirubin \n4. DB Direct Bilirubin \n5. Alkphos Alkaline Phosphotase \n6. Sgpt Alamine Aminotransferase \n7. Sgot Aspartate Aminotransferase \n8. TP Total Protiens \n9. ALB Albumin \n10. A/G Ratio Albumin and Globulin Ratio \n11. Selector field used to split the data into two sets (labeled by the experts) \n\n\nRelevant Papers:\n\n1. Bendi Venkata Ramana, Prof. M. S. Prasad Babu and Prof. N. B. Venkateswarlu, “A Critical Comparative Study of Liver Patients from USA and INDIA: An Exploratory Analysis”, International Journal of Computer Science Issues, ISSN :1694-0784, May 2012. \n2. Bendi Venkata Ramana, Prof. M. S. Prasad Babu and Prof. N. B. Venkateswarlu, “A Critical Study of Selected Classification Algorithms for Liver Disease Diagnosis”, International Journal of Database Management Systems (IJDMS), Vol.3, No.2, ISSN : 0975-5705, PP 101-114, May 2011.', 64), +(74, '1', '**Author**: Isabelle Guyon \n**Source**: UCI \n**Please cite**: Isabelle Guyon, Steve R. Gunn, Asa Ben-Hur, Gideon Dror, 2004. Result analysis of the NIPS 2003 feature selection challenge.\n\nAbstract: \n\nMADELON is an artificial dataset, which was part of the NIPS 2003 feature selection challenge. This is a two-class classification problem with continuous input variables. The difficulty is that the problem is multivariate and highly non-linear.\n\nSource:\n\nIsabelle Guyon \nClopinet \n955 Creston Road \nBerkeley, CA 90708 \nisabelle \'@\' clopinet.com \n\n\nData Set Information:\n\nMADELON is an artificial dataset containing data points grouped in 32 clusters placed on the vertices of a five dimensional hypercube and randomly labeled +1 or -1. The five dimensions constitute 5 informative features. 15 linear combinations of those features were added to form a set of 20 (redundant) informative features. Based on those 20 features one must separate the examples into the 2 classes (corresponding to the +-1 labels). We added a number of distractor feature called \'probes\' having no predictive power. The order of the features and patterns were randomized. \n\nThis dataset is one of five datasets used in the NIPS 2003 feature selection challenge. Our website is still open for post-challenge submissions. All details about the preparation of the data are found in our technical report: Design of experiments for the NIPS 2003 variable selection benchmark, Isabelle Guyon, July 2003. Such information was made available only after the end of the challenge. \n\nThe data are split into training, validation, and test set. Target values are provided only for the 2 first sets. Test set performance results are obtained by submitting prediction results to: [Web Link]. \n\nThe data are in the following format: \ndataname.param: Parameters and statistics about the data \ndataname.feat: Identities of the features (in the order the features are found in the data). \ndataname_train.data: Training set (a space-delimited regular matrix, patterns in lines, features in columns). \ndataname_valid.data: Validation set. \ndataname_test.data: Test set. \ndataname_train.labels: Labels (truth values of the classes) for training examples. \ndataname_valid.labels: Validation set labels (withheld during the benchmark, but provided now). \ndataname_test.labels: Test set labels (withheld, so the data can still be use as a benchmark). \n\n\nAttribute Information:\nWe do not provide attribute information, to avoid biasing the feature selection process.\n\n\nRelevant Papers:\n\nThe best challenge entrants wrote papers collected in the book: \nIsabelle Guyon, Steve Gunn, Masoud Nikravesh, Lofti Zadeh (Eds.), Feature Extraction, Foundations and Applications. Studies in Fuzziness and Soft Computing. Physica-Verlag, Springer.\n\nSee also: \nIsabelle Guyon, et al, 2007. Competitive baseline methods set new standards for the NIPS 2003 feature selection benchmark. Pattern Recognition Letters 28 (2007) 1438–1444. \n\nand the associated technical report: \nIsabelle Guyon, et al. 2006. Feature selection with the CLOP package. Technical Report.\n', 64), +(75, '1', '**Author**: \n**Source**: UCI\n**Please cite**: \n\nRelevant Papers: Laurent Candillier and Vincent Lemaire. Design and Analysis of the Nomao Challenge - Active Learning in the Real-World. In: Proceedings of the ALRA : Active Learning in Real-world Applications, Workshop ECML-PKDD 2012, Friday, September 28, 2012, Bristol, UK.\n\n1. Data set title:\nNomao Data Set \n\n\n2. Abstract: \nNomao collects data about places (name, phone, localization...) from many sources. Deduplication consists in detecting what data refer to the same place. Instances in the dataset compare 2 spots.\n\n3. Data Set Characteristics: \n\n- Univariate\n- Area: Computer\n- Attribute Characteristics: Real\n- Associated Tasks: Classification\n- Missing Values?: Yes\n\n\n4. Source:\n\n(a) Original owner of database (name / phone / snail address / email address) \nNomao / 00 33 5 62 48 33 90 / 1 avenue Jean Rieux, 31500 Toulouse / challenge \'@\' nomao.com \n(b) Donor of database (name / phone / snail address / email address) \nLaurent Candillier / - / 1 avenue Jean Rieux, 31500 Toulouse / laurent \'@\' nomao.com\n\n\n5. Data Set Information:\n\nThe dataset has been enriched during the Nomao Challenge: organized along with the ALRA workshop (Active Learning in Real-world Applications): held at the ECML-PKDD 2012 conference.', 64), +(76, '1', '**Author**: Kun Zhang, Wei Fan, XiaoJing Yuan\n\n**Source**: UCI\n\n**Please cite**: \n\n\n1 . Abstract: \nTwo ground ozone level data sets are included in this collection. One is the eight hour peak set (eighthr.data), the other is the one hour peak set (onehr.data). Those data were collected from 1998 to 2004 at the Houston, Galveston and Brazoria area.\n\n2. Source:\n\nKun Zhang, zhang.kun05 \'@\' gmail.com, Department of Computer Science, Xavier University of Lousiana \nWei Fan, wei.fan \'@\' gmail.com, IBM T.J.Watson Research \nXiaoJing Yuan, xyuan \'@\' uh.edu, Engineering Technology Department, College of Technology, University of Houston \n\n\n3. Data Set Information:\n\nAll the attribute start with T means the temperature measured at different time throughout the day; and those starts with WS indicate the wind speed at various time. \n\nWSR_PK: continuous. peek wind speed -- resultant (meaning average of wind vector) \nWSR_AV: continuous. average wind speed \nT_PK: continuous. Peak T \nT_AV: continuous. Average T \nT85: continuous. T at 850 hpa level (or about 1500 m height) \nRH85: continuous. Relative Humidity at 850 hpa \nU85: continuous. (U wind - east-west direction wind at 850 hpa) \nV85: continuous. V wind - N-S direction wind at 850 \nHT85: continuous. Geopotential height at 850 hpa, it is about the same as height at low altitude \nT70: continuous. T at 700 hpa level (roughly 3100 m height) \n\nRH70: continuous. \nU70: continuous. \nV70: continuous. \nHT70: continuous. \n\nT50: continuous. T at 500 hpa level (roughly at 5500 m height) \n\nRH50: continuous. \nU50: continuous. \nV50: continuous. \nHT50: continuous. \n\nKI: continuous. K-Index [Web Link] \nTT: continuous. T-Totals [Web Link] \nSLP: continuous. Sea level pressure \nSLP_: continuous. SLP change from previous day \n\nPrecp: continuous. -- precipitation\n\n\n4. Attribute Information:\n\nThe following are specifications for several most important attributes that are highly valued by Texas Commission on Environmental Quality (TCEQ). More details can be found in the two relevant papers. \n\nO 3 - Local ozone peak prediction \nUpwind - Upwind ozone background level \nEmFactor - Precursor emissions related factor \nTmax - Maximum temperature in degrees F \nTb - Base temperature where net ozone production begins (50 F) \nSRd - Solar radiation total for the day \nWSa - Wind speed near sunrise (using 09-12 UTC forecast mode) \nWSp - Wind speed mid-day (using 15-21 UTC forecast mode) \n\n\n5. Relevant Papers:\n\nForecasting skewed biased stochastic ozone days: analyses, solutions and beyond, Knowledge and Information Systems, Vol. 14, No. 3, 2008. \n\nIt Discusses details about the dataset, its use as well as various experiments (both cross-validation and streaming) using many state-of-the-art methods. \nA shorter version of the paper (does not contain some detailed experiments as the journal paper above) is in: \nForecasting Skewed Biased Stochastic Ozone Days: Analyses and Solutions. ICDM 2006: 753-764 \n\n', 64), +(77, '1', '**Author**: \n**Source**: KEEL\n**Please cite**: \n\n* Title:\n\nPhoneme dataset\n\n* Abstract:\n\nThe aim of this dataset is to distinguish between nasal (class 0) and oral sounds (class 1). The class distribution is 3,818 samples in class 0 and 1,586 samples in class 1. The phonemes are transcribed as follows: sh as in she, dcl as in dark, iy as the vowel in she, aa as the vowel in dark, and ao as the first vowel in water.\n\n* Attributes information:\n\n@relation phoneme\n@attribute Aa real [-1.7, 4.107]\n@attribute Ao real [-1.327, 4.378]\n@attribute Dcl real [-1.823, 3.199]\n@attribute Iy real [-1.581, 2.826]\n@attribute Sh real [-1.284, 2.719]\n@attribute Class {0, 1}\n@inputs Aa, Ao, Dcl, Iy, Sh\n@outputs Class', 64), +(78, '1', '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \n\n**Source**: UCI \n\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \n\n1. One-hundred plant species leaves data set (class = margin).\n \n2. Sources:\n (a) Original owners of colour Leaves Samples:\n\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\n The colour images are not included in this submission.\n The Leaves were collected in the Royal Botanic Gardens, Kew, UK.\n email: james.cope@kingston.ac.uk\n \n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\n\n (c) Date received 03/12/2012\n\n3. Past Usage:\n\n (a) This is a new data set, provisional paper: \n\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\n\n (b) Previous parts of the data set relate to feature extraction of leaves from: \n\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\n Plant texture classification using gabor cooccurrences.\n Advances in Visual Computing,\n pages 669ñ677, 2010.\n\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\n Shape and texture based plant leaf classification. In\n Advanced Concepts for Intelligent Vision Systems,\n pages 345ñ353. Springer, 2010.\n\n4. Relevant Information Paragraph:\n The data directory contains the binary images (masks) of the leaf samples. The colour images are not included.\n The data set features are organised as the following:\n * \'data_Sha_64.txt\'\n * \'data_Tex_64.txt\'\n * [THIS DATASET]\'data_Mar_64.txt\'\n\n One file for each 64-element feature vectors. Each row begins with the class label.\n The remaining 64 elements is the feature vector.\n\n5. Number of Instances\n\n 1600 samples each of three features (16 samples per leaf class).\n\n6. Number of Attributes\n\n Three 64 element feature vectors per sample.\n\n7. Vectors\n There are three features: Shape, Margin and Texture. As discussed in the paper(s) above.\n For Each feature, a 64 element vector is given per sample of leaf.\n These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin).\n\n8. Missing Attribute Values: none\n\n9. Class Distribution: 16 instances per class', 64), +(79, '1', '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \n\n**Source**: UCI \n\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \n\n1. One-hundred plant species leaves data set (class = shape).\n \n2. Sources:\n (a) Original owners of colour Leaves Samples:\n\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\n The colour images are not included in this submission.\n The Leaves were collected in the Royal Botanic Gardens, Kew, UK.\n email: james.cope@kingston.ac.uk\n \n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\n\n (c) Date received 03/12/2012\n\n3. Past Usage:\n\n (a) This is a new data set, provisional paper: \n\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\n\n (b) Previous parts of the data set relate to feature extraction of leaves from: \n\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\n Plant texture classification using gabor cooccurrences.\n Advances in Visual Computing,\n pages 669ñ677, 2010.\n\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\n Shape and texture based plant leaf classification. In\n Advanced Concepts for Intelligent Vision Systems,\n pages 345ñ353. Springer, 2010.\n\n4. Relevant Information Paragraph:\n The data directory contains the binary images (masks) of the leaf samples. The colour images are not included.\n The data set features are organised as the following:\n * [THIS DATASET]\'data_Sha_64.txt\'\n * \'data_Tex_64.txt\'\n * \'data_Mar_64.txt\'\n\n One file for each 64-element feature vectors. Each row begins with the class label.\n The remaining 64 elements is the feature vector.\n\n5. Number of Instances\n\n 1600 samples each of three features (16 samples per leaf class).\n\n6. Number of Attributes\n\n Three 64 element feature vectors per sample.\n\n7. Vectors\n There are three features: Shape, Margin and Texture. As discussed in the paper(s) above.\n For Each feature, a 64 element vector is given per sample of leaf.\n These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin).\n\n8. Missing Attribute Values: none\n\n9. Class Distribution: 16 instances per class', 64), +(80, '1', '**Author**: James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman. \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/One-hundred+plant+species+leaves+data+set) - 2012 \r\n**Please cite**: Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press. 2013. \r\n\r\n**One-hundred plant species leaves data set (class = texture)** \r\nThe data directory contains the binary images (masks) of the leaf samples. The colour images are not included. There are three features: Shape, Margin and Texture. As discussed in the paper(s) above. For Each feature, a 64 element vector is given per sample of leaf. These vectors are taken as a contigous descriptors (for shape) or histograms (for texture and margin). The colour images are not included in this submission. The Leaves were collected in the Royal Botanic Gardens, Kew, UK. email: james.cope@kingston.ac.uk\r\n\r\n**Sources** \r\n (a) Original owners of colour Leaves Samples:\r\n James Cope, Thibaut Beghin, Paolo Remagnino, Sarah Barman.\r\n (b) This dataset consists of work carried out by James Cope, Charles Mallah, and James Orwell.\r\n Donor of database Charles Mallah: charles.mallah@kingston.ac.uk; James Cope: james.cope@kingston.ac.uk\r\n (c) Date received 03/12/2012\r\n\r\n**Usage**\r\n (a) This is a new data set, provisional paper: \r\n\r\n Charles Mallah, James Cope, James Orwell. Plant Leaf Classification Using Probabilistic Integration of Shape, Texture and Margin Features. Signal Processing, Pattern Recognition and Applications, in press.\r\n\r\n (b) Previous parts of the data set relate to feature extraction of leaves from: \r\n\r\n J. Cope, P. Remagnino, S. Barman, and P. Wilkin.\r\n Plant texture classification using gabor cooccurrences.\r\n Advances in Visual Computing,\r\n pages 669ñ677, 2010.\r\n\r\n T. Beghin, J. Cope, P. Remagnino, and S. Barman.\r\n Shape and texture based plant leaf classification. In\r\n Advanced Concepts for Intelligent Vision Systems,\r\n pages 345ñ353. Springer, 2010.', 64), +(81, '1', '**Author**: \n**Source**: UCI \n**Please cite**: Mansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878 \n\n\nQSAR biodegradation Data Set \n\n* Abstract: \n\nData set containing values for 41 attributes (molecular descriptors) used to classify 1055 chemicals into 2 classes (ready and not ready biodegradable).\n\n\n* Source:\n\nKamel Mansouri, Tine Ringsted, Davide Ballabio (davide.ballabio \'@\' unimib.it), Roberto Todeschini, Viviana Consonni, Milano Chemometrics and QSAR Research Group (http://michem.disat.unimib.it/chm/), Università degli Studi Milano – Bicocca, Milano (Italy)\n\n\n* Data Set Information:\n\nThe QSAR biodegradation dataset was built in the Milano Chemometrics and QSAR Research Group (Università degli Studi Milano – Bicocca, Milano, Italy). The research leading to these results has received funding from the European Community’s Seventh Framework Programme [FP7/2007-2013] under Grant Agreement n. 238701 of Marie Curie ITN Environmental Chemoinformatics (ECO) project. \nThe data have been used to develop QSAR (Quantitative Structure Activity Relationships) models for the study of the relationships between chemical structure and biodegradation of molecules. Biodegradation experimental values of 1055 chemicals were collected from the webpage of the National Institute of Technology and Evaluation of Japan (NITE). Classification models were developed in order to discriminate ready (356) and not ready (699) biodegradable molecules by means of three different modelling methods: k Nearest Neighbours, Partial Least Squares Discriminant Analysis and Support Vector Machines. Details on attributes (molecular descriptors) selected in each model can be found in the quoted reference: Mansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878.\n\n\n* Attribute Information:\n\n41 molecular descriptors and 1 experimental class: \n1) SpMax_L: Leading eigenvalue from Laplace matrix \n2) J_Dz(e): Balaban-like index from Barysz matrix weighted by Sanderson electronegativity \n3) nHM: Number of heavy atoms \n4) F01[N-N]: Frequency of N-N at topological distance 1 \n5) F04[C-N]: Frequency of C-N at topological distance 4 \n6) NssssC: Number of atoms of type ssssC \n7) nCb-: Number of substituted benzene C(sp2) \n8) C%: Percentage of C atoms \n9) nCp: Number of terminal primary C(sp3) \n10) nO: Number of oxygen atoms \n11) F03[C-N]: Frequency of C-N at topological distance 3 \n12) SdssC: Sum of dssC E-states \n13) HyWi_B(m): Hyper-Wiener-like index (log function) from Burden matrix weighted by mass \n14) LOC: Lopping centric index \n15) SM6_L: Spectral moment of order 6 from Laplace matrix \n16) F03[C-O]: Frequency of C - O at topological distance 3 \n17) Me: Mean atomic Sanderson electronegativity (scaled on Carbon atom) \n18) Mi: Mean first ionization potential (scaled on Carbon atom) \n19) nN-N: Number of N hydrazines \n20) nArNO2: Number of nitro groups (aromatic) \n21) nCRX3: Number of CRX3 \n22) SpPosA_B(p): Normalized spectral positive sum from Burden matrix weighted by polarizability \n23) nCIR: Number of circuits \n24) B01[C-Br]: Presence/absence of C - Br at topological distance 1 \n25) B03[C-Cl]: Presence/absence of C - Cl at topological distance 3 \n26) N-073: Ar2NH / Ar3N / Ar2N-Al / R..N..R \n27) SpMax_A: Leading eigenvalue from adjacency matrix (Lovasz-Pelikan index) \n28) Psi_i_1d: Intrinsic state pseudoconnectivity index - type 1d \n29) B04[C-Br]: Presence/absence of C - Br at topological distance 4 \n30) SdO: Sum of dO E-states \n31) TI2_L: Second Mohar index from Laplace matrix \n32) nCrt: Number of ring tertiary C(sp3) \n33) C-026: R--CX--R \n34) F02[C-N]: Frequency of C - N at topological distance 2 \n35) nHDon: Number of donor atoms for H-bonds (N and O) \n36) SpMax_B(m): Leading eigenvalue from Burden matrix weighted by mass \n37) Psi_i_A: Intrinsic state pseudoconnectivity index - type S average \n38) nN: Number of Nitrogen atoms \n39) SM6_B(m): Spectral moment of order 6 from Burden matrix weighted by mass \n40) nArCOOR: Number of esters (aromatic) \n41) nX: Number of halogen atoms \n42) experimental class: ready biodegradable (RB) and not ready biodegradable (NRB)\n\n\n* Relevant Papers:\n\nMansouri, K., Ringsted, T., Ballabio, D., Todeschini, R., Consonni, V. (2013). Quantitative Structure - Activity Relationship models for ready biodegradability of chemicals. Journal of Chemical Information and Modeling, 53, 867-878\n', 64), +(82, '1', '**Author**: Ananda Freire, Marcus Veloso and Guilherme Barreto \n**Source**: UCI \n**Please cite**: \n\n* Dataset Title: \n\nWall-Following Robot Navigation Data Data Set \n\n* Abstract: \n\nThe data were collected as the SCITOS G5 robot navigates through the room following the wall in a clockwise direction, for 4 rounds, using 24 ultrasound sensors arranged circularly around its \'waist\'.\n\n* Source:\n\n(a) Creators: Ananda Freire, Marcus Veloso and Guilherme Barreto \nDepartment of Teleinformatics Engineering \nFederal University of Ceará \nFortaleza, Ceará, Brazil \n\n(b) Donors of database: Ananda Freire (anandalf \'@\' gmail.com) \nGuilherme Barreto (guilherme \'@\' deti.ufc.br)\n\n* Data Set Information:\n\nThe provided file contain the raw values of the measurements of all 24 ultrasound sensors and the corresponding class label. Sensor readings are sampled at a rate of 9 samples per second. \n\nIt is worth mentioning that the 24 ultrasound readings and the simplified distances were collected at the same time step, so each file has the same number of rows (one for each sampling time step). \n\nThe wall-following task and data gathering were designed to test the hypothesis that this apparently simple navigation task is indeed a non-linearly separable classification task. Thus, linear classifiers, such as the Perceptron network, are not able to learn the task and command the robot around the room without collisions. Nonlinear neural classifiers, such as the MLP network, are able to learn the task and command the robot successfully without collisions. \n\nIf some kind of short-term memory mechanism is provided to the neural classifiers, their performances are improved in general. For example, if past inputs are provided together with current sensor readings, even the Perceptron becomes able to learn the task and command the robot successfully. If a recurrent neural network, such as the Elman network, is used to learn the task, the resulting dynamical classifier is able to learn the task using less hidden neurons than the MLP network. \n\n* Attribute Information:\n\nNumber of Attributes: sensor_readings_24.data: 24 numeric attributes and the class. \n\nFor Each Attribute: \n-- File sensor_readings_24.data: \n1. US1: ultrasound sensor at the front of the robot (reference angle: 180°) - (numeric: real) \n2. US2: ultrasound reading (reference angle: -165°) - (numeric: real) \n3. US3: ultrasound reading (reference angle: -150°) - (numeric: real) \n4. US4: ultrasound reading (reference angle: -135°) - (numeric: real) \n5. US5: ultrasound reading (reference angle: -120°) - (numeric: real) \n6. US6: ultrasound reading (reference angle: -105°) - (numeric: real) \n7. US7: ultrasound reading (reference angle: -90°) - (numeric: real) \n8. US8: ultrasound reading (reference angle: -75°) - (numeric: real) \n9. US9: ultrasound reading (reference angle: -60°) - (numeric: real) \n10. US10: ultrasound reading (reference angle: -45°) - (numeric: real) \n11. US11: ultrasound reading (reference angle: -30°) - (numeric: real) \n12. US12: ultrasound reading (reference angle: -15°) - (numeric: real) \n13. US13: reading of ultrasound sensor situated at the back of the robot (reference angle: 0°) - (numeric: real) \n14. US14: ultrasound reading (reference angle: 15°) - (numeric: real) \n15. US15: ultrasound reading (reference angle: 30°) - (numeric: real) \n16. US16: ultrasound reading (reference angle: 45°) - (numeric: real) \n17. US17: ultrasound reading (reference angle: 60°) - (numeric: real) \n18. US18: ultrasound reading (reference angle: 75°) - (numeric: real) \n19. US19: ultrasound reading (reference angle: 90°) - (numeric: real) \n20. US20: ultrasound reading (reference angle: 105°) - (numeric: real) \n21. US21: ultrasound reading (reference angle: 120°) - (numeric: real) \n22. US22: ultrasound reading (reference angle: 135°) - (numeric: real) \n23. US23: ultrasound reading (reference angle: 150°) - (numeric: real) \n24. US24: ultrasound reading (reference angle: 165°) - (numeric: real) \n25. Class: {Move-Forward, Slight-Right-Turn, Sharp-Right-Turn, Slight-Left-Turn} \n\n\n* Relevant Papers:\n\nAnanda L. Freire, Guilherme A. Barreto, Marcus Veloso and Antonio T. Varela (2009), \n\'Short-Term Memory Mechanisms in Neural Network Learning of Robot Navigation \nTasks: A Case Study\'. Proceedings of the 6th Latin American Robotics Symposium (LARS\'2009), \nValparaíso-Chile, pages 1-6, DOI: 10.1109/LARS.2009.5418323\n', 64), +(83, '1', '**Author**: Semeion Research Center of Sciences of Communication \n**Source**: UCI \n**Please cite**: Semeion Research Center of Sciences of Communication, via Sersale 117, 00128 Rome, Italy \nTattile Via Gaetano Donizetti, 1-3-5,25030 Mairano (Brescia), Italy. \n\n* Title: \nSemeion Handwritten Digit Data Set \n\n* Abstract: \n1593 handwritten digits from around 80 persons were scanned, stretched in a rectangular box 16x16 in a gray scale of 256 values.\n\n\n* Source:\n\nThe dataset was created by Tactile Srl, Brescia, Italy (http://www.tattile.it) and donated in 1994 to Semeion Research Center of Sciences of Communication, Rome, Italy (http://www.semeion.it), for machine learning research. \n\nFor any questions, e-mail Massimo Buscema (m.buscema \'@\' semeion.it) or Stefano Terzi (s.terzi \'@\' semeion.it)\n\n\n* Data Set Information:\n\n1593 handwritten digits from around 80 persons were scanned, stretched in a rectangular box 16x16 in a gray scale of 256 values.Then each pixel of each image was scaled into a bolean (1/0) value using a fixed threshold. \n\nEach person wrote on a paper all the digits from 0 to 9, twice. The commitment was to write the digit the first time in the normal way (trying to write each digit accurately) and the second time in a fast way (with no accuracy). \n\nThe best validation protocol for this dataset seems to be a 5x2CV, 50% Tune (Train +Test) and completly blind 50% Validation\n\n\n* Attribute Information:\n\nThis dataset consists of 1593 records (rows) and 256 attributes (columns). Each record represents a handwritten digit, orginally scanned with a resolution of 256 grays scale (28). Each pixel of the each original scanned image was first stretched, and after scaled between 0 and 1 (setting to 0 every pixel whose value was under tha value 127 of the grey scale (127 included) and setting to 1 each pixel whose orinal value in the grey scale was over 127). Finally, each binary image was scaled again into a 16x16 square box (the final 256 binary attributes).\n\n\n* Relevant Papers:\n\nM Buscema, MetaNet: The Theory of Independent Judges, in Substance Use & Misuse 33(2)1998, pp 439-461.', 64), +(84, '1', '**Author**: Semeion, Research Center of Sciences of Communication, Rome, Italy. \n**Source**: UCI \n**Please cite**: Dataset provided by Semeion, Research Center of Sciences of Communication, Via Sersale 117, 00128, Rome, Italy. \n(www.semeion.it) \n\n\n* Title: Steel Plates Faults Data Set \n\n* Abstract: \n\nA dataset of steel plates\' faults, classified into 7 different types. The goal was to train machine learning for automatic pattern recognition.\n\n* Source:\n\nSemeion, Research Center of Sciences of Communication, Via Sersale 117, 00128, Rome, Italy. \nwww.semeion.it\n\n\n* Data Set Information:\n\nType of dependent variables (7 Types of Steel Plates Faults): \n1.Pastry \n2.Z_Scratch \n3.K_Scatch \n4.Stains \n5.Dirtiness \n6.Bumps \n7.Other_Faults \n\n\nAttribute Information:\n\n27 independent variables: \nX_Minimum \nX_Maximum \nY_Minimum \nY_Maximum \nPixels_Areas \nX_Perimeter \nY_Perimeter \nSum_of_Luminosity \nMinimum_of_Luminosity \nMaximum_of_Luminosity \nLength_of_Conveyer \nTypeOfSteel_A300 \nTypeOfSteel_A400 \nSteel_Plate_Thickness \nEdges_Index \nEmpty_Index \nSquare_Index \nOutside_X_Index \nEdges_X_Index \nEdges_Y_Index \nOutside_Global_Index \nLogOfAreas \nLog_X_Index \nLog_Y_Index \nOrientation_Index \nLuminosity_Index \nSigmoidOfAreas \n\n\n* Relevant Papers:\n\n1.M Buscema, S Terzi, W Tastle, A New Meta-Classifier,in NAFIPS 2010, Toronto (CANADA),26-28 July 2010, 978-1-4244-7858-6/10 ©2010 IEEE \n2.M Buscema, MetaNet: The Theory of Independent Judges, in Substance Use & Misuse, 33(2), 439-461,1998\n\n', 64), +(85, '1', '**Author**: K.Kalyani. \n**Source**: UCI \n**Please cite**: \n\n* Title: Tamilnadu Electricity Board Hourly Readings Data Set \n\n* Abstract: \n\nThis data can be effectively produced the result to fewer parameter of the Load profile can be reduced in the Database\n\n* Source:\n\nK.Kalyani ,kkalyanims \'@\' gmail.com,T.U.K Arts College,Karanthai,Thanjavur.\n\n\n* Data Set Information:\n\nCollect the real time readings for residential,commercial,industrial,agriculure,to find the accuracy consumption in Tamil Nadu Around Thanajvur.\n\n\n* Attribute Information:\n\nforkva,forkw,type,sector,service\n\n\n* Relevant Papers:\n\nEfficient Electricity Utilization By IHBMO\n', 64), +(86, '1', '**Author**: William H. Wolberg, W. Nick Street, Olvi L. Mangasarian \n**Source**: UCI \n**Please cite**: \n\n* Title: \n\nBreast Cancer Wisconsin (Diagnostic) Data Set (WDBC)\n\n* Abstract: \n\nDiagnostic Wisconsin Breast Cancer Database\n\n* Source:\n\nCreators: \n\n1. Dr. William H. Wolberg, General Surgery Dept. \nUniversity of Wisconsin, Clinical Sciences Center \nMadison, WI 53792 \nwolberg \'@\' eagle.surgery.wisc.edu \n\n2. W. Nick Street, Computer Sciences Dept. \nUniversity of Wisconsin, 1210 West Dayton St., Madison, WI 53706 \nstreet \'@\' cs.wisc.edu 608-262-6619 \n\n3. Olvi L. Mangasarian, Computer Sciences Dept. \nUniversity of Wisconsin, 1210 West Dayton St., Madison, WI 53706 \nolvi \'@\' cs.wisc.edu \n\nDonor: Nick Street\n\n* Data Set Information:\n\nFeatures are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image. A few of the images can be found at [Web Link] \n\nSeparating plane described above was obtained using Multisurface Method-Tree (MSM-T) [K. P. Bennett, \"Decision Tree Construction Via Linear Programming.\" Proceedings of the 4th Midwest Artificial Intelligence and Cognitive Science Society, pp. 97-101, 1992], a classification method which uses linear programming to construct a decision tree. Relevant features were selected using an exhaustive search in the space of 1-4 features and 1-3 separating planes. \n\nThe actual linear program used to obtain the separating plane in the 3-dimensional space is that described in: [K. P. Bennett and O. L. Mangasarian: \"Robust Linear Programming Discrimination of Two Linearly Inseparable Sets\", Optimization Methods and Software 1, 1992, 23-34]. \n\nThis database is also available through the UW CS ftp server: \nftp ftp.cs.wisc.edu \ncd math-prog/cpo-dataset/machine-learn/WDBC/\n\n\n* Attribute Information:\n\n1) ID number \n2) Diagnosis (M = malignant, B = benign) \n3-32) \n\nTen real-valued features are computed for each cell nucleus: \n\na) radius (mean of distances from center to points on the perimeter) \nb) texture (standard deviation of gray-scale values) \nc) perimeter \nd) area \ne) smoothness (local variation in radius lengths) \nf) compactness (perimeter^2 / area - 1.0) \ng) concavity (severity of concave portions of the contour) \nh) concave points (number of concave portions of the contour) \ni) symmetry \nj) fractal dimension (\"coastline approximation\" - 1)\n\n\n* Relevant Papers:\n\nW.N. Street, W.H. Wolberg and O.L. Mangasarian. Nuclear feature extraction for breast tumor diagnosis. IS&T/SPIE 1993 International Symposium on Electronic Imaging: Science and Technology, volume 1905, pages 861-870, San Jose, CA, 1993. \n[Web Link] \n\nO.L. Mangasarian, W.N. Street and W.H. Wolberg. Breast cancer diagnosis and prognosis via linear programming. Operations Research, 43(4), pages 570-577, July-August 1995. \n[Web Link] \n\nW.H. Wolberg, W.N. Street, and O.L. Mangasarian. Machine learning techniques to diagnose breast cancer from fine-needle aspirates. Cancer Letters 77 (1994) 163-171. \n\nW.H. Wolberg, W.N. Street, and O.L. Mangasarian. Image analysis and machine learning applied to breast cancer diagnosis and prognosis. Analytical and Quantitative Cytology and Histology, Vol. 17 No. 2, pages 77-87, April 1995. \n\nW.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. Computerized breast cancer diagnosis and prognosis from fine needle aspirates. Archives of Surgery 1995;130:511-516. \n\nW.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. Computer-derived nuclear features distinguish malignant from benign breast cytology. Human Pathology, 26:792--796, 1995. \n\n', 64), +(87, '1', '**Author**: Pierre Mahé, Jean-Baptiste Veyrieras \n**Source**: [original](http://www.openml.org/d/1514) - UCI \n**Please cite**: \n\n* Dataset Title: MicroMass - Pure (pure spectra version) \n\n* Abstract: \nA dataset to explore machine learning approaches for the identification of microorganisms from mass-spectrometry data. \n\n* Source:\n\nPierre Mahé, pierre.mahe \'@\' biomerieux.com, bioMérieux\nJean-Baptiste Veyrieras, jean-baptiste.veyrieras \'@\' biomerieux.com, bioMérieux\n\n* Data Set Information:\n\nThis MALDI-TOF dataset consists in:\nA) A reference panel of 20 Gram positive and negative bacterial species covering 9 genera among which several species are known to be hard to discriminate by mass spectrometry (MALDI-TOF). Each species was represented by 11 to 60 mass spectra obtained from 7 to 20 bacterial strains, constituting altogether a dataset of 571 spectra obtained from 213 strains. The spectra were obtained according to the standard culture-based workflow used in clinical routine in which the microorganism was first grown on an agar plate for 24 to 48 hours, before a portion of colony was picked, spotted on a MALDI slide and a mass spectrum was acquired. \nB) Based on this reference panel, a dedicated in vitro mock-up mixture dataset was constituted. For that purpose we considered 10 pairs of species of various taxonomic proximity:\n* 4 mixtures, labelled A, B, C and D, involved species that belong to the same genus, \n* 2 mixtures, labelled E and F, involved species that belong to distinct genera, but to the same Gram type, \n* 4 mixtures, labelled G, H, I and J, involved species that belong to distinct Gram types. \nEach mixture was represented by 2 pairs of strains, which were mixed according to the following 9 concentration ratios : 1:0, 10:1, 5:1, 2:1, 1:1, 1:2, 1:5, 1:10, 0:1. Two replicate spectra were acquired for each concentration ratio and each couple of strains, leading altogether to a dataset of 360 spectra, among which 80 are actually pure sample spectra.\n\n* Relevant Papers:\n\nMahé et al. (2014). Automatic identification of mixed bacterial species fingerprints in a MALDI-TOF mass-spectrum. Bioinformatics.\n\nVervier et al., A benchmark of support vector machines strategies for microbial identification by mass-spectrometry data, submitted\n\n\n\n\n\n', 64), +(88, '1', '**Author**: Brian Johnson \n**Source**: [UCI] (https://archive.ics.uci.edu/ml/datasets/Wilt) \n**Please cite**: Johnson, B., Tateishi, R., Hoan, N., 2013. A hybrid pansharpening approach and multiscale object-based image analysis for mapping diseased pine and oak trees. International Journal of Remote Sensing, 34 (20), 6969-6982. \n\n\n* Dataset: \nWilt Data Set \n\n* Abstract: \nHigh-resolution Remote Sensing data set (Quickbird). Small number of training samples of diseased trees, large number for other land cover. Testing data set from stratified random sample of image.\n\n* Source:\n \nBrian Johnson; \nInstitute for Global Environmental Strategies; \n2108-11 Kamiyamaguchi, Hayama, Kanagawa,240-0115 Japan; \nEmail: Johnson \'@\' iges.or.jp \n\n\n* Data Set Information: \n\nThis data set contains some training and testing data from a remote sensing study by Johnson et al. (2013) that involved detecting diseased trees in Quickbird imagery. There are few training samples for the \'diseased trees\' class (74) and many for \'other land cover\' class (4265). \n\nThe data set consists of image segments, generated by segmenting the pansharpened image. The segments contain spectral information from the Quickbird multispectral image bands and texture information from the panchromatic (Pan) image band. The testing data set is for the row with “Segmentation scale 15” segments and “original multi-spectral image” Spectral information in Table 2 of the reference (i.e. row 5). Please see the reference below for more information on the data set, and please cite the reference if you use this data set. Enjoy! \n\n* Attribute Information:\n\nclass: \'w\' (diseased trees), \'n\' (all other land cover) \nGLCM_Pan: GLCM mean texture (Pan band) \nMean_G: Mean green value \nMean_R: Mean red value \nMean_NIR: Mean NIR value \nSD_Pan: Standard deviation (Pan band) \n\n\n* Relevant Papers:\n\nJohnson, B., Tateishi, R., Hoan, N., 2013. A hybrid pansharpening approach and multiscale object-based image analysis for mapping diseased pine and oak trees. International Journal of Remote Sensing, 34 (20), 6969-6982.\n', 64), +(89, '1', '**Author**: Ronny Kohavi and Barry Becker \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Adult) - 1996-05-01 \n**Please cite**: Ron Kohavi, \"Scaling Up the Accuracy of Naive-Bayes Classifiers: a Decision-Tree Hybrid\", Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, 1996 \n\n**Note: this is the original version from the UCI repository, with training and test sets merged.**\n\nPrediction task is to determine whether a person makes over 50K a year. Extraction was done by Barry Becker from the 1994 Census database. A set of reasonably clean records was extracted using the following conditions: ((AAGE>16) && (AGI>100) && (AFNLWGT>1)&& (HRSWK>0))\n\nRonny Kohavi and Barry Becker. Data Mining and Visualization, Silicon Graphics. \ne-mail: ronnyk \'@\' live.com for questions. \n', 2), +(90, '1', 'Data from the Kaggle Bioresponse challenge:\nhttps://www.kaggle.com/c/bioresponse\n\nThe objective of the competition is to help us build as good a model as possible so that we can, as optimally as this data allows, relate molecular information, to an actual biological response.\n\nWe have shared the data in the comma separated values (CSV) format. Each row in this data set represents a molecule. The first column contains experimental data describing an actual biological response; the molecule was seen to elicit this response (1), or not (0). The remaining columns represent molecular descriptors (d1 through d1776), these are calculated properties that can capture some of the characteristics of the molecule - for example size, shape, or elemental constitution. The descriptor matrix has been normalized.\n\nThe original training and test set were merged.', 2), +(91, '1', 'Data from the Kaggle Amazon Employee Access Challenge:\nhttps://www.kaggle.com/c/amazon-employee-access-challenge\n\nWhen an employee at any company starts work, they first need to obtain the computer access necessary to fulfill their role. This access may allow an employee to read/manipulate resources through various applications or web portals. It is assumed that employees fulfilling the functions of a given role will access the same or similar resources. It is often the case that employees figure out the access they need as they encounter roadblocks during their daily work (e.g. not able to log into a reporting portal). A knowledgeable supervisor then takes time to manually grant the needed access in order to overcome access obstacles. As employees move throughout a company, this access discovery/recovery cycle wastes a nontrivial amount of time and money.\n\nThere is a considerable amount of data regarding an employee’s role within an organization and the resources to which they have access. Given the data related to current employees and their provisioned access, models can be built that automatically determine access privileges as employees enter and leave roles within a company. These auto-access models seek to minimize the human involvement required to grant or revoke employee access.\n\nThe original training and test set were merged.', 2), +(92, '1', '**Author**: Rami Mustafa A Mohammad ( University of Huddersfield\",\"rami.mohammad \'@\' hud.ac.uk\",\"rami.mustafa.a \'@\' gmail.com) Lee McCluskey (University of Huddersfield\",\"t.l.mccluskey \'@\' hud.ac.uk ) Fadi Thabtah (Canadian University of Dubai\",\"fadi \'@\' cud.ac.ae) \n**Source**: UCI \n**Please cite**: Please refer to the Machine Learning Repository\'s citation policy \n\nSource:\n\nRami Mustafa A Mohammad ( University of Huddersfield, rami.mohammad \'@\' hud.ac.uk, rami.mustafa.a \'@\' gmail.com)\nLee McCluskey (University of Huddersfield,t.l.mccluskey \'@\' hud.ac.uk )\n\nFadi Thabtah (Canadian University of Dubai,fadi \'@\' cud.ac.ae)\n\n\nData Set Information:\n\nOne of the challenges faced by our research was the unavailability of reliable training datasets. In fact this challenge faces any researcher in the field. However, although plenty of articles about predicting phishing websites have been disseminated these days, no reliable training dataset has been published publically, may be because there is no agreement in literature on the definitive features that characterize phishing webpages, hence it is difficult to shape a dataset that covers all possible features. \nIn this dataset, we shed light on the important features that have proved to be sound and effective in predicting phishing websites. In addition, we propose some new features.\n\n\nAttribute Information:\n\nFor Further information about the features see the features file in the data folder.\n\n\nRelevant Papers:\n\nMohammad, Rami, McCluskey, T.L. and Thabtah, Fadi (2012) An Assessment of Features Related to Phishing Websites using an Automated Technique. In: International Conferece For Internet Technology And Secured Transactions. ICITST 2012 . IEEE, London, UK, pp. 492-497. ISBN 978-1-4673-5325-0\n\nMohammad, Rami, Thabtah, Fadi Abdeljaber and McCluskey, T.L. (2014) Predicting phishing websites based on self-structuring neural network. Neural Computing and Applications, 25 (2). pp. 443-458. ISSN 0941-0643\n\nMohammad, Rami, McCluskey, T.L. and Thabtah, Fadi Abdeljaber (2014) Intelligent Rule based Phishing Websites Classification. IET Information Security, 8 (3). pp. 153-160. ISSN 1751-8709\n\n \n\nCitation Request:\n\nPlease refer to the Machine Learning Repository\'s citation policy', 874), +(93, '1', '**Author**: enata Cristina Barros Madeo (Madeo\",\"R. C. B.) Priscilla Koch Wagner (Wagner\",\"P. K.) Sarajane Marques Peres (Peres\",\"S. M.) {renata.si\",\"priscilla.wagner\",\"sarajane} at usp.br http://each.uspnet.usp.br/sarajane/ \n**Source**: UCI \n**Please cite**: Please refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers. \n\nSource:\n\nCreators: \nRenata Cristina Barros Madeo (Madeo, R. C. B.) \nPriscilla Koch Wagner (Wagner, P. K.) \nSarajane Marques Peres (Peres, S. M.) \n{renata.si, priscilla.wagner, sarajane} at usp.br \nhttp://each.uspnet.usp.br/sarajane/ \n\nDonor: \nUniversity of Sao Paulo - Brazil\n\n\nData Set Information:\n\nThe dataset is composed by features extracted from 7 videos with people gesticulating, aiming at studying Gesture Phase Segmentation. \nEach video is represented by two files: a raw file, which contains the position of hands, wrists, head and spine of the user in each frame; and a processed file, which contains velocity and acceleration of hands and wrists. See the data set description for more information on the dataset.\n\n\nAttribute Information:\n\nRaw files: 18 numeric attributes (double), a timestamp and a class attribute (nominal). \nProcessed files: 32 numeric attributes (double) and a class attribute (nominal). \nA feature vector with up to 50 numeric attributes can be generated with the two files mentioned above.\n\n\nRelevant Papers:\n\n1. Madeo, R. C. B. ; Lima, C. A. M. ; PERES, S. M. . Gesture Unit Segmentation using Support Vector Machines: Segmenting \nGestures from Rest Positions. In: Symposium on Applied Computing (SAC), 2013, Coimbra. Proceedings of the 28th Annual \nACM Symposium on Applied Computing (SAC), 2013. p. 46-52. \n* In this paper, the videos A1 and A2 were studied. \n\n2. Wagner, P. K. ; PERES, S. M. ; Madeo, R. C. B. ; Lima, C. A. M. ; Freitas, F. A. . Gesture Unit Segmentation Using \nSpatial-Temporal Information and Machine Learning. In: 27th Florida Artificial Intelligence Research Society Conference \n(FLAIRS), 2014, Pensacola Beach. Proceedings of the 27th Florida Artificial Intelligence Research Society Conference \n(FLAIRS). Palo Alto : The AAAI Press, 2014. p. 101-106. \n* In this paper, the videos A1, A2, A3, B1, B3, C1 and C3 were studied. \n\n3. Madeo, R. C. B.. Support Vector Machines and Gesture Analysis: incorporating temporal aspects (in Portuguese). Master \nThesis - Universidade de Sao Paulo, Sao Paulo Researcher Foundation. 2013. \n* In this document, the videos named B1 and B3 in the document correspond to videos C1 and C3 in this dataset. Only \nfive videos were explored in this document: A1, A2, A3, C1 and C3. \n\n4. Wagner, P. K. ; Madeo, R. C. B. ; PERES, S. M. ; Lima, C. A. M. . Segmentaçao de Unidades Gestuais com Multilayer \nPerceptrons (in Portuguese). In: Encontro Nacional de Inteligencia Artificial e Computacional (ENIAC), 2013, Fortaleza. \nAnais do X Encontro Nacional de Inteligencia Artificial e Computacional (ENIAC), 2013. \n* In this paper, the videos A1, A2 and A3 were studied.\n\n\n\nCitation Request:\n\nPlease refer to the Machine Learning Repository\'s citation policy. \nAdditionally, the authors require a citation to one or more publications from those cited as relevant papers.', 874), +(94, '1', '**Author**: lara Higuera Department of Software Engineering and Artificial Intelligence\",\"Faculty of Informatics and the Department of Biochemistry and Molecular Biology\",\"Faculty of Chemistry\",\"University Complutense\",\"Madrid\",\"Spain. Email: clarahiguera \'@\' ucm.es Katheleen J. Gardiner\",\"creator and owner of the protein expression data\",\"is currently with the Linda Crnic Institute for Down Syndrome\",\"Department of Pediatrics\",\"Department of Biochemistry and Molecular Genetics\",\"Human Medical Genetics and Genomics\",\"and Neuroscience Programs\",\"University of Colorado\",\"School of Medicine\",\"Aurora\",\"Colorado\",\"USA. Email: katheleen.gardiner \'@\' ucdenver.edu Krzysztof J. Cios is currently with the Department of Computer Science\",\"Virginia Commonwealth University\",\"Richmond\",\"Virginia\",\"USA\",\"and IITiS Polish Academy of Sciences\",\"Poland. Email: kcios \'@\' vcu.edu \n**Source**: UCI \n**Please cite**: Higuera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126 \n\nAbstract: Expression levels of 77 proteins measured in the cerebral cortex of 8 classes of control and Down syndrome mice exposed to context fear conditioning, a task used to assess associative learning.\nSource:\n\nClara Higuera Department of Software Engineering and Artificial Intelligence, Faculty of Informatics and the Department of Biochemistry and Molecular Biology, Faculty of Chemistry, University Complutense, Madrid, Spain. \nEmail: clarahiguera \'@\' ucm.es \n\nKatheleen J. Gardiner, creator and owner of the protein expression data, is currently with the Linda Crnic Institute for Down Syndrome, Department of Pediatrics, Department of Biochemistry and Molecular Genetics, Human Medical Genetics and Genomics, and Neuroscience Programs, University of Colorado, School of Medicine, Aurora, Colorado, USA. \nEmail: katheleen.gardiner \'@\' ucdenver.edu \n\nKrzysztof J. Cios is currently with the Department of Computer Science, Virginia Commonwealth University, Richmond, Virginia, USA, and IITiS Polish Academy of Sciences, Poland. \nEmail: kcios \'@\' vcu.edu \n\n\nData Set Information:\n\nThe data set consists of the expression levels of 77 proteins/protein modifications that produced detectable signals in the nuclear fraction of cortex. There are 38 control mice and 34 trisomic mice (Down syndrome), for a total of 72 mice. In the experiments, 15 measurements were registered of each protein per sample/mouse. Therefore, for control mice, there are 38x15, or 570 measurements, and for trisomic mice, there are 34x15, or 510 measurements. The dataset contains a total of 1080 measurements per protein. Each measurement can be considered as an independent sample/mouse. \n\nThe eight classes of mice are described based on features such as genotype, behavior and treatment. According to genotype, mice can be control or trisomic. According to behavior, some mice have been stimulated to learn (context-shock) and others have not (shock-context) and in order to assess the effect of the drug memantine in recovering the ability to learn in trisomic mice, some mice have been injected with the drug and others have not. \n\nClasses: \nc-CS-s: control mice, stimulated to learn, injected with saline (9 mice) \nc-CS-m: control mice, stimulated to learn, injected with memantine (10 mice) \nc-SC-s: control mice, not stimulated to learn, injected with saline (9 mice) \nc-SC-m: control mice, not stimulated to learn, injected with memantine (10 mice) \n\nt-CS-s: trisomy mice, stimulated to learn, injected with saline (7 mice) \nt-CS-m: trisomy mice, stimulated to learn, injected with memantine (9 mice) \nt-SC-s: trisomy mice, not stimulated to learn, injected with saline (9 mice) \nt-SC-m: trisomy mice, not stimulated to learn, injected with memantine (9 mice) \n\nThe aim is to identify subsets of proteins that are discriminant between the classes. \n\n\nAttribute Information:\n\n1 Mouse ID \n2..78 Values of expression levels of 77 proteins; the names of proteins are followed by “_n” indicating that they were measured in the nuclear fraction. For example: DYRK1A_n \n79 Genotype: control (c) or trisomy (t) \n80 Treatment type: memantine (m) or saline (s) \n81 Behavior: context-shock (CS) or shock-context (SC) \n82 Class: c-CS-s, c-CS-m, c-SC-s, c-SC-m, t-CS-s, t-CS-m, t-SC-s, t-SC-m \n\n\nRelevant Papers:\n\nThe posted data were analyzed by: \nHiguera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126 \n\nThe data are a subset of the data analyzed by: \nAhmed MM, Dhanasekaran AR, Block A, Tong S, Costa ACS, Stasko M, et al. (2015) Protein Dynamics Associated with Failed and Rescued Learning in the Ts65Dn Mouse Model of Down Syndrome. PLoS ONE 10(3): e0119491. [Web Link] \n\n\n\n\nCitation Request:\n\nHiguera C, Gardiner KJ, Cios KJ (2015) Self-Organizing Feature Maps Identify Proteins Critical to Learning in a Mouse Model of Down Syndrome. PLoS ONE 10(6): e0129126. [Web Link] journal.pone.0129126', 874), +(95, '1', '**Author**: Bob Evans, RR Donnelley & Sons Co. \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Cylinder+Bands) - August, 1995 \n**Please cite**: \n\n**Cylinder bands** \nProcess delays known as cylinder banding in rotogravure printing were substantially mitigated using control rules discovered by decision tree induction.\n \nAttribute Information:\n> \n 1. timestamp: numeric;19500101 - 21001231 \n 2. cylinder number: nominal \n 3. customer: nominal; \n 4. job number: nominal; \n 5. grain screened: nominal; yes, no \n 6. ink color: nominal; key, type \n 7. proof on ctd ink: nominal; yes, no \n 8. blade mfg: nominal; benton, daetwyler, uddeholm \n 9. cylinder division: nominal; gallatin, warsaw, mattoon \n 10. paper type: nominal; uncoated, coated, super \n 11. ink type: nominal; uncoated, coated, cover \n 12. direct steam: nominal; use; yes, no * \n 13. solvent type: nominal; xylol, lactol, naptha, line, other \n 14. type on cylinder: nominal; yes, no \n 15. press type: nominal; use; 70 wood hoe, 70 motter, 70 albert, 94 motter \n 16. press: nominal; 821, 802, 813, 824, 815, 816, 827, 828 \n 17. unit number: nominal; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 \n 18. cylinder size: nominal; catalog, spiegel, tabloid \n 19. paper mill location: nominal; north us, south us, canadian, \n scandanavian, mid european \n 20. plating tank: nominal; 1910, 1911, other \n 21. proof cut: numeric; 0-100 \n 22. viscosity: numeric; 0-100 \n 23. caliper: numeric; 0-1.0 \n 24. ink temperature: numeric; 5-30 \n 25. humifity: numeric; 5-120 \n 26. roughness: numeric; 0-2 \n 27. blade pressure: numeric; 10-75 \n 28. varnish pct: numeric; 0-100 \n 29. press speed: numeric; 0-4000 \n 30. ink pct: numeric; 0-100 \n 31. solvent pct: numeric; 0-100 \n 32. ESA Voltage: numeric; 0-16 \n 33. ESA Amperage: numeric; 0-10 \n 34. wax: numeric ; 0-4.0 \n 35. hardener: numeric; 0-3.0 \n 36. roller durometer: numeric; 15-120 \n 37. current density: numeric; 20-50 \n 38. anode space ratio: numeric; 70-130 \n 39. chrome content: numeric; 80-120 \n 40. band type: nominal; class; band, no band \n\nNotes: \n* cylinder number is an identifier and should be ignored when modelling the data', 2), +(96, '1', '**Author**: Dr. Fernando Camacho \n**Source**: Unknown - 1995 \n**Please cite**: Camacho, F. and Arron, G. (1995) Effects of the regulators paclobutrazol and flurprimidol on the growth of terminal sprouts formed on trimmed silver maple trees. Canadian Journal of Statistics 3(23).\n\nData on tree growth used in the Case Study published in the September, 1995 issue of the Canadian Journal of Statistics. This data set was been provided by Dr. Fernando Camacho, Ontario Hydro Technologies, 800 Kipling Ave, Toronto Canada M3Z 5S4. It forms the basis of the Case Study in Data Analysis published in the Canadian Journal of Statistics, September 1995. It can be freely used for noncommercial purposes, as long as proper acknowledgement to the source and to the Canadian Journal of Statistics is made.\n\n\nDescription\n\n\nThe effects of the Growth Regulators Paclobutrazol (PP 333)\nand Flurprimidol (EL-500) on the Number and Length of Internodes\nin Terminal Sprouts Formed on Trimmed Silver Maple Trees.\n \nIntroduction:\n \nThe trimming of trees under distribution lines on city streets and\nin rural areas is a major problem and expense for electrical\nutilities. Such operations are routinely performed at intervals of\none to eight years depending upon the individual species growth rate\nand the amount of clearance required. Ontario Hydro trims about\n500,000 trees per year at a cost of about $25 per tree.\n \nMuch effort has been spent in developing chemicals for the horticultural\nindustry to retard the growth of woody and herbaceous plants. Recently,\na group of new growth regulators was introduced which was shown to be\neffective in controlling the growth of trees without producing\nnoticeable injury symptoms. In this group are PP 333 ( common name\npaclobutrazol) (2RS, 3RS - 1 -(4-chlorophenyl) - 4,4 - dimethyl - 2 -\n(1,2,4-triazol-l-yl) pentan - 3- ol and EL-500 (common name flurprimidol\nand composition alpha - (1-methylethyl) - alpha - [4-(trifluromethoxyl)\nphenyl] - 5- pyrimidine - methanol). Both EL-500 and PP-333 have been\nreported to control excessive sprout growth in a number of species\nwhen applied as a foliar spray, as a soil drench, or by trunk injection.\nSprout length is a function of both the number of internodes and\nthe length of the individual internodes in the sprout. While there\nhave been many reports that both PP 333 and EL-500 cause a reduction\nin the length of internodes formed in sprouts on woody plants treated\nwith the growth regulators, there has been but one report that EL-500\napplication to apple trees resulted in a reduction of the number\nof internodes formed per sprout.\n \nThe purpose of the present study was to investigate the length of the\nterminal sprouts, the length of the individual internodes in those\nsprouts, and the number of internodes in trimmed silver maple trees\nfollowing trunk injection with the growth regulators PP 333 and EL-500.\n \nExperimental Details.\n \nMultistemmed 12-year-old silver maple trees growing at Wesleyville,\nOntario were trunk injected with methanolic solutions of EL-500\nand PP-333 in May of 1985 using a third generation Asplundh\ntree injector.\n \nTwo different application rates (20 g/L and 4 g/L) were used for each\nchemical. The volume of solution (and hence the amount of active\ningredient) injected into each tree was determined from the diameter\nof the tree, using the formula: vol(mL) = (dbh)*(dbh)*.492 where dbh\nis the diameter at breast height. Two sets of control trees were\nincluded in the experiment. In one set, tree received no injection\n(control) and in a second set, the trees were injected with\nmethanol, the carrier in the growth regulator solutions. Ten trees,\nchosen at random, were used in each of the control and experimental\nsets. Prior to injection, all the trees were trimmed by a forestry\ncrew, with their heights being reduced by about one third.\n \nIn January 1987, twenty months after the trees were injected, between\nsix and eight limbs were removed at random from the bottom two-thirds\nof the canopy of each of the ten trees in each experimental and control\nset. The limbs were returned to the laboratory and the length of all\nthe terminal sprouts, the lengths of the individual internodes, and\nthe number of internodes recorded. Between one and 25 terminal\nsprouts were found on each limb collected. Sprouts which had a\nlength of 1 cm or less were recorded as being 1 cm in length.\nIn such spouts, the internode lengths were not measured, but were\ncalculated from the total length of the sprout and the number\nof internodes counted. Internode lengths were then expressed to one\ndecimal place. In two instances, one of the ten trees in a set\ncould not be sampled because limb removal would have jeopardized the\nhealth of the tree over the long-term.\n \nData set:\n \nEach of the records represents a terminal sprout and contains the\nfollowing information:\n N the sprout number\n TR treatment 1 control\n 2 methanol control\n 3 PP 333 20g/L\n 4 PP 333 4g/L\n 5 EL 500 20g/L\n 6 EL 500 4g/L\n TREE tree id\n BR branch id\n TL total sprout length (cm)\n IN number of internodes on the sprout\n INTER a list of the lengths of the internodes in the sprout,\n starting from the base of the sprout (129 entries)\n \nSprouts 1868 to 1879 do not have branch identification data.', 2), +(97, '1', '**Author**: Muhammad Usman & Adeel Ahmed \r\n**Source**: origin source at [UCI](https://archive.ics.uci.edu/ml/datasets/Dresses_Attribute_Sales) \r\n**Please cite**: \r\n\r\n####1. Summary\r\n\r\nThis dataset contain attributes of dresses and their recommendations according to their sales.Sales are monitor on the basis of alternate days. \r\n\r\nThe attributes present analyzed are: Style, Price, Rating, Size, Season, NeckLine, SleeveLength, waiseline, Material, FabricType, Decoration, Pattern, Type, Recommendation.\r\n\r\nContact:\r\n```\r\nMuhammad Usman & Adeel Ahmed, usman.madspot \'@\' gmail.com adeel.ahmed92 \'@\' gmail.com, Air University, Students at Air University.\r\n```\r\n\r\n####2: Attribute Information:\r\n\r\n```\r\nStyle: Bohemia,brief,casual,cute,fashion,flare,novelty,OL,party,sexy,vintage,work. \r\nPrice:Low,Average,Medium,High,Very-High \r\nRating:1-5 \r\nSize:S,M,L,XL,Free \r\nSeason:Autumn,winter,Spring,Summer \r\nNeckLine:O-neck,backless,board-neck,Bowneck,halter,mandarin-collor,open,peterpan-collor,ruffled,scoop,slash-neck,square-collar,sweetheart,turndowncollar,V-neck. \r\nSleeveLength:full,half,halfsleeves,butterfly,sleveless,short,threequarter,turndown,null \r\nwaiseline:dropped,empire,natural,princess,null. \r\nMaterial:wool,cotton,mix etc \r\nFabricType:shafoon,dobby,popline,satin,knitted,jersey,flannel,corduroy etc \r\nDecoration:applique,beading,bow,button,cascading,crystal,draped,embroridary,feathers,flowers etc \r\nPattern type: solid,animal,dot,leapard etc \r\nRecommendation:0,1 \r\n```\r\n', 64), +(98, '1', '1. Title of Database: LED display domain\n\n2. Sources:\n (a) Breiman,L., Friedman,J.H., Olshen,R.A., & Stone,C.J. (1984). \n Classification and Regression Trees. Wadsworth International\n Group: Belmont, California. (see pages 43-49).\n (b) Donor: David Aha \n (c) Date: 11/10/1988\n\n3. Past Usage: (many)\n 1. CART book (above):\n -- Optimal Bayes classification rate: 74%\n -- CART decision tree algorithm: 71% (resubstitution estimate)\n -- Nearest Neighbor Algorithm: 71%\n -- 200 training and 5000 test instances\n \n 2. Quinlan,J.R. (1987). Simplifying Decision Trees. In International\n Journal of Man-Machine Studies (to appear).\n -- C4 decision tree algorithm: 72.6% (using pessimistic pruning)\n -- 2000 training and 500 test instances\n 3. Tan,M. & Eshelman,L. (1988). Using Weighted Networks to Represent\n Classification Knowledge in Noisy Domains. In Proceedings of the\n 5th International Conference on Machine Learning, 121-134, Ann\n Arbor, Michigan: Morgan Kaufmann. \n -- IWN system: 73.3% (using the And-OR classification algorithm)\n -- 400 training and 500 test cases\n\n4. Relevant Information Paragraph:\n This simple domain contains 7 Boolean attributes and 10 concepts,\n the set of decimal digits. Recall that LED displays contain 7\n light-emitting diodes -- hence the reason for 7 attributes. The\n problem would be easy if not for the introduction of noise. In\n this case, each attribute value has the 10% probability of having\n its value inverted. \n\n It\'s valuable to know the optimal Bayes rate for these databases.\n In this case, the misclassification rate is 26% (74% classification\n accuracy).\n \n5. Number of Instances: 500. But in the original URL you can find a C script and run it choosing the number of instances to be generated.\n\n6. Number of Attributes: 7 (all Boolean-valued)\n\n7. Attribute Information:\n -- All attribute values are either 0 or 1, according to whether\n the corresponding light is on or not for the decimal digit.\n -- Each attribute (excluding the class attribute, which is an\n integer ranging between 0 and 9 inclusive) has a 10% percent\n chance of being inverted.\n\n8. Missing Attribute Values: None\n\n9. Class Distribution: 10% (Theoretical)\n -- Each concept (digit) has the same theoretical probability\n distribution. The program randomly selects the attribute.', 64), +(99, '1', '**Author**: Laboratory of Image Processing and Pattern Recognition (INPG-LTIRF), Grenoble - France. \r\n**Source**: [original](https://www.elen.ucl.ac.be/neural-nets/Research/Projects/ELENA/databases/REAL/texture/) - ELENA project \r\n**Please cite**: \r\n\r\n####1. Summary\r\n\r\nThis database was generated by the Laboratory of Image Processing and Pattern Recognition (INPG-LTIRF) in the development of the Esprit project ELENA No. 6891 and the Esprit working group ATHOS No. 6620.\r\n```\r\n (a) Original source:\r\n\r\n P. Brodatz \"Textures: A Photographic Album for Artists and Designers\",\r\n Dover Publications,Inc.,New York, 1966.\r\n\r\n (b) Creation: Laboratory of Image Processing and Pattern Recognition\r\n\r\n Institut National Polytechnique de Grenoble INPG\r\n Laboratoire de Traitement d\'Image et de Reconnaissance de Formes LTIRF\r\n Av. Felix Viallet, 46\r\n F-38031 Grenoble Cedex\r\n France\r\n\r\n (c) Contact: Dr. A. Guerin-Dugue, INPG-LTIRF, guerin@tirf.inpg.fr\r\n```\r\n\r\n####2. Past Usage:\r\n\r\nThis database has a private usage at the TIRF laboratory. It has been created in order to study the textures discrimination with high order statistics.\r\n\r\n```\r\nA.Guerin-Dugue, C. Aviles-Cruz, \"High Order Statistics from Natural Textured Images\",\r\nIn ATHOS workshop on System Identification and High Order Statistics, Sophia-Antipolis, France, September 1993.\r\n\r\nGuerin-Dugue, A. and others, Deliverable R3-B4-P - Task B4: Benchmarks, Technical report,\r\nElena-NervesII \"Enhanced Learning for Evolutive Neural Architecture\", ESPRIT-Basic Research Project Number 6891,\r\nJune 1995.\r\n```\r\n\r\n####3. Relevant Information:\r\n\r\nThe aim is to distinguish between 11 different textures (Grass lawn, Pressed calf leather, Handmade paper, Raffia looped to a high pile, Cotton canvas, ...), each pattern (pixel) being characterised by 40 attributes built by the estimation of fourth order modified moments in four orientations: 0, 45, 90 and 135 degrees.\r\n\r\nA statistical method based on the extraction of fourth order moments for the characterization of natural micro-textures was developed called \"fourth order modified moments\" (mm4) [Guerin93], this method measures the deviation from first-order Gauss-Markov process, for each texture. The features were estimated in four directions to take into account the possible orientations of the textures (0, 45, 90 and 135 degrees). Only correlation between the current pixel, the first neighbourhood and the second neighbourhood are taken into account. This small neighbourhood is adapted to the fine grain property of the textures.\r\n\r\nThe data set contains 11 classes of 500 instances and each class refers to a type of texture in the Brodatz album.\r\n\r\nThe database dimension is 40 plus one for the class label. The 40 attributes were build respectively by the estimation of the following fourth order modified moments in four orientations: 0, 45, 90 and 135 degrees: mm4(000), mm4(001), mm4(002), mm4(011), mm4(012), mm4(022), mm4(111), mm4(112), mm4(122) and mm4(222).\r\n\r\n!! Patterns are always sorted by class and are presented in the increasing order of their class label in each dataset relative to the texture database (texture.dat, texture_CR.dat, texture_PCA.dat, texture_DFA.dat)\r\n\r\n####4. Class:\r\n\r\nThe class label is a code for the following classes:\r\n```\r\n Class Class label\r\n 2 Grass lawn (D09) \r\n 3 Pressed calf leather (D24) \r\n 4 Handmade paper (D57) \r\n 6 Raffia looped to a high pile: (D84) \r\n 7 Cotton canvas (D77) \r\n 8 Pigskin (D92) \r\n 9 Beach sand: (D28) \r\n 10 Beach sand (D29) \r\n 12 Oriental straw cloth (D53) \r\n 13 Oriental straw cloth (D78) \r\n 14 Oriental grass fiber cloth (D79) \r\n```\r\n\r\n####5. Summary Statistics:\r\n\r\nTable here below provides for each attribute of the database the dynamic (Min and Max values), the mean value and the standard deviation.\r\n\r\n```\r\nAttribute Min Max Mean Standard \r\n deviation \r\n\r\n 1 -1.4495 0.7741 -1.0983 0.2034\r\n 2 -1.2004 0.3297 -0.5867 0.2055\r\n 3 -1.3099 0.3441 -0.5838 0.3135\r\n 4 -1.1104 0.5878 -0.4046 0.2302\r\n 5 -1.0534 0.4387 -0.3307 0.2360\r\n 6 -1.0029 0.4515 -0.2422 0.2225\r\n 7 -1.2076 0.5246 -0.6026 0.2003\r\n 8 -1.0799 0.3980 -0.4322 0.2210\r\n 9 -1.0570 0.4369 -0.3317 0.2361\r\n 10 -1.2580 0.3546 -0.5978 0.3268\r\n 11 -1.4495 0.7741 -1.0983 0.2034\r\n 12 -1.0831 0.3715 -0.5929 0.2056\r\n 13 -1.1194 0.6347 -0.4019 0.3368\r\n 14 -1.0182 0.1573 -0.6270 0.1390\r\n 15 -0.9435 0.1642 -0.4482 0.1952\r\n 16 -0.9944 0.0357 -0.5763 0.1587\r\n 17 -1.1722 0.0201 -0.7331 0.1955\r\n 18 -1.0174 0.1155 -0.4919 0.2335\r\n 19 -1.0044 0.0833 -0.4727 0.2257\r\n 20 -1.1800 0.4392 -0.4831 0.3484\r\n 21 -1.4495 0.7741 -1.0983 0.2034\r\n 22 -1.2275 0.5963 -0.7363 0.2220\r\n 23 -1.3412 0.4464 -0.7771 0.3290\r\n 24 -1.1774 0.6882 -0.5770 0.2646\r\n 25 -1.1369 0.4098 -0.5085 0.2538\r\n 26 -1.1099 0.3725 -0.4038 0.2515\r\n 27 -1.2393 0.6120 -0.7279 0.2278\r\n 28 -1.1540 0.4221 -0.5863 0.2446\r\n 29 -1.1323 0.3916 -0.5090 0.2526\r\n 30 -1.4224 0.4718 -0.7708 0.3264\r\n 31 -1.4495 0.7741 -1.0983 0.2034\r\n 32 -1.1789 0.5647 -0.6463 0.1890\r\n 33 -1.1473 0.6755 -0.4919 0.3304\r\n 34 -1.1228 0.3132 -0.6435 0.1441\r\n 35 -1.0145 0.3396 -0.4918 0.1922\r\n 36 -1.0298 0.1560 -0.5934 0.1704\r\n 37 -1.2534 0.0899 -0.7795 0.1641\r\n 38 -1.0966 0.1944 -0.5541 0.2111\r\n 39 -1.0765 0.2019 -0.5230 0.2015\r\n 40 -1.2155 0.4647 -0.5677 0.3091\r\n```\r\n\r\nThe dynamic of the attributes is in [-1.45 - 0.775]. The database resulting from the centering and reduction by attribute of the Texture database is on the ftp server in the `REAL/texture/texture_CR.dat.Z\' file.\r\n\r\n####6. Confusion matrix.\r\n\r\nThe following confusion matrix of the k_NN classifier was obtained with a Leave_One_Out error counting method on the texture_CR.dat database. k was set to 1 in order to reach the minimum mean error rate : 1.0 +/- 0.8%.\r\n\r\n```\r\n Class 2 3 4 6 7 8 9 10 12 13 14 \r\n 2 97.0 1.0 0.4 0.0 0.0 0.0 1.6 0.0 0.0 0.0 0.0 \r\n 3 0.2 99.0 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.0 0.4 \r\n 4 1.0 0.0 98.8 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.0 \r\n 6 0.0 0.0 0.0 99.4 0.0 0.0 0.0 0.6 0.0 0.0 0.0 \r\n 7 0.0 0.0 0.0 0.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 \r\n 8 0.0 0.0 0.0 0.0 0.0 98.6 0.0 1.4 0.0 0.0 0.0 \r\n 9 0.4 0.0 0.2 0.0 0.0 0.2 98.8 0.4 0.0 0.0 0.0 \r\n 10 0.0 0.0 0.0 0.0 0.0 1.4 0.0 98.6 0.0 0.0 0.0 \r\n 12 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100.0 0.0 0.0 \r\n 13 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.8 0.2 \r\n 14 0.0 0.4 0.0 0.0 0.0 0.4 0.0 0.0 0.2 0.0 99.0 \r\n```\r\n\r\n7. Result of the Principal Component Analysis:\r\n\r\nThe Principal Components Analysis is a very classical method in pattern recognition [Duda73]. PCA reduces the sample dimension in a linear way for the best representation in lower dimensions keeping the maximum of inertia. The best axe for the representation is however not necessary the best axe for the discrimination. After PCA, features are selected according to the percentage of initial inertia which is covered by the different axes and the number of features is determined according to the percentage of initial inertia to keep for the classification process.\r\n\r\nThis selection method has been applied on the texture_CR database. When quasi-linear correlations exists between some initial features, these redundant dimensions are removed by PCA and this preprocessing is then recommended. In this case, before a PCA, the determinant of the data covariance matrix is near zero; this database is thus badly conditioned for all process which use this information (the quadratic classifier for example).\r\n\r\nThe following file is available for the texture database: \'\'texture_PCA.dat.Z\'\', it is the projection of the \'\'texture_CR\'\' database on its principal components (sorted in a decreasing order of the related inertia percentage; so, if you desire to work on the database projected on its x first principal components you only have to keep the x first attributes of the texture_PCA.dat database and the class labels (last attribute)).\r\n\r\nTable here below provides the inertia percentages associated to the eigenvalues corresponding to the principal component axis sorted in the decreasing order of the associated inertia percentage. 99.85 percent of the total database inertia will remain if the 20 first principal components are kept.\r\n\r\n```\r\n Eigen Value Inertia Cumulated\r\n value percentage inertia\r\n\r\n 1 30.267500000 75.6687000000 75.6687000000 \r\n 2 3.6512500000 9.1281300000 84.7969000000 \r\n 3 2.2937000000 5.7342400000 90.5311000000 \r\n 4 1.7039700000 4.2599300000 94.7910000000 \r\n 5 0.6716540000 1.6791300000 96.4702000000 \r\n 6 0.5015290000 1.2538200000 97.7240000000 \r\n 7 0.1922830000 0.4807070000 98.2047000000 \r\n 8 0.1561070000 0.3902670000 98.5950000000 \r\n 9 0.1099570000 0.2748920000 98.8699000000 \r\n 10 0.0890891000 0.2227230000 99.0926000000 \r\n 11 0.0656016000 0.1640040000 99.2566000000 \r\n 12 0.0489988000 0.1224970000 99.3791000000 \r\n 13 0.0433819000 0.1084550000 99.4875000000 \r\n 14 0.0345022000 0.0862554000 99.5738000000 \r\n 15 0.0299203000 0.0748007000 99.6486000000 \r\n 16 0.0248857000 0.0622141000 99.7108000000 \r\n 17 0.0167901000 0.0419752000 99.7528000000 \r\n 18 0.0161633000 0.0404083000 99.7932000000 \r\n 19 0.0128898000 0.0322246000 99.8254000000 \r\n 20 0.0113884000 0.0284710000 99.8539000000 \r\n 21 0.0078481400 0.0196204000 99.8735000000 \r\n 22 0.0071527800 0.0178820000 99.8914000000 \r\n 23 0.0067661400 0.0169153000 99.9083000000 \r\n 24 0.0053149500 0.0132874000 99.9216000000 \r\n 25 0.0051102600 0.0127757000 99.9344000000 \r\n 26 0.0047116600 0.0117792000 99.9461000000 \r\n 27 0.0036193700 0.0090484300 99.9552000000 \r\n 28 0.0033222000 0.0083054900 99.9635000000 \r\n 29 0.0030722400 0.0076806100 99.9712000000 \r\n 30 0.0026373300 0.0065933300 99.9778000000 \r\n 31 0.0020996800 0.0052492000 99.9830000000 \r\n 32 0.0019376500 0.0048441200 99.9879000000 \r\n 33 0.0015642300 0.0039105700 99.9918000000 \r\n 34 0.0009679080 0.0024197700 99.9942000000 \r\n 35 0.0009578000 0.0023945000 99.9966000000 \r\n 36 0.0007379780 0.0018449400 99.9984000000 \r\n 37 0.0006280250 0.0015700600 100.000000000\r\n 38 0.0000000040 0.0000000099 100.000000000 \r\n 39 0.0000000001 0.0000000003 100.000000000 \r\n 40 0.0000000008 0.0000000019 100.000000000 \r\n\r\n```\r\n\r\nThis matrix can be found in the texture_EV.dat file.\r\n\r\nThe Discriminant Factorial Analysis (DFA) can be applied to a learning database where each learning sample belongs to a particular class [Duda73]. The number of discriminant features selected by DFA is fixed in function of the number of classes (c) and of the number of input dimensions (d); this number is equal to the minimum between d and c-1. In the usual case where d is greater than c, the output dimension is fixed equal to the number of classes minus one and the discriminant axes are selected in order to maximize the between-variance and to minimize the within-variance of the classes.\r\n\r\nThe discrimination power (ratio of the projected between-variance over the projected within-variance) is not the same for each discriminant axis: this ratio decreases for each axis. So for a problem with many classes, this preprocessing will not be always efficient as the last output features will not be so discriminant. This analysis uses the information of the inverse of the global covariance matrix, so the covariance matrix must be well conditioned (for example, a preliminary PCA must be applied to remove the linearly correlated dimensions).\r\n\r\nThe Discriminant Factorial Analysis (DFA) has been applied on the 18 first principal components of the texture_PCA database (thus by keeping only the 18 first attributes of these databases before to apply the DFA preprocessing) in order to build the texture_DFA.dat.Z database file, having 10 dimensions (the texture database having 11 classes). In the case of the texture database, experiments shown that a DFA preprocessing is very useful and most of the time improved the classifiers performances.\r\n\r\n[Duda73] Duda, R.O. and Hart, P.E.,Pattern Classification and Scene Analysis, John Wiley & Sons, 1973.\r\n', 64), +(100, '1', '**Author**: Confidential. Donated by Ross Quinlan \r\n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Statlog+(Australian+Credit+Approval))/LibSVM - 2014-11-14 \r\n**Please cite**: \r\n\r\nThis is the famous Australian dataset, retrieved 2014-11-14 from the libSVM site.\r\nIt was normalized.\r\n\r\nThe original version is from [UCI](https://archive.ics.uci.edu/ml/datasets/Statlog+(Australian+Credit+Approval)).\r\n\r\nThis file concerns credit card applications. All attribute names and values have been changed to meaningless symbols to protect confidentiality of the data. \r\n\r\nThis dataset is interesting because there is a good mix of attributes -- continuous, nominal with small numbers of values, and nominal with larger numbers of values. There are also a few missing values. \r\n\r\n\r\nSource: Statlog / Australian\r\n# of classes: 2\r\n# of data: 690\r\n# of features: 14', 2), +(101, '1', '**Author**: Terran Lane (terran@ecn.purdue.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/UNIX+User+Data) - Date unknown \n**Please cite**: \n\nThis file contains 9 sets of sanitized user data drawn from the command histories of 8 UNIX computer users at Purdue over the course of up to 2 years (USER0 and USER1 were generated by the same person, working on different platforms and different projects). The data is drawn from tcsh(1) history files and has been parsed and sanitized to remove filenames, user names, directory structures, web addresses, host names, and other possibly identifying items. Command names, flags, and shell metacharacters have been preserved. Additionally, **SOF** and **EOF** tokens have been inserted at the start and end of\nshell sessions, respectively. Sessions are concatenated by date order and tokens appear in the order issued within the shell session, but no timestamps are included in this data. For example, the two sessions:\n\ncd ~/private/docs \nls -laF | more \ncat foo.txt bar.txt zorch.txt > somewhere \nexit \n\ncd ~/games/ \nxquake & \nfg \nvi scores.txt \nmailx john_doe@somewhere.com \nexit \n\nwould be represented by the token stream \n\n**SOF** \ncd \n\\<1\\> (one \"file name\" argument) \nls \n-laF \n| \nmore \ncat \n\\<3\\> (three \"file\" arguments)\n\\> \n\\<1\\> \nexit \n**EOF** \n**SOF** \ncd \n\\<1\\> \nxquake \n& \nfg \nvi \n\\<1\\> \nmailx \n\\<1\\> \nexit \n**EOF**\n\nThis data is made available under conditions of anonymity for the contributing users and may be used for research purposes only. Summaries and research results employing this data may be published, but literal tokens or token sequences from the data may not be published except with express consent of the originators of the data. No portion of this data may be released with or included in a commercial product, nor may any portion of this data be sold or redistributed for profit or as part of of a profit-making endeavor.', 2), +(102, '1', '**Author**: Tin Kam Ho and Eugene M. Kleinberg. \nlibSVM\",\"AAD group \n**Source**: [original](http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html) - Date unknown \n**Please cite**: \n\n#Dataset from the LIBSVM data repository.\n\nPreprocessing: transform to two-class', 402), +(103, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis is data set is concerned with the forward kinematics of an 8 link\n robot arm. Among the existing variants of this data set we have used\n the variant 8nm, which is known to be highly non-linear and medium\n noisy.\n\n Original source: DELVE repository of data. \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 8192 cases, 9 attributes (0 nominal, 9 continuous).', 1), +(104, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 1), +(105, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n1. Title: Wisconsin Prognostic Breast Cancer (WPBC)\n \n 2. Source Information\n \n a) Creators: \n \n Dr. William H. Wolberg, General Surgery Dept., University of\n Wisconsin, Clinical Sciences Center, Madison, WI 53792\n wolberg@eagle.surgery.wisc.edu\n \n W. Nick Street, Computer Sciences Dept., University of\n Wisconsin, 1210 West Dayton St., Madison, WI 53706\n street@cs.wisc.edu 608-262-6619\n \n Olvi L. Mangasarian, Computer Sciences Dept., University of\n Wisconsin, 1210 West Dayton St., Madison, WI 53706\n olvi@cs.wisc.edu \n \n b) Donor: Nick Street\n \n c) Date: December 1995\n \n 3. Past Usage:\n \n Various versions of this data have been used in the following\n publications: \n \n (i) W. N. Street, O. L. Mangasarian, and W.H. Wolberg. \n An inductive learning approach to prognostic prediction. \n In A. Prieditis and S. Russell, editors, Proceedings of the\n Twelfth International Conference on Machine Learning, pages\n 522--530, San Francisco, 1995. Morgan Kaufmann.\n \n (ii) O.L. Mangasarian, W.N. Street and W.H. Wolberg. \n Breast cancer diagnosis and prognosis via linear programming. \n Operations Research, 43(4), pages 570-577, July-August 1995. \n \n (iii) W.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. \n Computerized breast cancer diagnosis and prognosis from fine\n needle aspirates. Archives of Surgery 1995;130:511-516. \n \n (iv) W.H. Wolberg, W.N. Street, and O.L. Mangasarian. \n Image analysis and machine learning applied to breast cancer\n diagnosis and prognosis. Analytical and Quantitative Cytology\n and Histology, Vol. 17 No. 2, pages 77-87, April 1995.\n \n (v) W.H. Wolberg, W.N. Street, D.M. Heisey, and O.L. Mangasarian. \n Computer-derived nuclear ``grade\'\' and breast cancer prognosis. \n Analytical and Quantitative Cytology and Histology, Vol. 17,\n pages 257-264, 1995. \n \n See also:\n http://www.cs.wisc.edu/~olvi/uwmp/mpml.html\n http://www.cs.wisc.edu/~olvi/uwmp/cancer.html\n \n Results:\n \n Two possible learning problems:\n \n 1) Predicting field 2, outcome: R = recurrent, N = nonrecurrent\n - Dataset should first be filtered to reflect a particular\n endpoint; e.g., recurrences before 24 months = positive,\n nonrecurrence beyond 24 months = negative.\n - 86.3% accuracy estimated accuracy on 2-year recurrence using\n previous version of this data. Learning method: MSM-T (see\n below) in the 4-dimensional space of Mean Texture, Worst Area,\n Worst Concavity, Worst Fractal Dimension.\n \n 2) Predicting Time To Recur (field 3 in recurrent records)\n - Estimated mean error 13.9 months using Recurrence Surface\n Approximation. (See references (i) and (ii) above)\n \n 4. Relevant information\n \n Each record represents follow-up data for one breast cancer\n case. These are consecutive patients seen by Dr. Wolberg\n since 1984, and include only those cases exhibiting invasive\n breast cancer and no evidence of distant metastases at the\n time of diagnosis. \n \n The first 30 features are computed from a digitized image of a\n fine needle aspirate (FNA) of a breast mass. They describe\n characteristics of the cell nuclei present in the image.\n A few of the images can be found at\n http://www.cs.wisc.edu/~street/images/\n \n The separation described above was obtained using\n Multisurface Method-Tree (MSM-T) [K. P. Bennett, \"Decision Tree\n Construction Via Linear Programming.\" Proceedings of the 4th\n Midwest Artificial Intelligence and Cognitive Science Society,\n pp. 97-101, 1992], a classification method which uses linear\n programming to construct a decision tree. Relevant features\n were selected using an exhaustive search in the space of 1-4\n features and 1-3 separating planes.\n \n The actual linear program used to obtain the separating plane\n in the 3-dimensional space is that described in:\n [K. P. Bennett and O. L. Mangasarian: \"Robust Linear\n Programming Discrimination of Two Linearly Inseparable Sets\",\n Optimization Methods and Software 1, 1992, 23-34].\n \n The Recurrence Surface Approximation (RSA) method is a linear\n programming model which predicts Time To Recur using both\n recurrent and nonrecurrent cases. See references (i) and (ii)\n above for details of the RSA method. \n \n This database is also available through the UW CS ftp server:\n \n ftp ftp.cs.wisc.edu\n cd math-prog/cpo-dataset/machine-learn/WPBC/\n \n 5. Number of instances: 198\n \n 6. Number of attributes: 34 (ID, outcome, 32 real-valued input features)\n \n 7. Attribute information\n \n 1) ID number\n 2) Outcome (R = recur, N = nonrecur)\n 3) Time (recurrence time if field 2 = R, disease-free time if \n field 2 = N)\n 4-33) Ten real-valued features are computed for each cell nucleus:\n \n a) radius (mean of distances from center to points on the perimeter)\n b) texture (standard deviation of gray-scale values)\n c) perimeter\n d) area\n e) smoothness (local variation in radius lengths)\n f) compactness (perimeter^2 / area - 1.0)\n g) concavity (severity of concave portions of the contour)\n h) concave points (number of concave portions of the contour)\n i) symmetry \n j) fractal dimension (\"coastline approximation\" - 1)\n \n Several of the papers listed above contain detailed descriptions of\n how these features are computed. \n \n The mean, standard error, and \"worst\" or largest (mean of the three\n largest values) of these features were computed for each image,\n resulting in 30 features. For instance, field 4 is Mean Radius, field\n 14 is Radius SE, field 24 is Worst Radius.\n \n Values for features 4-33 are recoded with four significant digits.\n \n 34) Tumor size - diameter of the excised tumor in centimeters\n 35) Lymph node status - number of positive axillary lymph nodes\n observed at time of surgery\n \n 8. Missing attribute values: \n Lymph node status is missing in 4 cases.\n \n 9. Class distribution: 151 nonrecur, 47 recur\n\n-----------------------------------------------------------------------------------------------------------\n Luis Torgo\'s version: (reconstructed)\n - removed the four instances with unknown values of the last attribute\n - exchanged the attribute position of attributes n.3 (Time) and n.35\n (Lymph node).\n - removed the attribute outcome as it is the class attribute if the\n problem is treated as a classification one\n-----------------------------------------------------------------------------------------------------------', 1), +(106, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 1), +(107, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n \n SUMMARY:\n \n Data from an experiment on the affects of machine adjustments on\n the time to count bolts. Data appear as the STATS (Issue 10) Challenge.\n \n DATA:\n \n Submitted by W. Robert Stephenson, Iowa State University\n email: wrstephe@iastate.edu\n \n A manufacturer of automotive accessories provides hardware, e.g. nuts,\n bolts, washers and screws, to fasten the accessory to the car or truck.\n Hardware is counted and packaged automatically. Specifically, bolts\n are dumped into a large metal dish. A plate that forms the bottom of\n the dish rotates counterclockwise. This rotation forces bolts to the\n outside of the dish and up along a narrow ledge. Due to the vibration\n of the dish caused by the spinning bottom plate, some bolts fall off \n the ledge and back into the dish. The ledge spirals up to a point \n where the bolts are allowed to drop into a pan on a conveyor belt. \n As a bolt drops, it passes by an electronic eye that counts it. When \n the electronic counter reaches the preset number of bolts, the\n rotation is stopped and the conveyor belt is moved forward. \n \n There are several adjustments on the machine that affect its operation. \n These include; a speed setting that controls the speed of rotation\n (SPEED1) of the plate at the bottom of the dish, a total number of \n bolts (TOTAL) to be counted, a second speed setting (SPEED2) that is \n used to change the speed of rotation (usually slowing it down) for the\n last few bolts, the number of bolts to be counted at this second speed\n (NUMBER2), and the sensitivity of the electronic eye (SENS). The \n sensitivity setting is to insure that the correct number of bolts are \n counted. Too few bolts packaged causes customer complaints. Too many\n bolts packaged increases costs. For each run conducted in this \n experiment the correct number of bolts was counted. From an\n engineering standpoint if the correct number of bolts is counted, the \n sensitivity should not affect the time to count bolts. The measured \n response is the time (TIME), in seconds, it takes to count the desired\n number of bolts. In order to put times on a equal footing the\n response to be analyzed is the time to count 20 bolts (T20BOLT).\n Below are the data for 40 combinations of settings. RUN is the order \n in which the data were collected.\n \n Analyze the data. What adjustments have the greatest effect on the \n time to count 20 bolts? How would you adjust the machine to get\n the shortest time to count 20 bolts? Are there any unusual features\n to the data?\n \n The data description and data may be freely used for non-commercial\n purposes and can be freely distributed. Copyright remains with the\n author and STATS Magazine.', 1), +(108, '1', '**Author**: Andras Janosi, M.D. \nDonor: David W. Aha (aha@ics.uci.edu) \n**Source**: [UCI](https://archive.ics.uci.edu/ml/datasets/Heart+Disease) - July 1988 \n**Please cite**: The author request that any publications resulting from the use of the data include the name of the author.\n\n**Heart Disease Databases: Cleveland** \nThis database contains 76 attributes, but all published experiments refer to using a subset of 14 of them. In particular, the Cleveland database is the only one that has been used by ML researchers to this date. The \"goal\" field refers to the presence of heart disease in the patient. It is integer valued from 0 (no presence) to 4. Experiments with the Cleveland database have concentrated on simply attempting to distinguish presence (values 1,2,3,4) from absence (value 0). \n \nThe names and social security numbers of the patients were recently removed from the database, replaced with dummy values.\nOne file has been \"processed\", that one containing the Cleveland database. \n \nAttribute documentation: \n>\n 1 id: patient identification number\n 2 ccf: social security number (I replaced this with a dummy value of 0)\n 3 age: age in years\n 4 sex: sex (1 = male; 0 = female)\n 5 painloc: chest pain location (1 = substernal; 0 = otherwise)\n 6 painexer (1 = provoked by exertion; 0 = otherwise)\n 7 relrest (1 = relieved after rest; 0 = otherwise)\n 8 pncaden (sum of 5, 6, and 7)\n 9 cp: chest pain type\n -- Value 1: typical angina\n -- Value 2: atypical angina\n -- Value 3: non-anginal pain\n -- Value 4: asymptomatic\n 10 trestbps: resting blood pressure (in mm Hg on admission to the \n hospital)\n 11 htn\n 12 chol: serum cholestoral in mg/dl\n 13 smoke: I believe this is 1 = yes; 0 = no (is or is not a smoker)\n 14 cigs (cigarettes per day)\n 15 years (number of years as a smoker)\n 16 fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)\n 17 dm (1 = history of diabetes; 0 = no such history)\n 18 famhist: family history of coronary artery disease (1 = yes; 0 = no)\n 19 restecg: resting electrocardiographic results\n -- Value 0: normal\n -- Value 1: having ST-T wave abnormality (T wave inversions and/or ST \n elevation or depression of > 0.05 mV)\n -- Value 2: showing probable or definite left ventricular hypertrophy\n by Estes\' criteria\n 20 ekgmo (month of exercise ECG reading)\n 21 ekgday(day of exercise ECG reading)\n 22 ekgyr (year of exercise ECG reading)\n 23 dig (digitalis used furing exercise ECG: 1 = yes; 0 = no)\n 24 prop (Beta blocker used during exercise ECG: 1 = yes; 0 = no)\n 25 nitr (nitrates used during exercise ECG: 1 = yes; 0 = no)\n 26 pro (calcium channel blocker used during exercise ECG: 1 = yes; 0 = no)\n 27 diuretic (diuretic used used during exercise ECG: 1 = yes; 0 = no)\n 28 proto: exercise protocol\n 1 = Bruce \n 2 = Kottus\n 3 = McHenry\n 4 = fast Balke\n 5 = Balke\n 6 = Noughton \n 7 = bike 150 kpa min/min (Not sure if \"kpa min/min\" is what was \n written!)\n 8 = bike 125 kpa min/min \n 9 = bike 100 kpa min/min\n 10 = bike 75 kpa min/min\n 11 = bike 50 kpa min/min\n 12 = arm ergometer\n 29 thaldur: duration of exercise test in minutes\n 30 thaltime: time when ST measure depression was noted\n 31 met: mets achieved\n 32 thalach: maximum heart rate achieved\n 33 thalrest: resting heart rate\n 34 tpeakbps: peak exercise blood pressure (first of 2 parts)\n 35 tpeakbpd: peak exercise blood pressure (second of 2 parts)\n 36 dummy\n 37 trestbpd: resting blood pressure\n 38 exang: exercise induced angina (1 = yes; 0 = no)\n 39 xhypo: (1 = yes; 0 = no)\n 40 oldpeak = ST depression induced by exercise relative to rest\n 41 slope: the slope of the peak exercise ST segment\n -- Value 1: upsloping\n -- Value 2: flat\n -- Value 3: downsloping\n 42 rldv5: height at rest\n 43 rldv5e: height at peak exercise\n 44 ca: number of major vessels (0-3) colored by flourosopy\n 45 restckm: irrelevant\n 46 exerckm: irrelevant\n 47 restef: rest raidonuclid (sp?) ejection fraction\n 48 restwm: rest wall (sp?) motion abnormality\n 0 = none\n 1 = mild or moderate\n 2 = moderate or severe\n 3 = akinesis or dyskmem (sp?)\n 49 exeref: exercise radinalid (sp?) ejection fraction\n 50 exerwm: exercise wall (sp?) motion \n 51 thal: 3 = normal; 6 = fixed defect; 7 = reversable defect\n 52 thalsev: not used\n 53 thalpul: not used\n 54 earlobe: not used\n 55 cmo: month of cardiac cath (sp?) (perhaps \"call\")\n 56 cday: day of cardiac cath (sp?)\n 57 cyr: year of cardiac cath (sp?)\n 58 num: diagnosis of heart disease (angiographic disease status)\n -- Value 0: < 50% diameter narrowing\n -- Value 1: > 50% diameter narrowing\n (in any major vessel: attributes 59 through 68 are vessels)\n 59 lmt\n 60 ladprox\n 61 laddist\n 62 diag\n 63 cxmain\n 64 ramus\n 65 om1\n 66 om2\n 67 rcaprox\n 68 rcadist\n 69 lvx1: not used\n 70 lvx2: not used\n 71 lvx3: not used\n 72 lvx4: not used\n 73 lvf: not used\n 74 cathef: not used\n 75 junk: not used\n 76 name: last name of patient \n (I replaced this with the dummy string \"name\")', 1), +(109, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis data set consists of three types of entities:\n (a) the specification of an auto in terms of various characteristics;\n (b) its assigned insurance risk rating,;\n (c) its normalized losses in use as compared to other cars. \n The second rating corresponds to the degree to which the auto is more risky than its price indicates. Cars are initially\n assigned a risk factor symbol associated with its price. Then, if it is more risky (or less), this symbol is adjusted by\n moving it up (or down) the scale. Actuarians call this process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.The third factor is the relative average loss payment per insured vehicle year.\n This value is normalized for all autos within a particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car per year.\n - Note: Several of the attributes in the database could be used as a \"class\" attribute.\n The original data (from the UCI repository) (http://www.ics.uci.edu/~mlearn/MLSummary.html) has 205 instances\n described by 26 attributes :\n - 15 continuous\n - 1 integer\n - 10 nominal\n The following provides more information on these attributes:\n \n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback,convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n The original data also has some missing attribute values denoted by \"?\" : \n \n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4\n \n I\'ve changed the original data in the following way :\n - All instances with unknowns were removed giving 159 instances.\n - The goal variable is \"price\"\n - All nominal attributes (10) were removed.\n \n Original source: UCI machine learning repository. (http://www.ics.uci.edu/~mlearn/MLSummary.html). \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 159 cases; 14 continuous variables; 1 nominal vars..', 1), +(110, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identifier attribute deleted.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n 1. Title: Auto-Mpg Data\n \n 2. Sources:\n (a) Origin: This dataset was taken from the StatLib library which is\n maintained at Carnegie Mellon University. The dataset was \n used in the 1983 American Statistical Association Exposition.\n (c) Date: July 7, 1993\n \n 3. Past Usage:\n - See 2b (above)\n - Quinlan,R. (1993). Combining Instance-Based and Model-Based Learning.\n In Proceedings on the Tenth International Conference of Machine \n Learning, 236-243, University of Massachusetts, Amherst. Morgan\n Kaufmann.\n \n 4. Relevant Information:\n \n This dataset is a slightly modified version of the dataset provided in\n the StatLib library. In line with the use by Ross Quinlan (1993) in\n predicting the attribute \"mpg\", 8 of the original instances were removed \n because they had unknown values for the \"mpg\" attribute. The original \n dataset is available in the file \"auto-mpg.data-original\".\n \n \"The data concerns city-cycle fuel consumption in miles per gallon,\n to be predicted in terms of 3 multivalued discrete and 5 continuous\n attributes.\" (Quinlan, 1993)\n \n 5. Number of Instances: 398\n \n 6. Number of Attributes: 9 including the class attribute\n \n 7. Attribute Information:\n \n 1. mpg: continuous\n 2. cylinders: multi-valued discrete\n 3. displacement: continuous\n 4. horsepower: continuous\n 5. weight: continuous\n 6. acceleration: continuous\n 7. model year: multi-valued discrete\n 8. origin: multi-valued discrete\n 9. car name: string (unique for each instance)\n \n 8. Missing Attribute Values: horsepower has 6 missing values', 1), +(111, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe Computer Activity databases are a collection of computer systems\n activity measures. The data was collected from a Sun Sparcstation\n 20/712 with 128 Mbytes of memory running in a multi-user university\n department. Users would typically be doing a large variety of tasks\n ranging from accessing the internet, editing files or running very\n cpu-bound programs. The data was collected continuously on two\n separate occasions. On both occassions, system activity was gathered\n every 5 seconds. The final dataset is taken from both occasions with\n equal numbers of observations coming from each collection epoch.\n \n System measures used:\n 1. lread - Reads (transfers per second ) between system memory and user memory.\n 2. lwrite - writes (transfers per second) between system memory and user memory.\n 3. scall - Number of system calls of all types per second.\n 4. sread - Number of system read calls per second.\n 5. swrite - Number of system write calls per second . \n 6. fork - Number of system fork calls per second. \n 7. exec - Number of system exec calls per second. \n 8. rchar - Number of characters transferred per second by system read calls.\n 9. wchar - Number of characters transfreed per second by system write calls. \n 10. pgout - Number of page out requests per second.\n 11. ppgout - Number of pages, paged out per second. \n 12. pgfree - Number of pages per second placed on the free list. \n 13. pgscan - Number of pages checked if they can be freed per second.\n 14. atch - Number of page attaches (satisfying a page fault by reclaiming a page in memory) per second.\n 15. pgin - Number of page-in requests per second.\n 16. ppgin - Number of pages paged in per second.\n 17. pflt - Number of page faults caused by protection errors (copy-on-writes). \n 18. vflt - Number of page faults caused by address translation. \n 19. runqsz - Process run queue size.\n 20. freemem - Number of memory pages available to user processes.\n 21. freeswap - Number of disk blocks available for page swapping. \n 22. usr - Portion of time (%) that cpus run in user mode.\n 23. sys - Portion of time (%) that cpus run in system mode.\n 24. wio - Portion of time (%) that cpus are idle waiting for block IO.\n 25. idle - Portion of time (%) that cpus are otherwise idle.\n \n The two different regression tasks obtained from these databases are:\n \n CompAct \n Predict usr, the portion of time that cpus run in user mode from all attributes 1-21.\n \n CompAct(s) \n Predict usr using a restricted number (excluding the paging information (10-18)\n \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original source: DELVE repository of data. \n Characteristics: 8192 cases, 22 continuous attributes', 1), +(112, '1', '**Author**: Rui Camacho (rcamacho@garfield.fe.up.pt) \n**Source**: [Regression datasets collection Luis Torgo](http://www.dcc.fc.up.pt/~ltorgo/Regression/DataSets.html) \n**Please cite**: \n\nThis data set is also obtained from the task of controlling the ailerons of a F16 aircraft, although the target variable and attributes are different from the ailerons domain. The target variable here is a variation instead of an absolute value, and there was some pre-selection of the attributes.', 1), +(113, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identifier attribute deleted.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: Sexual activity and the lifespan of male fruitflies\n TYPE: Designed (almost factorial) experiment\n SIZE: 125 observations, 5 variables\n \n DESCRIPTIVE ABSTRACT:\n A cost of increased reproduction in terms of reduced longevity has been\n shown for female fruitflies, but not for males. The flies used were an\n outbred stock. Sexual activity was manipulated by supplying individual\n males with one or eight receptive virgin females per day. The\n longevity of these males was compared with that of two control types.\n The first control consisted of two sets of individual males kept with\n one or eight newly inseminated females. Newly inseminated females will\n not usually remate for at least two days, and thus served as a control\n for any effect of competition with the male for food or space. The\n second control was a set of individual males kept with no females.\n There were 25 males in each of the five groups, which were treated\n identically in number of anaesthetizations (using CO2) and provision of\n fresh food medium.\n \n SOURCE:\n Figure 2 in the article \"Sexual Activity and the Lifespan of Male\n Fruitflies\" by Linda Partridge and Marion Farquhar. _Nature_, 294,\n 580-581, 1981.\n \n VARIABLE DESCRIPTIONS:\n Columns Variable Description\n ------- -------- -----------\n 1- 2 ID Serial No. (1-25) within each group of 25\n (the order in which data points were abstracted)\n \n 4 PARTNERS Number of companions (0, 1 or 8)\n \n 6 TYPE Type of companion\n 0: newly pregnant female\n 1: virgin female\n 9: not applicable (when PARTNERS=0)\n \n 8- 9 LONGEVITY Lifespan, in days\n \n 11-14 THORAX Length of thorax, in mm (x.xx)\n \n 16-17 SLEEP Percentage of each day spent sleeping\n \n \n SPECIAL NOTES:\n `Compliance\' of the males in the two experimental groups was documented\n as follows: On two days per week throughout the life of each\n experimental male, the females that had been supplied as virgins to\n that male were kept and examined for fertile eggs. The insemination\n rate declined from approximately 7 females/day at age one week to just\n under 2/day at age eight weeks in the males supplied with eight virgin\n females per day, and from just under 1/day at age one week to\n approximately 0.6/day at age eight weeks in the males supplied with one\n virgin female per day. These `compliance\' data were not supplied for\n individual males, but the authors say that \"There were no significant\n differences between the individual males within each experimental\n group.\"\n \n STORY BEHIND THE DATA:\n James Hanley found this dataset in _Nature_ and was attracted by the\n way the raw data were presented in classical analysis of covariance\n style in Figure 2. He read the data points from the graphs and brought\n them to the attention of a colleague with whom he was teaching the\n applied statistics course. Dr. Liddell thought that with only three\n explanatory variables (THORAX, plus PARTNERS and TYPE to describe the\n five groups), it would not be challenging enough as a data-analysis\n project. He suggested adding another variable. James Hanley added\n SLEEP, a variable not mentioned in the published article. Teachers can\n contact us about the construction of this variable. (We prefer to\n divulge the details at the end of the data-analysis project.)\n \n Further discussion of the background and pedagogical use of this\n dataset can be found in Hanley (1983) and in Hanley and Shapiro\n (1994). To obtain the Hanley and Shapiro article, send the one-line\n e-mail message:\n send jse/v2n1/datasets.hanley\n to the address archive@jse.stat.ncsu.edu\n \n PEDAGOGICAL NOTES:\n This has been the most successful and the most memorable dataset we\n have used in an \"applications of statistics\" course, which we have\n taught for ten years. The most common analysis techniques have been\n analysis of variance, classical analysis of covariance, and multiple\n regression. Because the variable THORAX is so strong (it explains\n about 1/3 of the variance in LONGEVITY), it is important to consider it\n to increase the precision of between-group contrasts. When students\n first check and find that the distributions of thorax length, and in\n particular, the mean thorax length, are very similar in the different\n groups, many of them are willing to say (in epidemiological\n terminology) that THORAX is not a confounding variable, and that it can\n be omitted from the analysis.\n \n There is usually lively discussion about the primary contrast. The\n five groups and their special structure allow opportunities for\n students to understand and verbalize what we mean by the term\n \"statistical interaction.\"\n \n There is also much debate as to whether one should take the SLEEP\n variable into account. Some students say that it is an `intermediate\'\n variable. Some students formally test the mean level of SLEEP across\n groups, find one pair where there is a statistically significant\n difference, and want to treat it as a confounding variable. A few\n students muse about how it was measured.\n \n There is heteroscedasticity in the LONGEVITY variable.\n \n One very observant student (now a professor) argued that THORAX cannot\n be used as a predictor or explanatory variable for the LONGEVITY\n outcome since fruitflies who die young may not be fully grown, i.e., it\n is also an intermediate variable. One Ph.D. student who had studied\n entomology assured us that fruitflies do not grow longer after birth;\n therefore, the THORAX length is not time-dependent!\n \n Curiously, the dataset has seldom been analyzed using techniques from\n survival analysis. The fact that there are no censored observations is\n not really an excuse, and one could easily devise a way to introduce\n censoring of LONGEVITY.\n \n REFERENCES:\n Hanley, J. A. (1983), \"Appropriate Uses of Multivariate Analysis,\"\n _Annual Review of Public Health_, 4, 155-180.\n \n Hanley, J. A., and Shapiro, S. H. (1994), \"Sexual Activity and the\n Lifespan of Male Fruitflies: A Dataset That Gets Attention,\" _Journal\n of Statistics Education_, Volume 2, Number 1.\n \n SUBMITTED BY:\n James A. Hanley and Stanley H. Shapiro\n Department of Epidemiology and Biostatistics\n McGill University\n 1020 Pine Avenue West\n Montreal, Quebec, H3A 1A2\n Canada\n tel: +1 (514) 398-6270 (JH) \n +1 (514) 398-6272 (SS)\n fax: +1 (514) 398-4503\n INJH@musicb.mcgill.ca, StanS@epid.lan.mcgill.ca', 1), +(114, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Case number deleted. X treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: PBC Data\n SIZE: 418 observations, 20 variables\n \n \n \n DESCRIPTIVE ABSTRACT:\n \n Below is a description of the variables recorded from the Mayo Clinic trial \n in primary biliary cirrhosis (PBC) of the liver conducted between 1974 and \n 1984. A total of 424 PBC patients, referred to Mayo Clinic during\n that ten-year interval, met eligibility criteria for the randomized placebo \n controlled trial of the drug D-penicillamine. The first 312 cases in the data \n set participated in the randomized trial, and contain largely complete data. \n The additional 112 cases did not participate in the clinical trial, but \n consented to have basic measurements recorded and to be followed for survival.\n Six of those cases were lost to follow-up shortly after diagnosis, so there \n are data here on an additional 106 cases as well as the 312 randomized \n participants. Missing data items are denoted by \".\". At least one space \n separates each variable in the .DAT file. Censoring was due to liver \n transplantation for twenty-five subjects with the following case numbers: \n 5, 105, 111, 120, 125, 158, 183, 241, 246, 247, 254, 263, 264, 265, 274, \n 288, 291, 295, 297, 345, 361, 362, 375, 380, 383.\n \n \n \n SOURCE: Counting Processes and Survival Analysis by T. Fleming & \n D. Harrington, (1991), published by John Wiley & Sons.\n \n \n \n VARIABLE DESCRIPTIONS:\n \n The data are in free format. That is, at least one blank space separates\n each variable. The variables contained in the .DAT are:\n \n \n N: Case number.\n X: The number of days between registration and the earlier of\n death, liver transplantation, or study analysis time in July, 1986.\n D: 1 if X is time to death, 0 if time to censoring\n Z1: Treatment Code, 1 = D-penicillamine, 2 = placebo.\n Z2: Age in years. For the first 312 cases, age was calculated by\n dividing the number of days between birth and study registration by 365.\n Z3: Sex, 0 = male, 1 = female.\n Z4: Presence of ascites, 0 = no, 1 = yes.\n Z5: Presence of hepatomegaly, 0 = no, 1 = yes.\n Z6: Presence of spiders 0 = no, 1 = Yes.\n Z7: Presence of edema, 0 = no edema and no diuretic therapy for\n edema; 0.5 = edema present for which no diuretic therapy was given, or \n edema resolved with diuretic therapy; 1 = edema despite diuretic therapy\n Z8: Serum bilirubin, in mg/dl.\n Z9: Serum cholesterol, in mg/dl.\n Z10: Albumin, in gm/dl.\n Z11: Urine copper, in mg/day.\n Z12: Alkaline phosphatase, in U/liter.\n Z13: SGOT, in U/ml.\n Z14: Triglycerides, in mg/dl.\n Z15: Platelet count; coded value is number of platelets\n per-cubic-milliliter of blood divided by 1000.\n Z16: Prothrombin time, in seconds.\n Z17: Histologic stage of disease, graded 1, 2, 3, or 4.\n \n \n \n \n STORY BEHIND THE DATA:\n \n Between January, 1974 and May, 1984, the Mayo Clinic conducted a\n double-blinded randomized trial in primary biliary cirrhosis of the liver\n (PBC), comparing the drug D-penicillamine (DPCA) with a placebo. There\n were 424 patients who met the eligibility criteria seen at the Clinic while\n the trial was open for patient registration. Both the treating physician and\n the patient agreed to participate in the randomized trial in 312 of the 424\n cases. The date of randomization and a large number of clinical, biochemical,\n serologic, and histologic parameters were recorded for each of the 312\n clinical trial patients. The data from the trial were analyzed in 1986 for\n presentation in the clinical literature. For that analysis, disease and \n survival status as of July, 1986, were recorded for as many patients as \n possible. By that date, 125 of the 312 patients had died, with only 11 \n not attributable to PBC. Eight patients had been lost to follow up, and 19 \n had undergone liver transplantation. \n \n PBC is a rare but fatal chronic liver disease of unknown cause,\n with a prevalence of about 50-cases-per-million population. The primary\n pathologic event appears to be the destruction of interlobular bile ducts,\n which may be mediated by immunologic mechanisms. The data discussed here are\n important in two respects. First, controlled clinical trials are difficult to\n complete in rare diseases, and this case series of patients uniformly\n diagnosed, treated, and followed is the largest existing for PBC. The\n treatment comparison in this trial is more precise than in similar trials\n having fewer participants and avoids the bias that may arise in comparing\n a case series to historical controls. Second, the data present an\n opportunity to study the natural history of the disease. We will see that, \n despite the immunosuppressive properties of DPCA, there are no detectable\n differences between the distributions of survival times for the DPCA and\n placebo treatment groups. This suggests that these groups can be combined\n in studying the association between survival time from randomization and\n clinical and other measurements. In the early to mid 1980s, the rate of \n successful liver transplant increased substantially, and transplant has \n become an effective therapy for PBC. The Mayo Clinic data set is therefore \n one of the last allowing a study of the natural history of PBC in patients \n who were treated with only supportive care or its equivalent. The PBC data \n can be used to: estimate a survival distribution; test for differences \n between two groups; and estimate covariate effects via a regression\n model.', 1), +(115, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis is a commercial application described in Weiss & Indurkhya (1995). \n The data describes a telecommunication problem. No further information\n is available.\n \n Characteristics: (10000+5000) cases, 49 continuous attributes \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original Source: The data in the original format can be obtained \n from http://www.cs.su.oz.au/~nitin', 1), +(116, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Horsepower treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n 1. Title: 1985 Auto Imports Database\n \n 2. Source Information:\n -- Creator/Donor: Jeffrey C. Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n -- Date: 19 May 1987\n -- Sources:\n 1) 1985 Model Import Car and Truck Specifications, 1985 Ward\'s\n Automotive Yearbook.\n 2) Personal Auto Manuals, Insurance Services Office, 160 Water\n Street, New York, NY 10038 \n 3) Insurance Collision Report, Insurance Institute for Highway\n Safety, Watergate 600, Washington, DC 20037\n\n 3. Past Usage:\n -- Kibler,~D., Aha,~D.~W., & Albert,~M. (1989). Instance-based prediction\n of real-valued attributes. {it Computational Intelligence}, {it 5},\n 51--57.\n -- Predicted price of car using all numeric and Boolean attributes\n -- Method: an instance-based learning (IBL) algorithm derived from a\n localized k-nearest neighbor algorithm. Compared with a\n linear regression prediction...so all instances\n with missing attribute values were discarded. This resulted with\n a training set of 159 instances, which was also used as a test\n set (minus the actual instance during testing).\n -- Results: Percent Average Deviation Error of Prediction from Actual\n -- 11.84% for the IBL algorithm\n -- 14.12% for the resulting linear regression equation\n \n 4. Relevant Information:\n -- Description\n This data set consists of three types of entities: (a) the\n specification of an auto in terms of various characteristics, (b)\n its assigned insurance risk rating, (c) its normalized losses in use\n as compared to other cars. The second rating corresponds to the\n degree to which the auto is more risky than its price indicates.\n Cars are initially assigned a risk factor symbol associated with its\n price. Then, if it is more risky (or less), this symbol is\n adjusted by moving it up (or down) the scale. Actuarians call this\n process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.\n \n The third factor is the relative average loss payment per insured\n vehicle year. This value is normalized for all autos within a\n particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car\n per year.\n \n -- Note: Several of the attributes in the database could be used as a\n \"class\" attribute.\n \n 5. Number of Instances: 205\n \n 6. Number of Attributes: 26 total\n -- 15 continuous\n -- 1 integer\n -- 10 nominal\n \n 7. Attribute Information: \n Attribute: Attribute Range:\n ------------------ -----------------------------------------------\n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback, convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n 8. Missing Attribute Values: (denoted by \"?\")\n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4%', 1), +(117, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Identification code deleted. \n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n NAME: LOW BIRTH WEIGHT DATA\n KEYWORDS: Logistic Regression\n SIZE: 189 observations, 11 variables\n \n NOTE:\n These data come from Appendix 1 of Hosmer and Lemeshow (1989).\n These data are copyrighted and must be acknowledged and used accordingly.\n \n DESCRIPTIVE ABSTRACT:\n The goal of this study was to identify risk factors associated with\n giving birth to a low birth weight baby (weighing less than 2500 grams).\n Data were collected on 189 women, 59 of which had low birth weight babies\n and 130 of which had normal birth weight babies. Four variables which were\n thought to be of importance were age, weight of the subject at her last\n menstrual period, race, and the number of physician visits during the first\n trimester of pregnancy.\n \n \n SOURCE:\n Data were collected at Baystate Medical Center, Springfield,\n Massachusetts, during 1986.\n \n \n NOTE:\n This data set consists of the complete data. A paired data set\n created from this low birth weight data may be found in plowbwt.dat and\n a 3 to 1 matched data set created from the low birth weight data may be\n found in mlowbwt.dat.\n \n \n \n Table: Code Sheet for the Variables in the Low Birth Weight Data Set.\n \n Columns Variable Abbreviation\n -----------------------------------------------------------------------------\n 2-4 Identification Code ID\n \n 10 Low Birth Weight (0 = Birth Weight ge 2500g, LOW\n l = Birth Weight < 2500g)\n \n 17-18 Age of the Mother in Years AGE\n \n 23-25 Weight in Pounds at the Last Menstrual Period LWT\n \n 32 Race (1 = White, 2 = Black, 3 = Other) RACE\n \n 40 Smoking Status During Pregnancy (1 = Yes, 0 = No) SMOKE\n \n 48 History of Premature Labor (0 = None, 1 = One, etc.) PTL\n \n 55 History of Hypertension (1 = Yes, 0 = No) HT\n \n 61 Presence of Uterine Irritability (1 = Yes, 0 = No) UI\n \n 67 Number of Physician Visits During the First Trimester FTV\n (0 = None, 1 = One, 2 = Two, etc.)\n \n 73-76 Birth Weight in Grams BWT\n -----------------------------------------------------------------------------\n \n PEDAGOGICAL NOTES:\n These data have been used as an example of fitting a multiple\n logistic regression model.\n \n STORY BEHIND THE DATA:\n Low birth weight is an outcome that has been of concern to physicians\n for years. This is due to the fact that infant mortality rates and birth\n defect rates are very high for low birth weight babies. A woman\'s behavior\n during pregnancy (including diet, smoking habits, and receiving prenatal care)\n can greatly alter the chances of carrying the baby to term and, consequently,\n of delivering a baby of normal birth weight.\n The variables identified in the code sheet given in the table have been\n shown to be associated with low birth weight in the obstetrical literature. The\n goal of the current study was to ascertain if these variables were important\n in the population being served by the medical center where the data were\n collected.\n \n \n References:\n \n 1. Hosmer and Lemeshow, Applied Logistic Regression, Wiley, (1989).', 1), +(118, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Cholesterol treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Publication Request: \n >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n This file describes the contents of the heart-disease directory.\n \n This directory contains 4 databases concerning heart disease diagnosis.\n All attributes are numeric-valued. The data was collected from the\n four following locations:\n \n 1. Cleveland Clinic Foundation (cleveland.data)\n 2. Hungarian Institute of Cardiology, Budapest (hungarian.data)\n 3. V.A. Medical Center, Long Beach, CA (long-beach-va.data)\n 4. University Hospital, Zurich, Switzerland (switzerland.data)\n \n Each database has the same instance format. While the databases have 76\n raw attributes, only 14 of them are actually used. Thus I\'ve taken the\n liberty of making 2 copies of each database: one with all the attributes\n and 1 with the 14 attributes actually used in past experiments.\n \n The authors of the databases have requested:\n \n ...that any publications resulting from the use of the data include the \n names of the principal investigator responsible for the data collection\n at each institution. They would be:\n \n 1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.\n 2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.\n 3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.\n 4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation:\n Robert Detrano, M.D., Ph.D.\n \n Thanks in advance for abiding by this request.\n \n David Aha\n July 22, 1988\n >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n \n 1. Title: Heart Disease Databases\n \n 2. Source Information:\n (a) Creators: \n -- 1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.\n -- 2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.\n -- 3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.\n -- 4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation:\n Robert Detrano, M.D., Ph.D.\n (b) Donor: David W. Aha (aha@ics.uci.edu) (714) 856-8779 \n (c) Date: July, 1988\n \n 3. Past Usage:\n 1. Detrano,~R., Janosi,~A., Steinbrunn,~W., Pfisterer,~M., Schmid,~J.,\n Sandhu,~S., Guppy,~K., Lee,~S., & Froelicher,~V. (1989). {it \n International application of a new probability algorithm for the \n diagnosis of coronary artery disease.} {it American Journal of \n Cardiology}, {it 64},304--310.\n -- International Probability Analysis \n -- Address: Robert Detrano, M.D.\n Cardiology 111-C\n V.A. Medical Center\n 5901 E. 7th Street\n Long Beach, CA 90028\n -- Results in percent accuracy: (for 0.5 probability threshold)\n Data Name: CDF CADENZA\n -- Hungarian 77 74\n Long beach 79 77\n Swiss 81 81\n -- Approximately a 77% correct classification accuracy with a\n logistic-regression-derived discriminant function\n 2. David W. Aha & Dennis Kibler\n -- \n \n \n -- Instance-based prediction of heart-disease presence with the \n Cleveland database\n -- NTgrowth: 77.0% accuracy\n -- C4: 74.8% accuracy\n 3. John Gennari\n -- Gennari, J.~H., Langley, P, & Fisher, D. (1989). Models of\n incremental concept formation. {it Artificial Intelligence, 40},\n 11--61.\n -- Results: \n -- The CLASSIT conceptual clustering system achieved a 78.9% accuracy\n on the Cleveland database.\n \n 4. Relevant Information:\n This database contains 76 attributes, but all published experiments\n refer to using a subset of 14 of them. In particular, the Cleveland\n database is the only one that has been used by ML researchers to \n this date. The \"goal\" field refers to the presence of heart disease\n in the patient. It is integer valued from 0 (no presence) to 4.\n Experiments with the Cleveland database have concentrated on simply\n attempting to distinguish presence (values 1,2,3,4) from absence (value\n 0). \n \n The names and social security numbers of the patients were recently \n removed from the database, replaced with dummy values.\n \n One file has been \"processed\", that one containing the Cleveland \n database. All four unprocessed files also exist in this directory.\n \n 5. Number of Instances: \n Database: # of instances:\n Cleveland: 303\n Hungarian: 294\n Switzerland: 123\n Long Beach VA: 200\n \n 6. Number of Attributes: 76 (including the predicted attribute)\n \n 7. Attribute Information:\n -- Only 14 used\n -- 1. #3 (age) \n -- 2. #4 (sex) \n -- 3. #9 (cp) \n -- 4. #10 (trestbps) \n -- 5. #12 (chol) \n -- 6. #16 (fbs) \n -- 7. #19 (restecg) \n -- 8. #32 (thalach) \n -- 9. #38 (exang) \n -- 10. #40 (oldpeak) \n -- 11. #41 (slope) \n -- 12. #44 (ca) \n -- 13. #51 (thal) \n -- 14. #58 (num) (the predicted attribute)\n \n -- Complete attribute documentation:\n 1 id: patient identification number\n 2 ccf: social security number (I replaced this with a dummy value of 0)\n 3 age: age in years\n 4 sex: sex (1 = male; 0 = female)\n 5 painloc: chest pain location (1 = substernal; 0 = otherwise)\n 6 painexer (1 = provoked by exertion; 0 = otherwise)\n 7 relrest (1 = relieved after rest; 0 = otherwise)\n 8 pncaden (sum of 5, 6, and 7)\n 9 cp: chest pain type\n -- Value 1: typical angina\n -- Value 2: atypical angina\n -- Value 3: non-anginal pain\n -- Value 4: asymptomatic\n 10 trestbps: resting blood pressure (in mm Hg on admission to the \n hospital)\n 11 htn\n 12 chol: serum cholestoral in mg/dl\n 13 smoke: I believe this is 1 = yes; 0 = no (is or is not a smoker)\n 14 cigs (cigarettes per day)\n 15 years (number of years as a smoker)\n 16 fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)\n 17 dm (1 = history of diabetes; 0 = no such history)\n 18 famhist: family history of coronary artery disease (1 = yes; 0 = no)\n 19 restecg: resting electrocardiographic results\n -- Value 0: normal\n -- Value 1: having ST-T wave abnormality (T wave inversions and/or ST \n elevation or depression of > 0.05 mV)\n -- Value 2: showing probable or definite left ventricular hypertrophy\n by Estes\' criteria\n 20 ekgmo (month of exercise ECG reading)\n 21 ekgday(day of exercise ECG reading)\n 22 ekgyr (year of exercise ECG reading)\n 23 dig (digitalis used furing exercise ECG: 1 = yes; 0 = no)\n 24 prop (Beta blocker used during exercise ECG: 1 = yes; 0 = no)\n 25 nitr (nitrates used during exercise ECG: 1 = yes; 0 = no)\n 26 pro (calcium channel blocker used during exercise ECG: 1 = yes; 0 = no)\n 27 diuretic (diuretic used used during exercise ECG: 1 = yes; 0 = no)\n 28 proto: exercise protocol\n 1 = Bruce \n 2 = Kottus\n 3 = McHenry\n 4 = fast Balke\n 5 = Balke\n 6 = Noughton \n 7 = bike 150 kpa min/min (Not sure if \"kpa min/min\" is what was \n written!)\n 8 = bike 125 kpa min/min \n 9 = bike 100 kpa min/min\n 10 = bike 75 kpa min/min\n 11 = bike 50 kpa min/min\n 12 = arm ergometer\n 29 thaldur: duration of exercise test in minutes\n 30 thaltime: time when ST measure depression was noted\n 31 met: mets achieved\n 32 thalach: maximum heart rate achieved\n 33 thalrest: resting heart rate\n 34 tpeakbps: peak exercise blood pressure (first of 2 parts)\n 35 tpeakbpd: peak exercise blood pressure (second of 2 parts)\n 36 dummy\n 37 trestbpd: resting blood pressure\n 38 exang: exercise induced angina (1 = yes; 0 = no)\n 39 xhypo: (1 = yes; 0 = no)\n 40 oldpeak = ST depression induced by exercise relative to rest\n 41 slope: the slope of the peak exercise ST segment\n -- Value 1: upsloping\n -- Value 2: flat\n -- Value 3: downsloping\n 42 rldv5: height at rest\n 43 rldv5e: height at peak exercise\n 44 ca: number of major vessels (0-3) colored by flourosopy\n 45 restckm: irrelevant\n 46 exerckm: irrelevant\n 47 restef: rest raidonuclid (sp?) ejection fraction\n 48 restwm: rest wall (sp?) motion abnormality\n 0 = none\n 1 = mild or moderate\n 2 = moderate or severe\n 3 = akinesis or dyskmem (sp?)\n 49 exeref: exercise radinalid (sp?) ejection fraction\n 50 exerwm: exercise wall (sp?) motion \n 51 thal: 3 = normal; 6 = fixed defect; 7 = reversable defect\n 52 thalsev: not used\n 53 thalpul: not used\n 54 earlobe: not used\n 55 cmo: month of cardiac cath (sp?) (perhaps \"call\")\n 56 cday: day of cardiac cath (sp?)\n 57 cyr: year of cardiac cath (sp?)\n 58 num: diagnosis of heart disease (angiographic disease status)\n -- Value 0: < 50% diameter narrowing\n -- Value 1: > 50% diameter narrowing\n (in any major vessel: attributes 59 through 68 are vessels)\n 59 lmt\n 60 ladprox\n 61 laddist\n 62 diag\n 63 cxmain\n 64 ramus\n 65 om1\n 66 om2\n 67 rcaprox\n 68 rcadist\n 69 lvx1: not used\n 70 lvx2: not used\n 71 lvx3: not used\n 72 lvx4: not used\n 73 lvf: not used\n 74 cathef: not used\n 75 junk: not used\n 76 name: last name of patient \n (I replaced this with the dummy string \"name\")\n \n 9. Missing Attribute Values: Several. Distinguished with value -9.0.\n \n 10. Class Distribution:\n Database: 0 1 2 3 4 Total\n Cleveland: 164 55 36 35 13 303\n Hungarian: 188 37 26 28 15 294\n Switzerland: 8 48 32 30 5 123\n Long Beach VA: 51 56 41 42 10 200', 1), +(119, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n Data from which conclusions were drawn in the article \"Sleep in \n Mammals: Ecological and Constitutional Correlates\" by Allison, T. and \n Cicchetti, D. (1976), _Science_, November 12, vol. 194, pp. 732-734. \n Includes brain and body weight, life span, gestation time, time \n sleeping, and predation and danger indices for 62 mammals.\n \n \n \n Variables below (from left to right) for Mammals Data Set:\n \n species of animal\n \n body weight in kg\n \n brain weight in g\n \n slow wave (\"nondreaming\") sleep (hrs/day)\n \n paradoxical (\"dreaming\") sleep (hrs/day)\n \n total sleep (hrs/day) (sum of slow wave and paradoxical sleep)\n \n maximum life span (years)\n \n gestation time (days)\n \n predation index (1-5)\n 1 = minimum (least likely to be preyed upon)\n 5 = maximum (most likely to be preyed upon)\n \n sleep exposure index (1-5)\n 1 = least exposed (e.g. animal sleeps in a \n well-protected den)\n 5 = most exposed\n \n overall danger index (1-5)\n (based on the above two indices and other information)\n 1 = least danger (from other animals)\n 5 = most danger (from other animals)\n \n Note: Missing values denoted by -999.0\n \n \n For more details, see\n \n Allison, Truett and Cicchetti, Domenic V. (1976), \"Sleep in Mammals: \n Ecological and Constitutional Correlates\", _Science_, November 12, \n vol. 194, pp. 732-734.\n \n The above data set can be freely used for non-commercial purposes and \n can be freely distributed (permission in writing obtained from Dr. \n Truett Allison).\n \n Submitted by Roger Johnson\n rwjohnso@silver.sdsmt.edu\n\n Total sleep treated as the class attribute. Attributes for slow\n wave and paradoxical sleep have been deleted. (The animal\'s\n name has also been deleted.)', 1), +(120, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThe problem is to learn a regression equation/rule/tree to predict the\n activity from the descriptive structural attributes. The data and\n methodology is described in detail in: - King, Ross .D., Hurst,\n Jonathan. D., and Sternberg, Michael.J.E. A comparison of artificial\n intelligence methods for modelling QSARs Applied Artificial\n Intelligence, 1994 (in press). - Hurst, Jonathan. D., King, Ross\n .D. and Sternberg, Michael.J.E. Quantitative Structure-Activity\n Relationships by neural networks and inductive logic programming:\n 2. The inhibition of dihydrofolate reductase by triazines. Journal of\n Computer Aided Molecular Design, 1994 (in press).\n \n Original source: ?. \n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Characteristics: 186 cases; 61 continuous variables', 1), +(121, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n All nominal attributes and instances with missing values are deleted.\n Price treated as the class attribute.\n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n 1. Title: 1985 Auto Imports Database\n \n 2. Source Information:\n -- Creator/Donor: Jeffrey C. Schlimmer (Jeffrey.Schlimmer@a.gp.cs.cmu.edu)\n -- Date: 19 May 1987\n -- Sources:\n 1) 1985 Model Import Car and Truck Specifications, 1985 Ward\'s\n Automotive Yearbook.\n 2) Personal Auto Manuals, Insurance Services Office, 160 Water\n Street, New York, NY 10038 \n 3) Insurance Collision Report, Insurance Institute for Highway\n Safety, Watergate 600, Washington, DC 20037\n\n 3. Past Usage:\n -- Kibler,~D., Aha,~D.~W., & Albert,~M. (1989). Instance-based prediction\n of real-valued attributes. {it Computational Intelligence}, {it 5},\n 51--57.\n -- Predicted price of car using all numeric and Boolean attributes\n -- Method: an instance-based learning (IBL) algorithm derived from a\n localized k-nearest neighbor algorithm. Compared with a\n linear regression prediction...so all instances\n with missing attribute values were discarded. This resulted with\n a training set of 159 instances, which was also used as a test\n set (minus the actual instance during testing).\n -- Results: Percent Average Deviation Error of Prediction from Actual\n -- 11.84% for the IBL algorithm\n -- 14.12% for the resulting linear regression equation\n \n 4. Relevant Information:\n -- Description\n This data set consists of three types of entities: (a) the\n specification of an auto in terms of various characteristics, (b)\n its assigned insurance risk rating, (c) its normalized losses in use\n as compared to other cars. The second rating corresponds to the\n degree to which the auto is more risky than its price indicates.\n Cars are initially assigned a risk factor symbol associated with its\n price. Then, if it is more risky (or less), this symbol is\n adjusted by moving it up (or down) the scale. Actuarians call this\n process \"symboling\". A value of +3 indicates that the auto is\n risky, -3 that it is probably pretty safe.\n \n The third factor is the relative average loss payment per insured\n vehicle year. This value is normalized for all autos within a\n particular size classification (two-door small, station wagons,\n sports/speciality, etc...), and represents the average loss per car\n per year.\n \n -- Note: Several of the attributes in the database could be used as a\n \"class\" attribute.\n \n 5. Number of Instances: 205\n \n 6. Number of Attributes: 26 total\n -- 15 continuous\n -- 1 integer\n -- 10 nominal\n \n 7. Attribute Information: \n Attribute: Attribute Range:\n ------------------ -----------------------------------------------\n 1. symboling: -3, -2, -1, 0, 1, 2, 3.\n 2. normalized-losses: continuous from 65 to 256.\n 3. make: alfa-romero, audi, bmw, chevrolet, dodge, honda,\n isuzu, jaguar, mazda, mercedes-benz, mercury,\n mitsubishi, nissan, peugot, plymouth, porsche,\n renault, saab, subaru, toyota, volkswagen, volvo\n 4. fuel-type: diesel, gas.\n 5. aspiration: std, turbo.\n 6. num-of-doors: four, two.\n 7. body-style: hardtop, wagon, sedan, hatchback, convertible.\n 8. drive-wheels: 4wd, fwd, rwd.\n 9. engine-location: front, rear.\n 10. wheel-base: continuous from 86.6 120.9.\n 11. length: continuous from 141.1 to 208.1.\n 12. width: continuous from 60.3 to 72.3.\n 13. height: continuous from 47.8 to 59.8.\n 14. curb-weight: continuous from 1488 to 4066.\n 15. engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor.\n 16. num-of-cylinders: eight, five, four, six, three, twelve, two.\n 17. engine-size: continuous from 61 to 326.\n 18. fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi.\n 19. bore: continuous from 2.54 to 3.94.\n 20. stroke: continuous from 2.07 to 4.17.\n 21. compression-ratio: continuous from 7 to 23.\n 22. horsepower: continuous from 48 to 288.\n 23. peak-rpm: continuous from 4150 to 6600.\n 24. city-mpg: continuous from 13 to 49.\n 25. highway-mpg: continuous from 16 to 54.\n 26. price: continuous from 5118 to 45400.\n \n 8. Missing Attribute Values: (denoted by \"?\")\n Attribute #: Number of instances missing a value:\n 2. 41\n 6. 2\n 19. 4\n 20. 4\n 22. 2\n 23. 2\n 26. 4%', 1), +(122, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n This is the data set called `DETROIT\' in the book `Subset selection in\n regression\' by Alan J. Miller published in the Chapman & Hall series of\n monographs on Statistics & Applied Probability, no. 40. The data are\n unusual in that a subset of three predictors can be found which gives a\n very much better fit to the data than the subsets found from the Efroymson\n stepwise algorithm, or from forward selection or backward elimination.\n \n The original data were given in appendix A of `Regression analysis and its\n application: A data-oriented approach\' by Gunst & Mason, Statistics\n textbooks and monographs no. 24, Marcel Dekker. It has caused problems\n because some copies of the Gunst & Mason book do not contain all of the data,\n and because Miller does not say which variables he used as predictors and\n which is the dependent variable. (HOM was the dependent variable, and the\n predictors were FTP ... WE)\n \n The data were collected by J.C. Fisher and used in his paper: \"Homicide in\n Detroit: The Role of Firearms\", Criminology, vol.14, 387-400 (1976)\n \n \n The data are on the homicide rate in Detroit for the years 1961-1973.\n FTP - Full-time police per 100,000 population\n UEMP - % unemployed in the population\n MAN - number of manufacturing workers in thousands\n LIC - Number of handgun licences per 100,000 population\n GR - Number of handgun registrations per 100,000 population\n CLEAR - % homicides cleared by arrests\n WM - Number of white males in the population\n NMAN - Number of non-manufacturing workers in thousands\n GOV - Number of government workers in thousands\n HE - Average hourly earnings\n WE - Average weekly earnings\n \n HOM - Number of homicides per 100,000 of population\n ACC - Death rate in accidents per 100,000 population\n ASR - Number of assaults per 100,000 population\n \n N.B. Each case takes two lines.', 1), +(123, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nDataset from Smoothing Methods in Statistics \n (ftp stat.cmu.edu/datasets)\n\n Simonoff, J.S. (1996). Smoothing Methods in Statistics. New York: Springer-Verlag.', 1), +(124, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n These data are those collected in a cloud-seeding experiment in Tasmania\n between mid-1964 and January 1971. Their analysis, using regression\n techniques and permutation tests, is discussed in:\n \n Miller, A.J., Shaw, D.E., Veitch, L.G. & Smith, E.J. (1979).\n `Analyzing the results of a cloud-seeding experiment in Tasmania\',\n Communications in Statistics - Theory & Methods, vol.A8(10),\n 1017-1047.\n \n The rainfalls are period rainfalls in inches. TE and TW are the east and\n west target areas respectively, while NC, SC and NWC are the corresponding\n rainfalls in the north, south and north-west control areas respectively.\n S = seeded, U = unseeded.\n\n Rain in eastern target region is being treated\n as the class attribute. (Attribute for rain\n in the western target region has been deleted.)', 1), +(125, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nData from StatLib (ftp stat.cmu.edu/datasets)\n\n The infamous Longley data, \"An appraisal of least-squares programs from\n the point of view of the user\", JASA, 62(1967) p819-841.\n\n Variables are: Number of people employed (usually the y variable)\n GNP implicit price deflator\n GNP\n Unemployed\n Armed forces\n Non-institutionalized population >=14 years of age\n Year\n\n Employment is being treated as the class\n attribute.', 1), +(126, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\nThis data set concerns the study of the factors affecting patterns of\n insulin-dependent diabetes mellitus in children. The objective is to\n investigate the dependence of the level of serum C-peptide on the\n various other factors in order to understand the patterns of residual\n insulin secretion. The response measurement is the logarithm of\n C-peptide concentration (pmol/ml) at the diagnosis, and the predictor\n measurements age and base deficit, a measure of acidity.\n\n Source: collection of regression datasets by Luis Torgo (ltorgo@ncc.up.pt) at\n http://www.ncc.up.pt/~ltorgo/Regression/DataSets.html\n Original source: Book Generalized Additive Models (p.304) by Hastie &\n Tibshirani, Chapman & Hall. \n Characteristics: 43 cases; 3 continuous variables', 1), +(127, '1', '**Author**: \n**Source**: Unknown - \n**Please cite**: \n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Case number deleted. \n\n As used by Kilpatrick, D. & Cameron-Jones, M. (1998). Numeric prediction\n using instance-based learning with encoding length selection. In Progress\n in Connectionist-Based Information Systems. Singapore: Springer-Verlag.\n\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n Name: Pharynx (A clinical Trial in the Trt. of Carcinoma of the Oropharynx).\n SIZE: 195 observations, 13 variables.\n \n \n \n DESCRIPTIVE ABSTRACT:\n \n The .dat file gives the data for a part of a large clinical trial\n carried out by the Radiation Therapy Oncology Group in the United States. \n The full study included patients with squamous carcinoma of 15 sites in \n the mouth and throat, with 16 participating institutions, though only data \n on three sites in the oropharynx reported by the six largest institutions \n are considered here. Patients entering the study were randomly assigned to \n one of two treatment groups, radiation therapy alone or radiation therapy \n together with a chemotherapeutic agent. One objective of the study was to \n compare the two treatment policies with respect to patient survival.\n \n \n \n SOURCE: The Statistical Analysis of Failure Time Data, by JD Kalbfleisch\n & RL Prentice, (1980), Published by John Wiley & Sons \n \n \n \n VARIABLE DESCRIPTIONS:\n \n The data are in free format. That is, at least one blank space separates \n each variable in the .dat file. The variables are as follows:\n \n \n Case: Case Number\n Inst: Participating Institution\n sex: 1=male, 2=female\n Treatment: 1=standard, 2=test\n Grade: 1=well differentiated, 2=moderately differentiated, \n 3=poorly differentiated, 9=missing\n Age: In years at time of diagnosis\n Condition: 1=no disability, 2=restricted work, 3=requires assistance with\n self care, 4=bed confined, 9=missing\n Site: 1=faucial arch, 2=tonsillar fossa, 3=posterior pillar,\n 4=pharyngeal tongue, 5=posterior wall\n T staging: 1=primary tumor measuring 2 cm or less in largest diameter,\n 2=primary tumor measuring 2 cm to 4 cm in largest diameter with\n minimal infiltration in depth, 3=primary tumor measuring more \n than 4 cm, 4=massive invasive tumor\n N staging: 0=no clinical evidence of node metastases, 1=single positive\n node 3 cm or less in diameter, not fixed, 2=single positive\n node more than 3 cm in diameter, not fixed, 3=multiple\n positive nodes or fixed positive nodes \n Entry Date: Date of study entry: Day of year and year\n Status: 0=censored, 1=dead\n Time: Survival time in days from day of diagnosis \n \n \n \n \n \n \n STORY BEHIND THE DATA:\n \n Approximately 30% of the survival times are censored owing primarily to \n patients surviving to the time of analysis. Some patients were lost\n to follow-up because the patient moved or transferred to an institution not\n participating in the study, though these cases were relatively rare. From \n a statistical point of view, an important feature of these data is the \n considerable lack of homogeneity between individuals being studied. \n Of course, as part of the study design, certain criteria for patient \n eligibility had to be met which eliminated extremes in the extent of disease, \n but still many factors are not controlled.\n \n This study included measurements of many covariates which would be expected \n to relate to survival experience. Six such variables are given in the data \n (sex, T staging, N staging, age, general condition, and grade). The site \n of the primary tumor and possible differences between participating \n institutions require consideration as well.\n \n The T,N staging classification gives a measure of the extent of the tumor at \n the primary site and at regional lymph nodes. T=1, refers to a small primary \n tumor, 2 centimeters or less in largest diameter, whereas T=4 is a massive \n tumor with extension to adjoining tissue. T=2 and T=3 refer to intermediate\n cases. N=0 refers to there being no clinical evidence of a lymph node \n metastasis and N=1, N=2, N=3 indicate, in increasing magnitude, the extent of \n existing lymph node involvement. Patients with classifications T=1,N=0; \n T=1,N=1; T=2,N=0; or T=2,N=1, or with distant metastases were excluded \n from study.\n \n The variable general condition gives a measure of the functional capacity of \n the patient at the time of diagnosis (1 refers to no disability whereas\n 4 denotes bed confinement; 2 and 3 measure intermediate levels). The variable\n grade is a measure of the degree of differentiation of the tumor (the degree\n to which the tumor cell resembles the host cell) from 1 (well differentiated) \n to 3 (poorly differentiated)\n \n In addition to the primary question whether the combined treatment mode is\n preferable to the conventional radiation therapy, it is of considerable \n interest to determine the extent to which the several covariates relate to\n subsequent survival. It is also imperative in answering the primary question \n to adjust the survivals for possible imbalance that may be present in the \n study with regard to the other covariates. Such problems are similar to those \n encountered in the classical theory of linear regression and the analysis of \n covariance. Again, the need to accommodate censoring is an important \n distinguishing point. In many situations it is also important to develop \n nonparametric and robust procedures since there is frequently little empirical\n or theoretical work to support a particular family of failure time \n distributions.', 1), +(128, '1', 'This data sets consists of 3 different types of irises\' (Setosa, Versicolour, and Virginica) petal and sepal length, stored in a 150x4 numpy.ndarray', 1), +(129, '1', '', 1), +(130, '1', '', 16), +(131, '1', '', 1); diff --git a/data/sql/estimation_procedure.sql b/data/sql/estimation_procedure.sql index 7f69e908b..2c406bcdd 100644 --- a/data/sql/estimation_procedure.sql +++ b/data/sql/estimation_procedure.sql @@ -27,4 +27,10 @@ INSERT INTO `estimation_procedure` (`id`, `ttid`, `name`, `type`, `repeats`, `fo (26, 1, 'Test on Training Data', 'testontrainingdata', NULL, NULL, 'false', NULL, NULL, 'false', '2019-03-16 11:30:14'), (27, 2, 'Test on Training Data', 'testontrainingdata', NULL, NULL, 'false', NULL, NULL, 'false', '2019-03-16 11:30:14'), (28, 1, '20% Holdout (Ordered)', 'holdout_ordered', 1, 1, 'false', 20, NULL, 'false', '2019-05-23 12:40:53'), -(29, 9, '10-fold Crossvalidation', 'crossvalidation', 1, 10, 'false', NULL, 'true', 'false', '2014-12-31 20:00:00'); +(29, 9, '10-fold Crossvalidation', 'crossvalidation', 1, 10, 'false', NULL, 'true', 'false', '2014-12-31 20:00:00'), +(30, 10, '10-fold Crossvalidation', 'crossvalidation', 1, 10, 'false', NULL, 'true', 'false', '2023-02-22 11:46:54'), +(31, 10, '5 times 2-fold Crossvalidation', 'crossvalidation', 5, 2, 'false', NULL, 'true', 'false', '2023-02-22 11:46:54'), +(32, 10, '10 times 10-fold Crossvalidation', 'crossvalidation', 10, 10, 'false', NULL, 'true', 'false', '2023-02-22 11:46:54'), +(33, 10, '10% Holdout set', 'holdout', 1, NULL, 'false', 33, 'true', 'false', '2023-02-22 11:46:54'), +(34, 10, '33% Holdout set', 'holdout', 1, NULL, 'false', 33, 'true', 'false', '2023-02-22 11:46:54'), +(35, 11, '33% Holdout set', 'holdout', 1, NULL, 'false', 33, 'true', 'false', '2023-06-15 16:34:54'); \ No newline at end of file diff --git a/data/sql/file.sql b/data/sql/file.sql index e240f88b8..8a0947751 100644 --- a/data/sql/file.sql +++ b/data/sql/file.sql @@ -128,4 +128,5 @@ INSERT INTO `file` (`id`, `creator`, `creation_date`, `filepath`, `filesize`, `f (127, 16, '2017-06-18 14:38:57', 'https://www.openml.org/data/download/3650/dataset_2199_pharynx.arff', 13471, 'pharynx.arff', 'arff', 'text/plain;charset=UTF-8', '0bdc5060f67578a2f715e541ee5d0138', 'url', 'public'), (128, 16, '2018-05-29 14:00:00', 'https://www.openml.org/data/download/61/iris.arff', 7487, 'iris.arff', 'arff', 'text/plain;charset=UTF-8', 'ad484452702105cbf3d30f8deaba39a9', 'url', 'public'), (129, 16, '2018-05-29 14:00:00', 'https://www.openml.org/data/download/19330175/iris-challenge.arff', 7103, 'iris-challenge.arff', 'arff', 'text/plain;charset=UTF-8', 'bce91bc6033c311070d198e78e7fc954', 'url', 'public'), -(130, 16, '2018-05-29 14:00:00', 'https://www.openml.org/data/download/61/iris.arff', 7487, 'iris.arff', 'arff', 'text/plain;charset=UTF-8', 'ad484452702105cbf3d30f8deaba39a9', 'url', 'private'); +(130, 16, '2018-05-29 14:00:00', 'https://www.openml.org/data/download/61/iris.arff', 7487, 'iris.arff', 'arff', 'text/plain;charset=UTF-8', 'ad484452702105cbf3d30f8deaba39a9', 'url', 'private'), +(131, 16, '2023-06-15 14:00:00', 'https://api.openml.org/data/v1/download/22116558/web_questions.arff', 818476, 'web_questions.arff', 'arff', 'text/plain;charset=UTF-8', '67f1977f1aceb685049ca0bf036ea80c', 'url', 'public'); diff --git a/data/sql/task.sql b/data/sql/task.sql index 998e36b0a..c9cd8d7cd 100644 --- a/data/sql/task.sql +++ b/data/sql/task.sql @@ -1301,4 +1301,6 @@ INSERT INTO `task` (`task_id`, `ttid`, `creator`, `creation_date`, `embargo_end_ (1300, 1, 1, '2019-05-24 12:30:49', NULL), (1301, 1, 1, '2019-05-24 12:30:50', NULL), (1302, 1, 1, '2019-05-24 12:30:50', NULL), -(1303, 1, 1, '2019-05-24 12:30:51', NULL); +(1303, 1, 1, '2019-05-24 12:30:51', NULL), +(1304, 11, 1, '2023-06-15 18:00:00', NULL), +(1305, 10, 3229, '2023-07-17 13:39:33', NULL); \ No newline at end of file diff --git a/data/sql/task_inputs.sql b/data/sql/task_inputs.sql index 44d8e2b1f..4afaeec15 100644 --- a/data/sql/task_inputs.sql +++ b/data/sql/task_inputs.sql @@ -3907,4 +3907,12 @@ INSERT INTO `task_inputs` (`task_id`, `input`, `value`) VALUES (1302, 'target_feature', 'Class'), (1303, 'estimation_procedure', '28'), (1303, 'source_data', '100'), -(1303, 'target_feature', 'Y'); +(1303, 'target_feature', 'Y'), +(1304, 'estimation_procedure', '35'), +(1304, 'source_data', '131'), +(1304, 'target_feature', 'answers'), +(1305, 'batch_size', '1'), +(1305, 'estimation_procedure', '30'), +(1305, 'evaluation_measures', 'predictive_accuracy'), +(1305, 'source_data', '128'), +(1305, 'target_feature', 'class'); \ No newline at end of file diff --git a/data/sql/task_type.sql b/data/sql/task_type.sql index 55055b462..6bf7e902b 100644 --- a/data/sql/task_type.sql +++ b/data/sql/task_type.sql @@ -7,4 +7,6 @@ INSERT INTO `task_type` (`ttid`, `name`, `description`, `creator`, `contributors (6, 'Machine Learning Challenge', 'This is a standard machine learning challenge with a hidden private dataset.\r\nIt offers a labeled training set and an unlabeled test set. \r\n\r\nThe task is to label the unlabeled instances. Only the OpenML server knows the correct labels, and will evaluate the submitted predictions using these hidden labels. The evaluation procedure, measure, and cost function (if any) are provided.', '\"Jan van Rijn\",\"Joaquin Vanschoren\"', NULL, '2014-11-28 00:00:00'), (7, 'Survival Analysis', 'Related to Regression. Given a dataset (typically consisting of patient data) predict a left timestamp (date entering the study), right timestamp (date of leaving the study), or both. ', '\"Benrd Bischl\",\"Dominik Kirchhoff\",\"Michel Lang\",\"Jan van Rijn\",\"Joaquin Vanschoren\"', NULL, '2014-12-03 00:00:00'), (8, 'Subgroup Discovery', 'Subgroup discovery is a data mining technique which extracts interesting rules with respect to a target variable. An important characteristic of this task is the combination of predictive and descriptive induction. An overview related to the task of subgroup discovery is presented. (description by: Herrera et. al., An overview on subgroup discovery: foundations and applications)', '\"Jan N. van Rijn\", \"Arno Knobbe\", \"Joaquin Vanschoren\"', NULL, '2016-06-17 10:59:20'), -(9, 'Multitask Regression', '', 'Jan N. van Rijn', NULL, '2019-10-24 23:46:54'); +(9, 'Multitask Regression', '', 'Jan N. van Rijn', NULL, '2019-10-24 23:46:54'), +(10, 'Active Classification', '', 'various contributors', NULL, '2023-02-22 11:46:54'), +(11, 'Text tasks', '', 'various contributors', NULL, '2023-06-15 16:32:41'); diff --git a/data/sql/task_type_inout.sql b/data/sql/task_type_inout.sql index 891169a2c..534eb4da3 100644 --- a/data/sql/task_type_inout.sql +++ b/data/sql/task_type_inout.sql @@ -1,64 +1,81 @@ -INSERT INTO `task_type_inout` (`ttid`, `name`, `type`, `io`, `requirement`, `description`, `order`, `api_constraints`, `template_api`, `template_search`) VALUES -(1, 'cost_matrix', 'CostMatrix', 'input', 'optional', 'A matrix describing the cost of miss-classifications per type. ', 21, '{\r\n \"data_type\": \"json\"\r\n}', '[INPUT:cost_matrix]', '{ \"name\": \"Specify cost matrix (optional):\", \"placeholder\": \"Experimental. Only allowed with one dataset selected in the dataset(s) field\"}'), -(1, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL, '{ \"name\": \"Specify row id\'s (0-based):\", \"placeholder\": \"Experimental. Only allowed with one dataset selected in the dataset(s) field\"}'), -(1, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(1, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(1, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(1, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL, NULL), -(1, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n', NULL), -(1, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(1, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL, '{\r\n \"placeholder\": \"Use default target\"\r\n}'), -(2, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL, '{ \"name\": \"Specify row id\'s (0-based):\", \"placeholder\": \"Experimental. Only allowed with one dataset selected in the dataset(s) field\"}'), -(2, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(2, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(2, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, predictive_accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\",\r\n \"default\": \"predictive_accuracy\"\r\n}'), -(2, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL, NULL), -(2, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n', NULL), -(2, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(2, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL, '{\r\n \"default\": \"class\",\r\n \"placeholder\": \"Use default target\"\r\n}'), -(3, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[INPUT:number_samples]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(3, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(3, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(3, 'number_samples', 'String', 'input', 'hidden', 'The (maximum) number of samples to return, or the number of points on the learning curve. The sample sizes grow exponentially as a power of two.', 60, NULL, NULL, NULL), -(3, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n\r\n', NULL), -(3, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(3, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL, '{\r\n \"default\": \"class\",\r\n \"placeholder\": \"Use default target\"\r\n}'), -(4, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(4, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(4, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(4, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n', NULL), -(4, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(4, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL, '{\r\n \"default\": \"class\",\r\n \"placeholder\": \"Use default target\"\r\n}'), -(5, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to assess the quality of the clustered', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(5, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(5, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., log likelihood', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(5, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL, NULL), -(5, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n', NULL), -(5, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(6, 'cost_matrix', 'CostMatrix', 'input', 'optional', 'A matrix describing the cost of miss-classifications per type. ', 21, '{\r\n \"data_type\": \"json\"\r\n}', '[INPUT:cost_matrix]', '{ \"name\": \"Specify cost matrix (optional):\", \"placeholder\": \"Experimental. Only allowed with one dataset selected in the dataset(s) field\"}'), -(6, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL, '{ \"name\": \"Specify row id\'s (0-based):\", \"placeholder\": \"Experimental. Only allowed with one dataset selected in the dataset(s) field\"}'), -(6, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(6, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(6, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(6, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL, NULL), -(6, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n', NULL), -(6, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:source_data_labeled]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset\",\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"Select at least one dataset\"\r\n}'), -(6, 'source_data_labeled', 'Dataset', 'input', 'required', 'The labelled version of the dataset', 13, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', NULL, '{\r\n \"name\": \"Dataset (labelled)\",\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"Select at least one dataset\"\r\n}'), -(6, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL, '{\r\n \"placeholder\": \"Use default target\"\r\n}'), -(7, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(7, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL, NULL), -(7, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\",\r\n \"default\": \"c_index\"\r\n}'), -(7, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL, NULL), -(7, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n', NULL), -(7, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature_left]\r\n[INPUT:target_feature_right]\r\n[INPUT:target_feature_event]\r\n', '{\r\n \"name\": \"Dataset\",\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"Select a dataset to perform survival analysis on\"\r\n}'), -(7, 'target_feature_event', 'String', 'input', 'required', 'The name of the feature that indicates the type of the event.', 17, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL, NULL), -(7, 'target_feature_left', 'String', 'input', 'optional', 'The name of the feature that indicates the start of the interval.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL, NULL), -(7, 'target_feature_right', 'String', 'input', 'optional', 'The name of the feature that indicates the end of the interval.', 16, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL, NULL), -(8, 'quality_measure', 'String', 'input', 'required', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '[INPUT:quality_measure]', '{\r\n \"autocomplete\": \"plain\",\r\n \"datasource\": \"expdbEvaluationMetrics()\"\r\n}'), -(8, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n[INPUT:target_value]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(8, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL, '{\r\n \"placeholder\": \"Use default target\"\r\n}'), -(8, 'target_value', 'String', 'input', 'required', 'The value of the target feature to be used as the SD target value.', 15, '{\r\n\"data_type\": \"string\"\r\n}', NULL, '{\r\n \"placeholder\": \"Use default target value\"\r\n}'), -(8, 'time_limit', 'Integer', 'input', 'required', 'The time limit for SD search', 30, '{\r\n\"data_type\": \"numeric\"\r\n}', '[INPUT:time_limit]', 'NULL'), -(9, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[INPUT:number_samples]\r\n', '{\r\n \"type\": \"select\",\r\n \"table\": \"estimation_procedure\",\r\n \"key\": \"id\",\r\n \"value\": \"name\"\r\n}'), -(9, 'source_data_list', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"json\"\r\n}', '\r\n[INPUT:source_data_list]\r\n[INPUT:target_feature]\r\n', '{\r\n \"name\": \"Dataset(s)\",\r\n \"autocomplete\": \"commaSeparated\",\r\n \"datasource\": \"expdbDatasetVersion()\",\r\n \"placeholder\": \"(*) include all datasets\"\r\n}'), -(9, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\"\r\n}', NULL, '{\r\n \"default\": \"class\",\r\n \"placeholder\": \"Use default target\"\r\n}'); +INSERT INTO `task_type_inout` (`ttid`, `name`, `type`, `io`, `requirement`, `description`, `order`, `api_constraints`, `template_api`) VALUES +(1, 'cost_matrix', 'CostMatrix', 'input', 'optional', 'A matrix describing the cost of miss-classifications per type. ', 21, '{\r\n \"data_type\": \"json\"\r\n}', '[INPUT:cost_matrix]'), +(1, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL), +(1, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n'), +(1, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(1, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(1, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(1, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n'), +(1, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n'), +(1, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL), +(2, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL), +(2, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n'), +(2, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(2, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, predictive_accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(2, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(2, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n'), +(2, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n'), +(2, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL), +(3, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[INPUT:number_samples]\r\n'), +(3, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(3, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(3, 'number_samples', 'String', 'input', 'hidden', 'The (maximum) number of samples to return, or the number of points on the learning curve. The sample sizes grow exponentially as a power of two.', 60, NULL, NULL), +(3, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n\r\n'), +(3, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n'), +(3, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL), +(4, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]'), +(4, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(4, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(4, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n'), +(4, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n'), +(4, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL), +(5, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to assess the quality of the clustered', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n'), +(5, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(5, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., log likelihood', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(5, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(5, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n'), +(5, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n'), +(6, 'cost_matrix', 'CostMatrix', 'input', 'optional', 'A matrix describing the cost of miss-classifications per type. ', 21, '{\r\n \"data_type\": \"json\"\r\n}', '[INPUT:cost_matrix]'), +(6, 'custom_testset', 'KeyValue', 'input', 'hidden', 'If applicable, the user can specify a custom testset', 22, '{\r\n \"data_type\": \"json\"\r\n}', NULL), +(6, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n'), +(6, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(6, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(6, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(6, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n'), +(6, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:source_data_labeled]\r\n[INPUT:target_feature]\r\n'), +(6, 'source_data_labeled', 'Dataset', 'input', 'required', 'The labelled version of the dataset', 13, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', NULL), +(6, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL), +(7, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n'), +(7, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(7, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(7, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(7, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n'), +(7, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature_left]\r\n[INPUT:target_feature_right]\r\n[INPUT:target_feature_event]\r\n'), +(7, 'target_feature_event', 'String', 'input', 'required', 'The name of the feature that indicates the type of the event.', 17, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL), +(7, 'target_feature_left', 'String', 'input', 'optional', 'The name of the feature that indicates the start of the interval.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL), +(7, 'target_feature_right', 'String', 'input', 'optional', 'The name of the feature that indicates the end of the interval.', 16, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"numeric\\\"\"\r\n}', NULL), +(8, 'quality_measure', 'String', 'input', 'required', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '[INPUT:quality_measure]'), +(8, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n[INPUT:target_value]\r\n'), +(8, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\r\n}', NULL), +(8, 'target_value', 'String', 'input', 'required', 'The value of the target feature to be used as the SD target value.', 15, '{\r\n\"data_type\": \"string\"\r\n}', NULL), +(8, 'time_limit', 'Integer', 'input', 'required', 'The time limit for SD search', 30, '{\r\n\"data_type\": \"numeric\"\r\n}', '[INPUT:time_limit]'), +(9, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]/api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[INPUT:number_samples]\r\n'), +(9, 'source_data_list', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"json\"\r\n}', '\r\n[INPUT:source_data_list]\r\n[INPUT:target_feature]\r\n'), +(9, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\"\r\n}', NULL), +(10, 'annotation_costs', 'List', 'input', 'optional', 'A list specifying the annotation cost per instance. Experimental. Can break the database for large datasets. ', 35, '{\n \"data_type\": \"json\"\n}', '[INPUT:annotation_costs]'), +(10, 'batch_size', 'int', 'input', 'optional', 'The number of instances that need to be selected per batch. ', 38, '{\n \"data_type\": \"numeric\"\n}', '[INPUT:batch_size]'), +(10, 'cost_matrix', 'CostMatrix', 'input', 'optional', 'A matrix describing the cost of miss-classifications per type. ', 21, '{\n \"data_type\": \"json\"\n}', '[INPUT:cost_matrix]'), +(10, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\n\"data_type\": \"numeric\",\n\"select\": \"id\",\n\"from\": \"estimation_procedure\",\n\"where\": \"ttid = [TASK:ttid]\"\n}', '\n[INPUT:estimation_procedure]\n[LOOKUP:estimation_procedure.type]\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\n[LOOKUP:estimation_procedure.repeats]\n[LOOKUP:estimation_procedure.folds]\n[LOOKUP:estimation_procedure.percentage]\n[LOOKUP:estimation_procedure.stratified_sampling]\n'), +(10, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(10, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\n\"data_type\": \"string\",\n\"select\": \"name\",\n\"from\": \"math_function\"\n}', '\n[INPUT:evaluation_measures]\n'), +(10, 'model', 'File', 'output', 'optional', 'A file containing the model built on all the input data.', 60, NULL, NULL), +(10, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\nARFF\n\n\n\n\n\n\n'), +(10, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\n\"data_type\": \"numeric\",\n\"select\": \"did\",\n\"from\": \"dataset\"\n}', '\n[INPUT:source_data]\n[INPUT:target_feature]\n'), +(10, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\n\"data_type\": \"string\",\n\"select\": \"name\",\n\"from\": \"data_feature\",\n\"where\": \"did = \\\"[INPUT:source_data]\\\" AND data_type = \\\"nominal\\\"\"\n}', NULL), +(10, 'utility_scores', 'Utility Scores', 'output', 'optional', 'The utility scores', 45, NULL, NULL), +(11, 'estimation_procedure', 'Estimation Procedure', 'input', 'required', 'The estimation procedure used to validate the generated models', 20, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"id\",\r\n\"from\": \"estimation_procedure\",\r\n\"where\": \"ttid = [TASK:ttid]\"\r\n}', '\r\n[INPUT:estimation_procedure]\r\n[LOOKUP:estimation_procedure.type]\r\n[CONSTANT:base_url]api_splits/get/[TASK:id]/Task_[TASK:id]_splits.arff\r\n[LOOKUP:estimation_procedure.repeats]\r\n[LOOKUP:estimation_procedure.folds]\r\n[LOOKUP:estimation_procedure.percentage]\r\n[LOOKUP:estimation_procedure.stratified_sampling]\r\n'), +(11, 'evaluations', 'KeyValue', 'output', 'optional', 'A list of user-defined evaluations of the task as key-value pairs.', 50, NULL, NULL), +(11, 'evaluation_measures', 'String', 'input', 'optional', 'The evaluation measures to optimize for, e.g., cpu time, accuracy', 30, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"math_function\"\r\n}', '\r\n[INPUT:evaluation_measures]\r\n'), +(11, 'predictions', 'Predictions', 'output', 'optional', 'The desired output format', 40, NULL, '\r\nARFF\r\n\r\n\r\n\r\n\r\n\r\n'), +(11, 'source_data', 'Dataset', 'input', 'required', 'The input data for this task', 10, '{\r\n\"data_type\": \"numeric\",\r\n\"select\": \"did\",\r\n\"from\": \"dataset\"\r\n}', '\r\n[INPUT:source_data]\r\n[INPUT:target_feature]\r\n'), +(11, 'target_feature', 'String', 'input', 'required', 'The name of the dataset feature to be used as the target feature.', 15, '{\r\n\"data_type\": \"string\",\r\n\"select\": \"name\",\r\n\"from\": \"data_feature\",\r\n\"where\": \"did = \\\"[INPUT:source_data]\\\" \"\r\n}', NULL); \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..7645d0c86 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,28 @@ +FROM php:7.4.33-apache + +RUN docker-php-source extract \ + && docker-php-ext-install mysqli \ + && docker-php-source delete + +# Java is necessary for the direct calls to the evaluation engine (in Api_splits.php) +RUN apt update \ + && apt install -y --no-install-recommends openjdk-11-jre + +COPY . /var/www/openml +RUN mv /var/www/openml/openml_OS/config/BASE_CONFIG-BLANK.php /var/www/openml/openml_OS/config/BASE_CONFIG.php + +RUN mkdir -p /var/www/openml/logs && \ + mkdir -p /var/www/data/log && \ + mkdir /data && \ + chown -R www-data:www-data /var/www/data + +COPY docker/config/*.load /etc/apache2/mods-enabled/ +COPY docker/config/api.conf /etc/apache2/sites-enabled/000-default.conf +COPY docker/config/php.ini /usr/local/etc/php/ +COPY docker/config/.htaccess /var/www/openml/.htaccess + +COPY docker/set_configuration.sh /scripts/ + + +WORKDIR /var/www/openml +ENTRYPOINT ["bash", "/scripts/set_configuration.sh"] diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..5454e95e5 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,28 @@ +# Running apache php backend locally + +In most cases, you probably want to run through docker compose. +This file contains instructions for running it on its own. + +```bash +docker run -p 8001:80 --rm -it openml/php-rest-api +``` + +Runs the PHP REST API server and exposes it to `http://localhost:8001/`. +Some `BASE_CONFIG.php` variables can be overwritten with environment variables, +these can be passed in the run command with the `-e` option, e.g.: `-e BASE_URL=http://localhost/`. +See `set_configuration.sh` for the variables which can be overwritten out-of-the-box. +Alternatively, mount your own `BASE_CONFIG.php` into the container at `/var/www/openml/openml_OS/config/BASE_CONFIG.php`. +The `set_configuration.sh` script will only overwrite unset variables. +To avoid overwriting altogether, also change the entrypoint: `--entrypoint=apache2-foreground`. + +To connect to a separate container running a MySQL server, they need to be on the same docker network. +For both, specify the network with `--network NETWORK_NAME`, which can be any network you create with `docker network create NETWORK_NAME`. +Assuming a connection to the database can be established, to get a dataset description go to `http://127.0.0.1:8001/api/v1/json/data/1`. +Note that the protocol is `http` not `https`. + + +## Build + +```bash +docker build --tag openml/php-rest-api -f docker/Dockerfile . +``` diff --git a/docker/config/.htaccess b/docker/config/.htaccess new file mode 100644 index 000000000..e8918d261 --- /dev/null +++ b/docker/config/.htaccess @@ -0,0 +1,17 @@ +RewriteEngine on + +# TODO: specific for main instance of OpenML site. Should do something better +RewriteCond %{HTTP_HOST} ^api_new.openml.org +RewriteRule ^(.*)$ http://www.openml.org/api_new/$1 [L,P] + +RewriteCond %{HTTPS_HOST} ^api_new.openml.org +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] + + + + Header set Access-Control-Allow-Origin "*" + Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept" + diff --git a/docker/config/BASE_CONFIG-BLANK.php b/docker/config/BASE_CONFIG-BLANK.php new file mode 100644 index 000000000..3f1a5e282 --- /dev/null +++ b/docker/config/BASE_CONFIG-BLANK.php @@ -0,0 +1,199 @@ + diff --git a/docker/config/api.conf b/docker/config/api.conf new file mode 100644 index 000000000..14a04b82f --- /dev/null +++ b/docker/config/api.conf @@ -0,0 +1,28 @@ +User www-data +Group www-data + +LogFormat "%h %l %u %t \"%r\" %>s %b" common +ErrorLog /var/www/openml/logs/error.log +CustomLog /var/www/openml/logs/access.log common + +HostnameLookups Off + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Require all granted + + + + DocumentRoot /var/www/openml + RewriteEngine on + RewriteCond %{SERVER_NAME} =api.openml.org + RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] + diff --git a/docker/config/headers.load b/docker/config/headers.load new file mode 100644 index 000000000..e4497e5a4 --- /dev/null +++ b/docker/config/headers.load @@ -0,0 +1 @@ +LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so diff --git a/docker/config/php.ini b/docker/config/php.ini new file mode 100644 index 000000000..6f97900dd --- /dev/null +++ b/docker/config/php.ini @@ -0,0 +1,1961 @@ +[PHP] + +;;;;;;;;;;;;;;;;;;; +; About php.ini ; +;;;;;;;;;;;;;;;;;;; +; PHP's initialization file, generally called php.ini, is responsible for +; configuring many of the aspects of PHP's behavior. + +; PHP attempts to find and load this configuration from a number of locations. +; The following is a summary of its search order: +; 1. SAPI module specific location. +; 2. The PHPRC environment variable. +; 3. A number of predefined registry keys on Windows +; 4. Current working directory (except CLI) +; 5. The web server's directory (for SAPI modules), or directory of PHP +; (otherwise in Windows) +; 6. The directory from the --with-config-file-path compile time option, or the +; Windows directory (usually C:\windows) +; See the PHP docs for more specific information. +; https://php.net/configuration.file + +; The syntax of the file is extremely simple. Whitespace and lines +; beginning with a semicolon are silently ignored (as you probably guessed). +; Section headers (e.g. [Foo]) are also silently ignored, even though +; they might mean something in the future. + +; Directives following the section heading [PATH=/www/mysite] only +; apply to PHP files in the /www/mysite directory. Directives +; following the section heading [HOST=www.example.com] only apply to +; PHP files served from www.example.com. Directives set in these +; special sections cannot be overridden by user-defined INI files or +; at runtime. Currently, [PATH=] and [HOST=] sections only work under +; CGI/FastCGI. +; https://php.net/ini.sections + +; Directives are specified using the following syntax: +; directive = value +; Directive names are *case sensitive* - foo=bar is different from FOO=bar. +; Directives are variables used to configure PHP or PHP extensions. +; There is no name validation. If PHP can't find an expected +; directive because it is not set or is mistyped, a default value will be used. + +; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one +; of the INI constants (On, Off, True, False, Yes, No and None) or an expression +; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a +; previously set variable or directive (e.g. ${foo}) + +; Expressions in the INI file are limited to bitwise operators and parentheses: +; | bitwise OR +; ^ bitwise XOR +; & bitwise AND +; ~ bitwise NOT +; ! boolean NOT + +; Boolean flags can be turned on using the values 1, On, True or Yes. +; They can be turned off using the values 0, Off, False or No. + +; An empty string can be denoted by simply not writing anything after the equal +; sign, or by using the None keyword: + +; foo = ; sets foo to an empty string +; foo = None ; sets foo to an empty string +; foo = "None" ; sets foo to the string 'None' + +; If you use constants in your value, and these constants belong to a +; dynamically loaded extension (either a PHP extension or a Zend extension), +; you may only use these constants *after* the line that loads the extension. + +;;;;;;;;;;;;;;;;;;; +; About this file ; +;;;;;;;;;;;;;;;;;;; +; PHP comes packaged with two INI files. One that is recommended to be used +; in production environments and one that is recommended to be used in +; development environments. + +; php.ini-production contains settings which hold security, performance and +; best practices at its core. But please be aware, these settings may break +; compatibility with older or less security-conscious applications. We +; recommending using the production ini in production and testing environments. + +; php.ini-development is very similar to its production variant, except it is +; much more verbose when it comes to errors. We recommend using the +; development version only in development environments, as errors shown to +; application users can inadvertently leak otherwise secure information. + +; This is the php.ini-production INI file. + +;;;;;;;;;;;;;;;;;;; +; Quick Reference ; +;;;;;;;;;;;;;;;;;;; + +; The following are all the settings which are different in either the production +; or development versions of the INIs with respect to PHP's default behavior. +; Please see the actual settings later in the document for more details as to why +; we recommend these changes in PHP's behavior. + +; display_errors +; Default Value: On +; Development Value: On +; Production Value: Off + +; display_startup_errors +; Default Value: On +; Development Value: On +; Production Value: Off + +; error_reporting +; Default Value: E_ALL +; Development Value: E_ALL +; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT + +; log_errors +; Default Value: Off +; Development Value: On +; Production Value: On + +; max_input_time +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) + +; output_buffering +; Default Value: Off +; Development Value: 4096 +; Production Value: 4096 + +; register_argc_argv +; Default Value: On +; Development Value: Off +; Production Value: Off + +; request_order +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" + +; session.gc_divisor +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 + +; session.sid_bits_per_character +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 + +; session.sid_length +; Default Value: 32 +; Development Value: 26 +; Production Value: 26 + +; short_open_tag +; Default Value: On +; Development Value: Off +; Production Value: Off + +; variables_order +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS" + +; zend.assertions +; Default Value: 1 +; Development Value: 1 +; Production Value: -1 + +; zend.exception_ignore_args +; Default Value: Off +; Development Value: Off +; Production Value: On + +; zend.exception_string_param_max_len +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 + +;;;;;;;;;;;;;;;;;;;; +; php.ini Options ; +;;;;;;;;;;;;;;;;;;;; +; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" +;user_ini.filename = ".user.ini" + +; To disable this feature set this option to an empty value +;user_ini.filename = + +; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) +;user_ini.cache_ttl = 300 + +;;;;;;;;;;;;;;;;;;;; +; Language Options ; +;;;;;;;;;;;;;;;;;;;; + +; Enable the PHP scripting language engine under Apache. +; https://php.net/engine +engine = On + +; This directive determines whether or not PHP will recognize code between +; tags as PHP source which should be processed as such. It is +; generally recommended that should be used and that this feature +; should be disabled, as enabling it may result in issues when generating XML +; documents, however this remains supported for backward compatibility reasons. +; Note that this directive does not control the would work. +; https://php.net/syntax-highlighting +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.default = #0000BB +;highlight.html = #000000 + +; If enabled, the request will be allowed to complete even if the user aborts +; the request. Consider enabling it if executing long requests, which may end up +; being interrupted by the user or a browser timing out. PHP's default behavior +; is to disable this feature. +; https://php.net/ignore-user-abort +;ignore_user_abort = On + +; Determines the size of the realpath cache to be used by PHP. This value should +; be increased on systems where PHP opens many files to reflect the quantity of +; the file operations performed. +; Note: if open_basedir is set, the cache is disabled +; https://php.net/realpath-cache-size +;realpath_cache_size = 4096k + +; Duration of time, in seconds for which to cache realpath information for a given +; file or directory. For systems with rarely changing files, consider increasing this +; value. +; https://php.net/realpath-cache-ttl +;realpath_cache_ttl = 120 + +; Enables or disables the circular reference collector. +; https://php.net/zend.enable-gc +zend.enable_gc = On + +; If enabled, scripts may be written in encodings that are incompatible with +; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such +; encodings. To use this feature, mbstring extension must be enabled. +;zend.multibyte = Off + +; Allows to set the default encoding for the scripts. This value will be used +; unless "declare(encoding=...)" directive appears at the top of the script. +; Only affects if zend.multibyte is set. +;zend.script_encoding = + +; Allows to include or exclude arguments from stack traces generated for exceptions. +; In production, it is recommended to turn this setting on to prohibit the output +; of sensitive information in stack traces +; Default Value: Off +; Development Value: Off +; Production Value: On +zend.exception_ignore_args = On + +; Allows setting the maximum string length in an argument of a stringified stack trace +; to a value between 0 and 1000000. +; This has no effect when zend.exception_ignore_args is enabled. +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 +; In production, it is recommended to set this to 0 to reduce the output +; of sensitive information in stack traces. +zend.exception_string_param_max_len = 0 + +;;;;;;;;;;;;;;;;; +; Miscellaneous ; +;;;;;;;;;;;;;;;;; + +; Decides whether PHP may expose the fact that it is installed on the server +; (e.g. by adding its signature to the Web server header). It is no security +; threat in any way, but it makes it possible to determine whether you use PHP +; on your server or not. +; https://php.net/expose-php +expose_php = On + +;;;;;;;;;;;;;;;;;;; +; Resource Limits ; +;;;;;;;;;;;;;;;;;;; + +; Maximum execution time of each script, in seconds +; https://php.net/max-execution-time +; Note: This directive is hardcoded to 0 for the CLI SAPI +max_execution_time = 30 + +; Maximum amount of time each script may spend parsing request data. It's a good +; idea to limit this time on productions servers in order to eliminate unexpectedly +; long running scripts. +; Note: This directive is hardcoded to -1 for the CLI SAPI +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) +; https://php.net/max-input-time +max_input_time = 60 + +; Maximum input variable nesting level +; https://php.net/max-input-nesting-level +;max_input_nesting_level = 64 + +; How many GET/POST/COOKIE input variables may be accepted +;max_input_vars = 1000 + +; How many multipart body parts (combined input variable and file uploads) may +; be accepted. +; Default Value: -1 (Sum of max_input_vars and max_file_uploads) +;max_multipart_body_parts = 1500 + +; Maximum amount of memory a script may consume +; https://php.net/memory-limit +memory_limit = 16G + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Error handling and logging ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; This directive informs PHP of which errors, warnings and notices you would like +; it to take action for. The recommended way of setting values for this +; directive is through the use of the error level constants and bitwise +; operators. The error level constants are below here for convenience as well as +; some common settings and their meanings. +; By default, PHP is set to take action on all errors, notices and warnings EXCEPT +; those related to E_NOTICE and E_STRICT, which together cover best practices and +; recommended coding standards in PHP. For performance reasons, this is the +; recommend error reporting setting. Your production server shouldn't be wasting +; resources complaining about best practices and coding standards. That's what +; development servers and development settings are for. +; Note: The php.ini-development file has this setting as E_ALL. This +; means it pretty much reports everything which is exactly what you want during +; development and early testing. +; +; Error Level Constants: +; E_ALL - All errors and warnings +; E_ERROR - fatal run-time errors +; E_RECOVERABLE_ERROR - almost fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it is automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; E_DEPRECATED - warn about code that will not work in future versions +; of PHP +; E_USER_DEPRECATED - user-generated deprecation warnings +; +; Common Values: +; E_ALL (Show all errors, warnings and notices including coding standards.) +; E_ALL & ~E_NOTICE (Show all errors, except for notices) +; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) +; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) +; Default Value: E_ALL +; Development Value: E_ALL +; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; https://php.net/error-reporting +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT + +; This directive controls whether or not and where PHP will output errors, +; notices and warnings too. Error output is very useful during development, but +; it could be very dangerous in production environments. Depending on the code +; which is triggering the error, sensitive information could potentially leak +; out of your application such as database usernames and passwords or worse. +; For production environments, we recommend logging errors rather than +; sending them to STDOUT. +; Possible Values: +; Off = Do not display any errors +; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) +; On or stdout = Display errors to STDOUT +; Default Value: On +; Development Value: On +; Production Value: Off +; https://php.net/display-errors +display_errors = Off + +; The display of errors which occur during PHP's startup sequence are handled +; separately from display_errors. We strongly recommend you set this to 'off' +; for production servers to avoid leaking configuration details. +; Default Value: On +; Development Value: On +; Production Value: Off +; https://php.net/display-startup-errors +display_startup_errors = Off + +; Besides displaying errors, PHP can also log errors to locations such as a +; server-specific log, STDERR, or a location specified by the error_log +; directive found below. While errors should not be displayed on productions +; servers they should still be monitored and logging is a great way to do that. +; Default Value: Off +; Development Value: On +; Production Value: On +; https://php.net/log-errors +log_errors = On + +; Do not log repeated messages. Repeated errors must occur in same file on same +; line unless ignore_repeated_source is set true. +; https://php.net/ignore-repeated-errors +ignore_repeated_errors = Off + +; Ignore source of message when ignoring repeated messages. When this setting +; is On you will not log errors with repeated messages from different files or +; source lines. +; https://php.net/ignore-repeated-source +ignore_repeated_source = Off + +; If this parameter is set to Off, then memory leaks will not be shown (on +; stdout or in the log). This is only effective in a debug compile, and if +; error reporting includes E_WARNING in the allowed list +; https://php.net/report-memleaks +report_memleaks = On + +; This setting is off by default. +;report_zend_debug = 0 + +; Turn off normal error reporting and emit XML-RPC error XML +; https://php.net/xmlrpc-errors +;xmlrpc_errors = 0 + +; An XML-RPC faultCode +;xmlrpc_error_number = 0 + +; When PHP displays or logs an error, it has the capability of formatting the +; error message as HTML for easier reading. This directive controls whether +; the error message is formatted as HTML or not. +; Note: This directive is hardcoded to Off for the CLI SAPI +; https://php.net/html-errors +;html_errors = On + +; If html_errors is set to On *and* docref_root is not empty, then PHP +; produces clickable error messages that direct to a page describing the error +; or function causing the error in detail. +; You can download a copy of the PHP manual from https://php.net/docs +; and change docref_root to the base URL of your local copy including the +; leading '/'. You must also specify the file extension being used including +; the dot. PHP's default behavior is to leave these settings empty, in which +; case no links to documentation are generated. +; Note: Never use this feature for production boxes. +; https://php.net/docref-root +; Examples +;docref_root = "/phpmanual/" + +; https://php.net/docref-ext +;docref_ext = .html + +; String to output before an error message. PHP's default behavior is to leave +; this setting blank. +; https://php.net/error-prepend-string +; Example: +;error_prepend_string = "" + +; String to output after an error message. PHP's default behavior is to leave +; this setting blank. +; https://php.net/error-append-string +; Example: +;error_append_string = "" + +; Log errors to specified file. PHP's default behavior is to leave this value +; empty. +; https://php.net/error-log +; Example: +; error_log = /var/www/openml/logs +; Log errors to syslog (Event Log on Windows). +;error_log = syslog + +; The syslog ident is a string which is prepended to every message logged +; to syslog. Only used when error_log is set to syslog. +;syslog.ident = php + +; The syslog facility is used to specify what type of program is logging +; the message. Only used when error_log is set to syslog. +;syslog.facility = user + +; Set this to disable filtering control characters (the default). +; Some loggers only accept NVT-ASCII, others accept anything that's not +; control characters. If your logger accepts everything, then no filtering +; is needed at all. +; Allowed values are: +; ascii (all printable ASCII characters and NL) +; no-ctrl (all characters except control characters) +; all (all characters) +; raw (like "all", but messages are not split at newlines) +; https://php.net/syslog.filter +;syslog.filter = ascii + +;windows.show_crt_warning +; Default value: 0 +; Development value: 0 +; Production value: 0 + +;;;;;;;;;;;;;;;;; +; Data Handling ; +;;;;;;;;;;;;;;;;; + +; The separator used in PHP generated URLs to separate arguments. +; PHP's default setting is "&". +; https://php.net/arg-separator.output +; Example: +;arg_separator.output = "&" + +; List of separator(s) used by PHP to parse input URLs into variables. +; PHP's default setting is "&". +; NOTE: Every character in this directive is considered as separator! +; https://php.net/arg-separator.input +; Example: +;arg_separator.input = ";&" + +; This directive determines which super global arrays are registered when PHP +; starts up. G,P,C,E & S are abbreviations for the following respective super +; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty +; paid for the registration of these arrays and because ENV is not as commonly +; used as the others, ENV is not recommended on productions servers. You +; can still get access to the environment variables through getenv() should you +; need to. +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS"; +; https://php.net/variables-order +variables_order = "GPCS" + +; This directive determines which super global data (G,P & C) should be +; registered into the super global array REQUEST. If so, it also determines +; the order in which that data is registered. The values for this directive +; are specified in the same manner as the variables_order directive, +; EXCEPT one. Leaving this value empty will cause PHP to use the value set +; in the variables_order directive. It does not mean it will leave the super +; globals array REQUEST empty. +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" +; https://php.net/request-order +request_order = "GP" + +; This directive determines whether PHP registers $argv & $argc each time it +; runs. $argv contains an array of all the arguments passed to PHP when a script +; is invoked. $argc contains an integer representing the number of arguments +; that were passed when the script was invoked. These arrays are extremely +; useful when running scripts from the command line. When this directive is +; enabled, registering these variables consumes CPU cycles and memory each time +; a script is executed. For performance reasons, this feature should be disabled +; on production servers. +; Note: This directive is hardcoded to On for the CLI SAPI +; Default Value: On +; Development Value: Off +; Production Value: Off +; https://php.net/register-argc-argv +register_argc_argv = Off + +; When enabled, the ENV, REQUEST and SERVER variables are created when they're +; first used (Just In Time) instead of when the script starts. If these +; variables are not used within a script, having this directive on will result +; in a performance gain. The PHP directive register_argc_argv must be disabled +; for this directive to have any effect. +; https://php.net/auto-globals-jit +auto_globals_jit = On + +; Whether PHP will read the POST data. +; This option is enabled by default. +; Most likely, you won't want to disable this option globally. It causes $_POST +; and $_FILES to always be empty; the only way you will be able to read the +; POST data will be through the php://input stream wrapper. This can be useful +; to proxy requests or to process the POST data in a memory efficient fashion. +; https://php.net/enable-post-data-reading +;enable_post_data_reading = Off + +; Maximum size of POST data that PHP will accept. +; Its value may be 0 to disable the limit. It is ignored if POST data reading +; is disabled through enable_post_data_reading. +; https://php.net/post-max-size +post_max_size = 8M + +; Automatically add files before PHP document. +; https://php.net/auto-prepend-file +auto_prepend_file = + +; Automatically add files after PHP document. +; https://php.net/auto-append-file +auto_append_file = + +; By default, PHP will output a media type using the Content-Type header. To +; disable this, simply set it to be empty. +; +; PHP's built-in default media type is set to text/html. +; https://php.net/default-mimetype +default_mimetype = "text/html" + +; PHP's default character set is set to UTF-8. +; https://php.net/default-charset +default_charset = "UTF-8" + +; PHP internal character encoding is set to empty. +; If empty, default_charset is used. +; https://php.net/internal-encoding +;internal_encoding = + +; PHP input character encoding is set to empty. +; If empty, default_charset is used. +; https://php.net/input-encoding +;input_encoding = + +; PHP output character encoding is set to empty. +; If empty, default_charset is used. +; See also output_buffer. +; https://php.net/output-encoding +;output_encoding = + +;;;;;;;;;;;;;;;;;;;;;;;;; +; Paths and Directories ; +;;;;;;;;;;;;;;;;;;;;;;;;; + +; UNIX: "/path1:/path2" +;include_path = ".:/php/includes" +; +; Windows: "\path1;\path2" +;include_path = ".;c:\php\includes" +; +; PHP's default setting for include_path is ".;/path/to/php/pear" +; https://php.net/include-path + +; The root of the PHP pages, used only if nonempty. +; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root +; if you are running php as a CGI under any web server (other than IIS) +; see documentation for security issues. The alternate is to use the +; cgi.force_redirect configuration below +; https://php.net/doc-root +doc_root = + +; The directory under which PHP opens the script using /~username used only +; if nonempty. +; https://php.net/user-dir +user_dir = + +; Directory in which the loadable extensions (modules) reside. +; https://php.net/extension-dir +;extension_dir = "./" +; On windows: +;extension_dir = "ext" + +; Directory where the temporary files should be placed. +; Defaults to the system default (see sys_get_temp_dir) +;sys_temp_dir = "/tmp" + +; Whether or not to enable the dl() function. The dl() function does NOT work +; properly in multithreaded servers, such as IIS or Zeus, and is automatically +; disabled on them. +; https://php.net/enable-dl +enable_dl = Off + +; cgi.force_redirect is necessary to provide security running PHP as a CGI under +; most web servers. Left undefined, PHP turns this on by default. You can +; turn it off here AT YOUR OWN RISK +; **You CAN safely turn this off for IIS, in fact, you MUST.** +; https://php.net/cgi.force-redirect +;cgi.force_redirect = 1 + +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. PHP's default behavior is to disable this feature. +;cgi.nph = 1 + +; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape +; (iPlanet) web servers, you MAY need to set an environment variable name that PHP +; will look for to know it is OK to continue execution. Setting this variable MAY +; cause security issues, KNOW WHAT YOU ARE DOING FIRST. +; https://php.net/cgi.redirect-status-env +;cgi.redirect_status_env = + +; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's +; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok +; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting +; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting +; of zero causes PHP to behave as before. Default is 1. You should fix your scripts +; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. +; https://php.net/cgi.fix-pathinfo +;cgi.fix_pathinfo=1 + +; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside +; of the web tree and people will not be able to circumvent .htaccess security. +;cgi.discard_path=1 + +; FastCGI under IIS supports the ability to impersonate +; security tokens of the calling client. This allows IIS to define the +; security context that the request runs under. mod_fastcgi under Apache +; does not currently support this feature (03/17/2002) +; Set to 1 if running under IIS. Default is zero. +; https://php.net/fastcgi.impersonate +;fastcgi.impersonate = 1 + +; Disable logging through FastCGI connection. PHP's default behavior is to enable +; this feature. +;fastcgi.logging = 0 + +; cgi.rfc2616_headers configuration option tells PHP what type of headers to +; use when sending HTTP response code. If set to 0, PHP sends Status: header that +; is supported by Apache. When this option is set to 1, PHP will send +; RFC2616 compliant header. +; Default is zero. +; https://php.net/cgi.rfc2616-headers +;cgi.rfc2616_headers = 0 + +; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! +; (shebang) at the top of the running script. This line might be needed if the +; script support running both as stand-alone script and via PHP CGI<. PHP in CGI +; mode skips this line and ignores its content if this directive is turned on. +; https://php.net/cgi.check-shebang-line +;cgi.check_shebang_line=1 + +;;;;;;;;;;;;;;;; +; File Uploads ; +;;;;;;;;;;;;;;;; + +; Whether to allow HTTP file uploads. +; https://php.net/file-uploads +file_uploads = On + +; Temporary directory for HTTP uploaded files (will use system default if not +; specified). +; https://php.net/upload-tmp-dir +;upload_tmp_dir = + +; Maximum allowed size for uploaded files. +; https://php.net/upload-max-filesize +upload_max_filesize = 2M + +; Maximum number of files that can be uploaded via a single request +max_file_uploads = 20 + +;;;;;;;;;;;;;;;;;; +; Fopen wrappers ; +;;;;;;;;;;;;;;;;;; + +; Whether to allow the treatment of URLs (like http:// or ftp://) as files. +; https://php.net/allow-url-fopen +allow_url_fopen = On + +; Whether to allow include/require to open URLs (like https:// or ftp://) as files. +; https://php.net/allow-url-include +allow_url_include = Off + +; Define the anonymous ftp password (your email address). PHP's default setting +; for this is empty. +; https://php.net/from +;from="john@doe.com" + +; Define the User-Agent string. PHP's default setting for this is empty. +; https://php.net/user-agent +;user_agent="PHP" + +; Default timeout for socket based streams (seconds) +; https://php.net/default-socket-timeout +default_socket_timeout = 60 + +; If your scripts have to deal with files from Macintosh systems, +; or you are running on a Mac and need to deal with files from +; unix or win32 systems, setting this flag will cause PHP to +; automatically detect the EOL character in those files so that +; fgets() and file() will work regardless of the source of the file. +; https://php.net/auto-detect-line-endings +;auto_detect_line_endings = Off + +;;;;;;;;;;;;;;;;;;;;;; +; Dynamic Extensions ; +;;;;;;;;;;;;;;;;;;;;;; + +; If you wish to have an extension loaded automatically, use the following +; syntax: +; +; extension=modulename +; +; For example: +; +; extension=mysqli +; +; When the extension library to load is not located in the default extension +; directory, You may specify an absolute path to the library file: +; +; extension=/path/to/extension/mysqli.so +; +; Note : The syntax used in previous PHP versions ('extension=.so' and +; 'extension='php_.dll') is supported for legacy reasons and may be +; deprecated in a future PHP major version. So, when it is possible, please +; move to the new ('extension=) syntax. +; +; Notes for Windows environments : +; +; - Many DLL files are located in the ext/ +; extension folders as well as the separate PECL DLL download. +; Be sure to appropriately set the extension_dir directive. +; +;extension=bz2 + +; The ldap extension must be before curl if OpenSSL 1.0.2 and OpenLDAP is used +; otherwise it results in segfault when unloading after using SASL. +; See https://github.com/php/php-src/issues/8620 for more info. +;extension=ldap + +;extension=curl +;extension=ffi +;extension=ftp +;extension=fileinfo +;extension=gd +;extension=gettext +;extension=gmp +;extension=intl +;extension=imap +;extension=mbstring +;extension=exif ; Must be after mbstring as it depends on it +;extension=mysqli +;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +;extension=oci8_19 ; Use with Oracle Database 19 Instant Client +;extension=odbc +;extension=openssl +;extension=pdo_firebird +;extension=pdo_mysql +;extension=pdo_oci +;extension=pdo_odbc +;extension=pdo_pgsql +;extension=pdo_sqlite +;extension=pgsql +;extension=shmop + +; The MIBS data available in the PHP distribution must be installed. +; See https://www.php.net/manual/en/snmp.installation.php +;extension=snmp + +;extension=soap +;extension=sockets +;extension=sodium +;extension=sqlite3 +;extension=tidy +;extension=xsl +;extension=zip + +;zend_extension=opcache + +;;;;;;;;;;;;;;;;;;; +; Module Settings ; +;;;;;;;;;;;;;;;;;;; + +[CLI Server] +; Whether the CLI web server uses ANSI color coding in its terminal output. +cli_server.color = On + +[Date] +; Defines the default timezone used by the date functions +; https://php.net/date.timezone +;date.timezone = + +; https://php.net/date.default-latitude +;date.default_latitude = 31.7667 + +; https://php.net/date.default-longitude +;date.default_longitude = 35.2333 + +; https://php.net/date.sunrise-zenith +;date.sunrise_zenith = 90.833333 + +; https://php.net/date.sunset-zenith +;date.sunset_zenith = 90.833333 + +[filter] +; https://php.net/filter.default +;filter.default = unsafe_raw + +; https://php.net/filter.default-flags +;filter.default_flags = + +[iconv] +; Use of this INI entry is deprecated, use global input_encoding instead. +; If empty, default_charset or input_encoding or iconv.input_encoding is used. +; The precedence is: default_charset < input_encoding < iconv.input_encoding +;iconv.input_encoding = + +; Use of this INI entry is deprecated, use global internal_encoding instead. +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;iconv.internal_encoding = + +; Use of this INI entry is deprecated, use global output_encoding instead. +; If empty, default_charset or output_encoding or iconv.output_encoding is used. +; The precedence is: default_charset < output_encoding < iconv.output_encoding +; To use an output encoding conversion, iconv's output handler must be set +; otherwise output encoding conversion cannot be performed. +;iconv.output_encoding = + +[imap] +; rsh/ssh logins are disabled by default. Use this INI entry if you want to +; enable them. Note that the IMAP library does not filter mailbox names before +; passing them to rsh/ssh command, thus passing untrusted data to this function +; with rsh/ssh enabled is insecure. +;imap.enable_insecure_rsh=0 + +[intl] +;intl.default_locale = +; This directive allows you to produce PHP errors when some error +; happens within intl functions. The value is the level of the error produced. +; Default is 0, which does not produce any errors. +;intl.error_level = E_WARNING +;intl.use_exceptions = 0 + +[sqlite3] +; Directory pointing to SQLite3 extensions +; https://php.net/sqlite3.extension-dir +;sqlite3.extension_dir = + +; SQLite defensive mode flag (only available from SQLite 3.26+) +; When the defensive flag is enabled, language features that allow ordinary +; SQL to deliberately corrupt the database file are disabled. This forbids +; writing directly to the schema, shadow tables (eg. FTS data tables), or +; the sqlite_dbpage virtual table. +; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html +; (for older SQLite versions, this flag has no use) +;sqlite3.defensive = 1 + +[Pcre] +; PCRE library backtracking limit. +; https://php.net/pcre.backtrack-limit +;pcre.backtrack_limit=100000 + +; PCRE library recursion limit. +; Please note that if you set this value to a high number you may consume all +; the available process stack and eventually crash PHP (due to reaching the +; stack size limit imposed by the Operating System). +; https://php.net/pcre.recursion-limit +;pcre.recursion_limit=100000 + +; Enables or disables JIT compilation of patterns. This requires the PCRE +; library to be compiled with JIT support. +;pcre.jit=1 + +[Pdo] +; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" +; https://php.net/pdo-odbc.connection-pooling +;pdo_odbc.connection_pooling=strict + +[Pdo_mysql] +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +pdo_mysql.default_socket= + +[Phar] +; https://php.net/phar.readonly +;phar.readonly = On + +; https://php.net/phar.require-hash +;phar.require_hash = On + +;phar.cache_list = + +[mail function] +; For Win32 only. +; https://php.net/smtp +SMTP = localhost +; https://php.net/smtp-port +smtp_port = 25 + +; For Win32 only. +; https://php.net/sendmail-from +;sendmail_from = me@example.com + +; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). +; https://php.net/sendmail-path +;sendmail_path = + +; Force the addition of the specified parameters to be passed as extra parameters +; to the sendmail binary. These parameters will always replace the value of +; the 5th parameter to mail(). +;mail.force_extra_parameters = + +; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename +mail.add_x_header = Off + +; Use mixed LF and CRLF line separators to keep compatibility with some +; RFC 2822 non conformant MTA. +mail.mixed_lf_and_crlf = Off + +; The path to a log file that will log all mail() calls. Log entries include +; the full path of the script, line number, To address and headers. +;mail.log = +; Log mail to syslog (Event Log on Windows). +;mail.log = syslog + +[ODBC] +; https://php.net/odbc.default-db +;odbc.default_db = Not yet implemented + +; https://php.net/odbc.default-user +;odbc.default_user = Not yet implemented + +; https://php.net/odbc.default-pw +;odbc.default_pw = Not yet implemented + +; Controls the ODBC cursor model. +; Default: SQL_CURSOR_STATIC (default). +;odbc.default_cursortype + +; Allow or prevent persistent links. +; https://php.net/odbc.allow-persistent +odbc.allow_persistent = On + +; Check that a connection is still valid before reuse. +; https://php.net/odbc.check-persistent +odbc.check_persistent = On + +; Maximum number of persistent links. -1 means no limit. +; https://php.net/odbc.max-persistent +odbc.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +; https://php.net/odbc.max-links +odbc.max_links = -1 + +; Handling of LONG fields. Returns number of bytes to variables. 0 means +; passthru. +; https://php.net/odbc.defaultlrl +odbc.defaultlrl = 4096 + +; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. +; See the documentation on odbc_binmode and odbc_longreadlen for an explanation +; of odbc.defaultlrl and odbc.defaultbinmode +; https://php.net/odbc.defaultbinmode +odbc.defaultbinmode = 1 + +[MySQLi] + +; Maximum number of persistent links. -1 means no limit. +; https://php.net/mysqli.max-persistent +mysqli.max_persistent = -1 + +; Allow accessing, from PHP's perspective, local files with LOAD DATA statements +; https://php.net/mysqli.allow_local_infile +;mysqli.allow_local_infile = On + +; It allows the user to specify a folder where files that can be sent via LOAD DATA +; LOCAL can exist. It is ignored if mysqli.allow_local_infile is enabled. +;mysqli.local_infile_directory = + +; Allow or prevent persistent links. +; https://php.net/mysqli.allow-persistent +mysqli.allow_persistent = On + +; Maximum number of links. -1 means no limit. +; https://php.net/mysqli.max-links +mysqli.max_links = -1 + +; Default port number for mysqli_connect(). If unset, mysqli_connect() will use +; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the +; compile-time value defined MYSQL_PORT (in that order). Win32 will only look +; at MYSQL_PORT. +; https://php.net/mysqli.default-port +mysqli.default_port = 3306 + +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +; https://php.net/mysqli.default-socket +mysqli.default_socket = + +; Default host for mysqli_connect() (doesn't apply in safe mode). +; https://php.net/mysqli.default-host +mysqli.default_host = + +; Default user for mysqli_connect() (doesn't apply in safe mode). +; https://php.net/mysqli.default-user +mysqli.default_user = + +; Default password for mysqli_connect() (doesn't apply in safe mode). +; Note that this is generally a *bad* idea to store passwords in this file. +; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") +; and reveal this password! And of course, any users with read access to this +; file will be able to reveal the password as well. +; https://php.net/mysqli.default-pw +mysqli.default_pw = + +; If this option is enabled, closing a persistent connection will rollback +; any pending transactions of this connection, before it is put back +; into the persistent connection pool. +;mysqli.rollback_on_cached_plink = Off + +[mysqlnd] +; Enable / Disable collection of general statistics by mysqlnd which can be +; used to tune and monitor MySQL operations. +mysqlnd.collect_statistics = On + +; Enable / Disable collection of memory usage statistics by mysqlnd which can be +; used to tune and monitor MySQL operations. +mysqlnd.collect_memory_statistics = Off + +; Records communication from all extensions using mysqlnd to the specified log +; file. +; https://php.net/mysqlnd.debug +;mysqlnd.debug = + +; Defines which queries will be logged. +;mysqlnd.log_mask = 0 + +; Default size of the mysqlnd memory pool, which is used by result sets. +;mysqlnd.mempool_default_size = 16000 + +; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. +;mysqlnd.net_cmd_buffer_size = 2048 + +; Size of a pre-allocated buffer used for reading data sent by the server in +; bytes. +;mysqlnd.net_read_buffer_size = 32768 + +; Timeout for network requests in seconds. +;mysqlnd.net_read_timeout = 31536000 + +; SHA-256 Authentication Plugin related. File with the MySQL server public RSA +; key. +;mysqlnd.sha256_server_public_key = + +[OCI8] + +; Connection: Enables privileged connections using external +; credentials (OCI_SYSOPER, OCI_SYSDBA) +; https://php.net/oci8.privileged-connect +;oci8.privileged_connect = Off + +; Connection: The maximum number of persistent OCI8 connections per +; process. Using -1 means no limit. +; https://php.net/oci8.max-persistent +;oci8.max_persistent = -1 + +; Connection: The maximum number of seconds a process is allowed to +; maintain an idle persistent connection. Using -1 means idle +; persistent connections will be maintained forever. +; https://php.net/oci8.persistent-timeout +;oci8.persistent_timeout = -1 + +; Connection: The number of seconds that must pass before issuing a +; ping during oci_pconnect() to check the connection validity. When +; set to 0, each oci_pconnect() will cause a ping. Using -1 disables +; pings completely. +; https://php.net/oci8.ping-interval +;oci8.ping_interval = 60 + +; Connection: Set this to a user chosen connection class to be used +; for all pooled server requests with Oracle Database Resident +; Connection Pooling (DRCP). To use DRCP, this value should be set to +; the same string for all web servers running the same application, +; the database pool must be configured, and the connection string must +; specify to use a pooled server. +;oci8.connection_class = + +; High Availability: Using On lets PHP receive Fast Application +; Notification (FAN) events generated when a database node fails. The +; database must also be configured to post FAN events. +;oci8.events = Off + +; Tuning: This option enables statement caching, and specifies how +; many statements to cache. Using 0 disables statement caching. +; https://php.net/oci8.statement-cache-size +;oci8.statement_cache_size = 20 + +; Tuning: Enables row prefetching and sets the default number of +; rows that will be fetched automatically after statement execution. +; https://php.net/oci8.default-prefetch +;oci8.default_prefetch = 100 + +; Tuning: Sets the amount of LOB data that is internally returned from +; Oracle Database when an Oracle LOB locator is initially retrieved as +; part of a query. Setting this can improve performance by reducing +; round-trips. +; https://php.net/oci8.prefetch-lob-size +; oci8.prefetch_lob_size = 0 + +; Compatibility. Using On means oci_close() will not close +; oci_connect() and oci_new_connect() connections. +; https://php.net/oci8.old-oci-close-semantics +;oci8.old_oci_close_semantics = Off + +[PostgreSQL] +; Allow or prevent persistent links. +; https://php.net/pgsql.allow-persistent +pgsql.allow_persistent = On + +; Detect broken persistent links always with pg_pconnect(). +; Auto reset feature requires a little overheads. +; https://php.net/pgsql.auto-reset-persistent +pgsql.auto_reset_persistent = Off + +; Maximum number of persistent links. -1 means no limit. +; https://php.net/pgsql.max-persistent +pgsql.max_persistent = -1 + +; Maximum number of links (persistent+non persistent). -1 means no limit. +; https://php.net/pgsql.max-links +pgsql.max_links = -1 + +; Ignore PostgreSQL backends Notice message or not. +; Notice message logging require a little overheads. +; https://php.net/pgsql.ignore-notice +pgsql.ignore_notice = 0 + +; Log PostgreSQL backends Notice message or not. +; Unless pgsql.ignore_notice=0, module cannot log notice message. +; https://php.net/pgsql.log-notice +pgsql.log_notice = 0 + +[bcmath] +; Number of decimal digits for all bcmath functions. +; https://php.net/bcmath.scale +bcmath.scale = 0 + +[browscap] +; https://php.net/browscap +;browscap = extra/browscap.ini + +[Session] +; Handler used to store/retrieve data. +; https://php.net/session.save-handler +session.save_handler = files + +; Argument passed to save_handler. In the case of files, this is the path +; where data files are stored. Note: Windows users have to change this +; variable in order to use PHP's session functions. +; +; The path can be defined as: +; +; session.save_path = "N;/path" +; +; where N is an integer. Instead of storing all the session files in +; /path, what this will do is use subdirectories N-levels deep, and +; store the session data in those directories. This is useful if +; your OS has problems with many files in one directory, and is +; a more efficient layout for servers that handle many sessions. +; +; NOTE 1: PHP will not create this directory structure automatically. +; You can use the script in the ext/session dir for that purpose. +; NOTE 2: See the section on garbage collection below if you choose to +; use subdirectories for session storage +; +; The file storage module creates files using mode 600 by default. +; You can change that by using +; +; session.save_path = "N;MODE;/path" +; +; where MODE is the octal representation of the mode. Note that this +; does not overwrite the process's umask. +; https://php.net/session.save-path +;session.save_path = "/tmp" + +; Whether to use strict session mode. +; Strict session mode does not accept an uninitialized session ID, and +; regenerates the session ID if the browser sends an uninitialized session ID. +; Strict mode protects applications from session fixation via a session adoption +; vulnerability. It is disabled by default for maximum compatibility, but +; enabling it is encouraged. +; https://wiki.php.net/rfc/strict_sessions +session.use_strict_mode = 0 + +; Whether to use cookies. +; https://php.net/session.use-cookies +session.use_cookies = 1 + +; https://php.net/session.cookie-secure +;session.cookie_secure = + +; This option forces PHP to fetch and use a cookie for storing and maintaining +; the session id. We encourage this operation as it's very helpful in combating +; session hijacking when not specifying and managing your own session id. It is +; not the be-all and end-all of session hijacking defense, but it's a good start. +; https://php.net/session.use-only-cookies +session.use_only_cookies = 1 + +; Name of the session (used as cookie name). +; https://php.net/session.name +session.name = PHPSESSID + +; Initialize session on request startup. +; https://php.net/session.auto-start +session.auto_start = 0 + +; Lifetime in seconds of cookie or, if 0, until browser is restarted. +; https://php.net/session.cookie-lifetime +session.cookie_lifetime = 0 + +; The path for which the cookie is valid. +; https://php.net/session.cookie-path +session.cookie_path = / + +; The domain for which the cookie is valid. +; https://php.net/session.cookie-domain +session.cookie_domain = + +; Whether or not to add the httpOnly flag to the cookie, which makes it +; inaccessible to browser scripting languages such as JavaScript. +; https://php.net/session.cookie-httponly +session.cookie_httponly = + +; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) +; Current valid values are "Strict", "Lax" or "None". When using "None", +; make sure to include the quotes, as `none` is interpreted like `false` in ini files. +; https://tools.ietf.org/html/draft-west-first-party-cookies-07 +session.cookie_samesite = + +; Handler used to serialize data. php is the standard serializer of PHP. +; https://php.net/session.serialize-handler +session.serialize_handler = php + +; Defines the probability that the 'garbage collection' process is started on every +; session initialization. The probability is calculated by using gc_probability/gc_divisor, +; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. +; Default Value: 1 +; Development Value: 1 +; Production Value: 1 +; https://php.net/session.gc-probability +session.gc_probability = 1 + +; Defines the probability that the 'garbage collection' process is started on every +; session initialization. The probability is calculated by using gc_probability/gc_divisor, +; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. +; For high volume production servers, using a value of 1000 is a more efficient approach. +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 +; https://php.net/session.gc-divisor +session.gc_divisor = 1000 + +; After this number of seconds, stored data will be seen as 'garbage' and +; cleaned up by the garbage collection process. +; https://php.net/session.gc-maxlifetime +session.gc_maxlifetime = 1440 + +; NOTE: If you are using the subdirectory option for storing session files +; (see session.save_path above), then garbage collection does *not* +; happen automatically. You will need to do your own garbage +; collection through a shell script, cron entry, or some other method. +; For example, the following script is the equivalent of setting +; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): +; find /path/to/sessions -cmin +24 -type f | xargs rm + +; Check HTTP Referer to invalidate externally stored URLs containing ids. +; HTTP_REFERER has to contain this substring for the session to be +; considered as valid. +; https://php.net/session.referer-check +session.referer_check = + +; Set to {nocache,private,public,} to determine HTTP caching aspects +; or leave this empty to avoid sending anti-caching headers. +; https://php.net/session.cache-limiter +session.cache_limiter = nocache + +; Document expires after n minutes. +; https://php.net/session.cache-expire +session.cache_expire = 180 + +; trans sid support is disabled by default. +; Use of trans sid may risk your users' security. +; Use this option with caution. +; - User may send URL contains active session ID +; to other person via. email/irc/etc. +; - URL that contains active session ID may be stored +; in publicly accessible computer. +; - User may access your site with the same session ID +; always using URL stored in browser's history or bookmarks. +; https://php.net/session.use-trans-sid +session.use_trans_sid = 0 + +; Set session ID character length. This value could be between 22 to 256. +; Shorter length than default is supported only for compatibility reason. +; Users should use 32 or more chars. +; https://php.net/session.sid-length +; Default Value: 32 +; Development Value: 26 +; Production Value: 26 +session.sid_length = 26 + +; The URL rewriter will look for URLs in a defined set of HTML tags. +;
is special; if you include them here, the rewriter will +; add a hidden field with the info which is otherwise appended +; to URLs. tag's action attribute URL will not be modified +; unless it is specified. +; Note that all valid entries require a "=", even if no value follows. +; Default Value: "a=href,area=href,frame=src,form=" +; Development Value: "a=href,area=href,frame=src,form=" +; Production Value: "a=href,area=href,frame=src,form=" +; https://php.net/url-rewriter.tags +session.trans_sid_tags = "a=href,area=href,frame=src,form=" + +; URL rewriter does not rewrite absolute URLs by default. +; To enable rewrites for absolute paths, target hosts must be specified +; at RUNTIME. i.e. use ini_set() +; tags is special. PHP will check action attribute's URL regardless +; of session.trans_sid_tags setting. +; If no host is defined, HTTP_HOST will be used for allowed host. +; Example value: php.net,www.php.net,wiki.php.net +; Use "," for multiple hosts. No spaces are allowed. +; Default Value: "" +; Development Value: "" +; Production Value: "" +;session.trans_sid_hosts="" + +; Define how many bits are stored in each character when converting +; the binary hash data to something readable. +; Possible values: +; 4 (4 bits: 0-9, a-f) +; 5 (5 bits: 0-9, a-v) +; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 +; https://php.net/session.hash-bits-per-character +session.sid_bits_per_character = 5 + +; Enable upload progress tracking in $_SESSION +; Default Value: On +; Development Value: On +; Production Value: On +; https://php.net/session.upload-progress.enabled +;session.upload_progress.enabled = On + +; Cleanup the progress information as soon as all POST data has been read +; (i.e. upload completed). +; Default Value: On +; Development Value: On +; Production Value: On +; https://php.net/session.upload-progress.cleanup +;session.upload_progress.cleanup = On + +; A prefix used for the upload progress key in $_SESSION +; Default Value: "upload_progress_" +; Development Value: "upload_progress_" +; Production Value: "upload_progress_" +; https://php.net/session.upload-progress.prefix +;session.upload_progress.prefix = "upload_progress_" + +; The index name (concatenated with the prefix) in $_SESSION +; containing the upload progress information +; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" +; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" +; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" +; https://php.net/session.upload-progress.name +;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" + +; How frequently the upload progress should be updated. +; Given either in percentages (per-file), or in bytes +; Default Value: "1%" +; Development Value: "1%" +; Production Value: "1%" +; https://php.net/session.upload-progress.freq +;session.upload_progress.freq = "1%" + +; The minimum delay between updates, in seconds +; Default Value: 1 +; Development Value: 1 +; Production Value: 1 +; https://php.net/session.upload-progress.min-freq +;session.upload_progress.min_freq = "1" + +; Only write session data when session data is changed. Enabled by default. +; https://php.net/session.lazy-write +;session.lazy_write = On + +[Assertion] +; Switch whether to compile assertions at all (to have no overhead at run-time) +; -1: Do not compile at all +; 0: Jump over assertion at run-time +; 1: Execute assertions +; Changing from or to a negative value is only possible in php.ini! +; (For turning assertions on and off at run-time, toggle zend.assertions between the values 1 and 0) +; Default Value: 1 +; Development Value: 1 +; Production Value: -1 +; https://php.net/zend.assertions +zend.assertions = -1 + +[COM] +; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs +; https://php.net/com.typelib-file +;com.typelib_file = + +; allow Distributed-COM calls +; https://php.net/com.allow-dcom +;com.allow_dcom = true + +; autoregister constants of a component's typelib on com_load() +; https://php.net/com.autoregister-typelib +;com.autoregister_typelib = true + +; register constants casesensitive +; https://php.net/com.autoregister-casesensitive +;com.autoregister_casesensitive = false + +; show warnings on duplicate constant registrations +; https://php.net/com.autoregister-verbose +;com.autoregister_verbose = true + +; The default character set code-page to use when passing strings to and from COM objects. +; Default: system ANSI code page +;com.code_page= + +; The version of the .NET framework to use. The value of the setting are the first three parts +; of the framework's version number, separated by dots, and prefixed with "v", e.g. "v4.0.30319". +;com.dotnet_version= + +[mbstring] +; language for internal character representation. +; This affects mb_send_mail() and mbstring.detect_order. +; https://php.net/mbstring.language +;mbstring.language = Japanese + +; Use of this INI entry is deprecated, use global internal_encoding instead. +; internal/script encoding. +; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;mbstring.internal_encoding = + +; Use of this INI entry is deprecated, use global input_encoding instead. +; http input encoding. +; mbstring.encoding_translation = On is needed to use this setting. +; If empty, default_charset or input_encoding or mbstring.input is used. +; The precedence is: default_charset < input_encoding < mbstring.http_input +; https://php.net/mbstring.http-input +;mbstring.http_input = + +; Use of this INI entry is deprecated, use global output_encoding instead. +; http output encoding. +; mb_output_handler must be registered as output buffer to function. +; If empty, default_charset or output_encoding or mbstring.http_output is used. +; The precedence is: default_charset < output_encoding < mbstring.http_output +; To use an output encoding conversion, mbstring's output handler must be set +; otherwise output encoding conversion cannot be performed. +; https://php.net/mbstring.http-output +;mbstring.http_output = + +; enable automatic encoding translation according to +; mbstring.internal_encoding setting. Input chars are +; converted to internal encoding by setting this to On. +; Note: Do _not_ use automatic encoding translation for +; portable libs/applications. +; https://php.net/mbstring.encoding-translation +;mbstring.encoding_translation = Off + +; automatic encoding detection order. +; "auto" detect order is changed according to mbstring.language +; https://php.net/mbstring.detect-order +;mbstring.detect_order = auto + +; substitute_character used when character cannot be converted +; one from another +; https://php.net/mbstring.substitute-character +;mbstring.substitute_character = none + +; Enable strict encoding detection. +;mbstring.strict_detection = Off + +; This directive specifies the regex pattern of content types for which mb_output_handler() +; is activated. +; Default: mbstring.http_output_conv_mimetypes=^(text/|application/xhtml\+xml) +;mbstring.http_output_conv_mimetypes= + +; This directive specifies maximum stack depth for mbstring regular expressions. It is similar +; to the pcre.recursion_limit for PCRE. +;mbstring.regex_stack_limit=100000 + +; This directive specifies maximum retry count for mbstring regular expressions. It is similar +; to the pcre.backtrack_limit for PCRE. +;mbstring.regex_retry_limit=1000000 + +[gd] +; Tell the jpeg decode to ignore warnings and try to create +; a gd image. The warning will then be displayed as notices +; disabled by default +; https://php.net/gd.jpeg-ignore-warning +;gd.jpeg_ignore_warning = 1 + +[exif] +; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. +; With mbstring support this will automatically be converted into the encoding +; given by corresponding encode setting. When empty mbstring.internal_encoding +; is used. For the decode settings you can distinguish between motorola and +; intel byte order. A decode setting cannot be empty. +; https://php.net/exif.encode-unicode +;exif.encode_unicode = ISO-8859-15 + +; https://php.net/exif.decode-unicode-motorola +;exif.decode_unicode_motorola = UCS-2BE + +; https://php.net/exif.decode-unicode-intel +;exif.decode_unicode_intel = UCS-2LE + +; https://php.net/exif.encode-jis +;exif.encode_jis = + +; https://php.net/exif.decode-jis-motorola +;exif.decode_jis_motorola = JIS + +; https://php.net/exif.decode-jis-intel +;exif.decode_jis_intel = JIS + +[Tidy] +; The path to a default tidy configuration file to use when using tidy +; https://php.net/tidy.default-config +;tidy.default_config = /usr/local/lib/php/default.tcfg + +; Should tidy clean and repair output automatically? +; WARNING: Do not use this option if you are generating non-html content +; such as dynamic images +; https://php.net/tidy.clean-output +tidy.clean_output = Off + +[soap] +; Enables or disables WSDL caching feature. +; https://php.net/soap.wsdl-cache-enabled +soap.wsdl_cache_enabled=1 + +; Sets the directory name where SOAP extension will put cache files. +; https://php.net/soap.wsdl-cache-dir +soap.wsdl_cache_dir="/tmp" + +; (time to live) Sets the number of second while cached file will be used +; instead of original one. +; https://php.net/soap.wsdl-cache-ttl +soap.wsdl_cache_ttl=86400 + +; Sets the size of the cache limit. (Max. number of WSDL files to cache) +soap.wsdl_cache_limit = 5 + +[sysvshm] +; A default size of the shared memory segment +;sysvshm.init_mem = 10000 + +[ldap] +; Sets the maximum number of open links or -1 for unlimited. +ldap.max_links = -1 + +[dba] +;dba.default_handler= + +[opcache] +; Determines if Zend OPCache is enabled +;opcache.enable=1 + +; Determines if Zend OPCache is enabled for the CLI version of PHP +;opcache.enable_cli=0 + +; The OPcache shared memory storage size. +;opcache.memory_consumption=128 + +; The amount of memory for interned strings in Mbytes. +;opcache.interned_strings_buffer=8 + +; The maximum number of keys (scripts) in the OPcache hash table. +; Only numbers between 200 and 1000000 are allowed. +;opcache.max_accelerated_files=10000 + +; The maximum percentage of "wasted" memory until a restart is scheduled. +;opcache.max_wasted_percentage=5 + +; When this directive is enabled, the OPcache appends the current working +; directory to the script key, thus eliminating possible collisions between +; files with the same name (basename). Disabling the directive improves +; performance, but may break existing applications. +;opcache.use_cwd=1 + +; When disabled, you must reset the OPcache manually or restart the +; webserver for changes to the filesystem to take effect. +;opcache.validate_timestamps=1 + +; How often (in seconds) to check file timestamps for changes to the shared +; memory storage allocation. ("1" means validate once per second, but only +; once per request. "0" means always validate) +;opcache.revalidate_freq=2 + +; Enables or disables file search in include_path optimization +;opcache.revalidate_path=0 + +; If disabled, all PHPDoc comments are dropped from the code to reduce the +; size of the optimized code. +;opcache.save_comments=1 + +; If enabled, compilation warnings (including notices and deprecations) will +; be recorded and replayed each time a file is included. Otherwise, compilation +; warnings will only be emitted when the file is first cached. +;opcache.record_warnings=0 + +; Allow file existence override (file_exists, etc.) performance feature. +;opcache.enable_file_override=0 + +; A bitmask, where each bit enables or disables the appropriate OPcache +; passes +;opcache.optimization_level=0x7FFFBFFF + +;opcache.dups_fix=0 + +; The location of the OPcache blacklist file (wildcards allowed). +; Each OPcache blacklist file is a text file that holds the names of files +; that should not be accelerated. The file format is to add each filename +; to a new line. The filename may be a full path or just a file prefix +; (i.e., /var/www/x blacklists all the files and directories in /var/www +; that start with 'x'). Line starting with a ; are ignored (comments). +;opcache.blacklist_filename= + +; Allows exclusion of large files from being cached. By default all files +; are cached. +;opcache.max_file_size=0 + +; How long to wait (in seconds) for a scheduled restart to begin if the cache +; is not being accessed. +;opcache.force_restart_timeout=180 + +; OPcache error_log file name. Empty string assumes "stderr". +;opcache.error_log= + +; All OPcache errors go to the Web server log. +; By default, only fatal errors (level 0) or errors (level 1) are logged. +; You can also enable warnings (level 2), info messages (level 3) or +; debug messages (level 4). +;opcache.log_verbosity_level=1 + +; Preferred Shared Memory back-end. Leave empty and let the system decide. +;opcache.preferred_memory_model= + +; Protect the shared memory from unexpected writing during script execution. +; Useful for internal debugging only. +;opcache.protect_memory=0 + +; Allows calling OPcache API functions only from PHP scripts which path is +; started from specified string. The default "" means no restriction +;opcache.restrict_api= + +; Mapping base of shared memory segments (for Windows only). All the PHP +; processes have to map shared memory into the same address space. This +; directive allows to manually fix the "Unable to reattach to base address" +; errors. +;opcache.mmap_base= + +; Facilitates multiple OPcache instances per user (for Windows only). All PHP +; processes with the same cache ID and user share an OPcache instance. +;opcache.cache_id= + +; Enables and sets the second level cache directory. +; It should improve performance when SHM memory is full, at server restart or +; SHM reset. The default "" disables file based caching. +;opcache.file_cache= + +; Enables or disables opcode caching in shared memory. +;opcache.file_cache_only=0 + +; Enables or disables checksum validation when script loaded from file cache. +;opcache.file_cache_consistency_checks=1 + +; Implies opcache.file_cache_only=1 for a certain process that failed to +; reattach to the shared memory (for Windows only). Explicitly enabled file +; cache is required. +;opcache.file_cache_fallback=1 + +; Enables or disables copying of PHP code (text segment) into HUGE PAGES. +; Under certain circumstances (if only a single global PHP process is +; started from which all others fork), this can increase performance +; by a tiny amount because TLB misses are reduced. On the other hand, this +; delays PHP startup, increases memory usage and degrades performance +; under memory pressure - use with care. +; Requires appropriate OS configuration. +;opcache.huge_code_pages=0 + +; Validate cached file permissions. +;opcache.validate_permission=0 + +; Prevent name collisions in chroot'ed environment. +;opcache.validate_root=0 + +; If specified, it produces opcode dumps for debugging different stages of +; optimizations. +;opcache.opt_debug_level=0 + +; Specifies a PHP script that is going to be compiled and executed at server +; start-up. +; https://php.net/opcache.preload +;opcache.preload= + +; Preloading code as root is not allowed for security reasons. This directive +; facilitates to let the preloading to be run as another user. +; https://php.net/opcache.preload_user +;opcache.preload_user= + +; Prevents caching files that are less than this number of seconds old. It +; protects from caching of incompletely updated files. In case all file updates +; on your site are atomic, you may increase performance by setting it to "0". +;opcache.file_update_protection=2 + +; Absolute path used to store shared lockfiles (for *nix only). +;opcache.lockfile_path=/tmp + +[curl] +; A default value for the CURLOPT_CAINFO option. This is required to be an +; absolute path. +;curl.cainfo = + +[openssl] +; The location of a Certificate Authority (CA) file on the local filesystem +; to use when verifying the identity of SSL/TLS peers. Most users should +; not specify a value for this directive as PHP will attempt to use the +; OS-managed cert stores in its absence. If specified, this value may still +; be overridden on a per-stream basis via the "cafile" SSL stream context +; option. +;openssl.cafile= + +; If openssl.cafile is not specified or if the CA file is not found, the +; directory pointed to by openssl.capath is searched for a suitable +; certificate. This value must be a correctly hashed certificate directory. +; Most users should not specify a value for this directive as PHP will +; attempt to use the OS-managed cert stores in its absence. If specified, +; this value may still be overridden on a per-stream basis via the "capath" +; SSL stream context option. +;openssl.capath= + +[ffi] +; FFI API restriction. Possible values: +; "preload" - enabled in CLI scripts and preloaded files (default) +; "false" - always disabled +; "true" - always enabled +;ffi.enable=preload + +; List of headers files to preload, wildcard patterns allowed. +;ffi.preload= diff --git a/docker/config/rewrite.load b/docker/config/rewrite.load new file mode 100644 index 000000000..b32f16264 --- /dev/null +++ b/docker/config/rewrite.load @@ -0,0 +1 @@ +LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so diff --git a/docker/set_configuration.sh b/docker/set_configuration.sh new file mode 100755 index 000000000..b579dff69 --- /dev/null +++ b/docker/set_configuration.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# TODO: read credentials from secrets instead +OPENML_PATH=${OPENML_PATH:-/var/www/} +BASE_CONFIG_PATH=${OPENML_PATH}openml/openml_OS/config/BASE_CONFIG.php +INDEX_PATH=${OPENML_PATH}openml/index.php + +# We expect some paths/urls to contain '/' characters, so we use '*' instead +sed "s*'BASE_URL', 'FILL_IN'*'BASE_URL', '${BASE_URL:-https://test.openml.org/}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'MINIO_URL', 'FILL_IN'*'MINIO_URL', '${MINIO_URL:-https://openml1.win.tue.nl/}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'PATH', 'FILL_IN'*'PATH', '${OPENML_PATH:-/var/www/}'*g" --in-place ${BASE_CONFIG_PATH} + +sed "s*'API_KEY', 'FILL_IN_KEY'*'API_KEY', '${API_KEY:-FILL_IN_KEY}'*g" --in-place ${BASE_CONFIG_PATH} + +sed "s*'DB_NAME_EXPDB', 'FILL_IN'*'DB_NAME_EXPDB', '${DB_NAME_EXPDB:-openml_expdb}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_HOST_EXPDB', 'FILL_IN'*'DB_HOST_EXPDB', '${DB_HOST_EXPDB:-openml-test-database:3306}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_USER_EXPDB_READ', 'FILL_IN'*'DB_USER_EXPDB_READ', '${DB_USER_EXPDB_READ:-root}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_PASS_EXPDB_READ', 'FILL_IN'*'DB_PASS_EXPDB_READ', '${DB_PASS_EXPDB_READ:-ok}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_USER_EXPDB_WRITE', 'FILL_IN'*'DB_USER_EXPDB_WRITE', '${DB_USER_EXPDB_WRITE:-root}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_PASS_EXPDB_WRITE', 'FILL_IN'*'DB_PASS_EXPDB_WRITE', '${DB_PASS_EXPDB_WRITE:-ok}'*g" --in-place ${BASE_CONFIG_PATH} + +sed "s*'DB_NAME_OPENML', 'FILL_IN'*'DB_NAME_OPENML', '${DB_NAME_OPENML:-openml}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_HOST_OPENML', 'FILL_IN'*'DB_HOST_OPENML', '${DB_HOST_OPENML:-openml-test-database:3306}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_USER_OPENML', 'FILL_IN'*'DB_USER_OPENML', '${DB_USER_OPENML:-root}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'DB_PASS_OPENML', 'FILL_IN'*'DB_PASS_OPENML', '${DB_PASS_OPENML:-ok}'*g" --in-place ${BASE_CONFIG_PATH} + +sed "s*'ES_URL', 'FILL_IN'*'ES_URL', '${ES_URL:-elasticsearch:9200}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'ES_USERNAME', 'FILL_IN'*'ES_USERNAME', '${ES_USERNAME:-elastic}'*g" --in-place ${BASE_CONFIG_PATH} +sed "s*'ES_PASSWORD', 'FILL_IN'*'ES_PASSWORD', '${ES_PASSWORD:-default}'*g" --in-place ${BASE_CONFIG_PATH} + +sed "s/define('ENVIRONMENT', '.*')/define('ENVIRONMENT', '${PHP_ENVIRONMENT:-production}')/" --in-place ${INDEX_PATH} + + +indices=('downvote', 'study', 'data', 'task', 'download', 'user', 'like', 'measure', 'flow', 'task_type', 'run') +for index in "${indices[@]}" +do + curl -X DELETE ${ES_URL:-elasticsearch:9200}/${index}?ignore_unavailable=true +done + +cd /var/www/openml +php index.php cron build_es_indices + +apache2-foreground diff --git a/downloads/openml.sql b/downloads/openml.sql index 155bca2b2..a41dc2f3c 100644 --- a/downloads/openml.sql +++ b/downloads/openml.sql @@ -19,7 +19,8 @@ SET time_zone = "+00:00"; -- -- Database: `openml` -- - +CREATE DATABASE IF NOT EXISTS `openml` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; +USE `openml`; -- -------------------------------------------------------- -- @@ -59,7 +60,7 @@ CREATE TABLE `file` ( `creator` int(16) NOT NULL, `creation_date` datetime NOT NULL, `filepath` varchar(256) NOT NULL, - `filesize` int(64) NOT NULL, + `filesize` bigint(64) NOT NULL, `filename_original` varchar(256) NOT NULL, `extension` varchar(16) NOT NULL, `mime_type` varchar(32) NOT NULL, diff --git a/downloads/openml_expdb.sql b/downloads/openml_expdb.sql index 657b12a2e..dd7c223ff 100644 --- a/downloads/openml_expdb.sql +++ b/downloads/openml_expdb.sql @@ -95,7 +95,6 @@ CREATE TABLE `dataset` ( `name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `version` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `version_label` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `format` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'arff', `creator` text COLLATE utf8_unicode_ci, `contributor` text COLLATE utf8_unicode_ci, @@ -106,6 +105,7 @@ CREATE TABLE `dataset` ( `citation` text COLLATE utf8_unicode_ci, `collection` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `url` mediumtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `parquet_url` mediumtext CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `isOriginal` enum('true','false') CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `file_id` int(10) DEFAULT NULL, `default_target_attribute` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -147,6 +147,33 @@ CREATE TABLE `dataset_tag` ( -- -------------------------------------------------------- + +-- +-- Table structure for table `dataset_description` +-- + +CREATE TABLE `dataset_description` ( + `did` int(10) UNSIGNED NOT NULL, + `version` int(10) UNSIGNED NOT NULL, + `description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `uploader` mediumint(8) UNSIGNED NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + + +-- Table structure for table `dataset_topic` +-- + +CREATE TABLE `dataset_topic` ( + `id` int(10) UNSIGNED NOT NULL, + `topic` varchar(255) NOT NULL, + `uploader` mediumint(8) UNSIGNED NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + -- -- Table structure for table `data_feature` -- @@ -180,12 +207,25 @@ CREATE TABLE `data_feature` ( -- Table structure for table `data_feature_value` -- -CREATE TABLE `data_feature_value` ( +CREATE TABLE `data_feature_description` ( `did` int(10) UNSIGNED NOT NULL, `index` int(10) UNSIGNED NOT NULL, + `uploader` mediumint(8) UNSIGNED NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `description_type` enum('plain','ontology') NOT NULL, `value` varchar(256) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- +-- Table structure for table `data_feature_value` +-- + +CREATE TABLE `data_feature_value` ( + `did` int(10) UNSIGNED NOT NULL, + `index` int(10) UNSIGNED NOT NULL, + `value` varchar(256) NOT NULL COLLATE latin1_general_cs +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + -- -------------------------------------------------------- -- @@ -897,6 +937,20 @@ ALTER TABLE `dataset_tag` ADD PRIMARY KEY (`id`,`tag`), ADD KEY `uploader` (`uploader`); +-- +-- Indexes for table `dataset_description` +-- +ALTER TABLE `dataset_description` + ADD PRIMARY KEY (`did`,`version`), + ADD KEY `uploader` (`uploader`); + +-- +-- Indexes for table `dataset_topic` +-- +ALTER TABLE `dataset_topic` + ADD PRIMARY KEY (`id`,`topic`), + ADD KEY `uploader` (`uploader`); + -- -- Indexes for table `data_feature` -- @@ -908,8 +962,15 @@ ALTER TABLE `data_feature` -- -- Indexes for table `data_feature_value` -- -ALTER TABLE `data_feature_value` +ALTER TABLE `data_feature_description` ADD KEY `did` (`did`,`index`); + +-- +-- Indexes for table `data_feature_value` +-- +ALTER TABLE `data_feature_value` + ADD KEY `did` (`did`,`index`), + ADD UNIQUE(`did`, `index`, `value`); -- -- Indexes for table `data_processed` @@ -1353,6 +1414,13 @@ ALTER TABLE `dataset_status` ADD CONSTRAINT `dataset_status_ibfk_1` FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE, ADD CONSTRAINT `dataset_status_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `openml`.`users` (`id`); +-- +-- Constraints for table `dataset_description` +-- +ALTER TABLE `dataset_description` + ADD CONSTRAINT `dataset_description_ibfk_1` FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE, + ADD CONSTRAINT `dataset_description_ibfk_2` FOREIGN KEY (`uploader`) REFERENCES `openml`.`users` (`id`); + -- -- Constraints for table `dataset_tag` -- @@ -1360,6 +1428,13 @@ ALTER TABLE `dataset_tag` ADD CONSTRAINT `dataset_tag_ibfk_1` FOREIGN KEY (`uploader`) REFERENCES `openml`.`users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_dataset_tag` FOREIGN KEY (`id`) REFERENCES `dataset` (`did`) ON DELETE CASCADE; +-- +-- Constraints for table `dataset_topic` +-- +ALTER TABLE `dataset_topic` + ADD CONSTRAINT `dataset_topic_ibfk_1` FOREIGN KEY (`uploader`) REFERENCES `openml`.`users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + ADD CONSTRAINT `fk_dataset_topic` FOREIGN KEY (`id`) REFERENCES `dataset` (`did`) ON DELETE CASCADE; + -- -- Constraints for table `data_feature` -- @@ -1374,6 +1449,13 @@ ALTER TABLE `data_feature` ALTER TABLE `data_feature_value` ADD CONSTRAINT `data_feature_value_ibfk_1` FOREIGN KEY (`did`,`index`) REFERENCES `data_feature` (`did`, `index`) ON DELETE CASCADE ON UPDATE CASCADE; + +-- +-- Constraints for table `data_feature_value` +-- +ALTER TABLE `data_feature_description` + ADD CONSTRAINT `data_feature_description_ibfk_1` FOREIGN KEY (`did`,`index`) REFERENCES `data_feature` (`did`, `index`) ON DELETE CASCADE ON UPDATE CASCADE; + -- -- Constraints for table `data_processed` -- diff --git a/img/OpenMLLogo.tiff b/img/OpenMLLogo.tiff new file mode 100644 index 000000000..35f70be21 Binary files /dev/null and b/img/OpenMLLogo.tiff differ diff --git a/index.php b/index.php index f75c7a81a..e1ce3f65f 100755 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ * * NOTE: If you change these, also change the error_reporting() code below */ - define('ENVIRONMENT', 'production'); + define('ENVIRONMENT', 'development'); /* *--------------------------------------------------------------- diff --git a/license.txt b/license.txt deleted file mode 100644 index 061cdb9db..000000000 --- a/license.txt +++ /dev/null @@ -1,51 +0,0 @@ -Copyright (c) 2008 - 2011, EllisLab, Inc. -All rights reserved. - -This license is a legal agreement between you and EllisLab Inc. for the use -of CodeIgniter Software (the "Software"). By obtaining the Software you -agree to comply with the terms and conditions of this license. - -PERMITTED USE -You are permitted to use, copy, modify, and distribute the Software and its -documentation, with or without modification, for any purpose, provided that -the following conditions are met: - -1. A copy of this license agreement must be included with the distribution. - -2. Redistributions of source code must retain the above copyright notice in - all source code files. - -3. Redistributions in binary form must reproduce the above copyright notice - in the documentation and/or other materials provided with the distribution. - -4. Any files that have been modified must carry notices stating the nature - of the change and the names of those who changed them. - -5. Products derived from the Software must include an acknowledgment that - they are derived from CodeIgniter in their documentation and/or other - materials provided with the distribution. - -6. Products derived from the Software may not be called "CodeIgniter", - nor may "CodeIgniter" appear in their name, without prior written - permission from EllisLab, Inc. - -INDEMNITY -You agree to indemnify and hold harmless the authors of the Software and -any contributors for any direct, indirect, incidental, or consequential -third-party claims, actions or suits, as well as any related expenses, -liabilities, damages, settlements or fees arising from your use or misuse -of the Software, or a violation of any terms of this license. - -DISCLAIMER OF WARRANTY -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR -IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, -NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. - -LIMITATIONS OF LIABILITY -YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE -FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE -APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING -BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF -DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. diff --git a/openml_OS/composer.json b/openml_OS/composer.json index 3d08a919e..7c2d006b1 100644 --- a/openml_OS/composer.json +++ b/openml_OS/composer.json @@ -11,13 +11,13 @@ "source": "https://github.com/bcit-ci/CodeIgniter" }, "require": { - "php": ">=5.2.4", - "elasticsearch/elasticsearch": "~6.0" + "php": "7.4.33", + "elasticsearch/elasticsearch": "~6.7" }, "suggest": { "paragonie/random_compat": "Provides better randomness in PHP 5.x" }, "require-dev": { - "mikey179/vfsStream": "1.1.*" + "mikey179/vfsstream": "1.6.*" } } diff --git a/openml_OS/composer.lock b/openml_OS/composer.lock index 8d5f8f9ee..a625e18c1 100644 --- a/openml_OS/composer.lock +++ b/openml_OS/composer.lock @@ -1,40 +1,40 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "11e4e4538ebc21675994064c7ac86a35", + "content-hash": "910917a8b4c1a118ae44f7b4b0cfc75a", "packages": [ { "name": "elasticsearch/elasticsearch", - "version": "v6.0.1", + "version": "v6.8.2", "source": { "type": "git", "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a" + "reference": "619c78266999c6e431df9ca0f844e8f656ac145b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/b8e3bc9d1fc54d6a18692df0b74956efe7fe241a", - "reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/619c78266999c6e431df9ca0f844e8f656ac145b", + "reference": "619c78266999c6e431df9ca0f844e8f656ac145b", "shasum": "" }, "require": { "ext-json": ">=1.3.7", - "guzzlehttp/ringphp": "~1.0", - "php": "^7.0", + "ezimuel/ringphp": "^1.1.2", + "php": "^7.3 || ^8.0", "psr/log": "~1.0" }, "require-dev": { - "cpliakas/git-wrapper": "~1.0", - "doctrine/inflector": "^1.1", - "mockery/mockery": "0.9.4", - "phpstan/phpstan-shim": "0.8.3", - "phpunit/phpunit": "6.3.0", - "squizlabs/php_codesniffer": "3.0.2", - "symfony/finder": "^2.8", - "symfony/yaml": "^2.8" + "doctrine/inflector": "^1.3", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.4", + "symfony/finder": "~4.0", + "symfony/yaml": "~4.0", + "symplify/git-wrapper": ">=9.0 <9.3.27" }, "suggest": { "ext-curl": "*", @@ -42,6 +42,9 @@ }, "type": "library", "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Elasticsearch\\": "src/Elasticsearch/" } @@ -53,6 +56,9 @@ "authors": [ { "name": "Zachary Tong" + }, + { + "name": "Enrico Zimuel" } ], "description": "PHP Client for Elasticsearch", @@ -61,43 +67,41 @@ "elasticsearch", "search" ], - "time": "2017-12-05T14:15:58+00:00" + "support": { + "issues": "https://github.com/elastic/elasticsearch-php/issues", + "source": "https://github.com/elastic/elasticsearch-php/tree/v6.8.2" + }, + "time": "2021-07-14T14:41:55+00:00" }, { - "name": "guzzlehttp/ringphp", - "version": "1.1.1", + "name": "ezimuel/guzzlestreams", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" + "url": "https://github.com/ezimuel/guzzlestreams.git", + "reference": "b4b5a025dfee70d6cd34c780e07330eb93d5b997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", - "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", + "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/b4b5a025dfee70d6cd34c780e07330eb93d5b997", + "reference": "b4b5a025dfee70d6cd34c780e07330eb93d5b997", "shasum": "" }, "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" + "php": ">=5.4.0" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" + "phpunit/phpunit": "~9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Ring\\": "src/" + "GuzzleHttp\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -111,38 +115,55 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2018-07-31T13:22:33+00:00" + "description": "Fork of guzzle/streams (abandoned) to be used with elasticsearch-php", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "support": { + "source": "https://github.com/ezimuel/guzzlestreams/tree/3.1.0" + }, + "time": "2022-10-24T12:58:50+00:00" }, { - "name": "guzzlehttp/streams", - "version": "3.0.0", + "name": "ezimuel/ringphp", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + "url": "https://github.com/ezimuel/ringphp.git", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/7887fc8488013065f72f977dcb281994f5fde9f4", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4", "shasum": "" }, "require": { - "php": ">=5.4.0" + "ezimuel/guzzlestreams": "^3.0.1", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "replace": { + "guzzlehttp/ringphp": "self.version" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-curl": "*", + "phpunit/phpunit": "~9.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Stream\\": "src/" + "GuzzleHttp\\Ring\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -156,26 +177,24 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ], - "time": "2014-10-12T19:18:40+00:00" + "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", + "support": { + "source": "https://github.com/ezimuel/ringphp/tree/1.2.2" + }, + "time": "2022-12-07T11:28:53+00:00" }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -184,7 +203,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -199,7 +218,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -209,36 +228,39 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "react/promise", - "version": "v2.7.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f4edc2581617431aea50430749db55cc3fc031b3" + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f4edc2581617431aea50430749db55cc3fc031b3", - "reference": "f4edc2581617431aea50430749db55cc3fc031b3", + "url": "https://api.github.com/repos/reactphp/promise/zipball/1a8460931ea36dc5c76838fec5734d55c88c6831", + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -247,7 +269,23 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "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": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", @@ -255,39 +293,70 @@ "promise", "promises" ], - "time": "2018-06-13T15:59:06+00:00" + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.11.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-16T16:16:50+00:00" } ], "packages-dev": [ { - "name": "mikey179/vfsStream", - "version": "v1.1.0", + "name": "mikey179/vfsstream", + "version": "v1.6.11", "source": { "type": "git", - "url": "https://github.com/mikey179/vfsStream.git", - "reference": "fc0fe8f4d0b527254a2dc45f0c265567c881d07e" + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/fc0fe8f4d0b527254a2dc45f0c265567c881d07e", - "reference": "fc0fe8f4d0b527254a2dc45f0c265567c881d07e", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, "autoload": { "psr-0": { - "org\\bovigo\\vfs": "src/main/php" + "org\\bovigo\\vfs\\": "src/main/php" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } ], + "description": "Virtual file system to mock the real file system in unit tests.", "homepage": "http://vfs.bovigo.org/", - "time": "2012-08-25T12:49:29+00:00" + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "time": "2022-02-23T02:02:42+00:00" } ], "aliases": [], @@ -296,7 +365,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.2.4" + "php": "7.4.33" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.6.0" } diff --git a/openml_OS/composer.phar b/openml_OS/composer.phar index 89920d398..e76650654 100755 Binary files a/openml_OS/composer.phar and b/openml_OS/composer.phar differ diff --git a/openml_OS/config/BASE_CONFIG-BLANK.php b/openml_OS/config/BASE_CONFIG-BLANK.php index 685956bad..3f1a5e282 100644 --- a/openml_OS/config/BASE_CONFIG-BLANK.php +++ b/openml_OS/config/BASE_CONFIG-BLANK.php @@ -24,6 +24,11 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ define( 'DATA_URL', BASE_URL . 'data/' ); +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * MINIO_URL: MINIO Server URL. Currently this is 'http://openml1.win.tue.nl/'. + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +define( 'MINIO_URL', 'FILL_IN' ); + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * PATH: The directory on the hard disk where the instance of OpenML * can be found, with tailing slash. Typically, this would be @@ -134,6 +139,13 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ define( 'DEBUG', FALSE ); +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * * * * * + * DEBUG_XSD_EMAIL: Will send debug information for failed XSD + * validations to the user who initiated it + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +define( 'DEBUG_XSD_EMAIL', FALSE ); + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * CMD_PREFIX: Adds a prefix to all shell commands; needed for bugfix * on some MAMP (OSX) systems. Can be left empty on all other systems. diff --git a/openml_OS/config/openml_mappings.php b/openml_OS/config/openml_mappings.php index 385caf47c..35bdda3a2 100644 --- a/openml_OS/config/openml_mappings.php +++ b/openml_OS/config/openml_mappings.php @@ -78,7 +78,7 @@ ); $config['xml_fields_run'] = array( - 'string' => array('task_id', 'flow_id', 'setup_string', 'error_message'), + 'string' => array('task_id', 'flow_id', 'setup_string', 'error_message', 'run_details'), 'csv' => array('tag'), 'array' => array('parameter_setting'), 'plain' => array('output_data') diff --git a/openml_OS/controllers/Api_new.php b/openml_OS/controllers/Api_new.php index 61cd789b5..437603f38 100644 --- a/openml_OS/controllers/Api_new.php +++ b/openml_OS/controllers/Api_new.php @@ -156,31 +156,23 @@ private function bootstrap($version) { $this->Api_data->returnError(103, $this->version); } else if ($this->user_has_writing_rights == false && $request_type != 'get') { $this->Api_data->returnError(104, $this->version, $this->openmlGeneralErrorCode, 'API calls of the read-only user can only be of type GET. '); - } else if (file_exists(APPPATH.'models/api/' . $this->version . '/Api_' . $type . '.php') == false && $type != 'xsd' && $type != 'xml_example') { + } else if (file_exists(APPPATH.'models/api/' . $this->version . '/Api_' . $type . '.php') == false && $type != 'xsd' && $type != 'xml_example' && $type != 'arff_example') { $this->Api_data->returnError(100, $this->version); } else if($type == 'xsd') { - $this->xsd($segs[0], 'v1'); + $this->server_document('xsd', $segs[0] . '.xsd', 'v1', 'Content-type: text/xml; charset=utf-8'); } else if($type == 'xml_example') { - $this->xml_example($segs[0], 'v1'); + $this->server_document('xml_example', $segs[0] . '.xml', 'v1', 'Content-type: text/xml; charset=utf-8'); + } else if($type == 'arff_example') { + $this->server_document('arff_example', $segs[0] . '.arff', 'v1', 'Content-type: text/plain; charset=utf-8'); } else { $this->{'Api_'.$type}->bootstrap($outputFormat, $segs, $request_type, $this->user_id); } } - private function xsd($filename,$version) { - $filepath = APPPATH.'views/pages/' . $this->controller . '/' . $version . '/xsd/' . $filename . '.xsd'; - if(is_safe($filename) && file_exists($filepath)) { - header('Content-type: text/xml; charset=utf-8'); - echo file_get_contents($filepath); - } else { - $this->error404(); - } - } - - private function xml_example($filename,$version) { - $filepath = APPPATH.'views/pages/' . $this->controller . '/' . $version . '/xml_example/' . $filename . '.xml'; - if(is_safe($filename) && file_exists($filepath)) { - header('Content-type: text/xml; charset=utf-8'); + private function server_document($type, $filename, $version, $header) { + $filepath = APPPATH.'views/pages/' . $this->controller . '/' . $version . '/' . $type . '/' . $filename; + if(is_safe($filename) && is_safe($type) && file_exists($filepath)) { + header($header); echo file_get_contents($filepath); } else { $this->error404(); diff --git a/openml_OS/controllers/Api_splits.php b/openml_OS/controllers/Api_splits.php index 033fa4cb9..6aa8aa3d9 100644 --- a/openml_OS/controllers/Api_splits.php +++ b/openml_OS/controllers/Api_splits.php @@ -17,7 +17,7 @@ function __construct() { $this->load->helper('file_upload'); $this->db = $this->load->database('read',true); - $this->task_types = array(1, 2, 3, 6, 7, 9); + $this->task_types = array(1, 2, 3, 6, 7, 9, 10, 11); $this->challenge_types = array(9); $this->evaluation = APPPATH . 'third_party/OpenML/Java/evaluate.jar'; $this->eval_engine_config = " -config 'cache_allowed=false;server=".BASE_URL.";api_key=".API_KEY."' "; @@ -135,6 +135,7 @@ function get($task_id) { private function generate($function, $task_id, $filepath) { $task = $this->Task->getById($task_id); + // JvR: in hindsight, this check belongs in the eval engine, and not here. if ($task === false || in_array($task->ttid, $this->task_types) === false) { http_response_code($this->config->item('general_http_error_code')); die('Task not providing datasplits.'); diff --git a/openml_OS/controllers/Cron.php b/openml_OS/controllers/Cron.php index 11b64c5a1..2b822a46c 100644 --- a/openml_OS/controllers/Cron.php +++ b/openml_OS/controllers/Cron.php @@ -167,7 +167,7 @@ function move_run_files($start_index, $end_index) { function install_database() { // note that this one does not come from DATA folder, as they are stored in github $models = directory_map('data/sql/', 1); - $manipulated_order = array('file.sql', 'implementation.sql', 'algorithm_setup.sql', 'dataset.sql', 'task_type.sql', 'task.sql', 'study.sql', 'groups.sql', 'users.sql'); + $manipulated_order = array('file.sql', 'implementation.sql', 'algorithm_setup.sql', 'evaluation_engine.sql', 'dataset.sql', 'data_processed.sql', 'data_feature.sql', 'task_type.sql', 'task.sql', 'study.sql', 'groups.sql', 'users.sql'); // moves elements of $manipulated_order to the start of the models array foreach (array_reverse($manipulated_order) as $name) { diff --git a/openml_OS/core/MY_Api_Model.php b/openml_OS/core/MY_Api_Model.php index 60132f263..f7b4c45ce 100644 --- a/openml_OS/core/MY_Api_Model.php +++ b/openml_OS/core/MY_Api_Model.php @@ -243,6 +243,11 @@ protected function entity_tag_untag($type, $id, $tag, $do_untag, $special_name, $this->returnError(473, $this->version, 450, 'id=' . $id . '; tag=' . $tag); return false; } + if(strlen($tag) > 64 || !is_system_string($tag)){ + $this->returnError(477, $this->version, 450, 'id=' . $id . '; tag=' . $tag); + return false; + } + $tag_data = array( 'id' => $id, 'tag' => $tag, diff --git a/openml_OS/helpers/file_upload_helper.php b/openml_OS/helpers/file_upload_helper.php index d11a0ef86..b0c02c82c 100644 --- a/openml_OS/helpers/file_upload_helper.php +++ b/openml_OS/helpers/file_upload_helper.php @@ -1,18 +1,19 @@ 0) { // php error generated $message = 'Upload Error ' . $file['error'] . ': ' . upload_error_message($file['error']); return false; + } else if($file['size'] == 0) { + $message = 'Filesize is 0 bytes, which is not allowed. '; + return false; } else if(!file_exists($file['tmp_name'])) { // file doesn't exist $message = 'File not present at expected location. '; return false; diff --git a/openml_OS/helpers/text_helper.php b/openml_OS/helpers/text_helper.php index fb902fa43..7d495ea51 100644 --- a/openml_OS/helpers/text_helper.php +++ b/openml_OS/helpers/text_helper.php @@ -15,6 +15,10 @@ function safe( $unsafe ) { return preg_replace('/[^a-zA-Z0-9\s.,-_()]/', '', $unsafe ); } +function is_system_string( $unsafe ) { + return !preg_match('/[^a-zA-Z0-9._-]/', $unsafe ); +} + function is_safe( $unsafe ) { return !preg_match('/[^a-zA-Z0-9\s.,-_()]/', $unsafe ); } diff --git a/openml_OS/libraries/ElasticSearch.php b/openml_OS/libraries/ElasticSearch.php index 1e1b47f9b..986290733 100644 --- a/openml_OS/libraries/ElasticSearch.php +++ b/openml_OS/libraries/ElasticSearch.php @@ -11,6 +11,8 @@ public function __construct() { $this->CI->load->model('Author'); $this->CI->load->model('Data_quality'); $this->CI->load->model('Dataset_tag'); + $this->CI->load->model('Dataset_topic'); + $this->CI->load->model('Dataset_description'); $this->CI->load->model('Implementation_tag'); $this->CI->load->model('Setup_tag'); $this->CI->load->model('Task_tag'); @@ -187,9 +189,14 @@ public function initialize(){ 'properties' => array( 'tag' => array('type' => 'text'), 'uploader' => array('type' => 'text'))), + 'collections' => array( + 'type' => 'nested', + 'properties' => array( + 'id' => array('type' => 'long'), + 'type' => array('type' => 'text'))), 'task_id' => array('type' => 'long'), 'tasktype.tt_id' => array('type' => 'long'), - 'runs' => array('type' => 'long') + 'runs' => array('type' => 'long') ) ); $this->mappings['task_type'] = array( @@ -222,6 +229,11 @@ public function initialize(){ 'properties' => array( 'tag' => array('type' => 'text'), 'uploader' => array('type' => 'text'))), + 'collections' => array( + 'type' => 'nested', + 'properties' => array( + 'id' => array('type' => 'long'), + 'type' => array('type' => 'text'))), 'run_id' => array('type' => 'long'), 'run_flow.flow_id' => array('type' => 'long'), 'run_flow.name' => array('type' => 'text', 'fielddata' => true), @@ -326,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)) @@ -530,7 +542,6 @@ private function build_user($d) { 'user_id' => $d->id, 'first_name' => $d->first_name, 'last_name' => $d->last_name, - 'email' => $d->email, 'company' => $d->company, 'country' => $d->country, 'bio' => $d->bio, @@ -927,6 +938,7 @@ private function build_task($d) { } $newdata['tags'] = array(); + $newdata['collections'] = array(); $studies = array(); $tags = $this->CI->Task_tag->getAssociativeArray('tag', 'uploader', 'id = ' . $d->task_id); if ($tags != false) { @@ -934,8 +946,13 @@ private function build_task($d) { $newdata['tags'][] = array( 'tag' => $t, 'uploader' => $u); - if(substr( $t, 0, 6 ) === "study_") - $studies[] = substr($t, strpos($t, "_") + 1); + if(substr( $t, 0, 6 ) === "study_"){ + $study_id = substr($t, strpos($t, "_") + 1); + $studies[] = $study_id; + $newdata['collections'][] = array( + 'type' => 'task', + 'id' => $study_id); + } } } @@ -943,11 +960,23 @@ private function build_task($d) { $new_studies = array(); $task_studies = $this->db->query("select study_id from task_study where task_id=" . $d->task_id); if ($task_studies != false) { - foreach ($task_studies as $t) { if (!in_array($t->study_id, $studies)){ $new_studies[] = $t->study_id; }} + foreach ($task_studies as $t) { + if (!in_array($t->study_id, $studies)){ + $new_studies[] = $t->study_id; + $newdata['collections'][] = array( + 'type' => 'task', + 'id' => $t->study_id); + }} } $run_studies = $this->db->query("select distinct study_id from run_study where run_id in (select rid from run where task_id=" . $d->task_id . ")"); if ($run_studies != false) { - foreach ($run_studies as $t) { if (!in_array($t->study_id, $studies)){ $new_studies[] = $t->study_id; }} + foreach ($run_studies as $t) { + if (!in_array($t->study_id, $studies)){ + $new_studies[] = $t->study_id; + $newdata['collections'][] = array( + 'type' => 'run', + 'id' => $t->study_id); + }} } if ($new_studies) { foreach ($new_studies as $t) { $new_data['tags'][] = array('tag' => 'study_' . $t, 'uploader' => '0'); } @@ -1216,6 +1245,26 @@ public function update_tags($type, $id) { $this->client->update($params); } + //update topics for given type and id + public function update_topics($id) { + $topictable = $this->CI->Dataset_topic; + $ts = array(); + $topics = $topictable->getAssociativeArray('topic', 'uploader', 'id = ' . $id); + if ($topics != false) { + foreach ($topics as $t => $u) { + $ts[] = array( + 'topic' => $t, + 'uploader' => $u); + } + } + + $params['index'] = 'data'; + $params['type'] = 'data'; + $params['id'] = $id; + $params['body'] = array('doc' => array('topics' => $ts)); + $this->client->update($params); + } + private function index_single_run($id) { $params['index'] = 'run'; @@ -1290,11 +1339,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; } @@ -1330,6 +1379,7 @@ private function build_run($r, $setups, $tasks, $runfiles, $evals, $altmetrics=T ); $new_data['tags'] = array(); + $new_data['collections'] = array(); $studies = array(); $tags = $this->CI->Run_tag->getAssociativeArray('tag', 'uploader', 'id = ' . $r->rid); if ($tags != false) { @@ -1337,8 +1387,13 @@ private function build_run($r, $setups, $tasks, $runfiles, $evals, $altmetrics=T $new_data['tags'][] = array( 'tag' => $t, 'uploader' => $u); - if(substr( $t, 0, 6 ) === "study_") - $studies[] = substr($t, strpos($t, "_") + 1); + if(substr( $t, 0, 6 ) === "study_"){ + $study_id = substr($t, strpos($t, "_") + 1); + $studies[] = $study_id; + $new_data['collections'][] = array( + 'type' => 'run', + 'id' => $study_id); + } } } @@ -1346,7 +1401,10 @@ private function build_run($r, $setups, $tasks, $runfiles, $evals, $altmetrics=T if ($run_studies != false) { foreach ($run_studies as $t) { if (!in_array($t->study_id, $studies)){ - $new_data['tags'][] = array('tag' => 'study_' . $t->study_id, 'uploader' => '0'); + $new_data['tags'][] = array('tag' => 'study_' . $t->study_id, 'uploader' => '0'); + $new_data['collections'][] = array( + 'type' => 'run', + 'id' => $t->study_id); } } } @@ -1705,7 +1763,7 @@ private function build_procedure($d) { private function build_function($d) { $id = str_replace("_", "-", $d->name); - $desc = $d->description . '
Source Code:
' . $d->source_code . '
'; + $desc = $d->description; $desc = str_replace("","$$",$desc); $desc = str_replace("","$$",$desc); @@ -1714,6 +1772,7 @@ private function build_function($d) { 'measure_type' => 'evaluation_measure', 'name' => $d->name, 'description' => $desc, + 'code' => $d->source_code, 'min' => $d->min, 'max' => $d->max, 'unit' => $d->unit, @@ -1764,7 +1823,7 @@ public function index_single_dataset($id) { $params['index'] = 'data'; $params['type'] = 'data'; $status_sql_variable = 'IFNULL(`s`.`status`, \'' . $this->CI->config->item('default_dataset_status') . '\')'; - $datasets = $this->db->query('select d.*, ' . $status_sql_variable . ' AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON s.did = d.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did)' . ($id ? ' where d.did=' . $id : '') . ' group by d.did'); + $datasets = $this->db->query('select d.*, ' . $status_sql_variable . ' AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message, GROUP_CONCAT(DISTINCT k.kaggle_link) as kaggle_link from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON s.did = d.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did) left join kaggle k on (d.did=k.dataset_id)' . ($id ? ' where d.did=' . $id : '') . ' group by d.did'); if ($id and ! $datasets) return 'Error: data set ' . $id . ' is unknown'; @@ -1816,7 +1875,7 @@ public function index_data($id, $start_id = 0, $altmetrics=True, $verbosity=0) { $params['body'] = array(); $valid_ids = array(); $status_sql_variable = 'IFNULL(`s`.`status`, \'' . $this->CI->config->item('default_dataset_status') . '\')'; - $datasets = $this->db->query('select d.*, ' . $status_sql_variable . 'AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON d.did = s.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did) where d.did>=' . $did . ' and d.did<' . ($did + $incr) . ' group by d.did'); + $datasets = $this->db->query('select d.*, ' . $status_sql_variable . 'AS `status`, count(rid) as runs, GROUP_CONCAT(dp.error) as error_message, GROUP_CONCAT(DISTINCT k.kaggle_link) as kaggle_link from dataset d left join (SELECT `did`, MAX(`status`) AS `status` FROM `dataset_status` GROUP BY `did`) s ON d.did = s.did left join task_inputs t on (t.value=d.did and t.input="source_data") left join run r on (r.task_id=t.task_id) left join data_processed dp on (d.did=dp.did) left join kaggle k on (d.did=k.dataset_id) where d.did>=' . $did . ' and d.did<' . ($did + $incr) . ' group by d.did'); if($datasets){ foreach ($datasets as $d) { try { @@ -1858,14 +1917,18 @@ public function index_data($id, $start_id = 0, $altmetrics=True, $verbosity=0) { } private function build_data($d, $altmetrics=True) { - $headless_description = trim(preg_replace('/\s+/', ' ', preg_replace('/^\*{2,}.*/m', '', $d->description))); + $description_record = $this->CI->Dataset_description->getWhereSingle('did =' . $d->did, 'version DESC'); + 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, 'exact_name' => $d->name, 'version' => (float) $d->version, 'version_label' => $d->version_label, - 'description' => $d->description, + 'description' => $description_record->description, 'format' => $d->format, 'uploader' => array_key_exists($d->uploader, $this->user_names) ? $this->user_names[$d->uploader]: 'unknown', 'uploader_id' => intval($d->uploader), @@ -1909,6 +1972,15 @@ private function build_data($d, $altmetrics=True) { $studies[] = substr($t, strpos($t, "_") + 1); } } + + $topics = $this->CI->Dataset_topic->getAssociativeArray('topic', 'uploader', 'id = ' . $d->did); + if ($topics != false) { + foreach ($topics as $t => $u) { + $new_data['topics'][] = array( + 'topic' => $t, + 'uploader' => $u); + } + } // replace with study list in new indexer $new_studies = array(); $task_studies = $this->db->query("select study_id from task_study where task_id in (select task_id from task_inputs where input='source_data' and value=" . $d->did . ")"); @@ -1934,6 +2006,19 @@ private function build_data($d, $altmetrics=True) { 'distinct' => $f->NumberOfDistinctValues, 'missing' => $f->NumberOfMissingValues ); + + $feature_descriptions = $this->db->query("SELECT * FROM `data_feature_description` WHERE `did` = " . $d->did . " AND `index` = " . $f->index); + if ($feature_descriptions != false) { + $feat['descriptions'] = array(); + foreach ($feature_descriptions as $desc) { + $current = array( + 'type' => $desc->description_type, + 'value' => $desc->value, + ); + $feat['descriptions'][] = $current; + } + } + if ($f->is_target == "true") $feat['target'] = "1"; if ($f->is_row_identifier == "true") diff --git a/openml_OS/models/Data_feature_description.php b/openml_OS/models/Data_feature_description.php new file mode 100644 index 000000000..4807c962d --- /dev/null +++ b/openml_OS/models/Data_feature_description.php @@ -0,0 +1,10 @@ +table = 'data_feature_description'; + $this->id_column = array('did', 'index', 'value'); + } +} +?> diff --git a/openml_OS/models/Dataset_description.php b/openml_OS/models/Dataset_description.php new file mode 100644 index 000000000..8b2ad3350 --- /dev/null +++ b/openml_OS/models/Dataset_description.php @@ -0,0 +1,11 @@ +table = 'dataset_description'; + $this->id_column = array('did', 'version'); + } + +} +?> diff --git a/openml_OS/models/Dataset_topic.php b/openml_OS/models/Dataset_topic.php new file mode 100644 index 000000000..2e523f838 --- /dev/null +++ b/openml_OS/models/Dataset_topic.php @@ -0,0 +1,11 @@ +table = 'dataset_topic'; + $this->id_column = array('id', 'topic'); + } + +} +?> diff --git a/openml_OS/models/api/v1/Api_data.php b/openml_OS/models/api/v1/Api_data.php index 3f7779f22..294d13002 100644 --- a/openml_OS/models/api/v1/Api_data.php +++ b/openml_OS/models/api/v1/Api_data.php @@ -12,7 +12,10 @@ function __construct() { $this->load->model('Dataset'); $this->load->model('Dataset_status'); $this->load->model('Dataset_tag'); + $this->load->model('Dataset_topic'); + $this->load->model('Dataset_description'); $this->load->model('Data_feature'); + $this->load->model('Data_feature_description'); $this->load->model('Data_feature_value'); $this->load->model('Data_quality'); $this->load->model('Feature_quality'); @@ -105,6 +108,11 @@ function bootstrap($format, $segments, $request_type, $user_id) { return; } + if (count($segments) == 3 && $segments[0] == 'description' && $segments[1] == 'list' && is_numeric($segments[2]) && in_array($request_type, $getpost)) { + $this->data_description_list($segments[2]); + return; + } + if (count($segments) == 2 && $segments[0] == 'qualities' && is_numeric($segments[1]) && in_array($request_type, $getpost)) { $this->data_qualities($segments[1], $this->config->item('default_evaluation_engine_id')); return; @@ -141,11 +149,31 @@ function bootstrap($format, $segments, $request_type, $user_id) { return; } + if ( $segments[0] == 'topicadd' && $request_type == 'post') { + $this->data_add_topic($this->input->post('data_id'), $this->input->post('topic')); + return; + } + + if ( $segments[0] == 'topicdelete' && $request_type == 'post') { + $this->data_delete_topic($this->input->post('data_id'), $this->input->post('topic')); + return; + } + if (count($segments) == 2 && $segments[0] == 'tag' && $segments[1] == 'list') { $this->list_tags('dataset', 'data'); return; } + if (count($segments) == 3 && $segments[0] == 'feature' && $segments[1] == 'ontology' && $segments[2] == 'add' && $request_type == 'post') { + $this->data_feature_description($this->input->post('data_id'), $this->input->post('index'), $this->input->post('ontology'), 'ontology', true); + return; + } + + if (count($segments) == 3 && $segments[0] == 'feature' && $segments[1] == 'ontology' && $segments[2] == 'remove' && $request_type == 'post') { + $this->data_feature_description($this->input->post('data_id'), $this->input->post('index'), $this->input->post('ontology'), 'ontology', false); + return; + } + if (count($segments) == 2 && $segments[0] == 'status' && $segments[1] == 'update') { $this->status_update($this->input->post('data_id'), $this->input->post('status')); return; @@ -153,6 +181,74 @@ function bootstrap($format, $segments, $request_type, $user_id) { $this->returnError(100, $this->version); } + + private function data_feature_description($data_id, $feature_idx, $description, $description_type, $do_add) { + if ($data_id === false || $feature_idx === false || $description === false) { + $this->returnError(1100, $this->version); + return false; + } + + if (strlen($description) > 256) { + $this->returnError(1105, $this->version); + return false; + } + if ($description_type == 'ontology' && !filter_var($description, FILTER_VALIDATE_URL)) { + $this->returnError(1106, $this->version); + return false; + } + + if ($do_add) { + $descriptions = $this->Data_feature_description->getColumnWhere('value', '`did` = "' . $data_id . '" AND `index` = "'. $feature_idx . '" AND `description_type` = "' . $description_type . '"'); + if($descriptions != false && in_array($description, $descriptions)) { + $this->returnError(1101, $this->version, 450, 'id=' . $data_id . '; description=' . $description); + return false; + } + // todo discuss policy: who is allowed to add ontology to a feature? + + $description_data = array( + 'did' => $data_id, + 'index' => $feature_idx, + 'description_type' => $description_type, + 'value' => $description, + 'uploader' => $this->user_id, + 'date' => now() + ); + + $res = $this->Data_feature_description->insert($description_data); + if ($res == false) { + $this->returnError(1102, $this->version, 450, 'id=' . $data_id . '; description=' . $description); + return false; + } + } else { + $description_record = $this->Data_feature_description->getWhereSingle('did = ' . $data_id . ' AND index = "' . $feature_idx . '" AND `description_type` = "' . $description_type . '" AND `value` = "' . $description . '"'); + if ($description_record == false) { + $this->returnError(1103, $this->version); + return false; + } + // todo discuss policy: who is allowed to remove ontology from a feature? + $is_admin = $this->ion_auth->is_admin($this->user_id); + if ($description_record->uploader != $this->user_id && $is_admin == false) { + $this->returnError(1104, $this->version); + return false; + } + $this->Data_feature_description->delete(array($data_id, $feature_idx, $description)); + } + + try { + $this->elasticsearch->index('data', $data_id); + } catch (Exception $e) { } + + $descriptions = $this->Data_feature_description->getColumnWhere('value', 'did = ' . $data_id . ' AND index = "' . $feature_idx . '" AND `description_type` = "' . $description_type . '"'); + $this->xmlContents( + 'data-feature-description', + $this->version, + array( + 'id' => $data_id, + 'description_type' => $description_type, + 'xml_tag_name' => 'feature_description' . '_' . ($do_add ? 'add' : 'remove'), + 'descriptions' => $descriptions) + ); + } /** *@OA\Post( @@ -485,13 +581,29 @@ 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', $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() { @@ -569,16 +681,55 @@ private function data_edit() { } } - $update_result = $this->Dataset->update($data_id, $update_fields); - // If result returns error - if( $update_result == false ) { - $this->returnError( 1067, $this->version ); - return; + // Add description in the description table as a new version + if (isset($update_fields['description'])) { + $description_record = $this->Dataset_description->getWhereSingle('did =' . $data_id, 'version DESC'); + $version_new = $description_record->version + 1; + $desc = array( + 'did'=>$data_id, + 'version' => $version_new, + 'description'=>$update_fields['description'], + 'uploader' => $dataset->uploader + ); + unset($update_fields['description']); + $desc_id = $this->Dataset_description->insert($desc); + if (!$desc_id) { + $this->returnError(1067, $this->version); + return; + } + } + + if ($update_fields) { + $update_result = $this->Dataset->update($data_id, $update_fields); + // If result returns error + if($update_result == false) { + $this->returnError(1068, $this->version); + return; + } } + // update elastic search index. + try { + $this->elasticsearch->index('data', $data_id); + } catch (Exception $e) { + $this->returnError(105, $this->version, $this->openmlGeneralErrorCode, $e->getMessage()); + + } + // Return data id, for user to verify changes $this->xmlContents( 'data-edit', $this->version, array( 'id' => $data_id) ); } + private function data_description_list($data_id) { + // Get descriptions for given id + $description_records = $this->Dataset_description->getWhere('did =' . $data_id, 'version DESC'); + if( is_array( $description_records ) == false || count( $description_records ) == 0 ) { + $this->returnError( 1090, $this->version ); + return; + } + // Return history + $this->xmlContents( 'data-description-list', $this->version, array('descriptions' => $description_records)); + } + /** *@OA\Get( * path="/data/{id}", @@ -657,6 +808,7 @@ private function data($data_id) { $dataset->url = BASE_URL . 'data/v1/download/' . $dataset->file_id . '/' . htmlspecialchars($dataset->name) . '.' . strtolower($dataset->format); } + $file = $this->File->getById($dataset->file_id); if (!$file) { $this->returnError(113, $this->version); @@ -668,6 +820,10 @@ private function data($data_id) { $tags = $this->Dataset_tag->getColumnWhere('tag', 'id = ' . $dataset->did); $dataset->tag = $tags != false ? '"' . implode( '","', $tags ) . '"' : array(); + $description_record = $this->Dataset_description->getWhereSingle('did =' . $data_id, 'version DESC'); + $dataset->description_version = $description_record->version; + $dataset->description = $description_record->description; + foreach( $this->xml_fields_dataset['csv'] as $field ) { $dataset->{$field} = getcsv( $dataset->{$field} ); } @@ -687,8 +843,17 @@ private function data($data_id) { if ($data_status != false) { $dataset->status = $data_status->status; } - - $this->xmlContents( 'data-get', $this->version, $dataset ); + // The BASE_URL check prevents servering parquet urls from the test server, + // which is needed as long as the test server does not have its own dedicated + // MinIO with parquet files. TODO: Remove this after running MinIO on test + if ($dataset->format != 'Sparse_ARFF' && BASE_URL != "https://test.openml.org/") { + $bracket = sprintf('%04d', floor($data_id / 10000)); + $padded_id = sprintf('%04d', $data_id); + $url = MINIO_URL . 'datasets/' . $bracket . '/' . $padded_id . '/dataset_' . $data_id . '.pq'; + $dataset->parquet_url = $url; + $dataset->minio_url = $url; + } + $this->xmlContents( 'data-get', $this->version, $dataset ); } private function data_reset($data_id) { @@ -709,6 +874,15 @@ private function data_reset($data_id) { $this->returnError(1023, $this->version); return; } + + // Temporary fix: makes sure that feature values are also removed when data is reset + // A new foreign key on Data_processed should be added to replace this + $result = $this->Data_feature_value->deleteWhere('`did` = "' . $dataset->did . '" '); + if ($result == false) { + $this->returnError(1023, $this->version); + return; + } + $this->xmlContents('data-reset', $this->version, array('dataset' => $dataset)); } @@ -761,6 +935,90 @@ private function data_reset($data_id) { * ), *) */ + private function data_add_topic($id, $topic) { + # Data id and topic are required + if ($id == false || $topic == false) { + $this->returnError(1080, $this->version); + return false; + } + # If dataset does not exist + $dataset = $this->Dataset->getById($id); + if($dataset == false) { + $this->returnError(1081, $this->version); + return; + } + # Restrict only to admin + if(!$this->user_has_admin_rights) { + $this->returnError(1082, $this->version); + return; + } + # Check if topic and id combination exists + $topics = $this->Dataset_topic->getColumnWhere('topic', 'id = ' . $id); + if($topics != false && in_array($topic, $topics)) { + $this->returnError(1083, $this->version); + return false; + } + $currentTime = now(); + $topic_data = array( + 'id' => $id, + 'topic' => $topic, + 'uploader' => $this->user_id, + 'date' => $currentTime + ); + # Insert into DB + $res = $this->Dataset_topic->insert($topic_data); + if ($res == false) { + $this->returnError(1084, $this->version); + return false; + } + + try { + //update index + $this->elasticsearch->update_topics($id); + + } catch (Exception $e) { + $this->returnError(105, $this->version, $this->openmlGeneralErrorCode, $e->getMessage(), false, $surpressOutput); + return false; + } + $this->xmlContents( 'data-topic', $this->version, array( 'id' => $id) ); + } + + + private function data_delete_topic($id, $topic) { + # Data id and topic are required + if ($id == false || $topic == false) { + $this->returnError(1080, $this->version); + return false; + } + # If dataset does not exist + $dataset = $this->Dataset->getById($id); + if($dataset == false) { + $this->returnError(1081, $this->version); + return; + } + # Restrict only to admin + if(!$this->user_has_admin_rights) { + $this->returnError(1082, $this->version); + return; + } + $topic_record = $this->Dataset_topic->getWhereSingle('id = ' . $id . ' AND topic = "' . $topic . '"'); + if ($topic_record == false) { + $this->returnError(1085, $this->version); + return false; + } + $this->Dataset_topic->delete(array($id, $topic)); + try { + //update index + $this->elasticsearch->update_topics($id); + + } catch (Exception $e) { + $this->returnError(105, $this->version, $this->openmlGeneralErrorCode, $e->getMessage()); + return false; + } + $this->xmlContents( 'data-topic', $this->version, array( 'id' => $id) ); + } + + private function data_delete($data_id) { $dataset = $this->Dataset->getById( $data_id ); @@ -875,10 +1133,11 @@ private function data_upload() { // get description from string upload $description = $this->input->post('description', false); if(validateXml($description, $xsdFile, $xmlErrors, false ) == false) { - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Data Upload DEBUG message. '; - $content = "Uploaded POST field \nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . $description; + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $subject = 'OpenML Data Upload DEBUG message (' . $server . ')'; + $content = $server . "\nUploaded Post Field\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); sendEmail($to, $subject, $content,'text'); } $this->returnError(131, $this->version, $this->openmlGeneralErrorCode, $xmlErrors); @@ -896,10 +1155,11 @@ private function data_upload() { $description = $_FILES['description']; if (validateXml($description['tmp_name'], $xsdFile, $xmlErrors) == false) { - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Data Upload DEBUG message. '; - $content = 'Filename: ' . $description['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $subject = 'OpenML Data Upload DEBUG message (' . $server . ')'; + $content = $server . "\nFilename: " . $description['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); sendEmail($to, $subject, $content,'text'); } $this->returnError(131, $this->version, $this->openmlGeneralErrorCode, $xmlErrors); @@ -990,7 +1250,7 @@ private function data_upload() { 'last_update' => now(), 'uploader' => $this->user_id, 'isOriginal' => 'true', - 'file_id' => $file_id + 'file_id' => $file_id, ); // extract all other necessary info from the XML description @@ -1000,11 +1260,19 @@ private function data_upload() { // handle tags $tags = array(); - if (array_key_exists('tag', $dataset)) { + if (isset($dataset['tag'])) { $tags = str_getcsv($dataset['tag']); unset($dataset['tag']); } + $desc = array( + 'version' => 1, + 'description'=>$dataset['description'], + 'uploader' => $this->user_id + ); + + unset($dataset['description']); + /* * * * * THE ACTUAL INSERTION * * * */ @@ -1014,6 +1282,13 @@ private function data_upload() { return; } + $desc['did'] = $id; + $desc_id = $this->Dataset_description->insert($desc); + if (!$desc_id) { + $this->returnError(134, $this->version); + return; + } + // try to move the file to a new directory. If it fails, the dataset is // still valid, but we probably want to make some mechanism to inform administrators if ($file_record->type != 'url') { @@ -1041,7 +1316,7 @@ private function data_upload() { } // create initial wiki page - $this->wiki->export_to_wiki($id); + //$this->wiki->export_to_wiki($id); // create $this->xmlContents('data-upload', $this->version, array('id' => $id)); @@ -1251,19 +1526,35 @@ private function data_features($data_id) { $this->returnError(273, $this->version); return; } - + $dataset->features = $this->Data_feature->getWhere('did = "' . $dataset->did . '"'); + // obtains possible values for a feature $dataset->features_values = $this->Data_feature_value->getWhere('did = "' . $dataset->did . '"'); $index_values = array(); if ($dataset->features_values) { foreach($dataset->features_values as $val) { - if (!array_key_exists($val->index, $index_values)) { + if (!isset($index_values[$val->index])) { $index_values[$val->index] = array(); } $index_values[$val->index][] = $val->value; } } $dataset->index_values = $index_values; + + // obtains possible ontologies for a feature (for now: only ontologies) + $dataset->features_descriptions = $this->Data_feature_description->getWhere('did = "' . $dataset->did . '" AND description_type = "ontology"'); + $index_ontologies = array(); + if ($dataset->features_descriptions) { + foreach($dataset->features_descriptions as $val) { + if ($val->description_type == 'ontology') { // this is guaranteed + if (!isset($index_ontologies[$val->index])) { + $index_ontologies[$val->index] = array(); + } + $index_ontologies[$val->index][] = $val->value; + } + } + } + $dataset->index_ontologies = $index_ontologies; if ($data_processed->error && $dataset->features === false) { $this->returnError(274, $this->version); @@ -1326,8 +1617,9 @@ private function data_features_upload() { } // get correct description - if (isset($_FILES['description']) == false || check_uploaded_file($_FILES['description']) == false) { - $this->returnError(442, $this->version); + $message = ''; + if (isset($_FILES['description']) == false || check_uploaded_file($_FILES['description'], false, $message) == false) { + $this->returnError(442, $this->version, $this->openmlGeneralErrorCode, 'Error: ' . $message); return; } @@ -1378,10 +1670,11 @@ private function data_features_upload() { if (validateXml($description['tmp_name'], xsd('openml.data.features', $this->controller, $this->version), $xmlErrors) == false) { $data['error'] = 'XSD does not comply. XSD errors: ' . $xmlErrors; $success = $this->Data_processed->replace($data); - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Data Features Upload DEBUG message. '; - $content = 'Filename: ' . $description['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $subject = 'OpenML Data Feature Upload DEBUG message (' . $server . ')'; + $content = $server . "\nFilename: " . $description['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); sendEmail($to, $subject, $content, 'text'); } $this->returnError(443, $this->version, $this->openmlGeneralErrorCode, $xmlErrors); @@ -1437,13 +1730,21 @@ private function data_features_upload() { } //actual insert of the feature - if (array_key_exists('nominal_value', $feature)) { + if (isset($feature['nominal_value'])) { $nominal_values = $feature['nominal_value']; unset($feature['nominal_value']); } else { $nominal_values = false; } + //actual insert of the feature + if (array_key_exists('ontology', $feature)) { + $ontologies = $feature['ontology']; + unset($feature['ontology']); + } else { + $ontologies = false; + } + $result = $this->Data_feature->insert($feature); if (!$result) { $this->db->trans_rollback(); @@ -1466,7 +1767,7 @@ private function data_features_upload() { return; } } - + // situation where we are trying to add nominal values to a non-nominal attribute if ($feature['data_type'] != 'nominal') { // only allowed for nominal values $this->db->trans_rollback(); @@ -1474,12 +1775,30 @@ private function data_features_upload() { return; } } elseif ($feature['data_type'] == 'nominal') { - // required for nominal values.. missing so throw error + // nominal values now require this information.. since it is not there, throw the error $this->db->trans_rollback(); $this->returnError(448, $this->version, $this->openmlGeneralErrorCode, 'feature: ' . $feature['name']); return; } + if ($ontologies) { + // check the nominal value property + foreach ($ontologies as $ontology) { + $data = array( + 'did' => $did, + 'index' => $ontology['index'], + 'description_type' => 'ontology', + 'value' => $value + ); + $result = $this->Data_feature_description->insert($data); + if (!$result) { + $this->db->trans_rollback(); + $this->returnError(450, $this->version, $this->openmlGeneralErrorCode, 'feature: ' . $feature['name'] . ', value: ' . $value); + return; + } + } + } + // NOTE: this is commented out because not all datasets have targets, or they can have multiple ones. Targets should also be set more carefully. // if no specified attribute is the target, select the last one: //if( $dataset->default_target_attribute == false && $feature->index > $current_index ) { diff --git a/openml_OS/models/api/v1/Api_flow.php b/openml_OS/models/api/v1/Api_flow.php index 142f80e8a..e75441fdb 100644 --- a/openml_OS/models/api/v1/Api_flow.php +++ b/openml_OS/models/api/v1/Api_flow.php @@ -567,10 +567,12 @@ private function flow_upload() { $description = $this->input->post('description'); $xmlErrors = ""; if( validateXml( $description, $xsd, $xmlErrors, false ) == false ) { - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Flow Upload DEBUG message. '; - $content = "Uploaded by POST field.\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . $this->input->post('description'); + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $content = $server . "\nFilename: " . $description['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); + $subject = 'OpenML Flow Upload DEBUG message (' . $server . ')'; + $content = $server . "\nUploaded by POST field.\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . $this->input->post('description'); sendEmail($to, $subject, $content,'text'); } @@ -583,10 +585,11 @@ private function flow_upload() { $description = $_FILES['description']; if (validateXml($description['tmp_name'], $xsd, $xmlErrors) == false) { - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Flow Upload DEBUG message. '; - $content = 'Filename: ' . $_FILES['description']['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $subject = 'OpenML Flow Upload DEBUG message (' . $server . ')'; + $content = $server . "\nFilename: " . $_FILES['description']['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); sendEmail($to, $subject, $content,'text'); } @@ -816,17 +819,17 @@ private function insertImplementationFromXML( $xml, $configuration, $implementat $implementation['fullName'] = $implementation['name'] . '(' . $version . ')'; $implementation['version'] = $version; - if( array_key_exists( 'source_md5', $implementation ) ) { - if( array_key_exists( 'external_version', $implementation ) === false ) { + if( isset( $implementation['source_md5'] ) ) { + if( isset( $implementation['external_version'] ) === false ) { $implementation['external_version'] = $implementation['source_md5']; } - } elseif( array_key_exists( 'binary_md5', $implementation ) ) { - if( array_key_exists( 'external_version', $implementation ) === false ) { + } elseif( isset( $implementation['binary_md5'] ) ) { + if( isset( $implementation['external_version'] ) === false ) { $implementation['external_version'] = $implementation['binary_md5']; } } - if( array_key_exists( 'implements', $implementation ) ) { + if( isset( $implementation['implements'] ) ) { if( in_array( $implementation['implements'], $this->supportedMetrics ) == false && in_array( $implementation['implements'], $this->supportedAlgorithms == false ) ) { return false; @@ -839,7 +842,7 @@ private function insertImplementationFromXML( $xml, $configuration, $implementat // tags also not insertable. but handled differently. $tags = array(); - if( array_key_exists( 'tag', $implementation ) ) { + if( isset( $implementation['tag'] ) ) { $tags = str_getcsv( $implementation['tag'] ); unset( $implementation['tag'] ); } diff --git a/openml_OS/models/api/v1/Api_run.php b/openml_OS/models/api/v1/Api_run.php index be5add8a5..d25a94e96 100644 --- a/openml_OS/models/api/v1/Api_run.php +++ b/openml_OS/models/api/v1/Api_run.php @@ -504,7 +504,12 @@ private function run($run_id) { $user = $this->Author->getById($run->uploader); $run->user_name = $user->first_name . ' ' . $user->last_name; $run->flow_name = $this->Implementation->getById($run->setup->implementation_id)->fullName; - $run->task_evaluation = $this->Task_inputs->getWhere("task_id = " . $run->task_id . " and input = 'evaluation_measures'")[0]; + $task_evaluations = $this->Task_inputs->getWhere("task_id = " . $run->task_id . " and input = 'evaluation_measures'"); + if( $task_evaluations ) { + $run->task_evaluation = $task_evaluations[0]; + } else { + $run->task_evaluation = ""; + } $this->xmlContents( 'run-get', $this->version, array( 'source' => $run ) ); } @@ -742,7 +747,6 @@ private function run_reset($run_id) { *) */ private function run_upload() { - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Everything that needs to be done for EVERY task, * * Including the unsupported tasks * @@ -752,7 +756,6 @@ private function run_upload() { // If changing something big, also test that function. $timestamps = array(microtime(true)); // profiling 0 - // check uploaded file $description = isset($_FILES['description']) ? $_FILES['description'] : false; $uploadError = ''; @@ -764,10 +767,11 @@ private function run_upload() { // validate xml $xmlErrors = ''; if(validateXml($description['tmp_name'], xsd('openml.run.upload', $this->controller, $this->version), $xmlErrors) == false) { - if (DEBUG) { + if (DEBUG_XSD_EMAIL) { $to = $this->user_email; - $subject = 'OpenML Flow Upload DEBUG message. '; - $content = 'Filename: ' . $_FILES['description']['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); + $server = 'Server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']; + $subject = 'OpenML Run Upload DEBUG message (' . $server . ')'; + $content = $server . "\nFilename: " . $_FILES['description']['name'] . "\nXSD Validation Message: " . $xmlErrors . "\n=====BEGIN XML=====\n" . file_get_contents($description['tmp_name']); sendEmail($to, $subject, $content,'text'); } @@ -784,16 +788,17 @@ private function run_upload() { $run_xml = all_tags_from_xml( $xml->children('oml', true), - $this->xml_fields_run); + $this->xml_fields_run + ); $task_id = $run_xml['task_id']; $implementation_id = $run_xml['flow_id']; - $setup_string = array_key_exists('setup_string', $run_xml) ? $run_xml['setup_string'] : null; - $error_message = array_key_exists('error_message', $run_xml) ? $run_xml['error_message'] : false; - $run_details = array_key_exists('run_details', $run_xml) ? $run_xml['run_details'] : null; - $parameter_objects = array_key_exists('parameter_setting', $run_xml) ? $run_xml['parameter_setting'] : array(); - $output_data = array_key_exists('output_data', $run_xml) ? $run_xml['output_data'] : array(); - $tags = array_key_exists('tag', $run_xml) ? str_getcsv ($run_xml['tag']) : array(); + $setup_string = isset($run_xml['setup_string']) ? $run_xml['setup_string'] : null; + $error_message = isset($run_xml['error_message']) ? $run_xml['error_message'] : false; + $run_details = isset($run_xml['run_details']) ? $run_xml['run_details'] : null; + $parameter_objects = isset($run_xml['parameter_setting']) ? $run_xml['parameter_setting'] : array(); + $output_data = isset($run_xml['output_data']) ? $run_xml['output_data'] : array(); + $tags = isset($run_xml['tag']) ? str_getcsv ($run_xml['tag']) : array(); $predictionsUrl = false; @@ -809,7 +814,6 @@ private function run_upload() { } // check whether uploaded files are present. - foreach ($_FILES as $key => $value) { $message = ''; $extension = getExtension($_FILES[$key]['name']); @@ -881,11 +885,11 @@ private function run_upload() { } $task = $this->Task_inputs->getTaskValuesAssoc($task_id); - if (!array_key_exists('source_data', $task)) { + if (!isset($task['source_data'])) { $this->returnError(219, $this->version); return; } - if (!array_key_exists('estimation_procedure', $task)) { + if (!isset($task['estimation_procedure'])) { $this->returnError(220, $this->version); return; } @@ -910,7 +914,7 @@ private function run_upload() { $supported_evaluation_measures = $this->Math_function->getColumnWhere('name', '`functionType` = "EvaluationFunction"'); // the user can specify his own metrics. here we check whether these exists in the database. - if($output_data != false && array_key_exists('evaluation', $output_data)) { + if($output_data != false && isset($output_data->evaluation)) { // php does not have a set data structure, use hashmap instead $used_evaluation_measures = array(); $illegal_measures = array(); @@ -920,9 +924,9 @@ private function run_upload() { $used_evaluation_measures[$eval['name']] = true; // check whether it was a legal measure w.r.t. the estimation procedure // first add null values, in case a propoerty doesn't exist - $repeat_nr = array_key_exists('repeat', $eval) ? $eval['repeat'] : null; - $fold_nr = array_key_exists('fold', $eval) ? $eval['fold'] : null; - $sample_nr = array_key_exists('sample', $eval) ? $eval['sample'] : null; + $repeat_nr = isset($eval['repeat']) ? $eval['repeat'] : null; + $fold_nr = isset($eval['fold']) ? $eval['fold'] : null; + $sample_nr = isset($eval['sample']) ? $eval['sample'] : null; $num_inst = $num_instances_record->value; if (!$this->Estimation_procedure->check_legal($ep_record, $num_inst, $repeat_nr, $fold_nr, $sample_nr)) { $illegal_measures[] = $this->Estimation_procedure->eval_measure_to_string($eval['name'], $repeat_nr, $fold_nr, $sample_nr); @@ -939,7 +943,6 @@ private function run_upload() { return; } } - // now create a run $runData = array( 'uploader' => $this->user_id, @@ -1337,7 +1340,7 @@ private function run_evaluate() { } $task = $this->Task_inputs->getTaskValuesAssoc($runRecord->task_id); - if (!array_key_exists('source_data', $task)) { + if (!isset($task['source_data'])) { // also add error in database $error_code = 429; $data['error'] = $this->load->apiErrors[$error_code]; @@ -1345,7 +1348,7 @@ private function run_evaluate() { $this->returnError($error_code, $this->version); return; } - if (!array_key_exists('estimation_procedure', $task)) { + if (!isset($task['estimation_procedure'])) { // also add error in database $error_code = 430; $data['error'] = $this->load->apiErrors[$error_code]; @@ -1407,9 +1410,9 @@ private function run_evaluate() { $illegal_measures = array(); foreach($xml->children('oml', true)->{'evaluation'} as $e) { $eval = xml2assoc($e, true); - $repeat_nr = array_key_exists('repeat', $eval) ? $eval['repeat'] : null; - $fold_nr = array_key_exists('fold', $eval) ? $eval['fold'] : null; - $sample_nr = array_key_exists('sample', $eval) ? $eval['sample'] : null; + $repeat_nr = isset($eval['repeat']) ? $eval['repeat'] : null; + $fold_nr = isset($eval['fold']) ? $eval['fold'] : null; + $sample_nr = isset($eval['sample']) ? $eval['sample'] : null; $num_inst = $num_instances_record->value; if (!$this->Estimation_procedure->check_legal($ep_record, $num_inst, $repeat_nr, $fold_nr, $sample_nr)) { $illegal_measures[] = $this->Estimation_procedure->eval_measure_to_string($eval['name'], $repeat_nr, $fold_nr, $sample_nr); @@ -1432,7 +1435,7 @@ private function run_evaluate() { $evaluation['evaluation_engine_id'] = $eval_engine_id; // TODO: this responsibility should be shifted to the evaluation engine - if (array_key_exists($evaluation['name'], $math_functions)) { + if (isset($math_functions[$evaluation['name']])) { $evaluation['function_id'] = $math_functions[$evaluation['name']]; } else { // there will be a DB error due to the absence of 'function_id' @@ -1440,10 +1443,10 @@ private function run_evaluate() { // unset function field unset($evaluation['name']); - if(array_key_exists('fold', $evaluation) && array_key_exists('repeat', $evaluation) && array_key_exists('sample', $evaluation)) { + if(isset($evaluation['fold']) && isset($evaluation['repeat']) && isset($evaluation['sample'])) { // evaluation_sample $this->Evaluation_sample->insert($evaluation); - } elseif(array_key_exists('fold', $evaluation) && array_key_exists('repeat', $evaluation)) { + } elseif(isset($evaluation['fold']) && isset($evaluation['repeat'])) { // evaluation_fold $this->Evaluation_fold->insert($evaluation); } else { diff --git a/openml_OS/models/api/v1/Api_setup.php b/openml_OS/models/api/v1/Api_setup.php index fff2dd4bd..113b229cd 100644 --- a/openml_OS/models/api/v1/Api_setup.php +++ b/openml_OS/models/api/v1/Api_setup.php @@ -463,7 +463,7 @@ private function setup_exists($partial) { $this->xml_fields_run); $implementation_id = $run_xml['flow_id']; - $parameter_objects = array_key_exists('parameter_setting', $run_xml) ? $run_xml['parameter_setting'] : array(); + $parameter_objects = isset($run_xml['parameter_setting']) ? $run_xml['parameter_setting'] : array(); // fetch implementation $implementation = $this->Implementation->getById($implementation_id); diff --git a/openml_OS/models/api/v1/Api_study.php b/openml_OS/models/api/v1/Api_study.php index d4edd56c3..63fd9b53e 100644 --- a/openml_OS/models/api/v1/Api_study.php +++ b/openml_OS/models/api/v1/Api_study.php @@ -145,7 +145,7 @@ private function study_create() { return; } - if (array_key_exists('benchmark_suite', $study)) { + if (isset($study['benchmark_suite'])) { if ($study['main_entity_type'] != 'run') { $this->returnError(1035, $this->version); return; @@ -163,7 +163,7 @@ private function study_create() { } } - if (array_key_exists('alias', $study)) { + if (isset($study['alias'])) { $res = $this->Study->getWhereSingle('alias = "' . $study['alias'] . '"'); if ($res) { $this->returnError(1038, $this->version); @@ -174,11 +174,11 @@ private function study_create() { $this->db->trans_start(); $schedule_data = array( - 'alias' => array_key_exists('alias', $study) ? $study['alias'] : null, + 'alias' => isset($study['alias']) ? $study['alias'] : null, 'main_entity_type' => $study['main_entity_type'], - 'benchmark_suite' => array_key_exists('benchmark_suite', $study) ? $study['benchmark_suite'] : null, + 'benchmark_suite' => isset($study['benchmark_suite']) ? $study['benchmark_suite'] : null, 'name' => $study['name'], - 'description' => array_key_exists('description', $study) ? $study['description'] : null, + 'description' => isset($study['description']) ? $study['description'] : null, 'visibility' => 'public', 'creation_date' => now(), 'creator' => $this->user_id, @@ -804,11 +804,11 @@ private function _study_get($study, $entity_type) { return; } - $data = array_key_exists('data', $res) ? $res['data'] : null; - $tasks = array_key_exists('tasks', $res) ? $res['tasks'] : null; - $flows = array_key_exists('flows', $res) ? $res['flows'] : null; - $setups = array_key_exists('setups', $res) ? $res['setups'] : null; - $runs = array_key_exists('runs', $res) ? $res['runs'] : null; + $data = isset($res['data']) ? $res['data'] : null; + $tasks = isset($res['tasks']) ? $res['tasks'] : null; + $flows = isset($res['flows']) ? $res['flows'] : null; + $setups = isset($res['setups']) ? $res['setups'] : null; + $runs = isset($res['runs']) ? $res['runs'] : null; $template_values = array( 'study' => $study, @@ -845,7 +845,8 @@ private function _link_entities($study_id, $uploader_id, $link_entities) { $model = ucfirst($study->main_entity_type) . '_study'; $id_name = $study->main_entity_type . '_id'; - foreach ($link_entities[$study->main_entity_type] as $id) { + if(array_key_exists($study->main_entity_type, $link_entities)){ + foreach ($link_entities[$study->main_entity_type] as $id) { $data = array( 'study_id' => $study_id, $id_name => $id, @@ -856,6 +857,7 @@ private function _link_entities($study_id, $uploader_id, $link_entities) { if (!$result) { return false; } + } } return true; } diff --git a/openml_OS/models/api/v1/Api_task.php b/openml_OS/models/api/v1/Api_task.php index 35ca249a0..5c52b6aa0 100644 --- a/openml_OS/models/api/v1/Api_task.php +++ b/openml_OS/models/api/v1/Api_task.php @@ -523,13 +523,17 @@ private function task($task_id) { $inputs = $this->Task_inputs->getAssociativeArray('input', 'value', 'task_id = ' . $task_id); + if (isset($inputs['custom_testset'])) { + $this->returnError(153, $this->version); + return; + } $parsed_io = $this->Task_type_inout->getParsed($task_id); $tags = $this->Task_tag->getColumnWhere('tag', 'id = ' . $task_id); $name = 'Task ' . $task_id . ' (' . $task_type->name . ')'; - if (array_key_exists('source_data', $inputs)) { + if (isset($inputs['source_data'])) { $dataset = $this->Dataset->getById($inputs['source_data']); $name = 'Task ' . $task_id . ': ' . $dataset->name . ' (' . $task_type->name . ')'; } @@ -733,7 +737,7 @@ public function task_upload() { $name = $input->attributes() . ''; // check if input is no duplicate - if (array_key_exists($name, $inputs)) { + if (isset($inputs[$name])) { $this->returnError(617, $this->version, $this->openmlGeneralErrorCode, 'problematic input: ' . $name); @@ -755,7 +759,7 @@ public function task_upload() { foreach($inputs as $name => $input_value) { // check if input is legal - if (array_key_exists($name, $legal_inputs) == false) { + if (isset($legal_inputs[$name]) == false) { $this->returnError(616, $this->version, $this->openmlGeneralErrorCode, 'problematic input: ' . $name); return; } @@ -768,7 +772,7 @@ public function task_upload() { // is_json lives in text_helper $type_check_mappings = array('numeric' => 'is_numeric', 'json' => 'is_json', 'string' => 'is_string'); - if (!property_exists($constraints, 'data_type') || !array_key_exists($constraints->data_type, $type_check_mappings)) { + if (!property_exists($constraints, 'data_type') || !isset($type_check_mappings[$constraints->data_type])) { $this->returnError(620, $this->version, $this->openmlGeneralErrorCode, 'problematic input: ' . $name); return; } diff --git a/openml_OS/third_party/OpenML/Java/evaluate.jar b/openml_OS/third_party/OpenML/Java/evaluate.jar index cba9e78bd..59f38d9a7 100644 Binary files a/openml_OS/third_party/OpenML/Java/evaluate.jar and b/openml_OS/third_party/OpenML/Java/evaluate.jar differ diff --git a/openml_OS/vendor/autoload.php b/openml_OS/vendor/autoload.php old mode 100755 new mode 100644 index abe50a2fb..1824d2017 --- a/openml_OS/vendor/autoload.php +++ b/openml_OS/vendor/autoload.php @@ -2,6 +2,24 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); +} + require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit42a8ed1e61513be5513aa0cb72c34677::getLoader(); +return ComposerAutoloaderInit910917a8b4c1a118ae44f7b4b0cfc75a::getLoader(); diff --git a/openml_OS/vendor/composer/ClassLoader.php b/openml_OS/vendor/composer/ClassLoader.php index 4626994fd..7824d8f7e 100644 --- a/openml_OS/vendor/composer/ClassLoader.php +++ b/openml_OS/vendor/composer/ClassLoader.php @@ -37,57 +37,126 @@ * * @author Fabien Potencier * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + // PSR-4 + /** + * @var array> + */ private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ private $prefixDirsPsr4 = array(); + /** + * @var list + */ private $fallbackDirsPsr4 = array(); // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ private $prefixesPsr0 = array(); + /** + * @var list + */ private $fallbackDirsPsr0 = array(); + /** @var bool */ private $useIncludePath = false; + + /** + * @var array + */ private $classMap = array(); + + /** @var bool */ private $classMapAuthoritative = false; + + /** + * @var array + */ private $missingClasses = array(); + + /** @var string|null */ private $apcuPrefix; + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); } + /** + * @return array> + */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } + /** + * @return list + */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } + /** + * @return list + */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } + /** + * @return array Array of classname => path + */ public function getClassMap() { return $this->classMap; } /** - * @param array $classMap Class to filename map + * @param array $classMap Class to filename map + * + * @return void */ public function addClassMap(array $classMap) { @@ -102,22 +171,25 @@ public function addClassMap(array $classMap) * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void */ public function add($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - (array) $paths + $paths ); } @@ -126,19 +198,19 @@ public function add($prefix, $paths, $prepend = false) $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; + $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - (array) $paths + $paths ); } } @@ -147,25 +219,28 @@ public function add($prefix, $paths, $prepend = false) * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException + * + * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { + $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - (array) $paths, + $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - (array) $paths + $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -175,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false) throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; + $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, + $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - (array) $paths + $paths ); } } @@ -195,8 +270,10 @@ public function addPsr4($prefix, $paths, $prepend = false) * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void */ public function set($prefix, $paths) { @@ -211,10 +288,12 @@ public function set($prefix, $paths) * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException + * + * @return void */ public function setPsr4($prefix, $paths) { @@ -234,6 +313,8 @@ public function setPsr4($prefix, $paths) * Turns on searching the include path for class files. * * @param bool $useIncludePath + * + * @return void */ public function setUseIncludePath($useIncludePath) { @@ -256,6 +337,8 @@ public function getUseIncludePath() * that have not been registered with the class map. * * @param bool $classMapAuthoritative + * + * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -276,10 +359,12 @@ public function isClassMapAuthoritative() * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix + * + * @return void */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** @@ -296,33 +381,55 @@ public function getApcuPrefix() * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** * Unregisters this instance as an autoloader. + * + * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** * Loads the given class or interface. * * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise + * @return true|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + $includeFile = self::$includeFile; + $includeFile($file); return true; } + + return null; } /** @@ -367,6 +474,21 @@ public function findFile($class) return $file; } + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -374,10 +496,14 @@ private function findFileWithExtension($class, $ext) $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { return $file; } } @@ -428,14 +554,26 @@ private function findFileWithExtension($class, $ext) return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } } diff --git a/openml_OS/vendor/composer/InstalledVersions.php b/openml_OS/vendor/composer/InstalledVersions.php new file mode 100644 index 000000000..51e734a77 --- /dev/null +++ b/openml_OS/vendor/composer/InstalledVersions.php @@ -0,0 +1,359 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/openml_OS/vendor/composer/LICENSE b/openml_OS/vendor/composer/LICENSE index 1a2812488..f27399a04 100644 --- a/openml_OS/vendor/composer/LICENSE +++ b/openml_OS/vendor/composer/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2016 Nils Adermann, Jordi Boggiano +Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/openml_OS/vendor/composer/autoload_classmap.php b/openml_OS/vendor/composer/autoload_classmap.php index 7a91153b0..0fb0a2c19 100644 --- a/openml_OS/vendor/composer/autoload_classmap.php +++ b/openml_OS/vendor/composer/autoload_classmap.php @@ -2,8 +2,9 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', ); diff --git a/openml_OS/vendor/composer/autoload_files.php b/openml_OS/vendor/composer/autoload_files.php index 80babd7e9..3addebf7f 100644 --- a/openml_OS/vendor/composer/autoload_files.php +++ b/openml_OS/vendor/composer/autoload_files.php @@ -2,9 +2,10 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php', + '8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php', ); diff --git a/openml_OS/vendor/composer/autoload_namespaces.php b/openml_OS/vendor/composer/autoload_namespaces.php index b7fc0125d..5c24fb52c 100644 --- a/openml_OS/vendor/composer/autoload_namespaces.php +++ b/openml_OS/vendor/composer/autoload_namespaces.php @@ -2,8 +2,9 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( + 'org\\bovigo\\vfs\\' => array($vendorDir . '/mikey179/vfsstream/src/main/php'), ); diff --git a/openml_OS/vendor/composer/autoload_psr4.php b/openml_OS/vendor/composer/autoload_psr4.php index 682ca7a74..8c8c6102a 100644 --- a/openml_OS/vendor/composer/autoload_psr4.php +++ b/openml_OS/vendor/composer/autoload_psr4.php @@ -2,13 +2,13 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'React\\Promise\\' => array($vendorDir . '/react/promise/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'GuzzleHttp\\Stream\\' => array($vendorDir . '/guzzlehttp/streams/src'), - 'GuzzleHttp\\Ring\\' => array($vendorDir . '/guzzlehttp/ringphp/src'), + 'GuzzleHttp\\Stream\\' => array($vendorDir . '/ezimuel/guzzlestreams/src'), + 'GuzzleHttp\\Ring\\' => array($vendorDir . '/ezimuel/ringphp/src'), 'Elasticsearch\\' => array($vendorDir . '/elasticsearch/elasticsearch/src/Elasticsearch'), ); diff --git a/openml_OS/vendor/composer/autoload_real.php b/openml_OS/vendor/composer/autoload_real.php index 323e357ac..ba0593a73 100644 --- a/openml_OS/vendor/composer/autoload_real.php +++ b/openml_OS/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit42a8ed1e61513be5513aa0cb72c34677 +class ComposerAutoloaderInit910917a8b4c1a118ae44f7b4b0cfc75a { private static $loader; @@ -13,58 +13,38 @@ public static function loadClassLoader($class) } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit42a8ed1e61513be5513aa0cb72c34677', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit42a8ed1e61513be5513aa0cb72c34677', 'loadClassLoader')); + require __DIR__ . '/platform_check.php'; - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; + spl_autoload_register(array('ComposerAutoloaderInit910917a8b4c1a118ae44f7b4b0cfc75a', 'loadClassLoader'), true, true); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + spl_autoload_unregister(array('ComposerAutoloaderInit910917a8b4c1a118ae44f7b4b0cfc75a', 'loadClassLoader')); - call_user_func(\Composer\Autoload\ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::getInitializer($loader)); $loader->register(true); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire42a8ed1e61513be5513aa0cb72c34677($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); } return $loader; } } - -function composerRequire42a8ed1e61513be5513aa0cb72c34677($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/openml_OS/vendor/composer/autoload_static.php b/openml_OS/vendor/composer/autoload_static.php index c28f0cc7d..0f74ac5f9 100644 --- a/openml_OS/vendor/composer/autoload_static.php +++ b/openml_OS/vendor/composer/autoload_static.php @@ -4,10 +4,11 @@ namespace Composer\Autoload; -class ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677 +class ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', + '8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php', ); public static $prefixLengthsPsr4 = array ( @@ -41,11 +42,11 @@ class ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677 ), 'GuzzleHttp\\Stream\\' => array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/streams/src', + 0 => __DIR__ . '/..' . '/ezimuel/guzzlestreams/src', ), 'GuzzleHttp\\Ring\\' => array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/ringphp/src', + 0 => __DIR__ . '/..' . '/ezimuel/ringphp/src', ), 'Elasticsearch\\' => array ( @@ -53,11 +54,27 @@ class ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677 ), ); + public static $prefixesPsr0 = array ( + 'o' => + array ( + 'org\\bovigo\\vfs\\' => + array ( + 0 => __DIR__ . '/..' . '/mikey179/vfsstream/src/main/php', + ), + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit42a8ed1e61513be5513aa0cb72c34677::$prefixDirsPsr4; + $loader->prefixLengthsPsr4 = ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::$prefixesPsr0; + $loader->classMap = ComposerStaticInit910917a8b4c1a118ae44f7b4b0cfc75a::$classMap; }, null, ClassLoader::class); } diff --git a/openml_OS/vendor/composer/installed.json b/openml_OS/vendor/composer/installed.json index a9e87aa68..65cbc69e6 100644 --- a/openml_OS/vendor/composer/installed.json +++ b/openml_OS/vendor/composer/installed.json @@ -1,263 +1,376 @@ -[ - { - "name": "guzzlehttp/streams", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2014-10-12T19:18:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ] - }, - { - "name": "psr/log", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-10-10T12:19:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "react/promise", - "version": "v2.7.0", - "version_normalized": "2.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "f4edc2581617431aea50430749db55cc3fc031b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f4edc2581617431aea50430749db55cc3fc031b3", - "reference": "f4edc2581617431aea50430749db55cc3fc031b3", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "time": "2018-06-13T15:59:06+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ] - }, - { - "name": "guzzlehttp/ringphp", - "version": "1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", - "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", - "shasum": "" - }, - "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "time": "2018-07-31T13:22:33+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function." - }, - { - "name": "elasticsearch/elasticsearch", - "version": "v6.0.1", - "version_normalized": "6.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/b8e3bc9d1fc54d6a18692df0b74956efe7fe241a", - "reference": "b8e3bc9d1fc54d6a18692df0b74956efe7fe241a", - "shasum": "" +{ + "packages": [ + { + "name": "elasticsearch/elasticsearch", + "version": "v6.8.2", + "version_normalized": "6.8.2.0", + "source": { + "type": "git", + "url": "https://github.com/elastic/elasticsearch-php.git", + "reference": "619c78266999c6e431df9ca0f844e8f656ac145b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/619c78266999c6e431df9ca0f844e8f656ac145b", + "reference": "619c78266999c6e431df9ca0f844e8f656ac145b", + "shasum": "" + }, + "require": { + "ext-json": ">=1.3.7", + "ezimuel/ringphp": "^1.1.2", + "php": "^7.3 || ^8.0", + "psr/log": "~1.0" + }, + "require-dev": { + "doctrine/inflector": "^1.3", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.4", + "symfony/finder": "~4.0", + "symfony/yaml": "~4.0", + "symplify/git-wrapper": ">=9.0 <9.3.27" + }, + "suggest": { + "ext-curl": "*", + "monolog/monolog": "Allows for client-level logging and tracing" + }, + "time": "2021-07-14T14:41:55+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Elasticsearch\\": "src/Elasticsearch/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Zachary Tong" + }, + { + "name": "Enrico Zimuel" + } + ], + "description": "PHP Client for Elasticsearch", + "keywords": [ + "client", + "elasticsearch", + "search" + ], + "support": { + "issues": "https://github.com/elastic/elasticsearch-php/issues", + "source": "https://github.com/elastic/elasticsearch-php/tree/v6.8.2" + }, + "install-path": "../elasticsearch/elasticsearch" }, - "require": { - "ext-json": ">=1.3.7", - "guzzlehttp/ringphp": "~1.0", - "php": "^7.0", - "psr/log": "~1.0" + { + "name": "ezimuel/guzzlestreams", + "version": "3.1.0", + "version_normalized": "3.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/ezimuel/guzzlestreams.git", + "reference": "b4b5a025dfee70d6cd34c780e07330eb93d5b997" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/b4b5a025dfee70d6cd34c780e07330eb93d5b997", + "reference": "b4b5a025dfee70d6cd34c780e07330eb93d5b997", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~9.0" + }, + "time": "2022-10-24T12:58:50+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Fork of guzzle/streams (abandoned) to be used with elasticsearch-php", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "support": { + "source": "https://github.com/ezimuel/guzzlestreams/tree/3.1.0" + }, + "install-path": "../ezimuel/guzzlestreams" }, - "require-dev": { - "cpliakas/git-wrapper": "~1.0", - "doctrine/inflector": "^1.1", - "mockery/mockery": "0.9.4", - "phpstan/phpstan-shim": "0.8.3", - "phpunit/phpunit": "6.3.0", - "squizlabs/php_codesniffer": "3.0.2", - "symfony/finder": "^2.8", - "symfony/yaml": "^2.8" + { + "name": "ezimuel/ringphp", + "version": "1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/ezimuel/ringphp.git", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/7887fc8488013065f72f977dcb281994f5fde9f4", + "reference": "7887fc8488013065f72f977dcb281994f5fde9f4", + "shasum": "" + }, + "require": { + "ezimuel/guzzlestreams": "^3.0.1", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "replace": { + "guzzlehttp/ringphp": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~9.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "time": "2022-12-07T11:28:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", + "support": { + "source": "https://github.com/ezimuel/ringphp/tree/1.2.2" + }, + "install-path": "../ezimuel/ringphp" }, - "suggest": { - "ext-curl": "*", - "monolog/monolog": "Allows for client-level logging and tracing" + { + "name": "mikey179/vfsstream", + "version": "v1.6.11", + "version_normalized": "1.6.11.0", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "time": "2022-02-23T02:02:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "install-path": "../mikey179/vfsstream" }, - "time": "2017-12-05T14:15:58+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Elasticsearch\\": "src/Elasticsearch/" - } + { + "name": "psr/log", + "version": "1.1.4", + "version_normalized": "1.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2021-05-03T11:20:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "install-path": "../psr/log" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Zachary Tong" - } - ], - "description": "PHP Client for Elasticsearch", - "keywords": [ - "client", - "elasticsearch", - "search" - ] - } -] + { + "name": "react/promise", + "version": "v2.11.0", + "version_normalized": "2.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/1a8460931ea36dc5c76838fec5734d55c88c6831", + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "time": "2023-11-16T16:16:50+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "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": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.11.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "install-path": "../react/promise" + } + ], + "dev": true, + "dev-package-names": [ + "mikey179/vfsstream" + ] +} diff --git a/openml_OS/vendor/composer/installed.php b/openml_OS/vendor/composer/installed.php new file mode 100644 index 000000000..0a24f14eb --- /dev/null +++ b/openml_OS/vendor/composer/installed.php @@ -0,0 +1,83 @@ + array( + 'name' => 'codeigniter/framework', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '4276446c32db6d515a9252a172c0f187fde25afc', + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + 'codeigniter/framework' => array( + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '4276446c32db6d515a9252a172c0f187fde25afc', + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'elasticsearch/elasticsearch' => array( + 'pretty_version' => 'v6.8.2', + 'version' => '6.8.2.0', + 'reference' => '619c78266999c6e431df9ca0f844e8f656ac145b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../elasticsearch/elasticsearch', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'ezimuel/guzzlestreams' => array( + 'pretty_version' => '3.1.0', + 'version' => '3.1.0.0', + 'reference' => 'b4b5a025dfee70d6cd34c780e07330eb93d5b997', + 'type' => 'library', + 'install_path' => __DIR__ . '/../ezimuel/guzzlestreams', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'ezimuel/ringphp' => array( + 'pretty_version' => '1.2.2', + 'version' => '1.2.2.0', + 'reference' => '7887fc8488013065f72f977dcb281994f5fde9f4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../ezimuel/ringphp', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'guzzlehttp/ringphp' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '1.2.2', + ), + ), + 'mikey179/vfsstream' => array( + 'pretty_version' => 'v1.6.11', + 'version' => '1.6.11.0', + 'reference' => '17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f', + 'type' => 'library', + 'install_path' => __DIR__ . '/../mikey179/vfsstream', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'psr/log' => array( + 'pretty_version' => '1.1.4', + 'version' => '1.1.4.0', + 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/log', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'react/promise' => array( + 'pretty_version' => 'v2.11.0', + 'version' => '2.11.0.0', + 'reference' => '1a8460931ea36dc5c76838fec5734d55c88c6831', + 'type' => 'library', + 'install_path' => __DIR__ . '/../react/promise', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/openml_OS/vendor/composer/platform_check.php b/openml_OS/vendor/composer/platform_check.php new file mode 100644 index 000000000..12f5790c9 --- /dev/null +++ b/openml_OS/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70433)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.33". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/Dockerfile b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/Dockerfile new file mode 100644 index 000000000..451830524 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/Dockerfile @@ -0,0 +1,40 @@ +ARG PHP_VERSION=7.4-cli +FROM php:${PHP_VERSION} + +WORKDIR /usr/src/app + +# Install git +RUN apt-get update && \ + apt-get install -y --no-install-recommends git + +# Install zip extension for PHP +RUN apt-get install -y \ + libzip-dev \ + zip \ + libyaml-dev \ + && docker-php-ext-install zip + +# Install yaml extension for PHP +RUN pecl channel-update pecl.php.net +RUN pecl install yaml && docker-php-ext-enable yaml + +# Print PHP version +RUN php -v + +# Install composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# Print composer version +RUN composer --version + +COPY composer.json . + +# Install dependencies with composer +RUN composer install + +COPY . . + +# Updating elasticsearch submodule +RUN git submodule update --init --recursive + +CMD ["bash", ".ci/yaml-tests.sh"] \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.crt b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.crt new file mode 100644 index 000000000..115eb92e9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDSTCCAjGgAwIBAgIUNs0sTe4SIC2Vlo3MxLII+2R0nHQwDQYJKoZIhvcNAQEL +BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l +cmF0ZWQgQ0EwHhcNMjEwMjI1MTQ0MTI2WhcNMjQwMjI1MTQ0MTI2WjA0MTIwMAYD +VQQDEylFbGFzdGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAI2JttYaT4GI96K5wh5TPsc3 +Yk4FBQGwFdyYeRJTG6vAP8aD32UYNTitSOVyFVIhAA4hRgfQPI+h5W/zw8n0HG3b +OCSdW7N7SiqDQv6+rtYj+QN/Lu7VuBbKnhmNZCLz7gqQ1IWIk8AmeNtFvw0ErEHH +Pc2Ri/bOcok+jVvpr3CpvPZZVPj142yPhvelVQyzc9oPXqa5fAIM761qqfcxYk6m +ydqkjC5FgjVcc/Q1kXYU0KVQB40H8ssjey1TfCILiuS2E9EBXOiAnw869iZzz1u0 +p38qFrCIOzDYxhQTR/4xD1XLN7LVQuIO+0m4wV0x1mG8e+0kKMIHlZ90Kmm47kcC +AwEAAaNTMFEwHQYDVR0OBBYEFIge6MVjUvBhxpU/sEVv7m6P8rIIMB8GA1UdIwQY +MBaAFIge6MVjUvBhxpU/sEVv7m6P8rIIMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggEBABeP2YYedfCiWw4C/MTvGpfbjdVLQw3MPZvFcPMsyL2C/zOn +eJpTDHX+eTcrcNTEvX2Z56EWTKmyr4PwCVw/iZ4e8+ZII908haAuJqNWYGjIebsG +0hor/rZfRt4SjJR8mc0GXQ4SXYYglTuO7Q88QO3oBEaWj3f+0hefVObBOGhBL7BL +JLjdUMJjH1rDbPyVVzEzspwP0x4JBWgqaSjIfmzrL66GI13oMHAw1NL8AlmqgI2d +8yKR6RTyJ/rNcmDjCiynsUzqTt8ZpH//MeQLo286JM1f2TgB5zi5V4kDwB/WpzXs +4CqWX26iFeOfL6yxRdKpxb1UHFvqZY3tVB6Hg6A= +-----END CERTIFICATE----- diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.key b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.key new file mode 100644 index 000000000..cc61f7a02 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/ca.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAjYm21hpPgYj3ornCHlM+xzdiTgUFAbAV3Jh5ElMbq8A/xoPf +ZRg1OK1I5XIVUiEADiFGB9A8j6Hlb/PDyfQcbds4JJ1bs3tKKoNC/r6u1iP5A38u +7tW4FsqeGY1kIvPuCpDUhYiTwCZ420W/DQSsQcc9zZGL9s5yiT6NW+mvcKm89llU ++PXjbI+G96VVDLNz2g9eprl8AgzvrWqp9zFiTqbJ2qSMLkWCNVxz9DWRdhTQpVAH +jQfyyyN7LVN8IguK5LYT0QFc6ICfDzr2JnPPW7SnfyoWsIg7MNjGFBNH/jEPVcs3 +stVC4g77SbjBXTHWYbx77SQowgeVn3QqabjuRwIDAQABAoIBAHlrI3MmXQA1nKJ3 +EoTrStaht25QtgvNn+N+1ZYXv4wmP0+wP0s9aiK13OwgYxPyhVaZyrbXN6zL6MSS +bGpqRJ0lS1N1vn4JDQXNVwKsV9YSRANw7rUqmGLM7LXk6ntloNZlijsHgCB9oH4S +piOn15ISNv2Ll3NhhTYheCjaHovZcFsU/b6OvNtaN5TxHyB+fV4NkiX3iOIrhBzM +dJfpUB7K643EB1cvHck6NqXX4iU3RGGdsBaJ380QSsSjLhnwic25tEyQnBZkIPQ6 +/QTgBSwLGMfal2xiiRkmdUio/BPuNP5XSibOj1318vSFmlZqShl+ugvlHz6ppp0J +rMDgGiECgYEA83/8VXhNvZBp9gOjMqLCDeBjluC16h2nVb43RIhVBqrIEqiRhLWp +EiFJTAWTzACecHk9r32svY0vT3tfOAS/GA5Ym6koYQt//4brDYh9hiewHLnVZ3AW +CYnJ/jK4HuGLYo8t32mWFPYTQnCL33owEQoJIPdFnDUysV6WAsiQx7cCgYEAlM3F +F0YPi8Lqasa3aEUrxQ7hnXACeSLo1Kitw5sjl5X+0zSST8B0FvmKtSX3uh2f0rXb +53haysTN1fxW9qaEzH5nVQBxP5+Q8YeOeNgKjsed6+xz0eKtSDBms5gW+BzOJE+M +rCM7NT3MY6V8iWK5Wa58Wy5DXdP8A4AqAwa8bfECgYEAxKMKZwsr3HWO3Di7xdxh +0UrvoZv9y/3+b+OYRiPCZgvsXgT63qzEx/tRca7fV9L4H+QIyHs40Cn/lrQOhPJw +T0DmlW3ZSeU7jGKr1tXuaDQMqGX5y/pcEX/QOxNCVM3W/dSaOtzNckf17aVtjx7h +SiFMle6ZrDfZpBq6Ea1eHakCgYBN0M2gviKjE+tCq2h+Pq4E/yM9EbY5YugfTZaR +FDAotWftSzC4RAxxd03yLUi/K37I0hGNmoLgRsrdfHh9w9bumauv5+tROkCyDhGT +YGclA36yQZTPzZqQhb8va/mXBnlGw9Lssf/kd8zKz1+w+M+09mpRxH+2MYU4z20o +5/ziAQKBgQCGR9A5St8ks+PmLY7eMrcGWTkwwKowHFiydEqGko85JjcvogcH0otX +C2LeQvySItfr6ZXuc8YFSvNbydPg+f4bge/ilVfPYrHnN4Y1ERRxu/JoxQe0nDhM +9cFG5uR9Qk0Kuv6U4NwFI9Mx8OEiS02TWZp3qYnVIwrou2TOMVYE4Q== +-----END RSA PRIVATE KEY----- diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.crt b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.crt new file mode 100644 index 000000000..7cb72272e --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDWDCCAkCgAwIBAgIVAO8CZ24F8je2ZCNGSHY0cdefL2sBMA0GCSqGSIb3DQEB +CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu +ZXJhdGVkIENBMB4XDTIxMDIyNTE0NDEyN1oXDTI0MDIyNTE0NDEyN1owETEPMA0G +A1UEAxMGbm9kZTAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAno4I +PwiuRibcLAM70QW0ejp9lAJr7l/gFzEN6DJKLnE+DXA5ILZqVR/bpvdoUMwj+cV/ +Kt1VsAj/sqYJTykDYt+ZyuslllKQ2l2thuyC6hWGA9kUtRbbnQIu+HK9gNDyptLy +ViWgiK4FwOef4G5CTcfsAdZLBgHulv8dl/sc3F8RzOkBY+vahyTOeTudynkwCATi +yTjRtudKordafsqoU2f6rwNrVf7Y1pCE9GzfhdKv+Biuj1pdvjXrHu5dVLZ7/sBo +thtYOW15e49lNVvb0al2r2AtriLcsKawsAUCqx1ifbyyNbEHNp3Jud8LsUDCeyKC +vhnla6Mpr+7w1qlhMQIDAQABo4GDMIGAMB0GA1UdDgQWBBTq4ALXi7kVdotF6VRx +wB8NEqVD6zAfBgNVHSMEGDAWgBSIHujFY1LwYcaVP7BFb+5uj/KyCDAzBgNVHREE +LDAqgglsb2NhbGhvc3SHBH8AAAGCCTEyNy4wLjAuMYIMaXB2NC5maWRkbGVyMAkG +A1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAF9tjxFekc2QR/sOv3Hxrsb7UY3P +OGGR7QqstKGDpqgAtY7gF30Fu5oEGd6Zn9A/ElyRD0CH1YvCXGNyV+ZwCB3ayuTH ++PJvIZVhnuvjkd4iVW2WOG9N80HNicLVehho/2ae/nb9lhVWllzPpo++IvUDfnPQ +gl07R7liju7iW8QcscAcA1tWvYz53je89kud5D6UQeorkLmZ5u/M9kSV2ViRYJFu +hPOlitTK7psDv6eGHnf7jK9IdO/p2etlH/wBNzitIdI7GAH2jQOoEpFw5ip/oRQM +2TMYVtBQOGpEgjG59K7Ngu1I15Q/lEBOf3KjP1GiNDgh03FV35xG+hOJpao= +-----END CERTIFICATE----- diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.key b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.key new file mode 100644 index 000000000..41eca8e27 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/certs/testnode.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAno4IPwiuRibcLAM70QW0ejp9lAJr7l/gFzEN6DJKLnE+DXA5 +ILZqVR/bpvdoUMwj+cV/Kt1VsAj/sqYJTykDYt+ZyuslllKQ2l2thuyC6hWGA9kU +tRbbnQIu+HK9gNDyptLyViWgiK4FwOef4G5CTcfsAdZLBgHulv8dl/sc3F8RzOkB +Y+vahyTOeTudynkwCATiyTjRtudKordafsqoU2f6rwNrVf7Y1pCE9GzfhdKv+Biu +j1pdvjXrHu5dVLZ7/sBothtYOW15e49lNVvb0al2r2AtriLcsKawsAUCqx1ifbyy +NbEHNp3Jud8LsUDCeyKCvhnla6Mpr+7w1qlhMQIDAQABAoIBAFrUsxSpPG0jxe3Q +zGuqAQIkj9xCpuIgOpgOmhDy/lwss4evSora9X9eiM7V3QSsbc+gvIEp2vTFsvX8 ++EhJDo+N2OTOYPIEysbN86Lfyv+e5O8/ZQV42sbPgWkDElzBVsELB5kiZRzn1JP2 +HTjM8V7tsN48jS4b3TrTW3i9eoMja9bbOcm1ojTAlFzFroNqbg6E/46ag+I9JA+d +CyJdZVWLGpA8q4GKwfI6qEDsGkyqSM9vmfbmRvzp4qVdOPLPSr+VhY/nuaUTFR9H +mYRFsU38daX+CKb0gSD4044PStOT2dcuS8ZoQTdJ0q6ojV0q0+DnpBO6IDaSNCrR +phjnEAECgYEA2iIoJHdU9UQHD3/GHEkpPzbqHwnishnNibsCFy+moWRig5SbfPgx +OxmQ5A7c+MVSPRCpECqCs1+bTh3PxSBSV3HW6ZV+0XY1z/otM/b1kVrgQC+5PZpF +mPdRnctlpa7MOAiffKUwfUej2oSwTzVtobDsucI4SC0Vf9zNASM51JECgYEAuhQ0 +Hw8RjOBA+i20DTLPMbla0ZQQjl72QOZkLxNL55oxtDrsMA5WLxQHI659/LroDiPD +x17lGVsNY1nRT0Wgi6gFcf+gqV5gxwAfvu++rWQzLW0+bjdXPHxxIsZGD1ekQxfV +dOswrmAlO67APxcgFw39rKZcNtm6z8G/CDsQkqECgYAgJ9rdDU5T3ZRg34gX0V0o +OXMn4jAt6wnWnN/BBUA+GGtBVF3bfUbcnHc0d1Bxx7zIzbTuciXURWrCiDiBqbMZ +uulgg64vOIrUPt/9AhHPPKNEMwTOpPhPhV3dsgco9myacgL4v+02+qGX6+mFs62W +oVs0QwJC+Ypqz+TUnxm+UQKBgAnK8GdGCr1oO+MurpAXQXIzeAUZjrl/Y+RMe69C +i7cXlVAP3cg1qPF3U1zcXQME7xt3ZGFErDfmY9D7tBlA588Ru5+hPVpMfjla11Dc +GyPS5yKX4jY4sV2civOyjZNXIGzrfy9VBU3X/32hl7p6RBUShmwkoSu9z6gJYT1U +pm2hAoGAK565JUhabcGWosGnJ7LcpwUXzLXIOxaYN8gG45PddXYD8G+fliRlcnos +bEHIwaihTA4YdkJ4HXQKd+Gx3ZIAsWjda+l/w6jEZJhP3OOS3EMTW0mU7m6KnCmi +tvAXCxUMCAbd12Ci72lKuZD762XaHs2g/o9Al1zydHK95po1VEc= +-----END RSA PRIVATE KEY----- diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/docker/Dockerfile b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/docker/Dockerfile new file mode 100644 index 000000000..ea6898049 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/docker/Dockerfile @@ -0,0 +1,5 @@ +ARG PHP_VERSION=7.4-cli +FROM php:${PHP_VERSION} + +# Create app directory +WORKDIR /usr/src/app diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/cleanup.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/cleanup.sh new file mode 100644 index 000000000..4c25166fb --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/cleanup.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# +# Shared cleanup routines between different steps +# +# Please source .ci/functions/imports.sh as a whole not just this file +# +# Version 1.0.0 +# - Initial version after refactor + +function cleanup_volume { + if [[ "$(docker volume ls -q -f name=$1)" ]]; then + echo -e "\033[34;1mINFO:\033[0m Removing volume $1\033[0m" + (docker volume rm "$1") || true + fi +} +function container_running { + if [[ "$(docker ps -q -f name=$1)" ]]; then + return 0; + else return 1; + fi +} +function cleanup_node { + if container_running "$1"; then + echo -e "\033[34;1mINFO:\033[0m Removing container $1\033[0m" + (docker container rm --force --volumes "$1") || true + fi + if [[ -n "$1" ]]; then + echo -e "\033[34;1mINFO:\033[0m Removing volume $1-${suffix}-data\033[0m" + cleanup_volume "$1-${suffix}-data" + fi +} +function cleanup_network { + if [[ "$(docker network ls -q -f name=$1)" ]]; then + echo -e "\033[34;1mINFO:\033[0m Removing network $1\033[0m" + (docker network rm "$1") || true + fi +} + +function cleanup_trap { + status=$? + set +x + if [[ "$DETACH" != "true" ]]; then + echo -e "\033[34;1mINFO:\033[0m clean the network if not detached (start and exit)\033[0m" + cleanup_all_in_network "$1" + fi + # status is 0 or SIGINT + if [[ "$status" == "0" || "$status" == "130" ]]; then + echo -e "\n\033[32;1mSUCCESS run-tests\033[0m" + exit 0 + else + echo -e "\n\033[31;1mFAILURE during run-tests\033[0m" + exit ${status} + fi +}; +function cleanup_all_in_network { + + if [[ -z "$(docker network ls -q -f name="^$1\$")" ]]; then + echo -e "\033[34;1mINFO:\033[0m $1 is already deleted\033[0m" + return 0 + fi + containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' $1) + while read -r container; do + cleanup_node "$container" + done <<< "$containers" + cleanup_network $1 + echo -e "\033[32;1mSUCCESS:\033[0m Cleaned up and exiting\033[0m" +}; diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/imports.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/imports.sh new file mode 100644 index 000000000..3c4010654 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/imports.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# +# Sets up all the common variables and imports relevant functions +# +# Version 1.0.1 +# - Initial version after refactor +# - Validate STACK_VERSION asap + +function require_stack_version() { + if [[ -z $STACK_VERSION ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [STACK_VERSION] not set\033[0m" + exit 1 + fi +} + +require_stack_version + +if [[ -z $es_node_name ]]; then + # only set these once + set -euo pipefail + export TEST_SUITE=${TEST_SUITE-oss} + export RUNSCRIPTS=${RUNSCRIPTS-} + export DETACH=${DETACH-false} + export CLEANUP=${CLEANUP-false} + + #export es_node_name=instance + export es_node_name=elasticsearch + export elastic_password=changeme + export elasticsearch_image=elasticsearch + export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200 + if [[ $TEST_SUITE != "xpack" ]]; then + export elasticsearch_image=elasticsearch-${TEST_SUITE} + export es_node_name=elasticsearch-oss + export elasticsearch_url=http://${es_node_name}:9200 + fi + export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost} + export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}" + + export suffix=rest-test + export moniker=$(echo "$elasticsearch_container" | tr -C "[:alnum:]" '-') + export network_name=${moniker}${suffix} + + export ssl_cert="${script_path}/certs/testnode.crt" + export ssl_key="${script_path}/certs/testnode.key" + export ssl_ca="${script_path}/certs/ca.crt" + +fi + + export script_path=$(dirname $(realpath -s $0)) + source $script_path/functions/cleanup.sh + source $script_path/functions/wait-for-container.sh + trap "cleanup_trap ${network_name}" EXIT + + +if [[ "$CLEANUP" == "true" ]]; then + cleanup_all_in_network $network_name + exit 0 +fi + +echo -e "\033[34;1mINFO:\033[0m Creating network $network_name if it does not exist already \033[0m" +docker network inspect "$network_name" > /dev/null 2>&1 || docker network create "$network_name" + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/wait-for-container.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/wait-for-container.sh new file mode 100644 index 000000000..1a721b588 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/functions/wait-for-container.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Exposes a routine scripts can call to wait for a container if that container set up a health command +# +# Please source .ci/functions/imports.sh as a whole not just this file +# +# Version 1.0.1 +# - Initial version after refactor +# - Make sure wait_for_contiainer is silent + +function wait_for_container { + set +x + until ! container_running "$1" || (container_running "$1" && [[ "$(docker inspect -f "{{.State.Health.Status}}" ${1})" != "starting" ]]); do + echo "" + docker inspect -f "{{range .State.Health.Log}}{{.Output}}{{end}}" ${1} + echo -e "\033[34;1mINFO:\033[0m waiting for node $1 to be up\033[0m" + sleep 2; + done; + + # Always show logs if the container is running, this is very useful both on CI as well as while developing + if container_running $1; then + docker logs $1 + fi + + if ! container_running $1 || [[ "$(docker inspect -f "{{.State.Health.Status}}" ${1})" != "healthy" ]]; then + cleanup_all_in_network $2 + echo + echo -e "\033[31;1mERROR:\033[0m Failed to start $1 in detached mode beyond health checks\033[0m" + echo -e "\033[31;1mERROR:\033[0m dumped the docker log before shutting the node down\033[0m" + return 1 + else + echo + echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${1} on docker network: ${network_name}\033[0m" + return 0 + fi +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/defaults.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/defaults.yml new file mode 100644 index 000000000..194e3a081 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/defaults.yml @@ -0,0 +1,74 @@ + + +##### GLOBAL METADATA + +- meta: + cluster: clients-ci + +##### JOB DEFAULTS + +- job: + project-type: matrix + logrotate: + daysToKeep: 30 + numToKeep: 100 + properties: + - github: + url: https://github.com/elastic/elasticsearch-php/ + - inject: + properties-content: HOME=$JENKINS_HOME + concurrent: true + node: flyweight + scm: + - git: + name: origin + credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba + reference-repo: /var/lib/jenkins/.git-references/elasticsearch-php.git + branches: + - ${branch_specifier} + url: https://github.com/elastic/elasticsearch-php.git + wipe-workspace: 'True' + triggers: + - github + vault: + # vault read auth/approle/role/clients-ci/role-id + role_id: ddbd0d44-0e51-105b-177a-c8fdfd445126 + axes: + - axis: + type: slave + name: label + values: + - linux + - axis: + type: yaml + filename: .ci/test-matrix.yml + name: STACK_VERSION + - axis: + type: yaml + filename: .ci/test-matrix.yml + name: PHP_VERSION + - axis: + type: yaml + filename: .ci/test-matrix.yml + name: TEST_SUITE + yaml-strategy: + exclude-key: exclude + filename: .ci/test-matrix.yml + wrappers: + - ansicolor + - timeout: + type: absolute + timeout: 120 + fail: true + - timestamps + - workspace-cleanup + builders: + - shell: |- + #!/usr/local/bin/runbld + .ci/run-tests + publishers: + - email: + recipients: build-lang-clients@elastic.co + - junit: + results: "tests/*-junit.xml" + allow-empty-results: true diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+6.8.x.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+6.8.x.yml new file mode 100644 index 000000000..50455c049 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+6.8.x.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+elasticsearch-php+6.8.x + display-name: 'elastic / elasticsearch-php # 6.8.x' + description: Testing the elasticsearch-php 6.8.x branch. + parameters: + - string: + name: branch_specifier + default: refs/heads/6.8.x + description: the Git branch specifier to build (<branchName>, <tagName>, + <commitId>, etc.) + triggers: + - github + - timed: 'H */12 * * *' diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+master.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+master.yml new file mode 100644 index 000000000..e0e37e032 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+master.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+elasticsearch-php+master + display-name: 'elastic / elasticsearch-php # master' + description: Testing the elasticsearch-php master branch. + parameters: + - string: + name: branch_specifier + default: refs/heads/master + description: the Git branch specifier to build (<branchName>, <tagName>, + <commitId>, etc.) + triggers: + - github + - timed: 'H */12 * * *' diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+pull-request.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+pull-request.yml new file mode 100644 index 000000000..abf3e861d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/jobs/elastic+elasticsearch-php+pull-request.yml @@ -0,0 +1,19 @@ +--- +- job: + name: elastic+elasticsearch-php+pull-request + display-name: 'elastic / elasticsearch-php # pull-request' + description: Testing of elasticsearch-php pull requests. + junit_results: "tests/*-junit.xml" + scm: + - git: + branches: + - ${ghprbActualCommit} + refspec: +refs/pull/*:refs/remotes/origin/pr/* + triggers: + - github-pull-request: + org-list: + - elastic + allow-whitelist-orgs-as-admins: true + github-hooks: true + status-context: clients-ci + cancel-builds-on-update: true diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/packer_cache.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/packer_cache.sh new file mode 100644 index 000000000..b5bb35890 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/packer_cache.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +source /usr/local/bin/bash_standard_lib.sh + +DOCKER_IMAGES="php:8.0-cli +php:7.4-cli +php:7.3-cli +" + +for di in ${DOCKER_IMAGES} +do +(retry 2 docker pull "${di}") || echo "Error pulling ${di} Docker image, we continue" +done + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-elasticsearch.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-elasticsearch.sh new file mode 100755 index 000000000..c4bced93c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-elasticsearch.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +# +# Launch one or more Elasticsearch nodes via the Docker image, +# to form a cluster suitable for running the REST API tests. +# +# Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'. +# Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'. +# Export the NUMBER_OF_NODES variable to start more than 1 node + +# Version 1.2.0 +# - Initial version of the run-elasticsearch.sh script +# - Deleting the volume should not dependent on the container still running +# - Fixed `ES_JAVA_OPTS` config +# - Moved to STACK_VERSION and TEST_VERSION +# - Refactored into functions and imports +# - Support NUMBER_OF_NODES +# - Added 5 retries on docker pull for fixing transient network errors + +script_path=$(dirname $(realpath -s $0)) +source $script_path/functions/imports.sh +set -euo pipefail + +echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m" +cleanup_node $es_node_name + +master_node_name=${es_node_name} +cluster_name=${moniker}${suffix} + +declare -a volumes +environment=($(cat <<-END + --env node.name=$es_node_name + --env cluster.name=$cluster_name + --env cluster.routing.allocation.disk.threshold_enabled=false + --env bootstrap.memory_lock=true + --env node.attr.testattr=test + --env path.repo=/tmp + --env repositories.url.allowed_urls=http://snapshot.test* +END +)) +if [[ "$TEST_SUITE" == "xpack" ]]; then + environment+=($(cat <<-END + --env ELASTIC_PASSWORD=$elastic_password + --env xpack.license.self_generated.type=trial + --env xpack.security.enabled=true + --env xpack.security.http.ssl.enabled=true + --env xpack.security.http.ssl.verification_mode=certificate + --env xpack.security.http.ssl.key=certs/testnode.key + --env xpack.security.http.ssl.certificate=certs/testnode.crt + --env xpack.security.http.ssl.certificate_authorities=certs/ca.crt + --env xpack.security.transport.ssl.enabled=true + --env xpack.security.transport.ssl.key=certs/testnode.key + --env xpack.security.transport.ssl.certificate=certs/testnode.crt + --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt +END +)) + volumes+=($(cat <<-END + --volume $ssl_cert:/usr/share/elasticsearch/config/certs/testnode.crt + --volume $ssl_key:/usr/share/elasticsearch/config/certs/testnode.key + --volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt +END +)) +fi + +cert_validation_flags="" +if [[ "$TEST_SUITE" == "xpack" ]]; then + cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1" +fi + +# Pull the container, retry on failures up to 5 times with +# short delays between each attempt. Fixes most transient network errors. +docker_pull_attempts=0 +until [ "$docker_pull_attempts" -ge 5 ] +do + docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break + docker_pull_attempts=$((docker_pull_attempts+1)) + echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..." + sleep 10 +done + +NUMBER_OF_NODES=${NUMBER_OF_NODES-1} +http_port=9200 +for (( i=0; i<$NUMBER_OF_NODES; i++, http_port++ )); do + node_name=${es_node_name}$i + node_url=${external_elasticsearch_url/9200/${http_port}}$i + if [[ "$i" == "0" ]]; then node_name=$es_node_name; fi + environment+=($(cat <<-END + --env node.name=$node_name +END +)) + echo "$i: $http_port $node_url " + volume_name=${node_name}-${suffix}-data + volumes+=($(cat <<-END + --volume $volume_name:/usr/share/elasticsearch/data${i} +END +)) + + # make sure we detach for all but the last node if DETACH=false (default) so all nodes are started + local_detach="true" + if [[ "$i" == "$((NUMBER_OF_NODES-1))" ]]; then local_detach=$DETACH; fi + echo -e "\033[34;1mINFO:\033[0m Starting container $node_name \033[0m" + set -x + docker run \ + --name "$node_name" \ + --network "$network_name" \ + --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \ + "${environment[@]}" \ + "${volumes[@]}" \ + --publish "$http_port":9200 \ + --ulimit nofile=65536:65536 \ + --ulimit memlock=-1:-1 \ + --detach="$local_detach" \ + --health-cmd="curl $cert_validation_flags --fail $elasticsearch_url/_cluster/health || exit 1" \ + --health-interval=2s \ + --health-retries=20 \ + --health-timeout=2s \ + --rm \ + docker.elastic.co/elasticsearch/"$elasticsearch_container"; + + set +x + if wait_for_container "$es_node_name" "$network_name"; then + echo -e "\033[32;1mSUCCESS:\033[0m Running on: $node_url\033[0m" + fi + +done + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-repository.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-repository.sh new file mode 100644 index 000000000..9a2bf4d4c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-repository.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# parameters are available to this script + +# STACK_VERSION -- version e.g Major.Minor.Patch(-Prelease) +# TEST_SUITE -- which test suite to run: oss or xpack +# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE +# PHP_VERSION -- PHP version (defined in test-matrix.yml, a default is hardcoded here) +script_path=$(dirname $(realpath -s $0)) +source $script_path/functions/imports.sh +set -euo pipefail + +PHP_VERSION=${PHP_VERSION-7.4-cli} +ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"} +elasticsearch_container=${elasticsearch_container-} + +echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m" +echo -e "\033[34;1mINFO:\033[0m TEST_SUITE ${TEST_SUITE}\033[0m" +echo -e "\033[34;1mINFO:\033[0m URL ${ELASTICSEARCH_URL}\033[0m" +echo -e "\033[34;1mINFO:\033[0m CONTAINER ${elasticsearch_container}\033[0m" +echo -e "\033[34;1mINFO:\033[0m PHP_VERSION ${PHP_VERSION}\033[0m" + +echo -e "\033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +docker build \ + --no-cache \ + --file .ci/Dockerfile \ + --tag elastic/elasticsearch-php \ + --build-arg PHP_VERSION=${PHP_VERSION} \ + . + +echo -e "\033[1m>>>>> Run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +repo=$(realpath $(dirname $(realpath -s $0))/../) + +docker run \ + --network=${network_name} \ + --workdir="/usr/src/app" \ + --volume=${repo}/tests:/usr/src/app/tests \ + --env STACK_VERSION=${STACK_VERSION} \ + --env TEST_SUITE=${TEST_SUITE} \ + --env PHP_VERSION=${PHP_VERSION} \ + --env ELASTICSEARCH_URL=${ELASTICSEARCH_URL} \ + --ulimit nofile=65535:65535 \ + --name elasticsearch-php \ + --rm \ + elastic/elasticsearch-php \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-tests b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-tests new file mode 100755 index 000000000..1c3383584 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/run-tests @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Version 1.1 +# - Moved to .ci folder and seperated out `run-repository.sh` +# - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products +script_path=$(dirname $(realpath -s $0)) +source $script_path/functions/imports.sh +set -euo pipefail + +echo -e "\033[1m>>> [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" +DETACH=true bash .ci/run-elasticsearch.sh + +if [[ -n "$RUNSCRIPTS" ]]; then + for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do + echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + CONTAINER_NAME=${RUNSCRIPT} \ + DETACH=true \ + bash .ci/run-${RUNSCRIPT}.sh + done +fi + +echo -e "\033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" +bash .ci/run-repository.sh \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/test-matrix.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/test-matrix.yml new file mode 100644 index 000000000..91d7d8e40 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/test-matrix.yml @@ -0,0 +1,14 @@ +--- +STACK_VERSION: + - 6.8.16 + +PHP_VERSION: + - 8.0-cli + - 7.4-cli + - 7.3-cli + +TEST_SUITE: + - oss + - xpack + +exclude: ~ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.ci/yaml-tests.sh b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/yaml-tests.sh new file mode 100755 index 000000000..b62c6bee5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.ci/yaml-tests.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Checkout the YAML test from Elasticsearch tag +php util/RestSpecRunner.php + +# Generate the YAML tests for PHPUnit +php util/build_tests.php ${STACK_VERSION} ${TEST_SUITE} + +# Run YAML tests +vendor/bin/phpunit -c "phpunit-yaml-${TEST_SUITE}-tests.xml" \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.gitattributes b/openml_OS/vendor/elasticsearch/elasticsearch/.gitattributes new file mode 100644 index 000000000..1111d65fd --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/.gitattributes @@ -0,0 +1,15 @@ +# Files to exclude when creating archive +/tests export-ignore +/.github export-ignore +/.gitmodules export-ignore +/.gitignore export-ignore +/.php_cs export-ignore +/.travis.yml export-ignore +/.phpstan-src.neon export-ignore +/.phpstan-src-71.neon export-ignore +/.phpstan-tests.neon export-ignore +/phpunit-integration.xml export-ignore +/phpunit.xml export-ignore +/ruleset.xml export-ignore +/travis export-ignore +/util export-ignore diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.github/CONTRIBUTING.md b/openml_OS/vendor/elasticsearch/elasticsearch/.github/CONTRIBUTING.md deleted file mode 100644 index 30f80eb82..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.github/CONTRIBUTING.md +++ /dev/null @@ -1,47 +0,0 @@ -If you have a bugfix or new feature that you would like to contribute to elasticsearch-php, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change. - -We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code. - -The process for contributing to any of the Elasticsearch repositories is similar. - -1. Sign the contributor license agreement - - Please make sure you have signed the [Contributor License Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. - -2. Set up your fork for development - - $> git clone https://github.com/elasticsearch/elasticsearch-php.git - $> cd elasticsearch-php - $> git submodule update --init --recursive - $> curl -s http://getcomposer.org/installer | php - $> php composer.phar install --dev - -3. Ensure a version of Elasticsearch is running on your machine. Recommended "test" configuration is: - - $> bin/elasticsearch -Des.gateway.type=none -Des.http.port=9200 \ - -Des.index.store.type=memory -Des.discovery.zen.ping.multicast.enabled=false \ - -Des.node.bench=true -Des.script.disable_dynamic=false - -4. Run the unit and yaml integration tests to ensure your changes do not break existing code. The `util/RestSpecRunner.php` script will automatically checkout the tests for the exact same build as is the Elasticsearch you are running on your machine (since tests are specific to the server version): - - $> export ES_TEST_HOST='http://localhost:9200' - - Then proceed to initialize the REST yaml tests and run the package. **WARNING: the unit tests will clear your cluster - and data..._do not_ run the tests on a production cluster!** - - $> php util/RestSpecRunner.php - $> php vendor/bin/phpunit - -5. Ensure your changes follow the [PSR-2 Coding Style Guide](http://www.php-fig.org/psr/psr-2/). You can run tools such as [PHP-CS-Fixer](http://cs.sensiolabs.org/) or [PHP_CodeSniffer](http://pear.php.net/package/PHP_CodeSniffer) to enforce PSR-2 automatically. - -6. Rebase your changes - - Update your local repository with the most recent code from the main elasticsearch-php repository, and rebase your branch on top of the latest master branch. We prefer your changes to be squashed into a single commit. - -7. Submit a pull request - - Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg “Closes #123″. Please consider adding or modifying tests related to your changes. - - -Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into elasticsearch-php. - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.github/ISSUE_TEMPLATE.md b/openml_OS/vendor/elasticsearch/elasticsearch/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 40380c153..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,31 +0,0 @@ - -### Summary of problem or feature request - - - - -### Code snippet of problem - - - -### System details - - - -- Operating System -- PHP Version -- ES-PHP client version -- Elasticsearch version \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.github/PULL_REQUEST_TEMPLATE.md b/openml_OS/vendor/elasticsearch/elasticsearch/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 0aa96c9e2..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.gitignore b/openml_OS/vendor/elasticsearch/elasticsearch/.gitignore deleted file mode 100755 index 7ed6ab2ec..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -#composer related -composer.lock -vendor/ -composer.phar -.php_cs.cache - -#editor related -.idea - -# OS generated files -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -Icon? -ehthumbs.db -Thumbs.db - -#generator related -generator/* - -# Elasticsearch related -util/elasticsearch/ -util/cache/ -util/output - -# Sami docs generator -/sami.phar diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.gitmodules b/openml_OS/vendor/elasticsearch/elasticsearch/.gitmodules deleted file mode 100644 index e03c4467a..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "util/elasticsearch"] - path = util/elasticsearch - url = https://github.com/elasticsearch/elasticsearch.git diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.php_cs b/openml_OS/vendor/elasticsearch/elasticsearch/.php_cs deleted file mode 100644 index e01869ce0..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.php_cs +++ /dev/null @@ -1,22 +0,0 @@ -exclude('benchmarks') - ->exclude('docs') - ->exclude('util') - ->exclude('.github') - ->exclude('util') - ->exclude('travis') - ->exclude('util/cache') - ->exclude('util/elasticsearch') - ->exclude('vendor') - ->in(__DIR__); - - return Symfony\CS\Config\Config::create() - ->setUsingCache(true) - ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) - ->finder($finder); -} - -return php_cs(); diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/.travis.yml b/openml_OS/vendor/elasticsearch/elasticsearch/.travis.yml deleted file mode 100644 index 6eab7e69b..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/.travis.yml +++ /dev/null @@ -1,60 +0,0 @@ -language: php - -jdk: - - oraclejdk8 - -addons: - apt: - packages: - - oracle-java8-installer - -branches: - except: - - 0.4 - -sudo: true - -matrix: - fast_finish: true - include: - - php: 7.0 - env: ES_VERSION="6.0" - - php: 7.0 - env: ES_VERSION="6.x" - - - php: 7.1 - env: ES_VERSION="6.0" - - php: 7.1 - env: ES_VERSION="6.x" - - - php: 7.2 - env: ES_VERSION="6.0" - - allow_failures: - - env: ES_VERSION="6.x" - -env: - global: - - ES_TEST_HOST=http://localhost:9200 - - JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre" - -before_install: - - sudo update-java-alternatives -s java-8-oracle - - ./travis/download_and_run_es.sh - -install: - - composer install --prefer-source - -before_script: - - if [ $TRAVIS_PHP_VERSION = '7.0' ]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi - - php util/RestSpecRunner.php - - php util/EnsureClusterAlive.php - -script: - - composer run-script phpcs - - composer run-script phpstan - - vendor/bin/phpunit $PHPUNIT_FLAGS - - vendor/bin/phpunit -c phpunit-integration.xml --group sync $PHPUNIT_FLAGS - -after_script: - - if [ $TRAVIS_PHP_VERSION = '7.0' ]; then php vendor/bin/coveralls; fi diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/BREAKING_CHANGES.md b/openml_OS/vendor/elasticsearch/elasticsearch/BREAKING_CHANGES.md index fbba874a0..3b69c66fc 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/BREAKING_CHANGES.md +++ b/openml_OS/vendor/elasticsearch/elasticsearch/BREAKING_CHANGES.md @@ -1,4 +1,10 @@ +# 6.7 + +- `{type}` part in `indices.put_mapping` API is not required anymore, see new specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json) + # 6.0 - [Search Templates]: PutTemplate endpoint has been removed (see [Elasticsearch Breaking Changes](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_scripting_changes.html#_stored_search_template_apis_removed)), -use PutScript instead. \ No newline at end of file +use PutScript instead. + +- [#674](https://github.com/elastic/elasticsearch-php/pull/674) `ClientBuilder::defaultLogger()` method was removed. It is recommended to [create the logger object manually](https://github.com/elastic/elasticsearch-php/blob/master/docs/configuration.asciidoc#enabling-the-logger). diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/CHANGELOG.md b/openml_OS/vendor/elasticsearch/elasticsearch/CHANGELOG.md index 6f4f12cd1..b1f1e3553 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/CHANGELOG.md +++ b/openml_OS/vendor/elasticsearch/elasticsearch/CHANGELOG.md @@ -1,3 +1,101 @@ +## Release 6.8.2 + +- Fix #1131 class naming for some endpoints used in `elasticsearch-php` < 6.8. + These endpoints are: `NodeAttrs`, `ForceMerge`, `MTermVectors`, `TermVectors` + (https://github.com/elastic/elasticsearch-php/pull/1151) +## Release 6.8.1 + +- Fix missing class aliases in 6.8.0 (https://github.com/elastic/elasticsearch-php/pull/1114) +- Backported fix #1066 (https://github.com/elastic/elasticsearch-php/pull/1109) + +## Release 6.8.0 + +- Added XPack endpoints +- Added X-Opaque-Id header (https://github.com/elastic/elasticsearch-php/pull/952) +- Added X-Elastic-Client-Meta header (https://github.com/elastic/elasticsearch-php/pull/1089) +- Added the license header (https://github.com/elastic/elasticsearch-php/commit/0ff5fb98745a511118df5b1a68ca54d892b08ee3) +- Support of PHP 8 (https://github.com/elastic/elasticsearch-php/pull/1095 and https://github.com/elastic/elasticsearch-php/pull/1063) +- Replace `array_walk` with `array_map` in `Connection::getURI` (https://github.com/elastic/elasticsearch-php/pull/1075) +- Fix for #1064 reset custom headers (https://github.com/elastic/elasticsearch-php/pull/1065) +- Replace `guzzlehttp/ringphp` with `ezimuel/ringphp` (https://github.com/elastic/elasticsearch-php/pull/1102) + +## Release 6.7.2 + +- Fix #846 choosing `GET` and `POST` in endpoints based on body [[acbc76d0]](https://github.com/elastic/elasticsearch-php/commit/acbc76d0) +- Fix #843 adding `wait_for_active_shards` and `pipeline` in `UpdateByQuery` [[acbc76d0]](https://github.com/elastic/elasticsearch-php/commit/acbc76d0) +- Fixed missing `ScriptsPainlessExecute` endpoint, since ES 6.3 [[acbc76d0]](https://github.com/elastic/elasticsearch-php/commit/acbc76d0) +- Fixed missing `RankEval` endpoint, since ES 6.2 [[acbc76d0]](https://github.com/elastic/elasticsearch-php/commit/acbc76d0) +- Added User-Agent header equal to `elasticsearch-php/6.7.1 (metadata-values)` [[acbc76d0]](https://github.com/elastic/elasticsearch-php/commit/acbc76d0) + +## Release 6.7.1 + +- Added `track_total_hits` in `search` endpoint [0c9ff47](https://github.com/elastic/elasticsearch-php/commit/9f4f0dfa331c4f50d2c88c0068afd3062e6ea353) + +## Release 6.7.0 + +- Removed requirement of `{type}` part in `indices.put_mapping`, see new API specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json) +- Added `seq_no_primary_term` parameter in `bulk` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884) +- Added `include_type_name`, `if_primary_term`, `if_seq_no` in `delete` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884) +- Added `include_type_name` in `get`, `index`, `indices.create`, `indices.field.get`, `indices.get`, `indices.mapping.get`, `indices.mapping.getfield`, `indices.mapping.put`, `indices.rollover`, `indices.template.get`, `indices.template.put` endpoints [#884](https://github.com/elastic/elasticsearch-php/pull/884) +- Added `seq_no_primary_term` in `search` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884) +- Added `if_primary_term', 'if_seq_no`in `update` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884) + +### Testing + +- Fix tests for PHP 7 with ES 6.7 [[5401479](https://github.com/elastic/elasticsearch-php/pull/884/commits/5401479) + +### Docs + +- [DOCS] Fix doc links in README [[5a1782d]](https://github.com/elastic/elasticsearch-php/pull/884/commits/5a1782d) + +## Release 6.5.0 + +- Remove `_suggest` endpoint, which has disappeared from ES6 [#763](https://github.com/elastic/elasticsearch-php/pull/763) +- Fix `SearchHitIterator` key duplicates [#872](https://github.com/elastic/elasticsearch-php/pull/872) +- Fixing script get and delete by removing `lang` from endpoint url [#814](https://github.com/elastic/elasticsearch-php/pull/814) +- Fix `SearchResponseIterator` is scrolling the first page twice [#871](https://github.com/elastic/elasticsearch-php/pull/871), issue [#595](https://github.com/elastic/elasticsearch-php/issues/595) + +### Docs + +- [DOCS] Add reference to `parse_url()` for Extended Host Configuration [#778](https://github.com/elastic/elasticsearch-php/pull/778) +- [DOCS] Update php version requirement [#757](https://github.com/elastic/elasticsearch-php/pull/757) +- [DOCS] Update `community.asciidoc`, added `ElasticSearchQueryDSL` project [#749](https://github.com/elastic/elasticsearch-php/pull/749) +- [DOCS] Proper return type array for get method for `IndicesNamespace` [#651](https://github.com/elastic/elasticsearch-php/pull/651) +- [DOCS] Fix full docs link [#862](https://github.com/elastic/elasticsearch-php/pull/862) +- [DOCS] Update breaking-changes.asciidoc, removal of ClientBuilder::defaultLogger() [#879](https://github.com/elastic/elasticsearch-php/pull/879) + +### Testing + +- Fix integration tests using docker [#867](https://github.com/elastic/elasticsearch-php/pull/867) + +## Release 6.1.0 + +- Add 'wait_for_no_initializing_shards' to Cluster\Health whitelist [[98a372c]](http://github.com/elasticsearch/elasticsearch-php/commit/98a372c) +- Add 'wait_for_active_shards' to Indices\Open whitelist [[0275fe5]](http://github.com/elasticsearch/elasticsearch-php/commit/0275fe5) +- Add 'max_concurrent_searches' to msearch whitelist [[5624123]](http://github.com/elasticsearch/elasticsearch-php/commit/5624123) +- Add 'max_concurrent_shard_requests' param to MSearch endpoint [[00800c1]](http://github.com/elasticsearch/elasticsearch-php/commit/00800c1) +- Add ReloadSecureSettings endpoint [[75b32b2]](http://github.com/elasticsearch/elasticsearch-php/commit/75b32b2) +- Remove obsolete Shutdown API [[c75d690]](http://github.com/elasticsearch/elasticsearch-php/commit/c75d690) +- Fix: Restore::setBody() does not throw exceptions (#828) [[a96bb9c]](http://github.com/elasticsearch/elasticsearch-php/commit/a96bb9c) +- Fixed php 7.3 compatibility for elasticsearch 6 (#827) [[77916b2]](http://github.com/elasticsearch/elasticsearch-php/commit/77916b2) +- Fix issue with getting status of respository and snapshots. (#719) [[2d11682]](http://github.com/elasticsearch/elasticsearch-php/commit/2d11682) +- fix DeleteByQuery param white list (#748) [[8d963c6]](http://github.com/elasticsearch/elasticsearch-php/commit/8d963c6) + +### Docs +- [Docs] Update elasticsearch version (#743) [[043ad4f]](http://github.com/elasticsearch/elasticsearch-php/commit/043ad4f) +- [DOCS] reuqest → request typo fix (#728) [[68db9f0]](http://github.com/elasticsearch/elasticsearch-php/commit/68db9f0) +- [DOCS] Fix documentation example of upsert (#730) [[805329b]](http://github.com/elasticsearch/elasticsearch-php/commit/805329b) +- [DOCS] Replace deprecated string type with keyword type for index operations (#736) [[a550507]](http://github.com/elasticsearch/elasticsearch-php/commit/a550507) + +### Testing + +- [TEST] Fix travis untarring [[0106351]](http://github.com/elasticsearch/elasticsearch-php/commit/0106351) +- [TEST] Download artifacts directly, migrate off esvm [[1e9f06c]](http://github.com/elasticsearch/elasticsearch-php/commit/1e9f06c) +- Update Travis Matrix [[aa32b12]](http://github.com/elasticsearch/elasticsearch-php/commit/aa32b12) +- [TEST] Fix teardown in yaml runner [[098030e]](http://github.com/elasticsearch/elasticsearch-php/commit/098030e) +- Add Indices/Split endpoint [[46d5a7a]](http://github.com/elasticsearch/elasticsearch-php/commit/46d5a7a) +- [TEST] Blacklist some bad yml tests [[d5edab7]](http://github.com/elasticsearch/elasticsearch-php/commit/d5edab7) + ## Release 6.0.1 - Fix imports [[0106351]](http://github.com/elasticsearch/elasticsearch-php/commit/0106351) diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/README.md b/openml_OS/vendor/elasticsearch/elasticsearch/README.md index 7dfc4df51..eedaf2efd 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/README.md +++ b/openml_OS/vendor/elasticsearch/elasticsearch/README.md @@ -1,13 +1,14 @@ elasticsearch-php ================= -[![Build Status](https://img.shields.io/travis/elastic/elasticsearch-php.svg?style=flat-square)](https://travis-ci.org/elastic/elasticsearch-php) +[![Build status](https://github.com/elastic/elasticsearch-php/workflows/PHP%20test/badge.svg?branch=6.8.x)](https://github.com/elastic/elasticsearch-php/actions) [![Latest Stable Version](https://poser.pugx.org/elasticsearch/elasticsearch/v/stable)](https://packagist.org/packages/elasticsearch/elasticsearch) [![Total Downloads](https://poser.pugx.org/elasticsearch/elasticsearch/downloads)](https://packagist.org/packages/elasticsearch/elasticsearch) Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because of this it tries to be opinion-free and very extendable. To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array. +**NOTE**: starting from `elasticsearch-php` 6.8.0 we supports also [XPack](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/setup-xpack.html) endpoints of Elasticsearch. Features -------- @@ -19,9 +20,6 @@ Features - Pluggable connection pools to offer different connection strategies - Generalized, pluggable architecture - most components can be replaced with your own custom class if specialized behavior is required - Option to use asynchronous future, which enables parallel execution of curl requests to multiple nodes - - -**Note:** If you want to use X-Pack API, you need to install an optional extension [elasticsearch/xpack](https://github.com/elastic/elasticsearch-x-pack-php). Version Matrix @@ -29,32 +27,36 @@ Version Matrix | Elasticsearch Version | Elasticsearch-PHP Branch | | --------------------- | ------------------------ | -| >= 6.0 | 6.0 | +| >= 6.8, < 7.0 | 6.8.x | +| >= 6.6, < 7.0 | 6.7.x | +| >= 6.0, < 6.6 | 6.5.x | | >= 5.0, < 6.0 | 5.0 | | >= 2.0, < 5.0 | 1.0 or 2.0 | | >= 1.0, < 2.0 | 1.0 or 2.0 | | <= 0.90.x | 0.4 | - - If you are using Elasticsearch 6.0+ , use Elasticsearch-PHP 6.0 branch. - - If you are using Elasticsearch 5.x , use Elasticsearch-PHP 5.0 branch. + - If you are using Elasticsearch 6.8+, use Elasticsearch-PHP 6.8.x branch. + - If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch. + - If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch. + - If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch. - If you are using Elasticsearch 1.x or 2.x, prefer using the Elasticsearch-PHP 2.0 branch. The 1.0 branch is compatible however. - If you are using a version older than 1.0, you must install the `0.4` Elasticsearch-PHP branch. Since ES 0.90.x and below is now EOL, the corresponding `0.4` branch will not receive any more development or bugfixes. Please upgrade. - You should never use Elasticsearch-PHP Master branch, as it tracks Elasticsearch master and may contain incomplete features or breaks in backwards compatibility. Only use ES-PHP master if you are developing against ES master for some reason. Documentation -------------- -[Full documentation can be found here.](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/5.0/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it! +[Full documentation can be found here.](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it! Installation via Composer ------------------------- The recommended method to install _Elasticsearch-PHP_ is through [Composer](http://getcomposer.org). -1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch): +1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch, for instance for ES 6.8): ```json { "require": { - "elasticsearch/elasticsearch": "~6.0" + "elasticsearch/elasticsearch": "^6.8" } } ``` @@ -91,12 +93,16 @@ PHP Version Requirement Version 6.0 of this library requires at least PHP version 7.0.0 to function. In addition, it requires the native JSON extension to be version 1.3.7 or higher. +**NOTE**: starting from `elasticsearch-php` **6.8.0** we supports only PHP 7.3+ (including PHP 8.0). + + | Elasticsearch-PHP Branch | PHP Version | | ----------- | ------------------------ | -| 6.0 | >= 7.0.0 | -| 5.0 | >= 5.6.6 | -| 2.0 | >= 5.4.0 | -| 0.4, 1.0 | >= 5.3.9 | +| 6.8 | >= 7.3.0, < 9.0.0 | +| 6.0 | >= 7.0.0, < 8.0.0 | +| 5.0 | >= 5.6.6, < 8.0.0 | +| 2.0 | >= 5.4.0, < 7.0.0 | +| 0.4, 1.0 | >= 5.3.9, < 7.0.0 | Quickstart @@ -353,7 +359,7 @@ That was just a crash-course overview of the client and its syntax. If you are You'll also notice that the client is configured in a manner that facilitates easy discovery via the IDE. All core actions are available under the `$client` object (indexing, searching, getting, etc.). Index and cluster management are located under the `$client->indices()` and `$client->cluster()` objects, respectively. -Check out the rest of the [Documentation](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/index.html) to see how the entire client works. +Check out the rest of the [Documentation](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) to see how the entire client works. Available Licenses diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/composer.json b/openml_OS/vendor/elasticsearch/elasticsearch/composer.json index 7b966a0dd..2fbb0f6c7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/composer.json +++ b/openml_OS/vendor/elasticsearch/elasticsearch/composer.json @@ -6,37 +6,45 @@ "license": "Apache-2.0", "authors": [ { - "name": "Zachary Tong" + "name": "Zachary Tong" + }, + { + "name": "Enrico Zimuel" } ], "require": { - "php": "^7.0", + "php": "^7.3 || ^8.0", "ext-json": ">=1.3.7", - "guzzlehttp/ringphp": "~1.0", + "ezimuel/ringphp": "^1.1.2", "psr/log": "~1.0" }, "require-dev": { - "cpliakas/git-wrapper": "~1.0", - "doctrine/inflector": "^1.1", - "mockery/mockery": "0.9.4", - "phpstan/phpstan-shim": "0.8.3", - "phpunit/phpunit": "6.3.0", - "squizlabs/php_codesniffer": "3.0.2", - "symfony/finder": "^2.8", - "symfony/yaml": "^2.8" + "symplify/git-wrapper": ">=9.0 <9.3.27", + "doctrine/inflector": "^1.3", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.4", + "symfony/finder": "~4.0", + "symfony/yaml": "~4.0" }, "suggest": { "ext-curl": "*", "monolog/monolog": "Allows for client-level logging and tracing" }, "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Elasticsearch\\": "src/Elasticsearch/" } }, "autoload-dev": { "psr-4": { - "Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/" + "Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/", + "Elasticsearch\\IntegrationTests\\": "tests/Elasticsearch/IntegrationTests/", + "Elasticsearch\\Util\\": "util/" } }, "config": { @@ -44,11 +52,11 @@ }, "scripts": { "phpcs": [ - "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src", - "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests" + "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src --ignore=src/Elasticsearch/Endpoints", + "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests --ignore=tests/Elasticsearch/Tests/Yaml" ], "phpstan": [ - "@php vendor/phpstan/phpstan-shim/phpstan.phar analyse -c phpstan.neon tests --level 7 --no-progress" + "phpstan analyse src --level 2 --no-progress" ] } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/breaking-changes.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/breaking-changes.asciidoc index 23ee4a291..94a6ee69e 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/breaking-changes.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/breaking-changes.asciidoc @@ -1,3 +1,17 @@ +[[breaking_changes]] == Breaking changes from 5.x -None! :) \ No newline at end of file +### Removal of ClientBuilder::defaultLogger() + +In 5.x there is the ability to create a default Logger object, which has been removed. It is now required to explicitly make a Logger object. + +5.x +``` +$logger = ClientBuilder::defaultLogger('path_to_log_file'); +``` + +6.5 +``` +$logger = new Logger('name'); +$logger->pushHandler(new StreamHandler('path_to_log_file', Logger::WARNING); +``` diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/Client.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/Client.asciidoc index ec49e7197..587902c1a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/Client.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/Client.asciidoc @@ -46,7 +46,6 @@ The class defines the following methods: * <> * <> * <> -* <> * <> * <> * <> @@ -932,7 +931,6 @@ $response = $client->updateByQuery($params); ---- /* $params['id'] = (string) The script ID (Required) - ['lang'] = (string) The script language (Required) ['body'] = (array) Request body */ @@ -954,7 +952,6 @@ $response = $client->getScript($params); ---- /* $params['id'] = (string) The script ID (Required) - ['lang'] = (string) The script language (Required) ['body'] = (array) Request body */ @@ -976,7 +973,6 @@ $response = $client->deleteScript($params); ---- /* $params['id'] = (string) The script ID (Required) - ['lang'] = (string) The script language (Required) ['body'] = (array) Request body */ @@ -1033,27 +1029,6 @@ $response = $client->deleteTemplate($params); -[[Elasticsearch_ClientputTemplate_putTemplate]] -.`putTemplate()` -**** -[source,php] ----- -/* -$params['id'] = (string) The search template ID (Required) - ['body'] = (array) Request body -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->putTemplate($params); ----- -**** - - - [[Elasticsearch_ClientfieldStats_fieldStats]] .`fieldStats()` **** diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/ClientBuilder.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/ClientBuilder.asciidoc index d8304cbe9..9f815e7e4 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/ClientBuilder.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/Elasticsearch/ClientBuilder.asciidoc @@ -20,7 +20,6 @@ The class defines the following methods: * <> * <> * <> -* <> * <> * <> * <> @@ -157,19 +156,6 @@ corresponds to setConnectionPool(). -[[Elasticsearch_ClientBuilderdefaultLogger_defaultLogger]] -.`defaultLogger()` -**** -[source,php] ----- -/* -*/ - ----- -**** - - - [[Elasticsearch_ClientBuildersetConnectionFactory_setConnectionFactory]] .`setConnectionFactory()` **** diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/renderer.index b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/renderer.index index 64af672be..f2bb86557 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/renderer.index +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/build/renderer.index @@ -1 +1 @@ -C:19:"Sami\Renderer\Index":1041:{a:3:{i:0;a:10:{s:20:"Elasticsearch\Client";s:40:"6ac4061ad03df8cddeaec31a8bfb556fc7a33e71";s:27:"Elasticsearch\ClientBuilder";s:40:"30fa910e5653bf5f7096369ef1529a47da7e3e92";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"a9d466909dc08564e9c1516162c3a6bb91dbecbe";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"577bab662735319b93ed7b555cd2b12b73e40680";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"66391991c19f28764c86e9604e231b9ce004c82e";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"9bd2962d80e3c0cdcaedda4f23b722b3a8cfa013";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"da4e71f9d953d00600920c26fe585b6884e45f94";s:40:"Elasticsearch\Namespaces\RemoteNamespace";s:40:"a503f6ea82452e1ea0275a044aeb527bc946616d";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"e28a1807789b0fcca3fd6b9712ed713650cf7ac2";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"2de86d7ab409a629320725f6444c76d2a9313c72";}i:1;a:1:{i:0;s:6:"master";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}} \ No newline at end of file +C:19:"Sami\Renderer\Index":1041:{a:3:{i:0;a:10:{s:20:"Elasticsearch\Client";s:40:"1815e70d1a9613e61fbe3bf14e3c77e4321c3b31";s:27:"Elasticsearch\ClientBuilder";s:40:"824023c8ff5d33cd7085f75ff88b436b5dde0482";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"a9d466909dc08564e9c1516162c3a6bb91dbecbe";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"577bab662735319b93ed7b555cd2b12b73e40680";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"66391991c19f28764c86e9604e231b9ce004c82e";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"9bd2962d80e3c0cdcaedda4f23b722b3a8cfa013";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"da4e71f9d953d00600920c26fe585b6884e45f94";s:40:"Elasticsearch\Namespaces\RemoteNamespace";s:40:"a503f6ea82452e1ea0275a044aeb527bc946616d";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"e28a1807789b0fcca3fd6b9712ed713650cf7ac2";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"2de86d7ab409a629320725f6444c76d2a9313c72";}i:1;a:1:{i:0;s:6:"master";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}} \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/community.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/community.asciidoc index 9f286c746..efe5aa08a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/community.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/community.asciidoc @@ -1,4 +1,4 @@ - +[[community_dsls]] == Community DSLs === ElasticsearchDSL @@ -18,6 +18,15 @@ __________________________ This agnostic package is a lightweight wrapper on top of the Elasticsearch PHP client. Its main goal is to allow for easier structuring of queries and indices in your application. It does not want to hide or replace functionality of the Elasticsearch PHP client. __________________________ +=== ElasticSearchQueryDSL + +https://github.com/gskema/elasticsearch-query-dsl-php[Link: ElasticSearchQueryDSL] + +[quote, ElasticSearchQueryDSL] +__________________________ +Feature complete, object oriented, composable, extendable ElasticSearch query DSL builder for PHP. Deliberately built to be as simple as possible, easily usable and with explicit naming. +__________________________ + == Community Integrations === Symfony @@ -112,4 +121,4 @@ _____________________ This helper is a light library which wrap the official client elasticsearch-php. It will help you to manage your ES Indices with no downtime. This helper implements the philosophy described in the https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation] which can be summarized in a few words : *use alias instead of index directly* -_____________________ \ No newline at end of file +_____________________ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/configuration.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/configuration.asciidoc index e159eee67..79c266a3d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/configuration.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/configuration.asciidoc @@ -1,4 +1,4 @@ - +[[configuration]] == Configuration Almost every aspect of the client is configurable. Most users will only need to configure a few parameters to suit @@ -60,16 +60,17 @@ Basic Auth's password contains special characters such as a pound sign (`#`) or For this reason, the client supports an extended host syntax which provides greater control over host initialization. None of the components are validated, so edge-cases like underscores domain names will not cause problems. -The extended syntax is an array of parameters for each host: +The extended syntax is an array of parameters for each host. The structure of the parameter list is identical to the return values of a http://php.net/manual/en/function.parse-url.php#refsect1-function.parse-url-returnvalues[`parse_url()`] call: [source,php] ---- $hosts = [ - // This is effectively equal to: "https://username:password!#$?*abc@foo.com:9200/" + // This is effectively equal to: "https://username:password!#$?*abc@foo.com:9200/elastic" [ 'host' => 'foo.com', 'port' => '9200', 'scheme' => 'https', + 'path' => '/elastic', 'user' => 'username', 'pass' => 'password!#$?*abc' ], @@ -89,7 +90,8 @@ scheme is `http`. === Authorization and Encryption -For details about HTTP Authorization and SSL encryption, please see link:_security.html[Authorization and SSL]. +For details about HTTP Authorization and SSL encryption, see +<>. === Set retries @@ -180,34 +182,7 @@ And then update your composer installation: php composer.phar update ---------------------------- -Once Monolog (or another logger) is installed, you need to create a log object and inject it into the client. The -`ClientBuilder` object has a helper static function that will generate a common Monolog-based logger for you. All you need -to do is provide the path to your desired logging location: - -[source,php] ----- -$logger = ClientBuilder::defaultLogger('path/to/your.log'); - -$client = ClientBuilder::create() // Instantiate a new ClientBuilder - ->setLogger($logger) // Set the logger with a default logger - ->build(); // Build the client object ----- - -You can also specify the severity of log messages that you wish to log: - -[source,php] ----- -// set severity with second parameter -$logger = ClientBuilder::defaultLogger('/path/to/logs/', Logger::INFO); - -$client = ClientBuilder::create() // Instantiate a new ClientBuilder - ->setLogger($logger) // Set the logger with a default logger - ->build(); // Build the client object ----- - -The `defaultLogger()` method is just a helper, you are not required to use it. You can create your own logger and inject -that instead: - +Once Monolog (or another logger) is installed, you need to create a log object and inject it into the client: [source,php] ---- @@ -269,7 +244,8 @@ $client = ClientBuilder::create() ->build(); ---- -For more details, please see the dedicated page on link:_connection_pool.html[configuring connection pools]. +For more details, please see the dedicated page on +<>. === Setting the Connection Selector @@ -285,7 +261,8 @@ $client = ClientBuilder::create() ->build(); ---- -For more details, please see the dedicated page on link:_selectors.html[configuring selectors]. +For more details, please see the dedicated page on +<>. === Setting the Serializer @@ -305,7 +282,8 @@ $client = ClientBuilder::create() ->build(); ---- -For more details, please see the dedicated page on link:_serializers.html[configuring serializers]. +For more details, please see the dedicated page on +<>. === Setting a custom ConnectionFactory diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/connection-pool.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/connection-pool.asciidoc index 192fb3dbd..3cb22a726 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/connection-pool.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/connection-pool.asciidoc @@ -1,4 +1,4 @@ - +[[connection_pool]] == Connection Pool The connection pool is an object inside the client that is responsible for maintaining the current list of nodes. diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/crud.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/crud.asciidoc index d778746a8..ec4b245e1 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/crud.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/crud.asciidoc @@ -1,4 +1,4 @@ - +[[indexing_documents]] == Indexing Documents When you add documents to Elasticsearch, you index JSON documents. This maps naturally to PHP associative arrays, since @@ -129,6 +129,7 @@ if (!empty($params['body'])) { } ---- +[[getting_documents]] == Getting Documents Elasticsearch provides realtime GETs of documents. This means that as soon as the document has been indexed and your @@ -148,6 +149,7 @@ $response = $client->get($params); ---- {zwsp} + +[[updating_documents]] == Updating Documents Updating a document allows you to either completely replace the contents of the existing document, or perform a partial @@ -212,13 +214,15 @@ $params = [ 'type' => 'my_type', 'id' => 'my_id', 'body' => [ - 'script' => 'ctx._source.counter += count', - 'params' => [ - 'count' => 4 + 'script' => [ + 'source' => 'ctx._source.counter += params.count', + 'params' => [ + 'count' => 4 + ], ], 'upsert' => [ 'counter' => 1 - ] + ], ] ]; @@ -226,7 +230,7 @@ $response = $client->update($params); ---- {zwsp} + - +[[deleting_documents]] == Deleting documents Finally, you can delete documents by specifying their full `/index/type/id` path: diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/futures.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/futures.asciidoc index ceee52016..4edd05a01 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/futures.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/futures.asciidoc @@ -1,4 +1,4 @@ - +[[future_mode]] == Future Mode The client offers a mode called "future" or "async" mode. This allows batch processing of requests (sent in parallel diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/index-operations.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/index-operations.asciidoc index 80f08d549..448be4b9d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/index-operations.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/index-operations.asciidoc @@ -1,4 +1,4 @@ - +[[index_management]] == Index Management Operations Index management operations allow you to manage the indices in your Elasticsearch cluster, such as creating, deleting and @@ -41,7 +41,7 @@ $params = [ ], 'properties' => [ 'first_name' => [ - 'type' => 'string', + 'type' => 'keyword', 'analyzer' => 'standard' ], 'age' => [ @@ -104,28 +104,28 @@ $params = [ '_default_' => [ <4> 'properties' => [ 'title' => [ - 'type' => 'string', + 'type' => 'keyword', 'analyzer' => 'reuters', 'term_vector' => 'yes', 'copy_to' => 'combined' ], 'body' => [ - 'type' => 'string', + 'type' => 'keyword', 'analyzer' => 'reuters', 'term_vector' => 'yes', 'copy_to' => 'combined' ], 'combined' => [ - 'type' => 'string', + 'type' => 'keyword', 'analyzer' => 'reuters', 'term_vector' => 'yes' ], 'topics' => [ - 'type' => 'string', + 'type' => 'keyword', 'index' => 'not_analyzed' ], 'places' => [ - 'type' => 'string', + 'type' => 'keyword', 'index' => 'not_analyzed' ] ] @@ -133,7 +133,7 @@ $params = [ 'my_type' => [ <5> 'properties' => [ 'my_field' => [ - 'type' => 'string' + 'type' => 'keyword' ] ] ] @@ -214,7 +214,7 @@ $params = [ ], 'properties' => [ 'first_name' => [ - 'type' => 'string', + 'type' => 'keyword', 'analyzer' => 'standard' ], 'age' => [ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/installation.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/installation.asciidoc index a7547e0dc..96d9a88bb 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/installation.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/installation.asciidoc @@ -1,3 +1,4 @@ +[[installation]] == Installation Elasticsearch-php only has a three requirements that you need to worry about: @@ -26,7 +27,8 @@ The master branch will always track Elasticsearch master, but it is not recommen [width="40%",options="header",frame="topbot"] |============================ |Elasticsearch Version | Elasticsearch-PHP Branch -| >= 6.0 | `6.0` +| >= 6.6, <= 6.7 | `6.7` +| >= 6.0, <= 6.5 | `6.5` | >= 5.0, <= 6.0 | `5.0` | >= 1.0, <= 5.0 | `1.0`, `2.0` | <= 0.90.* | `0.4` @@ -40,7 +42,7 @@ The master branch will always track Elasticsearch master, but it is not recommen -------------------------- { "require": { - "elasticsearch/elasticsearch": "~6.0" + "elasticsearch/elasticsearch": "~6.7.0" } } -------------------------- diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/namespaces.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/namespaces.asciidoc index 05a18d1fe..67feba150 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/namespaces.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/namespaces.asciidoc @@ -1,4 +1,4 @@ - +[[namespaces]] == Namespaces The client has a number of "namespaces", which generally expose administrative diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/overview.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/overview.asciidoc index f2dda5aee..55eef39b0 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/overview.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/overview.asciidoc @@ -1,3 +1,4 @@ +[[overview]] == Overview This is the official PHP client for Elasticsearch. It is designed to be a very low-level client that does not stray from the REST API. diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/per-request-configuration.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/per-request-configuration.asciidoc index ad33ca98d..0b250e621 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/per-request-configuration.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/per-request-configuration.asciidoc @@ -1,4 +1,4 @@ - +[[per_request_configuration]] == Per-request configuration There are several configurations that can be set on a per-request basis, rather than at a connection- or client-level. @@ -13,7 +13,7 @@ conflicts, etc. But sometimes you want to deal with the response body rather th in test suites). If you need that behavior, you can configure an `ignore` parameter. This should be configured in the `client` parameter -of the reuqest array. For example, this example will ignore the `MissingDocument404Exception` +of the request array. For example, this example will ignore the `MissingDocument404Exception` exception and instead return the JSON provided by Elasticsearch. @@ -214,6 +214,28 @@ Array ) ---- +=== Request Identification + +You can enrich your requests against Elasticsearch with an identifier string, that allows you to discover this identifier +in https://www.elastic.co/guide/en/elasticsearch/reference/6.8/logging.html#deprecation-logging[deprecation logs], to support you with +https://www.elastic.co/guide/en/elasticsearch/reference/6.8/index-modules-slowlog.html[identifying search slow log origin] +or to help with https://www.elastic.co/guide/en/elasticsearch/reference/6.8/tasks.html#_identifying_running_tasks[identifying running tasks]. + + +[source,php] +---- +$client = ClientBuilder::create()->build(); +$params = [ + 'index' => 'test', + 'id' => 1, + 'client' => [ + 'opaqueId' => 'app17@dc06.eu_user1234', <1> + ] +]; +$response = $client->get($params); +---- +<1> This will populate the `X-Opaque-Id` header with the value `app17@dc06.eu_user1234` + === Curl Timeouts It is possible to configure per-request curl timeouts via the `timeout` and `connect_timeout` parameters. These @@ -269,11 +291,12 @@ $results = $future->wait(); // resolve the future ---- Future mode supports two options: `true` or `'lazy'`. For more details about how asynchronous execution functions, and -how to work with the results, see the dedicated page on <<_future_mode>>. +how to work with the results, see the dedicated page on <>. === SSL Encryption -Normally, you will specify SSL configurations when you create the client (see <<_security>> for more details), since encryption typically +Normally, you will specify SSL configurations when you create the client (see +<> for more details), since encryption typically applies to all requests. However, it is possible to configure on a per-request basis too if you need that functionality. For example, if you need to use a self-signed cert on a specific request, you can specify it via the `verify` parameter in the client options: diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/php-version-requirement.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/php-version-requirement.asciidoc index b45fb5aaf..bc3cd9b5c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/php-version-requirement.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/php-version-requirement.asciidoc @@ -1,4 +1,5 @@ +[[php_version_requirement]] == PHP Version Requirement -Version 5.0 of Elasticsearch-PHP requires PHP version 5.6.6 or higher. In addition, it requires the native JSON +Version 6.0 of Elasticsearch-PHP requires PHP version 7.0.0 or higher. In addition, it requires the native JSON extension to be version 1.3.7 or higher. diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/quickstart.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/quickstart.asciidoc index 61aa73c01..bd391429f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/quickstart.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/quickstart.asciidoc @@ -1,4 +1,4 @@ - +[[quickstart]] == Quickstart This section will give you a quick overview of the client and how the major functions work. @@ -11,7 +11,7 @@ This section will give you a quick overview of the client and how the major func ---------------------------- { "require": { - "elasticsearch/elasticsearch": "~5.0" + "elasticsearch/elasticsearch": "~6.7.0" } } ---------------------------- @@ -266,4 +266,3 @@ actions are available under the `$client` object (indexing, searching, getting, are located under the `$client->indices()` and `$client->cluster()` objects, respectively. Check out the rest of the Documentation to see how the entire client works. - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/search-operations.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/search-operations.asciidoc index 9b95393d1..99bfaf40a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/search-operations.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/search-operations.asciidoc @@ -1,3 +1,4 @@ +[[search_operations]] == Search Operations Well...it isn't called elasticsearch for nothing! Let's talk about search operations in the client. @@ -230,7 +231,7 @@ This window allows consistent paging even if there is background indexing/updati request with `scroll` enabled. This returns a "page" of documents, and a scroll_id which is used to continue paginating through the hits. -More details about scrolling can be found in the https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html[Link: reference documentation]. +More details about scrolling can be found in the https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll[Link: reference documentation]. This is an example which can be used as a template for more advanced operations: diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/security.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/security.asciidoc index f0e632acd..7f5dda43f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/security.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/security.asciidoc @@ -1,4 +1,4 @@ - +[[security]] == Security The Elasticsearch-PHP client supports two security features: HTTP Authentication and SSL encryption. diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/selectors.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/selectors.asciidoc index f091c1f60..5da5bd7e6 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/selectors.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/selectors.asciidoc @@ -1,4 +1,4 @@ - +[[selectors]] == Selectors The connection pool maintains the list of connections, and decides when nodes should transition from alive to dead (and @@ -37,7 +37,7 @@ better to "stick" to a single connection for the duration of the script. By default, this selector will randomize the hosts upon initialization, which will still guarantee an even distribution of load across the cluster. It changes the round-robin dynamics from per-request to per-script. -If you are using <<_future_mode>>, the "sticky" behavior of this selector will be non-ideal, since all parallel requests +If you are using <>, the "sticky" behavior of this selector will be non-ideal, since all parallel requests will go to the same node instead of multiple nodes in your cluster. When using future mode, the default `RoundRobinSelector` should be preferred. diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/docs/serializers.asciidoc b/openml_OS/vendor/elasticsearch/elasticsearch/docs/serializers.asciidoc index 4b90fd530..e367eaf77 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/docs/serializers.asciidoc +++ b/openml_OS/vendor/elasticsearch/elasticsearch/docs/serializers.asciidoc @@ -1,4 +1,4 @@ - +[[serializers]] == Serializers The client has three serializers available. You will most likely never need diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpstan.neon b/openml_OS/vendor/elasticsearch/elasticsearch/phpstan.neon index 82066adfd..19a19a64c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/phpstan.neon +++ b/openml_OS/vendor/elasticsearch/elasticsearch/phpstan.neon @@ -1,12 +1,9 @@ parameters: + reportUnmatchedIgnoredErrors: + false ignoreErrors: - - '#Mockery\\MockInterface::shouldReceive\(\)#' - - '#Mockery\\MockInterface given#' - - '#Mockery\\MockInterface\[\] given#' - - # because of \Elasticsearch\Tests\RegisteredNamespaceTest - - '#Call to an undefined method Elasticsearch\\Client::foo\(\)#' - - '#Call to an undefined method Elasticsearch\\Client::bar\(\)#' - - # because of \Elasticsearch\Tests\ClientBuilderTest - - '#expects Psr\\Log\\LoggerInterface, Elasticsearch\\Tests\\ClientBuilder\\DummyLogger given.$#' + - '#Unsafe usage of new static\(\)#' + - '#Call to static method performRequest\(\) on trait#' + - '#Constant JSON_THROW_ON_ERROR not found#' + - '#Caught class JsonException not found#' + - '#Call to method getCode\(\) on an unknown class JsonException#' \ No newline at end of file diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration-tests.xml b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration-tests.xml new file mode 100644 index 000000000..ea7662d5c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration-tests.xml @@ -0,0 +1,27 @@ + + + + + tests + + + + + Integration + + + + + src + + + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration.xml b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration.xml deleted file mode 100644 index e7cd6ddf3..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-integration.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - tests/Elasticsearch/Tests/YamlRunnerTest.php - - - - - src - - - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-oss-tests.xml b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-oss-tests.xml new file mode 100644 index 000000000..74b9ed3b7 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-oss-tests.xml @@ -0,0 +1,35 @@ + + + + + + + + + + tests/Elasticsearch/Tests/Yaml/Oss + + + + + oss + + + + + src + + + + + + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-xpack-tests.xml b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-xpack-tests.xml new file mode 100644 index 000000000..7c0a3c23c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit-yaml-xpack-tests.xml @@ -0,0 +1,35 @@ + + + + + + + + + + tests/Elasticsearch/Tests/Yaml/Xpack + + + + + xpack + + + + + src + + + + + + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml deleted file mode 100644 index 841f48eb3..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - tests - tests/Elasticsearch/Tests/YamlRunnerTest.php - - - - - src - - - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml.dist b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml.dist new file mode 100644 index 000000000..b8bb72714 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/phpunit.xml.dist @@ -0,0 +1,30 @@ + + + + + tests + tests/Elasticsearch/Tests/YamlRunnerTest.php + + + + + Integration + oss + xpack + + + + + src + + + diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/ruleset.xml b/openml_OS/vendor/elasticsearch/elasticsearch/ruleset.xml deleted file mode 100644 index b62736b6c..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/ruleset.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php index e5648e745..dba53c2e4 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Client { + const VERSION = '6.8.2'; + /** * @var Transport */ @@ -43,206 +68,297 @@ class Client protected $params; /** - * @var IndicesNamespace + * @var callable */ - protected $indices; + protected $endpoints; + + /** + * @var NamespaceBuilderInterface[] + */ + protected $registeredNamespaces = []; + /** + * @var CatNamespace + */ + protected $cat; + /** * @var ClusterNamespace */ protected $cluster; - + + /** + * @var IndicesNamespace + */ + protected $indices; + + /** + * @var IngestNamespace + */ + protected $ingest; + /** * @var NodesNamespace */ protected $nodes; - + /** * @var SnapshotNamespace */ protected $snapshot; - + /** - * @var CatNamespace + * @var TasksNamespace */ - protected $cat; - + protected $tasks; + /** - * @var IngestNamespace + * @var CcrNamespace */ - protected $ingest; - + protected $ccr; + /** - * @var TasksNamespace + * @var IlmNamespace */ - protected $tasks; - + protected $ilm; + /** - * @var RemoteNamespace + * @var SecurityNamespace */ - protected $remote; - - /** @var callback */ - protected $endpoints; - - /** @var NamespaceBuilderInterface[] */ - protected $registeredNamespaces = []; + protected $security; + + /** + * @var GraphNamespace + */ + protected $graph; + + /** + * @var XpackNamespace + */ + protected $xpack; + + /** + * @var LicenseNamespace + */ + protected $license; + + /** + * @var MigrationNamespace + */ + protected $migration; + + /** + * @var MlNamespace + */ + protected $ml; + + /** + * @var MonitoringNamespace + */ + protected $monitoring; + + /** + * @var RollupNamespace + */ + protected $rollup; + + /** + * @var SqlNamespace + */ + protected $sql; + + /** + * @var SslNamespace + */ + protected $ssl; + + /** + * @var WatcherNamespace + */ + protected $watcher; + /** * Client constructor * - * @param Transport $transport - * @param callable $endpoint + * @param Transport $transport + * @param callable $endpoint * @param AbstractNamespace[] $registeredNamespaces */ public function __construct(Transport $transport, callable $endpoint, array $registeredNamespaces) { $this->transport = $transport; $this->endpoints = $endpoint; - $this->indices = new IndicesNamespace($transport, $endpoint); - $this->cluster = new ClusterNamespace($transport, $endpoint); - $this->nodes = new NodesNamespace($transport, $endpoint); - $this->snapshot = new SnapshotNamespace($transport, $endpoint); - $this->cat = new CatNamespace($transport, $endpoint); - $this->ingest = new IngestNamespace($transport, $endpoint); - $this->tasks = new TasksNamespace($transport, $endpoint); - $this->remote = new RemoteNamespace($transport, $endpoint); + $this->cat = new CatNamespace($transport, $endpoint); + $this->cluster = new ClusterNamespace($transport, $endpoint); + $this->indices = new IndicesNamespace($transport, $endpoint); + $this->ingest = new IngestNamespace($transport, $endpoint); + $this->nodes = new NodesNamespace($transport, $endpoint); + $this->snapshot = new SnapshotNamespace($transport, $endpoint); + $this->tasks = new TasksNamespace($transport, $endpoint); + $this->ccr = new CcrNamespace($transport, $endpoint); + $this->ilm = new IlmNamespace($transport, $endpoint); + $this->security = new SecurityNamespace($transport, $endpoint); + $this->graph = new GraphNamespace($transport, $endpoint); + $this->xpack = new XpackNamespace($transport, $endpoint); + $this->license = new LicenseNamespace($transport, $endpoint); + $this->migration = new MigrationNamespace($transport, $endpoint); + $this->ml = new MlNamespace($transport, $endpoint); + $this->monitoring = new MonitoringNamespace($transport, $endpoint); + $this->rollup = new RollupNamespace($transport, $endpoint); + $this->sql = new SqlNamespace($transport, $endpoint); + $this->ssl = new SslNamespace($transport, $endpoint); + $this->watcher = new WatcherNamespace($transport, $endpoint); + $this->registeredNamespaces = $registeredNamespaces; } /** - * @param $params + * $params['index'] = (string) Default index for items which don't provide one + * $params['type'] = (string) Default document type for items which don't provide one + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for) + * $params['routing'] = (string) Specific routing value + * $params['timeout'] = (time) Explicit operation timeout + * $params['fields'] = (list) Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request + * $params['_source'] = (list) True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request + * $params['_source_excludes'] = (list) Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + * $params['_source_includes'] = (list) Default list of fields to extract and return from the _source field, can be overridden on each sub-request + * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with + * $params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html */ - public function info($params = []) + public function bulk(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var \Elasticsearch\Endpoints\Info $endpoint */ - $endpoint = $endpointBuilder('Info'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Bulk'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * @param $params array Associative array of parameters + * $params['scroll_id'] = (list) A comma-separated list of scroll IDs to clear + * $params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter * - * @return bool + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html */ - public function ping($params = []) + public function clearScroll(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $scroll_id = $this->extractArgument($params, 'scroll_id'); + $body = $this->extractArgument($params, 'body'); - /** @var \Elasticsearch\Endpoints\Ping $endpoint */ - $endpoint = $endpointBuilder('Ping'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('ClearScroll'); $endpoint->setParams($params); + $endpoint->setScrollId($scroll_id); + $endpoint->setBody($body); - try { - $this->performRequest($endpoint); - } catch (Missing404Exception $exception) { - return false; - } catch (TransportException $exception) { - return false; - } catch (NoNodesAvailableException $exception) { - return false; - } - - return true; + return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required) - * ['ignore_missing'] = ?? - * ['fields'] = (list) A comma-separated list of fields to return in the response - * ['parent'] = (string) The ID of the parent document - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode - * ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation - * ['routing'] = (string) Specific routing value - * ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field - * ['_source_include'] = (list) A list of fields to extract and return from the _source field - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of indices to restrict the results + * $params['type'] = (list) A comma-separated list of types to restrict the results + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['min_score'] = (number) Include only documents with a specific `_score` value in the result + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['routing'] = (list) A comma-separated list of specific routing values + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['analyzer'] = (string) The analyzer to use for the query string + * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The field to use as default where no field prefix is given in the query string + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['terminate_after'] = (number) The maximum count for each shard, upon reaching which the query execution will terminate early + * $params['body'] = (array) A query to restrict the results specified with the Query DSL (optional) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html */ - public function get($params) + public function count(array $params = []) { - $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Get $endpoint */ - $endpoint = $endpointBuilder('Get'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type); + $endpoint = $endpointBuilder('Count'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required) - * ['ignore_missing'] = ?? - * ['parent'] = (string) The ID of the parent document - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode - * ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation - * ['routing'] = (string) Specific routing value - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) Document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (Required) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['parent'] = (string) ID of the parent document + * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for) + * $params['routing'] = (string) Specific routing value + * $params['timeout'] = (time) Explicit operation timeout + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with + * $params['body'] = (array) The document (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html */ - public function getSource($params) + public function create(array $params = []) { $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Get $endpoint */ - $endpoint = $endpointBuilder('Get'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type) - ->returnOnlySource(); + $endpoint = $endpointBuilder('Create'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (Required) - * ['consistency'] = (enum) Specific write consistency setting for the operation - * ['parent'] = (string) ID of parent document - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['replication'] = (enum) Specific replication type - * ['routing'] = (string) Specific routing value - * ['timeout'] = (time) Explicit operation timeout - * ['version_type'] = (enum) Specific version type - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (Required) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['parent'] = (string) ID of parent document + * $params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for) + * $params['routing'] = (string) Specific routing value + * $params['timeout'] = (time) Explicit operation timeout + * $params['if_seq_no'] = (number) only perform the delete operation if the last operation that has changed the document has the specified sequence number + * $params['if_primary_term'] = (number) only perform the delete operation if the last operation that has changed the document has the specified primary term + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html */ - public function delete($params) + public function delete(array $params = []) { $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); @@ -251,1244 +367,1065 @@ public function delete($params) $this->verifyNotNullOrEmpty("id", $id); $this->verifyNotNullOrEmpty("type", $type); $this->verifyNotNullOrEmpty("index", $index); - - /** @var callback $endpointBuilder */ + $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Delete $endpoint */ $endpoint = $endpointBuilder('Delete'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); return $this->performRequest($endpoint); } - /** - * - * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * ['_source_exclude'] = (array) A list of fields to exclude from the returned _source field - * ['_source_include'] = (array) A list of fields to extract and return from the _source field - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['analyze_wildcard'] = (bool) Specify whether wildcard and prefix queries should be analyzed (default: false) - * ['analyzer'] = (string) The analyzer to use for the query string - * ['conflicts'] = (enum) What to do when the delete-by-query hits version conflicts? - * ['default_operator'] = (enum) The default operator for query string query (AND or OR) - * ['df'] = (string) The field to use as default where no field prefix is given in the query string - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * ['from'] = (number) Starting offset (default: 0) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['lenient'] = (bool) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['q'] = (string) Query in the Lucene query string syntax - * ['refresh'] = (bool) Should the effected indexes be refreshed? - * ['request_cache'] = (bool) Specify if request cache should be used for this request or not, defaults to index level setting - * ['requests_per_second'] = (number) The throttle for this request in sub-requests per second. -1 means no throttle. - * ['routing'] = (array) A comma-separated list of specific routing values - * ['scroll'] = (number) Specify how long a consistent view of the index should be maintained for scrolled search - * ['scroll_size'] = (number) Size on the scroll request powering the update_by_query - * ['search_timeout'] = (number) Explicit timeout for each search request. Defaults to no timeout. - * ['search_type'] = (enum) Search operation type - * ['size'] = (number) Number of hits to return (default: 10) - * ['slices'] = (integer) The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. - * ['sort'] = (array) A comma-separated list of : pairs - * ['stats'] = (array) Specific 'tag' of the request for logging and statistical purposes - * ['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - * ['timeout'] = (number) Time each individual bulk request should wait for shards that are unavailable. - * ['version'] = (bool) Specify whether to return document version as part of a hit - * ['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * ['wait_for_completion'] = (bool) Should the request should block until the delete-by-query is complete. - * - * @param array $params - * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required) + * $params['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types + * $params['analyzer'] = (string) The analyzer to use for the query string + * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The field to use as default where no field prefix is given in the query string + * $params['from'] = (number) Starting offset (default: 0) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['conflicts'] = (enum) What to do when the delete by query hits version conflicts? (Options = abort,proceed) (Default = abort) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['routing'] = (list) A comma-separated list of specific routing values + * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) + * $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout. + * $params['size'] = (number) Number of hits to return (default: 10) + * $params['sort'] = (list) A comma-separated list of : pairs + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes + * $params['version'] = (boolean) Specify whether to return document version as part of a hit + * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting + * $params['refresh'] = (boolean) Should the effected indexes be refreshed? + * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['scroll_size'] = (number) Size on the scroll request powering the delete by query + * $params['wait_for_completion'] = (boolean) Should the request should block until the delete by query is complete. (Default = true) + * $params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. -1 means no throttle. (Default = 0) + * $params['slices'] = (number) The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. (Default = 1) + * $params['body'] = (array) The search definition using the Query DSL (Required) + * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html */ - public function deleteByQuery($params = array()) + public function deleteByQuery(array $params = []) { $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\DeleteByQuery $endpoint */ $endpoint = $endpointBuilder('DeleteByQuery'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to restrict the results - * ['type'] = (list) A comma-separated list of types to restrict the results - * ['min_score'] = (number) Include only documents with a specific `_score` value in the result - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['routing'] = (string) Specific routing value - * ['source'] = (string) The URL-encoded query definition (instead of using the request body) - * ['body'] = (array) A query to restrict the results (optional) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['task_id'] = (string) The task id to rethrottle (Required) + * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html */ - public function count($params = array()) + public function deleteByQueryRethrottle(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); + $task_id = $this->extractArgument($params, 'task_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Count $endpoint */ - $endpoint = $endpointBuilder('Count'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('DeleteByQueryRethrottle'); $endpoint->setParams($params); + $endpoint->setTaskId($task_id); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to restrict the results - * ['type'] = (list) A comma-separated list of types to restrict the results - * ['id'] = (string) ID of document - * ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['routing'] = (string) Specific routing value - * ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['body'] = (array) A query to restrict the results (optional) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['percolate_index'] = (string) The index to count percolate the document into. Defaults to index. - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * ['version'] = (number) Explicit version number for concurrency control - * ['version_type'] = (enum) Specific version type - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Script ID (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array - * - * @deprecated + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html */ - public function countPercolate($params = array()) + public function deleteScript(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $id = $this->extractArgument($params, 'id'); - $body = $this->extractArgument($params, 'body'); + $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\CountPercolate $endpoint */ - $endpoint = $endpointBuilder('CountPercolate'); - $endpoint->setIndex($index) - ->setType($type) - ->setID($id) - ->setBody($body); + $endpoint = $endpointBuilder('DeleteScript'); $endpoint->setParams($params); + $endpoint->setId($id); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index with a registered percolator query (Required) - * ['type'] = (string) The document type (Required) - * ['prefer_local'] = (boolean) With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) - * ['body'] = (array) The document (`doc`) to percolate against registered queries; optionally also a `query` to limit the percolation to specific registered queries - * - * @param $params array Associative array of parameters - * - * @return array - * - * @deprecated + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required) + * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response + * $params['parent'] = (string) The ID of the parent document + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode + * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html */ - public function percolate($params) + public function exists(array $params = []): bool { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $id = $this->extractArgument($params, 'id'); - $body = $this->extractArgument($params, 'body'); + $type = $this->extractArgument($params, 'type'); - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var \Elasticsearch\Endpoints\Percolate $endpoint */ - $endpoint = $endpointBuilder('Percolate'); - $endpoint->setIndex($index) - ->setType($type) - ->setID($id) - ->setBody($body); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Exists'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (string) Default index for items which don't provide one - * ['type'] = (string) Default document type for items which don't provide one - * ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters - * - * @return array - * - * @deprecated + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document; use `_all` to fetch the first document matching the ID across all types (Required) + * $params['parent'] = (string) The ID of the parent document + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode + * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html */ - public function mpercolate($params = array()) + public function existsSource(array $params = []): bool { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var \Elasticsearch\Endpoints\MPercolate $endpoint */ - $endpoint = $endpointBuilder('MPercolate'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('ExistsSource'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (string) Default index for items which don't provide one - * ['type'] = (string) Default document type for items which don't provide one - * ['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['routing'] = (string) Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['parent'] = (string) Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['realtime'] = (boolean) Specifies if request is real-time as opposed to near-real-time (default: true). - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (Required) + * $params['analyze_wildcard'] = (boolean) Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + * $params['analyzer'] = (string) The analyzer for the query string query + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The default field for query string query (default: _all) + * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['parent'] = (string) The ID of the parent document + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['body'] = (array) The query definition using the Query DSL + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html */ - public function termvectors($params = array()) + public function explain(array $params = []) { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $id = $this->extractArgument($params, 'id'); - $body = $this->extractArgument($params, 'body'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\TermVectors $endpoint */ - $endpoint = $endpointBuilder('TermVectors'); - $endpoint->setIndex($index) - ->setType($type) - ->setID($id) - ->setBody($body); + $endpoint = $endpointBuilder('Explain'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) Default index for items which don't provide one - * ['type'] = (string) Default document type for items which don't provide one - * ['ids'] = (list) A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body - * ['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"." - * ['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['routing'] = (string) Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['parent'] = (string) Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\". - * ['realtime'] = (boolean) Specifies if request is real-time as opposed to near-real-time (default: true). - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['fields'] = (list) A comma-separated list of field names + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['body'] = (array) Field json objects containing an array of field names + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html */ - public function mtermvectors($params = array()) + public function fieldCaps(array $params = []) { $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\MTermVectors $endpoint */ - $endpoint = $endpointBuilder('MTermVectors'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('FieldCaps'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required) - * ['parent'] = (string) The ID of the parent document - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode - * ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation - * ['routing'] = (string) Specific routing value - * - * @param $params array Associative array of parameters - * - * @return array | boolean + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required) + * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response + * $params['parent'] = (string) The ID of the parent document + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode + * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['_source_exclude'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_include'] = (list) A list of fields to extract and return from the _source field + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html */ - public function exists($params) + public function get(array $params = []) { $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); - //manually make this verbose so we can check status code - $params['client']['verbose'] = true; - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Exists $endpoint */ - $endpoint = $endpointBuilder('Exists'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type); + $endpoint = $endpointBuilder('Get'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index - * ['type'] = (string) The type of the document - * ['fields'] = (list) A comma-separated list of fields to return in the response - * ['parent'] = (string) The ID of the parent document - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode - * ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation - * ['routing'] = (string) Specific routing value - * ['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. - * ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field - * ['_source_include'] = (list) A list of fields to extract and return from the _source field - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Script ID (Required) + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html */ - public function mget($params = array()) + public function getScript(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); + $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Mget $endpoint */ - $endpoint = $endpointBuilder('Mget'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('GetScript'); $endpoint->setParams($params); + $endpoint->setId($id); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to use as default - * ['type'] = (list) A comma-separated list of document types to use as default - * ['search_type'] = (enum) Search operation type - * ['body'] = (array|string) The request definitions (metadata-search request definition pairs), separated by newlines - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) The document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document; use `_all` to fetch the first document matching the ID across all types (Required) + * $params['parent'] = (string) The ID of the parent document + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode + * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html */ - public function msearch($params = array()) + public function getSource(array $params = []) { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Msearch $endpoint */ - $endpoint = $endpointBuilder('Msearch'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('GetSource'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to use as default - * ['type'] = (list) A comma-separated list of document types to use as default - * ['search_type'] = (enum) Search operation type - * ['body'] = (array|string) The request definitions (metadata-search request definition pairs), separated by newlines - * ['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) Document ID + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (Required) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['op_type'] = (enum) Explicit operation type (Options = index,create) (Default = index) + * $params['parent'] = (string) ID of the parent document + * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for) + * $params['routing'] = (string) Specific routing value + * $params['timeout'] = (time) Explicit operation timeout + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * $params['if_seq_no'] = (number) only perform the index operation if the last operation that has changed the document has the specified sequence number + * $params['if_primary_term'] = (number) only perform the index operation if the last operation that has changed the document has the specified primary term + * $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with + * $params['body'] = (array) The document (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html */ - public function msearchTemplate($params = array()) + public function index(array $params = []) { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\MsearchTemplate $endpoint */ - $endpoint = $endpointBuilder('MsearchTemplate'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Index'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (Required) - * ['id'] = (string) Specific document ID (when the POST method is used) - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * ['parent'] = (string) ID of the parent document - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['replication'] = (enum) Specific replication type - * ['routing'] = (string) Specific routing value - * ['timeout'] = (time) Explicit operation timeout - * ['timestamp'] = (time) Explicit timestamp for the document - * ['ttl'] = (duration) Expiration time for the document - * ['version'] = (number) Explicit version number for concurrency control - * ['version_type'] = (enum) Specific version type - * ['body'] = (array) The document - * - * @param $params array Associative array of parameters * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/ */ - public function create($params) + public function info(array $params = []) { - $id = $this->extractArgument($params, 'id'); - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Create $endpoint */ - $endpoint = $endpointBuilder('Create'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Info'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) Default index for items which don't provide one - * ['type'] = (string) Default document type for items which don't provide one - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['replication'] = (enum) Explicitly set the replication type - * ['fields'] = (list) Default comma-separated list of fields to return in the response for updates - * ['body'] = (array) The document - * - * @param $params array Associative array of parameters - * + * $params['index'] = (string) The name of the index + * $params['type'] = (string) The type of the document + * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode + * $params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation + * $params['routing'] = (string) Specific routing value + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html */ - public function bulk($params = array()) + public function mget(array $params = []) { $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Bulk $endpoint */ - $endpoint = $endpointBuilder('Bulk'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Mget'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (Required) - * ['id'] = (string) Specific document ID (when the POST method is used) - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * ['op_type'] = (enum) Explicit operation type - * ['parent'] = (string) ID of the parent document - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['replication'] = (enum) Specific replication type - * ['routing'] = (string) Specific routing value - * ['timeout'] = (time) Explicit operation timeout - * ['timestamp'] = (time) Explicit timestamp for the document - * ['ttl'] = (duration) Expiration time for the document - * ['version'] = (number) Explicit version number for concurrency control - * ['version_type'] = (enum) Specific version type - * ['body'] = (array) The document - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to use as default + * $params['type'] = (list) A comma-separated list of document types to use as default + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute + * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. (Default = 128) + * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests each sub search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = The default grows with the number of nodes in the cluster but is at most 256.) + * $params['rest_total_hits_as_int'] = (boolean) This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number (Default = false) + * $params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html */ - public function index($params) + public function msearch(array $params = []) { - $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Index $endpoint */ - $endpoint = $endpointBuilder('Index'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Msearch'); $endpoint->setParams($params); - - return $this->performRequest($endpoint); - } - - /** - * $params['refresh'] = (boolean) Should the effected indexes be refreshed? - * ['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * ['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete - * ['requests_per_second'] = (float) The throttle for this request in sub-requests per second. 0 means set no throttle - * ['body'] = (array) The search definition using the Query DSL and the prototype for the index request (Required) - * - * @param $params array Associative array of parameters - * - * @return array - */ - public function reindex($params) - { - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Reindex $endpoint */ - $endpoint = $endpointBuilder('Reindex'); + $endpoint->setIndex($index); + $endpoint->setType($type); $endpoint->setBody($body); - $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['routing'] = (string) Specific routing value - * ['source'] = (string) The URL-encoded request definition (instead of using request body) - * ['body'] = (array) The request definition - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to use as default + * $params['type'] = (list) A comma-separated list of document types to use as default + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute + * $params['rest_total_hits_as_int'] = (boolean) This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number (Default = false) + * $params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html */ - public function suggest($params = array()) + public function msearchTemplate(array $params = []) { $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Suggest $endpoint */ - $endpoint = $endpointBuilder('Suggest'); - $endpoint->setIndex($index) - ->setBody($body); + $endpoint = $endpointBuilder('MsearchTemplate'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (Required) - * ['analyze_wildcard'] = (boolean) Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) - * ['analyzer'] = (string) The analyzer for the query string query - * ['default_operator'] = (enum) The default operator for query string query (AND or OR) - * ['df'] = (string) The default field for query string query (default: _all) - * ['fields'] = (list) A comma-separated list of fields to return in the response - * ['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased - * ['parent'] = (string) The ID of the parent document - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['q'] = (string) Query in the Lucene query string syntax - * ['routing'] = (string) Specific routing value - * ['source'] = (string) The URL-encoded query definition (instead of using the request body) - * ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field - * ['_source_include'] = (list) A list of fields to extract and return from the _source field - * ['body'] = (string) The URL-encoded query definition (instead of using the request body) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (string) The index in which the document resides. + * $params['type'] = (string) The type of the document. + * $params['ids'] = (list) A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * $params['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = false) + * $params['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true) + * $params['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * $params['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true) + * $params['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true) + * $params['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". (Default = true) + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + * $params['routing'] = (string) Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * $params['parent'] = (string) Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * $params['realtime'] = (boolean) Specifies if requests are real-time as opposed to near-real-time (default: true). + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * $params['body'] = (array) Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html */ - public function explain($params) + public function mtermvectors(array $params = []) { - $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Explain $endpoint */ - $endpoint = $endpointBuilder('Explain'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('MTermVectors'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types - * ['analyzer'] = (string) The analyzer to use for the query string - * ['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) - * ['default_operator'] = (enum) The default operator for query string query (AND or OR) - * ['df'] = (string) The field to use as default where no field prefix is given in the query string - * ['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit - * ['fields'] = (list) A comma-separated list of fields to return as part of a hit - * ['from'] = (number) Starting offset (default: 0) - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['indices_boost'] = (list) Comma-separated list of index boosts - * ['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['q'] = (string) Query in the Lucene query string syntax - * ['query_cache'] = (boolean) Enable query cache for this request - * ['request_cache'] = (boolean) Enable request cache for this request - * ['routing'] = (list) A comma-separated list of specific routing values - * ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search - * ['search_type'] = (enum) Search operation type - * ['size'] = (number) Number of hits to return (default: 10) - * ['sort'] = (list) A comma-separated list of : pairs - * ['source'] = (string) The URL-encoded request definition using the Query DSL (instead of using request body) - * ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field - * ['_source_include'] = (list) A list of fields to extract and return from the _source field - * ['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes - * ['suggest_field'] = (string) Specify which field to use for suggestions - * ['suggest_mode'] = (enum) Specify suggest mode - * ['suggest_size'] = (number) How many suggestions to return in response - * ['suggest_text'] = (text) The source text for which the suggestions should be returned - * ['timeout'] = (time) Explicit operation timeout - * ['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - * ['version'] = (boolean) Specify whether to return document version as part of a hit - * ['body'] = (array|string) The search definition using the Query DSL * - * @param $params array Associative array of parameters - * - * @return array + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/ */ - public function search($params = array()) + public function ping(array $params = []): bool { - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var \Elasticsearch\Endpoints\Search $endpoint */ - $endpoint = $endpointBuilder('Search'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ping'); $endpoint->setParams($params); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types - * ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) - * ['routing'] = (string) Specific routing value - * ['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Script ID (Required) + * $params['context'] = (string) Script context + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['body'] = (array) The document (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html */ - public function searchShards($params = array()) + public function putScript(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); + $id = $this->extractArgument($params, 'id'); + $context = $this->extractArgument($params, 'context'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\SearchShards $endpoint */ - $endpoint = $endpointBuilder('SearchShards'); - $endpoint->setIndex($index) - ->setType($type); + $endpoint = $endpointBuilder('PutScript'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setContext($context); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['body'] = (array) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html */ - public function searchTemplate($params = array()) + public function rankEval(array $params = []) { $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Search $endpoint */ - $endpoint = $endpointBuilder('SearchTemplate'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('RankEval'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['scroll_id'] = (string) The scroll ID for scrolled search - * ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search - * ['body'] = (string) The scroll ID for scrolled search - * - * @param $params array Associative array of parameters - * + * $params['refresh'] = (boolean) Should the effected indexes be refreshed? + * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete. (Default = true) + * $params['requests_per_second'] = (number) The throttle to set on this request in sub-requests per second. -1 means no throttle. (Default = 0) + * $params['slices'] = (number) The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. (Default = 1) + * $params['body'] = (array) The search definition using the Query DSL and the prototype for the index request. (Required) + * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html */ - public function scroll($params = array()) + public function reindex(array $params = []) { - $scrollID = $this->extractArgument($params, 'scroll_id'); $body = $this->extractArgument($params, 'body'); - $scroll = $this->extractArgument($params, 'scroll'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Scroll $endpoint */ - $endpoint = $endpointBuilder('Scroll'); - $endpoint->setScrollID($scrollID) - ->setScroll($scroll) - ->setBody($body); + $endpoint = $endpointBuilder('Reindex'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['scroll_id'] = (string) The scroll ID for scrolled search - * ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search - * ['body'] = (string) The scroll ID for scrolled search - * - * @param $params array Associative array of parameters + * $params['task_id'] = (string) The task id to rethrottle (Required) + * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html */ - public function clearScroll($params = array()) + public function reindexRethrottle(array $params = []) { - $scrollID = $this->extractArgument($params, 'scroll_id'); - $body = $this->extractArgument($params, 'body'); + $task_id = $this->extractArgument($params, 'task_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\ClearScroll $endpoint */ - $endpoint = $endpointBuilder('ClearScroll'); - $endpoint->setScrollID($scrollID) - ->setBody($body); + $endpoint = $endpointBuilder('ReindexRethrottle'); $endpoint->setParams($params); + $endpoint->setTaskId($task_id); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) Document ID (Required) - * ['index'] = (string) The name of the index (Required) - * ['type'] = (string) The type of the document (Required) - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * ['fields'] = (list) A comma-separated list of fields to return in the response - * ['lang'] = (string) The script language (default: mvel) - * ['parent'] = (string) ID of the parent document - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['replication'] = (enum) Specific replication type - * ['retry_on_conflict'] = (number) Specify how many times should the operation be retried when a conflict occurs (default: 0) - * ['routing'] = (string) Specific routing value - * ['script'] = () The URL-encoded script definition (instead of using request body) - * ['timeout'] = (time) Explicit operation timeout - * ['timestamp'] = (time) Explicit timestamp for the document - * ['ttl'] = (duration) Expiration time for the document - * ['version_type'] = (number) Explicit version number for concurrency control - * ['body'] = (array) The request definition using either `script` or partial `doc` - * - * @param $params array Associative array of parameters + * $params['id'] = (string) The id of the stored search template + * $params['body'] = (array) The search definition template and its params * + * @param array $params Associative array of parameters * @return array + * @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html */ - public function update($params) + public function renderSearchTemplate(array $params = []) { $id = $this->extractArgument($params, 'id'); - $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Update $endpoint */ - $endpoint = $endpointBuilder('Update'); - $endpoint->setID($id) - ->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('RenderSearchTemplate'); $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or - * empty string to perform the operation on all indices (Required) - * ['type'] = (list) A comma-separated list of document types to search; leave empty to - * perform the operation on all types - * ['analyzer'] = (string) The analyzer to use for the query string - * ['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed - * (default: false) - * ['default_operator'] = (enum) The default operator for query string query (AND or OR) (AND,OR) - * (default: OR) - * ['df'] = (string) The field to use as default where no field prefix is given in the - * query string - * ['explain'] = (boolean) Specify whether to return detailed information about score - * computation as part of a hit - * ['fields'] = (list) A comma-separated list of fields to return as part of a hit - * ['fielddata_fields'] = (list) A comma-separated list of fields to return as the field data - * representation of a field for each hit - * ['from'] = (number) Starting offset (default: 0) - * ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when - * unavailable (missing or closed) - * ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into - * no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['conflicts'] = (enum) What to do when the reindex hits version conflicts? (abort,proceed) - * (default: abort) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are - * open, closed or both. (open,closed,none,all) (default: open) - * ['lenient'] = (boolean) Specify whether format-based query failures (such as providing - * text to a numeric field) should be ignored - * ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased - * ['preference'] = (string) Specify the node or shard the operation should be performed on - * (default: random) - * ['q'] = (string) Query in the Lucene query string syntax - * ['routing'] = (list) A comma-separated list of specific routing values - * ['scroll'] = (duration) Specify how long a consistent view of the index should be - * maintained for scrolled search - * ['search_type'] = (enum) Search operation type (query_then_fetch,dfs_query_then_fetch) - * ['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout. - * ['size'] = (number) Number of hits to return (default: 10) - * ['sort'] = (list) A comma-separated list of : pairs - * ['_source'] = (list) True or false to return the _source field or not, or a list of - * fields to return - * ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field - * ['_source_include'] = (list) A list of fields to extract and return from the _source field - * ['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon - * reaching which the query execution will terminate early. - * ['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes - * ['suggest_field'] = (string) Specify which field to use for suggestions - * ['suggest_mode'] = (enum) Specify suggest mode (missing,popular,always) (default: missing) - * ['suggest_size'] = (number) How many suggestions to return in response - * ['suggest_text'] = (text) The source text for which the suggestions should be returned - * ['timeout'] = (time) Time each individual bulk request should wait for shards that are - * unavailable. (default: 1m) - * ['track_scores'] = (boolean) Whether to calculate and return scores even if they are not used - * for sorting - * ['version'] = (boolean) Specify whether to return document version as part of a hit - * ['version_type'] = (boolean) Should the document increment the version number (internal) on - * hit or not (reindex) - * ['request_cache'] = (boolean) Specify if request cache should be used for this request or not, - * defaults to index level setting - * ['refresh'] = (boolean) Should the effected indexes be refreshed? - * ['consistency'] = (enum) Explicit write consistency setting for the operation - * (one,quorum,all) - * ['scroll_size'] = (integer) Size on the scroll request powering the update_by_query - * ['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete. - * (default: false) - * ['body'] = The search definition using the Query DSL - * - * @param array $params + * $params['body'] = (array) The script to execute * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html */ - public function updateByQuery($params = array()) + public function scriptsPainlessExecute(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $body = $this->extractArgument($params, 'body'); - $type = $this->extractArgument($params, 'type'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\UpdateByQuery $endpoint */ - $endpoint = $endpointBuilder('UpdateByQuery'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('ScriptsPainlessExecute'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The script ID (Required) - * ['lang'] = (string) The script language (Required) - * - * @param $params array Associative array of parameters + * $params['scroll_id'] = (string) The scroll ID + * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search + * $params['rest_total_hits_as_int'] = (boolean) This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number (Default = false) + * $params['body'] = (array) The scroll ID if not passed by URL or query parameter. * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html */ - public function getScript($params) + public function scroll(array $params = []) { - $id = $this->extractArgument($params, 'id'); - $lang = $this->extractArgument($params, 'lang'); + $scroll_id = $this->extractArgument($params, 'scroll_id'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Script\Get $endpoint */ - $endpoint = $endpointBuilder('Script\Get'); - $endpoint->setID($id) - ->setLang($lang); + $endpoint = $endpointBuilder('Scroll'); $endpoint->setParams($params); + $endpoint->setScrollId($scroll_id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The script ID (Required) - * ['lang'] = (string) The script language (Required) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * $params['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types + * $params['analyzer'] = (string) The analyzer to use for the query string + * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The field to use as default where no field prefix is given in the query string + * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit + * $params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit + * $params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit + * $params['from'] = (number) Starting offset (default: 0) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['routing'] = (list) A comma-separated list of specific routing values + * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) + * $params['size'] = (number) Number of hits to return (default: 10) + * $params['sort'] = (list) A comma-separated list of : pairs + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes + * $params['suggest_field'] = (string) Specify which field to use for suggestions + * $params['suggest_mode'] = (enum) Specify suggest mode (Options = missing,popular,always) (Default = missing) + * $params['suggest_size'] = (number) How many suggestions to return in response + * $params['suggest_text'] = (string) The source text for which the suggestions should be returned + * $params['timeout'] = (time) Explicit operation timeout + * $params['track_scores'] = (boolean) Whether to calculate and return scores even if they are not used for sorting + * $params['track_total_hits'] = (boolean) Indicate if the number of documents that match the query should be tracked + * $params['allow_partial_search_results'] = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true) + * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * $params['version'] = (boolean) Specify whether to return document version as part of a hit + * $params['seq_no_primary_term'] = (boolean) Specify whether to return sequence number and primary term of the last modification of each hit + * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting + * $params['batched_reduce_size'] = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. (Default = 512) + * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = The default grows with the number of nodes in the cluster but is at most 256.) + * $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. (Default = 128) + * $params['rest_total_hits_as_int'] = (boolean) This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number (Default = false) + * $params['body'] = (array) The search definition using the Query DSL + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html */ - public function deleteScript($params) + public function search(array $params = []) { - $id = $this->extractArgument($params, 'id'); - $lang = $this->extractArgument($params, 'lang'); + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Script\Delete $endpoint */ - $endpoint = $endpointBuilder('Script\Delete'); - $endpoint->setID($id) - ->setLang($lang); + $endpoint = $endpointBuilder('Search'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The script ID (Required) - * ['lang'] = (string) The script language (Required) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['routing'] = (string) Specific routing value + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html */ - public function putScript($params) + public function searchShards(array $params = []) { - $id = $this->extractArgument($params, 'id'); - $lang = $this->extractArgument($params, 'lang'); - $body = $this->extractArgument($params, 'body'); + $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Script\Put $endpoint */ - $endpoint = $endpointBuilder('Script\Put'); - $endpoint->setID($id) - ->setBody($body); + $endpoint = $endpointBuilder('SearchShards'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The search template ID (Required) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * $params['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['routing'] = (list) A comma-separated list of specific routing values + * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit + * $params['profile'] = (boolean) Specify whether to profile the query execution + * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * $params['rest_total_hits_as_int'] = (boolean) This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number (Default = false) + * $params['body'] = (array) The search definition template and its params (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html */ - public function getTemplate($params) + public function searchTemplate(array $params = []) { - $id = $this->extractArgument($params, 'id'); + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Template\Get $endpoint */ - $endpoint = $endpointBuilder('Template\Get'); - $endpoint->setID($id); + $endpoint = $endpointBuilder('SearchTemplate'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) The search template ID (Required) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (string) The index in which the document resides. (Required) + * $params['type'] = (string) The type of the document. (Required) + * $params['id'] = (string) The id of the document, when not specified a doc param should be supplied. + * $params['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. (Default = false) + * $params['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. (Default = true) + * $params['fields'] = (list) A comma-separated list of fields to return. + * $params['offsets'] = (boolean) Specifies if term offsets should be returned. (Default = true) + * $params['positions'] = (boolean) Specifies if term positions should be returned. (Default = true) + * $params['payloads'] = (boolean) Specifies if term payloads should be returned. (Default = true) + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random). + * $params['routing'] = (string) Specific routing value. + * $params['parent'] = (string) Parent id of documents. + * $params['realtime'] = (boolean) Specifies if request is real-time as opposed to near-real-time (default: true). + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) + * $params['body'] = (array) Define parameters and or supply a document to get termvectors for. See documentation. + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html */ - public function deleteTemplate($params) + public function termvectors(array $params = []) { + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Template\Delete $endpoint */ - $endpoint = $endpointBuilder('Template\Delete'); - $endpoint->setID($id); + $endpoint = $endpointBuilder('TermVectors'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setId($id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to restrict the results - * ['fields'] = (list) A comma-separated list of fields for to get field statistics for (min value, max value, and more) - * ['level'] = (enum) Defines if field stats should be returned on a per index level or on a cluster wide level - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters - * + * $params['id'] = (string) Document ID (Required) + * $params['index'] = (string) The name of the index (Required) + * $params['type'] = (string) The type of the document (Required) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['fields'] = (list) A comma-separated list of fields to return in the response + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['lang'] = (string) The script language (default: painless) + * $params['parent'] = (string) ID of the parent document. Is is only used for routing and when for the upsert request + * $params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for) + * $params['retry_on_conflict'] = (number) Specify how many times should the operation be retried when a conflict occurs (default: 0) + * $params['routing'] = (string) Specific routing value + * $params['timeout'] = (time) Explicit operation timeout + * $params['if_seq_no'] = (number) only perform the update operation if the last operation that has changed the document has the specified sequence number + * $params['if_primary_term'] = (number) only perform the update operation if the last operation that has changed the document has the specified primary term + * $params['version'] = (number) Explicit version number for concurrency control + * $params['version_type'] = (enum) Specific version type (Options = internal,force) + * $params['body'] = (array) The request definition requires either `script` or partial `doc` (Required) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html */ - public function fieldStats($params = array()) + public function update(array $params = []) { + $id = $this->extractArgument($params, 'id'); $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\FieldStats $endpoint */ - $endpoint = $endpointBuilder('FieldStats'); - $endpoint->setIndex($index) - ->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('Update'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to restrict the results - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required) + * $params['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types + * $params['analyzer'] = (string) The analyzer to use for the query string + * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The field to use as default where no field prefix is given in the query string + * $params['from'] = (number) Starting offset (default: 0) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['conflicts'] = (enum) What to do when the update by query hits version conflicts? (Options = abort,proceed) (Default = abort) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['pipeline'] = (string) Ingest pipeline to set on index requests made by this action. (default: none) + * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['routing'] = (list) A comma-separated list of specific routing values + * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) + * $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout. + * $params['size'] = (number) Number of hits to return (default: 10) + * $params['sort'] = (list) A comma-separated list of : pairs + * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return + * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field + * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field + * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes + * $params['version'] = (boolean) Specify whether to return document version as part of a hit + * $params['version_type'] = (boolean) Should the document increment the version number (internal) on hit or not (reindex) + * $params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting + * $params['refresh'] = (boolean) Should the effected indexes be refreshed? + * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + * $params['scroll_size'] = (number) Size on the scroll request powering the update by query + * $params['wait_for_completion'] = (boolean) Should the request should block until the update by query operation is complete. (Default = true) + * $params['requests_per_second'] = (number) The throttle to set on this request in sub-requests per second. -1 means no throttle. (Default = 0) + * $params['slices'] = (number) The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. (Default = 1) + * $params['body'] = (array) The search definition using the Query DSL + * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html */ - public function fieldCaps($params = array()) + public function updateByQuery(array $params = []) { $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\FieldCaps $endpoint */ - $endpoint = $endpointBuilder('FieldCaps'); - $endpoint->setIndex($index) - ->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('UpdateByQuery'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['id'] = (string) ID of the template to render - * - * @param $params array Associative array of parameters + * $params['task_id'] = (string) The task id to rethrottle (Required) + * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html */ - public function renderSearchTemplate($params = array()) + public function updateByQueryRethrottle(array $params = []) { - $body = $this->extractArgument($params, 'body'); - $id = $this->extractArgument($params, 'id'); + $task_id = $this->extractArgument($params, 'task_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\RenderSearchTemplate $endpoint */ - $endpoint = $endpointBuilder('RenderSearchTemplate'); - $endpoint->setBody($body) - ->setID($id); + $endpoint = $endpointBuilder('UpdateByQueryRethrottle'); $endpoint->setParams($params); + $endpoint->setTaskId($task_id); return $this->performRequest($endpoint); } - - /** - * Operate on the Indices Namespace of commands - * - * @return IndicesNamespace - */ - public function indices() + public function cat(): CatNamespace { - return $this->indices; + return $this->cat; } - - /** - * Operate on the Cluster namespace of commands - * - * @return ClusterNamespace - */ - public function cluster() + public function cluster(): ClusterNamespace { return $this->cluster; } - - /** - * Operate on the Nodes namespace of commands - * - * @return NodesNamespace - */ - public function nodes() + public function indices(): IndicesNamespace + { + return $this->indices; + } + public function ingest(): IngestNamespace + { + return $this->ingest; + } + public function nodes(): NodesNamespace { return $this->nodes; } - - /** - * Operate on the Snapshot namespace of commands - * - * @return SnapshotNamespace - */ - public function snapshot() + public function snapshot(): SnapshotNamespace { return $this->snapshot; } - - /** - * Operate on the Cat namespace of commands - * - * @return CatNamespace - */ - public function cat() + public function tasks(): TasksNamespace { - return $this->cat; + return $this->tasks; } - - /** - * Operate on the Ingest namespace of commands - * - * @return IngestNamespace - */ - public function ingest() + public function ccr(): CcrNamespace { - return $this->ingest; + return $this->ccr; } - - /** - * Operate on the Tasks namespace of commands - * - * @return TasksNamespace - */ - public function tasks() + public function ilm(): IlmNamespace { - return $this->tasks; + return $this->ilm; } - - /** - * Operate on the Remote namespace of commands - * - * @return RemoteNamespace - */ - public function remote() + public function security(): SecurityNamespace + { + return $this->security; + } + public function graph(): GraphNamespace + { + return $this->graph; + } + public function xpack(): XpackNamespace + { + return $this->xpack; + } + public function license(): LicenseNamespace { - return $this->remote; + return $this->license; + } + public function migration(): MigrationNamespace + { + return $this->migration; + } + public function ml(): MlNamespace + { + return $this->ml; + } + public function monitoring(): MonitoringNamespace + { + return $this->monitoring; + } + public function rollup(): RollupNamespace + { + return $this->rollup; + } + public function sql(): SqlNamespace + { + return $this->sql; + } + public function ssl(): SslNamespace + { + return $this->ssl; + } + public function watcher(): WatcherNamespace + { + return $this->watcher; } /** * Catchall for registered namespaces * - * @param $name - * @param $arguments - * @return Object + * @return object * @throws BadMethodCallException if the namespace cannot be found */ - public function __call($name, $arguments) + public function __call(string $name, array $arguments) { if (isset($this->registeredNamespaces[$name])) { return $this->registeredNamespaces[$name]; @@ -1497,22 +1434,17 @@ public function __call($name, $arguments) } /** - * @param array $params - * @param string $arg - * * @return null|mixed */ - public function extractArgument(&$params, $arg) + public function extractArgument(array &$params, string $arg) { - if (is_object($params) === true) { - $params = (array) $params; - } - if (array_key_exists($arg, $params) === true) { - $val = $params[$arg]; + $value = $params[$arg]; + $value = (is_object($value) && !is_iterable($value)) ? + (array) $value : + $value; unset($params[$arg]); - - return $val; + return $value; } else { return null; } @@ -1536,12 +1468,9 @@ private function verifyNotNullOrEmpty($name, $var) } } } - + /** - * @param $endpoint AbstractEndpoint - * - * @throws \Exception - * @return array + * @return callable|array */ private function performRequest(AbstractEndpoint $endpoint) { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php index 41029a09e..368675168 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php @@ -1,17 +1,29 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ClientBuilder { /** @var Transport */ private $transport; - /** @var callback */ + /** @var callable */ private $endpoint; /** @var NamespaceBuilderInterface[] */ @@ -89,40 +96,45 @@ class ClientBuilder /** @var null|bool|string */ private $sslVerification = null; + /** + * @var bool + */ + private $elasticMetaHeader = true; + /** * @return ClientBuilder */ - public static function create() + public static function create(): ClientBuilder { return new static(); } /** * Can supply first parm to Client::__construct() when invoking manually or with dependency injection - * @return this->ransport + * @return Transport * */ - public function getTransport() + public function getTransport(): Transport { return $this->transport; } /** * Can supply second parm to Client::__construct() when invoking manually or with dependency injection - * @return this->endpoint + * @return callable * */ - public function getEndpoint() + public function getEndpoint(): callable { return $this->endpoint; } /** * Can supply third parm to Client::__construct() when invoking manually or with dependency injection - * @return this->registeredNamespacesBuilders + * @return NamespaceBuilderInterface[] * */ - public function getRegisteredNamespacesBuilders() + public function getRegisteredNamespacesBuilders(): array { return $this->registeredNamespacesBuilders; } @@ -143,7 +155,7 @@ public function getRegisteredNamespacesBuilders() * @throws Common\Exceptions\RuntimeException * @return \Elasticsearch\Client */ - public static function fromConfig($config, $quiet = false) + public static function fromConfig(array $config, bool $quiet = false): Client { $builder = new self; foreach ($config as $key => $value) { @@ -167,7 +179,7 @@ public static function fromConfig($config, $quiet = false) * @throws \RuntimeException * @return callable */ - public static function defaultHandler($multiParams = [], $singleParams = []) + public static function defaultHandler(array $multiParams = [], array $singleParams = []): callable { $future = null; if (extension_loaded('curl')) { @@ -190,7 +202,7 @@ public static function defaultHandler($multiParams = [], $singleParams = []) * @throws \RuntimeException * @return CurlMultiHandler */ - public static function multiHandler($params = []) + public static function multiHandler(array $params = []): CurlMultiHandler { if (function_exists('curl_multi_init')) { return new CurlMultiHandler(array_merge([ 'mh' => curl_multi_init() ], $params)); @@ -203,7 +215,7 @@ public static function multiHandler($params = []) * @return CurlHandler * @throws \RuntimeException */ - public static function singleHandler() + public static function singleHandler(): CurlHandler { if (function_exists('curl_reset')) { return new CurlHandler(); @@ -212,25 +224,11 @@ public static function singleHandler() } } - /** - * @param $path string - * @param int $level - * @return \Monolog\Logger\Logger - */ - public static function defaultLogger($path, $level = Logger::WARNING) - { - $log = new Logger('log'); - $handler = new StreamHandler($path, $level); - $log->pushHandler($handler); - - return $log; - } - /** * @param \Elasticsearch\Connections\ConnectionFactoryInterface $connectionFactory * @return $this */ - public function setConnectionFactory(ConnectionFactoryInterface $connectionFactory) + public function setConnectionFactory(ConnectionFactoryInterface $connectionFactory): ClientBuilder { $this->connectionFactory = $connectionFactory; @@ -243,7 +241,7 @@ public function setConnectionFactory(ConnectionFactoryInterface $connectionFacto * @throws \InvalidArgumentException * @return $this */ - public function setConnectionPool($connectionPool, array $args = []) + public function setConnectionPool($connectionPool, array $args = []): ClientBuilder { if (is_string($connectionPool)) { $this->connectionPool = $connectionPool; @@ -261,7 +259,7 @@ public function setConnectionPool($connectionPool, array $args = []) * @param callable $endpoint * @return $this */ - public function setEndpoint($endpoint) + public function setEndpoint(callable $endpoint): ClientBuilder { $this->endpoint = $endpoint; @@ -272,7 +270,7 @@ public function setEndpoint($endpoint) * @param NamespaceBuilderInterface $namespaceBuilder * @return $this */ - public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder) + public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder): ClientBuilder { $this->registeredNamespacesBuilders[] = $namespaceBuilder; @@ -283,7 +281,7 @@ public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder) * @param \Elasticsearch\Transport $transport * @return $this */ - public function setTransport($transport) + public function setTransport(Transport $transport): ClientBuilder { $this->transport = $transport; @@ -294,7 +292,7 @@ public function setTransport($transport) * @param mixed $handler * @return $this */ - public function setHandler($handler) + public function setHandler($handler): ClientBuilder { $this->handler = $handler; @@ -305,12 +303,8 @@ public function setHandler($handler) * @param \Psr\Log\LoggerInterface $logger * @return $this */ - public function setLogger($logger) + public function setLogger(LoggerInterface $logger): ClientBuilder { - if (!$logger instanceof LoggerInterface) { - throw new InvalidArgumentException('$logger must implement \Psr\Log\LoggerInterface!'); - } - $this->logger = $logger; return $this; @@ -320,12 +314,8 @@ public function setLogger($logger) * @param \Psr\Log\LoggerInterface $tracer * @return $this */ - public function setTracer($tracer) + public function setTracer(LoggerInterface $tracer): ClientBuilder { - if (!$tracer instanceof LoggerInterface) { - throw new InvalidArgumentException('$tracer must implement \Psr\Log\LoggerInterface!'); - } - $this->tracer = $tracer; return $this; @@ -336,7 +326,7 @@ public function setTracer($tracer) * @throws \InvalidArgumentException * @return $this */ - public function setSerializer($serializer) + public function setSerializer($serializer): ClientBuilder { $this->parseStringOrObject($serializer, $this->serializer, 'SerializerInterface'); @@ -358,7 +348,7 @@ public function setHosts($hosts) * @param array $params * @return $this */ - public function setConnectionParams(array $params) + public function setConnectionParams(array $params): ClientBuilder { $this->connectionParams = $params; @@ -369,7 +359,7 @@ public function setConnectionParams(array $params) * @param int $retries * @return $this */ - public function setRetries($retries) + public function setRetries($retries): ClientBuilder { $this->retries = $retries; @@ -381,7 +371,7 @@ public function setRetries($retries) * @throws \InvalidArgumentException * @return $this */ - public function setSelector($selector) + public function setSelector($selector): ClientBuilder { $this->parseStringOrObject($selector, $this->selector, 'SelectorInterface'); @@ -392,7 +382,7 @@ public function setSelector($selector) * @param boolean $sniffOnStart * @return $this */ - public function setSniffOnStart($sniffOnStart) + public function setSniffOnStart(bool $sniffOnStart): ClientBuilder { $this->sniffOnStart = $sniffOnStart; @@ -400,11 +390,11 @@ public function setSniffOnStart($sniffOnStart) } /** - * @param $cert + * @param string $cert The name of a file containing a PEM formatted certificate. * @param null|string $password * @return $this */ - public function setSSLCert($cert, $password = null) + public function setSSLCert(string $cert, string $password = null): ClientBuilder { $this->sslCert = [$cert, $password]; @@ -412,11 +402,11 @@ public function setSSLCert($cert, $password = null) } /** - * @param $key + * @param string $key The name of a file containing a private SSL key. * @param null|string $password * @return $this */ - public function setSSLKey($key, $password = null) + public function setSSLKey(string $key, string $password = null): ClientBuilder { $this->sslKey = [$key, $password]; @@ -427,17 +417,27 @@ public function setSSLKey($key, $password = null) * @param bool|string $value * @return $this */ - public function setSSLVerification($value = true) + public function setSSLVerification($value = true): ClientBuilder { $this->sslVerification = $value; return $this; } + /** + * Set or disable the x-elastic-client-meta header + */ + public function setElasticMetaHeader($value = true): ClientBuilder + { + $this->elasticMetaHeader = $value; + + return $this; + } + /** * @return Client */ - public function build() + public function build(): Client { $this->buildLoggers(); @@ -477,6 +477,8 @@ public function build() $this->serializer = new $this->serializer; } + $this->connectionParams['client']['x-elastic-client-meta'] = $this->elasticMetaHeader; + if (is_null($this->connectionFactory)) { if (is_null($this->connectionParams)) { $this->connectionParams = []; @@ -518,7 +520,11 @@ public function build() $this->endpoint = function ($class) use ($serializer) { $fullPath = '\\Elasticsearch\\Endpoints\\' . $class; - if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MsearchTemplate' || $class === 'MPercolate') { + + $reflection = new ReflectionClass($fullPath); + $constructor = $reflection->getConstructor(); + + if ($constructor && $constructor->getParameters()) { return new $fullPath($serializer); } else { return new $fullPath(); @@ -528,7 +534,7 @@ public function build() $registeredNamespaces = []; foreach ($this->registeredNamespacesBuilders as $builder) { - /** @var $builder NamespaceBuilderInterface */ + /** @var NamespaceBuilderInterface $builder */ $registeredNamespaces[$builder->getName()] = $builder->getObject($this->transport, $this->serializer); } @@ -541,12 +547,12 @@ public function build() * @param Object[] $registeredNamespaces * @return Client */ - protected function instantiate(Transport $transport, callable $endpoint, array $registeredNamespaces) + protected function instantiate(Transport $transport, callable $endpoint, array $registeredNamespaces): Client { return new Client($transport, $endpoint, $registeredNamespaces); } - private function buildLoggers() + private function buildLoggers(): void { if (is_null($this->logger)) { $this->logger = new NullLogger(); @@ -557,7 +563,7 @@ private function buildLoggers() } } - private function buildTransport() + private function buildTransport(): void { $connections = $this->buildConnectionsFromHosts($this->hosts); @@ -582,11 +588,11 @@ private function buildTransport() } if (is_null($this->transport)) { - $this->transport = new Transport($this->retries, $this->sniffOnStart, $this->connectionPool, $this->logger); + $this->transport = new Transport($this->retries, $this->connectionPool, $this->logger, $this->sniffOnStart); } } - private function parseStringOrObject($arg, &$destination, $interface) + private function parseStringOrObject($arg, &$destination, $interface): void { if (is_string($arg)) { $destination = new $arg; @@ -600,7 +606,7 @@ private function parseStringOrObject($arg, &$destination, $interface) /** * @return array */ - private function getDefaultHost() + private function getDefaultHost(): array { return ['localhost:9200']; } @@ -611,7 +617,7 @@ private function getDefaultHost() * @throws \InvalidArgumentException * @return \Elasticsearch\Connections\Connection[] */ - private function buildConnectionsFromHosts($hosts) + private function buildConnectionsFromHosts(array $hosts): array { if (is_array($hosts) === false) { $this->logger->error("Hosts parameter must be an array of strings, or an array of Connection hashes."); @@ -636,10 +642,10 @@ private function buildConnectionsFromHosts($hosts) } /** - * @param $host + * @param array $host * @return array */ - private function normalizeExtendedHost($host) + private function normalizeExtendedHost(array $host): array { if (isset($host['host']) === false) { $this->logger->error("Required 'host' was not defined in extended format: ".print_r($host, true)); @@ -656,17 +662,17 @@ private function normalizeExtendedHost($host) } /** - * @param array $host + * @param string $host * * @throws \InvalidArgumentException * @return array */ - private function extractURIParts($host) + private function extractURIParts(string $host): array { $parts = parse_url($host); if ($parts === false) { - throw new InvalidArgumentException("Could not parse URI"); + throw new InvalidArgumentException(sprintf('Could not parse URI: "%s"', $host)); } if (isset($parts['port']) !== true) { @@ -681,9 +687,9 @@ private function extractURIParts($host) * * @return string */ - private function prependMissingScheme($host) + private function prependMissingScheme(string $host): string { - if (!filter_var($host, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) { + if (!filter_var($host, FILTER_VALIDATE_URL)) { $host = 'http://' . $host; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/EmptyLogger.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/EmptyLogger.php index 89ced833d..19a62a310 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/EmptyLogger.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/EmptyLogger.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class EmptyLogger extends AbstractLogger implements LoggerInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php index 411c70abb..cd557956a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/AlreadyExpiredException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class AlreadyExpiredException extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadMethodCallException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadMethodCallException.php index d8dea6c66..468b93012 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadMethodCallException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadMethodCallException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class BadMethodCallException extends \BadMethodCallException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php index 1c652d78b..ac9ddc5e9 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/BadRequest400Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class BadRequest400Exception extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php index 844bbccaa..4547a34c9 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ClientErrorResponseException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ClientErrorResponseException extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Conflict409Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Conflict409Exception.php index d7f10a47a..1e0aae4a6 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Conflict409Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Conflict409Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Conflict409Exception extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotConnectToHost.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotConnectToHost.php index b1ccc22c9..3ff017b01 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotConnectToHost.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotConnectToHost.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class CouldNotConnectToHost extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotResolveHostException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotResolveHostException.php index 283afdf9d..0a064335d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotResolveHostException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/CouldNotResolveHostException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class CouldNotResolveHostException extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/OperationTimeoutException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/OperationTimeoutException.php index 12c1722f1..b1d75cc27 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/OperationTimeoutException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Curl/OperationTimeoutException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class OperationTimeoutException extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ElasticsearchException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ElasticsearchException.php index a5cab88c5..c16a4d340 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ElasticsearchException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ElasticsearchException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php index 2b84c64bc..718ab1206 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Forbidden403Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Forbidden403Exception extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php index 65e932baf..09cb12b99 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/InvalidArgumentException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class InvalidArgumentException extends \InvalidArgumentException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/MaxRetriesException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/MaxRetriesException.php index 15b28337d..274cea31d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/MaxRetriesException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/MaxRetriesException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class MaxRetriesException extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Missing404Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Missing404Exception.php index 76bc87a8d..d0562599c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Missing404Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Missing404Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Missing404Exception extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php index 75beb9f59..a92cd0349 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoDocumentsToGetException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class NoDocumentsToGetException extends ServerErrorResponseException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php index 63a179327..e9d550c72 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoNodesAvailableException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class NoNodesAvailableException extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php index 71b9a4ade..2d17804ed 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/NoShardAvailableException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class NoShardAvailableException extends ServerErrorResponseException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php index 8b668a88d..6dd61257b 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RequestTimeout408Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class RequestTimeout408Exception extends BadRequest400Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RoutingMissingException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RoutingMissingException.php index efa3cbd90..c9929ccd4 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RoutingMissingException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RoutingMissingException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class RoutingMissingException extends ServerErrorResponseException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RuntimeException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RuntimeException.php index 2fc381a5f..2bfe289f3 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RuntimeException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/RuntimeException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class RuntimeException extends \RuntimeException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php index 255c3a55a..40acee522 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ScriptLangNotSupportedException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ScriptLangNotSupportedException extends BadRequest400Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php index 626d4ae47..f8619c671 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Serializer/JsonErrorException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class JsonErrorException extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php index 9841254e1..6d9836c11 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/ServerErrorResponseException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ServerErrorResponseException extends TransportException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/TransportException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/TransportException.php index 6dce5b482..962b556f5 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/TransportException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/TransportException.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class TransportException extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Unauthorized401Exception.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Unauthorized401Exception.php index eaf695d44..7d87d3f9a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Unauthorized401Exception.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/Unauthorized401Exception.php @@ -1,15 +1,26 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Unauthorized401Exception extends \Exception implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php index 2a63e8088..588cfe01d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Common/Exceptions/UnexpectedValueException.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class UnexpectedValueException extends \UnexpectedValueException implements ElasticsearchException { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/AbstractConnectionPool.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/AbstractConnectionPool.php index 625eaa4a0..e820a9af8 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/AbstractConnectionPool.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/AbstractConnectionPool.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ abstract class AbstractConnectionPool implements ConnectionPoolInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php index d10fc3542..a87c89126 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/ConnectionPoolInterface.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface ConnectionPoolInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php index b544292e3..56b8773a7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RandomSelector.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class RandomSelector implements SelectorInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php index d725d0d20..91c09f84d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/RoundRobinSelector.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class RoundRobinSelector implements SelectorInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php index d29953942..361af6891 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/SelectorInterface.php @@ -1,22 +1,33 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface SelectorInterface { /** * Perform logic to select a single ConnectionInterface instance from the array provided * - * @param \Elasticsearch\Connections\ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from + * @param \Elasticsearch\Connections\ConnectionInterface[] $connections an array of ConnectionInterface instances to choose from * * @return \Elasticsearch\Connections\ConnectionInterface */ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/StickyRoundRobinSelector.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/StickyRoundRobinSelector.php index f44a68ca4..28d75de0a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/StickyRoundRobinSelector.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/Selectors/StickyRoundRobinSelector.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class StickyRoundRobinSelector implements SelectorInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php index f77e8d766..505be4274 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/SimpleConnectionPool.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Connection implements ConnectionInterface { @@ -53,7 +65,7 @@ class Connection implements ConnectionInterface protected $host; /** - * @var string || null + * @var string|null */ protected $path; @@ -90,9 +102,7 @@ class Connection implements ConnectionInterface private $lastRequest = array(); /** - * Constructor - * - * @param $handler + * @param callable $handler * @param array $hostDetails * @param array $connectionParams Array of connection-specific parameters * @param \Elasticsearch\Serializers\SerializerInterface $serializer @@ -107,7 +117,7 @@ public function __construct( LoggerInterface $log, LoggerInterface $trace ) { - + if (isset($hostDetails['port']) !== true) { $hostDetails['port'] = 9200; } @@ -126,6 +136,20 @@ public function __construct( unset($connectionParams['client']['headers']); } + // Add the User-Agent using the format: / (metadata-values) + $this->headers['User-Agent'] = [sprintf( + "elasticsearch-php/%s (%s %s, PHP %s)", + Client::VERSION, + php_uname("s"), + php_uname("r"), + phpversion() + )]; + + // Add x-elastic-client-meta header, if enabled + if (isset($connectionParams['client']['x-elastic-client-meta']) && $connectionParams['client']['x-elastic-client-meta']) { + $this->headers['x-elastic-client-meta'] = [$this->getElasticMetaHeader($connectionParams)]; + } + $host = $hostDetails['host'].':'.$hostDetails['port']; $path = null; if (isset($hostDetails['path']) === true) { @@ -138,13 +162,13 @@ public function __construct( $this->connectionParams = $connectionParams; $this->serializer = $serializer; - $this->handler = $this->wrapHandler($handler, $log, $trace); + $this->handler = $this->wrapHandler($handler); } /** - * @param $method - * @param $uri - * @param null $params + * @param string $method + * @param string $uri + * @param array $params * @param null $body * @param array $options * @param \Elasticsearch\Transport $transport @@ -152,18 +176,21 @@ public function __construct( */ public function performRequest($method, $uri, $params = null, $body = null, $options = [], Transport $transport = null) { - if (isset($body) === true) { + if ($body !== null) { $body = $this->serializer->serialize($body); } + $headers = $this->headers; + if (isset($options['client']['headers']) && is_array($options['client']['headers'])) { + $headers = array_merge($this->headers, $options['client']['headers']); + } + $request = [ 'http_method' => $method, 'scheme' => $this->transportSchema, 'uri' => $this->getURI($uri, $params), 'body' => $body, - 'headers' => array_merge([ - 'Host' => [$this->host] - ], $this->headers) + 'headers' => array_merge(['Host' => [$this->host]], $headers) ]; $request = array_replace_recursive($request, $this->connectionParams, $options); @@ -179,6 +206,12 @@ public function performRequest($method, $uri, $params = null, $body = null, $opt return $future; } + /** @return array */ + public function getHeaders() + { + return $this->headers; + } + /** @return string */ public function getTransportSchema() { @@ -191,15 +224,15 @@ public function getLastRequestInfo() return $this->lastRequest; } - private function wrapHandler(callable $handler, LoggerInterface $logger, LoggerInterface $tracer) + private function wrapHandler(callable $handler) { - return function (array $request, Connection $connection, Transport $transport = null, $options) use ($handler, $logger, $tracer) { + return function (array $request, Connection $connection, Transport $transport = null, $options) use ($handler) { $this->lastRequest = []; $this->lastRequest['request'] = $request; // Send the request using the wrapped handler. - $response = Core::proxy($handler($request), function ($response) use ($connection, $transport, $logger, $tracer, $request, $options) { + $response = Core::proxy($handler($request), function ($response) use ($connection, $transport, $request, $options) { $this->lastRequest['response'] = $response; @@ -308,16 +341,20 @@ private function wrapHandler(callable $handler, LoggerInterface $logger, LoggerI * * @return string */ - private function getURI($uri, $params) + private function getURI(string $uri, ?array $params): string { if (isset($params) === true && !empty($params)) { - array_walk($params, function (&$value, &$key) { - if ($value === true) { - $value = 'true'; - } elseif ($value === false) { - $value = 'false'; - } - }); + $params = array_map( + function ($value) { + if ($value === true) { + return 'true'; + } elseif ($value === false) { + return 'false'; + } + return $value; + }, + $params + ); $uri .= '?' . http_build_query($params); } @@ -326,7 +363,7 @@ private function getURI($uri, $params) $uri = $this->path . $uri; } - return $uri; + return $uri ?? ''; } /** @@ -382,7 +419,7 @@ public function logRequestSuccess($method, $fullURI, $body, $headers, $statusCod * @param null|string $statusCode * @param null|string $response * @param string $duration - * @param \Exception|null $exception + * @param \Exception $exception * * @return void */ @@ -530,8 +567,8 @@ public function getPath() } /** - * @param $request - * @param $response + * @param array $request + * @param array $response * @return \Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost|\Elasticsearch\Common\Exceptions\Curl\CouldNotResolveHostException|\Elasticsearch\Common\Exceptions\Curl\OperationTimeoutException|\Elasticsearch\Common\Exceptions\MaxRetriesException */ protected function getCurlRetryException($request, $response) @@ -541,13 +578,13 @@ protected function getCurlRetryException($request, $response) $exception = new MaxRetriesException($message); switch ($response['curl']['errno']) { case 6: - $exception = new CouldNotResolveHostException($message, null, $exception); + $exception = new CouldNotResolveHostException($message, 0, $exception); break; case 7: - $exception = new CouldNotConnectToHost($message, null, $exception); + $exception = new CouldNotConnectToHost($message, 0, $exception); break; case 28: - $exception = new OperationTimeoutException($message, null, $exception); + $exception = new OperationTimeoutException($message, 0, $exception); break; } @@ -563,7 +600,7 @@ protected function getCurlRetryException($request, $response) * * @return string */ - private function buildCurlCommand($method, $uri, $body) + private function buildCurlCommand(string $method, string $uri, ?string $body): string { if (strpos($uri, '?') === false) { $uri .= '?pretty=true'; @@ -582,10 +619,10 @@ private function buildCurlCommand($method, $uri, $body) } /** - * @param $request - * @param $response - * @param $ignore - * @throws \Elasticsearch\Common\Exceptions\AlreadyExpiredException|\Elasticsearch\Common\Exceptions\BadRequest400Exception|\Elasticsearch\Common\Exceptions\Conflict409Exception|\Elasticsearch\Common\Exceptions\Forbidden403Exception|\Elasticsearch\Common\Exceptions\Missing404Exception|\Elasticsearch\Common\Exceptions\ScriptLangNotSupportedException|null + * @param array $request + * @param array $response + * @param array $ignore + * @throws \Elasticsearch\Common\Exceptions\AlreadyExpiredException|\Elasticsearch\Common\Exceptions\BadRequest400Exception|\Elasticsearch\Common\Exceptions\Conflict409Exception|\Elasticsearch\Common\Exceptions\Forbidden403Exception|\Elasticsearch\Common\Exceptions\Missing404Exception|\Elasticsearch\Common\Exceptions\ScriptLangNotSupportedException */ private function process4xxError($request, $response, $ignore) { @@ -599,6 +636,11 @@ private function process4xxError($request, $response, $ignore) return; } + // if responseBody is not string, we convert it so it can be used as Exception message + if (!is_string($responseBody)) { + $responseBody = json_encode($responseBody); + } + if ($statusCode === 400 && strpos($responseBody, "AlreadyExpiredException") !== false) { $exception = new AlreadyExpiredException($responseBody, $statusCode); } elseif ($statusCode === 403) { @@ -630,9 +672,9 @@ private function process4xxError($request, $response, $ignore) } /** - * @param $request - * @param $response - * @param $ignore + * @param array $request + * @param array $response + * @param array $ignore * @throws \Elasticsearch\Common\Exceptions\NoDocumentsToGetException|\Elasticsearch\Common\Exceptions\NoShardAvailableException|\Elasticsearch\Common\Exceptions\RoutingMissingException|\Elasticsearch\Common\Exceptions\ServerErrorResponseException */ private function process5xxError($request, $response, $ignore) @@ -716,7 +758,37 @@ private function tryDeserializeError($response, $errorClass) return new $errorClass($response['body'], $response['status']); } + // if responseBody is not string, we convert it so it can be used as Exception message + $responseBody = $response['body']; + if (!is_string($responseBody)) { + $responseBody = json_encode($responseBody); + } + // <2.0 "i just blew up" nonstructured exception - return new $errorClass($response['body']); + return new $errorClass($responseBody); + } + + /** + * Get the x-elastic-client-meta header + */ + private function getElasticMetaHeader(array $connectionParams): string + { + $phpSemVersion = sprintf("%d.%d.%d", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION); + // Reduce the size in case of '-snapshot' version (using 'p' as pre-release) + $clientVersion = str_replace('-snapshot', '-p', strtolower(Client::VERSION)); + $clientMeta = sprintf( + "es=%s,php=%s,t=%s,a=%d", + $clientVersion, + $phpSemVersion, + $clientVersion, + isset($connectionParams['client']['future']) && $connectionParams['client']['future'] === 'lazy' ? 1 : 0 + ); + if (function_exists('curl_version')) { + $curlVersion = curl_version(); + if (isset($curlVersion['version'])) { + $clientMeta .= sprintf(",cu=%s", $curlVersion['version']); // cu = curl library + } + } + return $clientMeta; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactory.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactory.php index 88d6dc938..851be17e7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactory.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactory.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ConnectionFactory implements ConnectionFactoryInterface { @@ -49,7 +60,7 @@ public function __construct(callable $handler, array $connectionParams, Serializ $this->serializer = $serializer; } /** - * @param $hostDetails + * @param array $hostDetails * * @return ConnectionInterface */ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactoryInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactoryInterface.php index 94b628a71..e8ffa3eff 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactoryInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionFactoryInterface.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface ConnectionFactoryInterface { /** - * @param $handler + * @param callable $handler * @param array $connectionParams * @param SerializerInterface $serializer * @param LoggerInterface $logger @@ -32,7 +43,7 @@ public function __construct( ); /** - * @param $hostDetails + * @param array $hostDetails * * @return ConnectionInterface */ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionInterface.php index 8f675b246..a54de1e5f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionInterface.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface ConnectionInterface { /** - * Constructor - * - * @param $handler + * @param callable $handler * @param array $hostDetails * @param array $connectionParams connection-specific parameters * @param \Elasticsearch\Serializers\SerializerInterface $serializer @@ -93,9 +102,9 @@ public function markDead(); public function getLastRequestInfo(); /** - * @param $method - * @param $uri - * @param null $params + * @param string $method + * @param string $uri + * @param array $params * @param null $body * @param array $options * @param \Elasticsearch\Transport $transport @@ -103,6 +112,6 @@ public function getLastRequestInfo(); */ // @codingStandardsIgnoreStart // "Arguments with default values must be at the end of the argument list" - cannot change the interface - public function performRequest($method, $uri, $params = null, $body = null, $options = [], Transport $transport); + public function performRequest(string $method, string $uri, ?array $params = [], $body = null, array $options = [], Transport $transport = null); // @codingStandardsIgnoreEnd } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/AbstractEndpoint.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/AbstractEndpoint.php index 3330705bd..a97788efe 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/AbstractEndpoint.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/AbstractEndpoint.php @@ -1,12 +1,23 @@ extractOptions($params); $this->checkUserParams($params); $params = $this->convertCustom($params); - $this->extractOptions($params); $this->params = $this->convertArraysToStrings($params); return $this; @@ -164,6 +175,10 @@ public function setID($docID) return $this; } + if (is_int($docID)) { + $docID = (string) $docID; + } + $this->id = urlencode($docID); return $this; @@ -222,13 +237,13 @@ private function getOptionalType() * * @throws \Elasticsearch\Common\Exceptions\UnexpectedValueException */ - private function checkUserParams($params) + private function checkUserParams(array $params) { - if (isset($params) !== true) { + if (empty($params)) { return; //no params, just return. } - $whitelist = array_merge($this->getParamWhitelist(), array('client', 'custom', 'filter_path', 'human')); + $whitelist = array_merge($this->getParamWhitelist(), array('client', 'custom', 'filter_path', 'human', 'opaqueId')); $invalid = array_diff(array_keys($params), $whitelist); if (count($invalid) > 0) { @@ -243,12 +258,21 @@ private function checkUserParams($params) } /** - * @param $params Note: this is passed by-reference! + * @param array $params Note: this is passed by-reference! */ private function extractOptions(&$params) { // Extract out client options, then start transforming if (isset($params['client']) === true) { + // Check if the opaqueId is populated and add the header + if (isset($params['client']['opaqueId']) === true) { + if (isset($params['client']['headers']) === false) { + $params['client']['headers'] = []; + } + $params['client']['headers']['x-opaque-id'] = [trim($params['client']['opaqueId'])]; + unset($params['client']['opaqueId']); + } + $this->options['client'] = $params['client']; unset($params['client']); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php index 3bc15bc4e..935eb0c50 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php @@ -1,83 +1,95 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Bulk extends AbstractEndpoint implements BulkEndpointInterface { - /** - * @param SerializerInterface $serializer - */ + public function __construct(SerializerInterface $serializer) { $this->serializer = $serializer; } - /** - * @param string|array|\Traversable $body - * - * @return $this - */ - public function setBody($body) + public function getURI(): string { - if (empty($body)) { - return $this; - } + $index = $this->index ?? null; + $type = $this->type ?? null; - if (is_array($body) === true || $body instanceof \Traversable) { - foreach ($body as $item) { - $this->body .= $this->serializer->serialize($item) . "\n"; - } - } else { - $this->body = $body; + if (isset($index) && isset($type)) { + return "/$index/$type/_bulk"; } - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - return $this->getOptionalURI('_bulk'); + if (isset($index)) { + return "/$index/_bulk"; + } + return "/_bulk"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'consistency', + return [ + 'wait_for_active_shards', 'refresh', - 'replication', + 'routing', + 'timeout', 'type', 'fields', - 'pipeline', '_source', - '_source_include', - '_source_exclude', + '_source_excludes', + '_source_includes', 'pipeline' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setBody($body): Bulk + { + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; + } + } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/BulkEndpointInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/BulkEndpointInterface.php index c7da25451..f59eb9fa9 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/BulkEndpointInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/BulkEndpointInterface.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface BulkEndpointInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Aliases.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Aliases.php index 4fbebccdd..53bfb0df2 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Aliases.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Aliases.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Aliases extends AbstractEndpoint { - // A comma-separated list of alias names to return - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; + protected $name; - return $this; - } - - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $name = $this->name; - $uri = "/_cat/aliases"; + $name = $this->name ?? null; - if (isset($name) === true) { - $uri = "/_cat/aliases/$name"; + if (isset($name)) { + return "/_cat/aliases/$name"; } - - return $uri; + return "/_cat/aliases"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', - 'format', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setName($name): Aliases + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Allocation.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Allocation.php index 3084385d9..a8a24fd5f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Allocation.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Allocation.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Allocation extends AbstractEndpoint { - // A comma-separated list of node IDs or names to limit the returned information - private $node_id; - - /** - * @param $node_id - * - * @return $this - */ - public function setNodeId($node_id) - { - if (isset($node_id) !== true) { - return $this; - } - - $this->node_id = $node_id; - - return $this; - } + protected $node_id; - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $node_id = $this->node_id; - $uri = "/_cat/allocation"; + $node_id = $this->node_id ?? null; - if (isset($node_id) === true) { - $uri = "/_cat/allocation/$node_id"; + if (isset($node_id)) { + return "/_cat/allocation/$node_id"; } - - return $uri; + return "/_cat/allocation"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'bytes', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setNodeId($node_id): Allocation + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Count.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Count.php index de64d3f02..658ad28a0 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Count.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Count.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Count extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cat/count"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cat/count/$index"; + if (isset($index)) { + return "/_cat/count/$index"; } - - return $uri; + return "/_cat/count"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Fielddata.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Fielddata.php index 61a2303e8..b626bbb4a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Fielddata.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Fielddata.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Fielddata extends AbstractEndpoint { - private $fields; - - /** - * @param $fields - * - * @return $this - */ - public function setFields($fields) - { - if (isset($fields) !== true) { - return $this; - } - - $this->fields = $fields; + protected $fields; - return $this; - } - - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $fields = $this->fields; - $uri = "/_cat/fielddata"; + $fields = $this->fields ?? null; - if (isset($fields) === true) { - $uri = "/_cat/fielddata/$fields"; + if (isset($fields)) { + return "/_cat/fielddata/$fields"; } - - return $uri; + return "/_cat/fielddata"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', + 'bytes', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v', + 'fields' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setFields($fields): Fielddata + { + if (isset($fields) !== true) { + return $this; + } + if (is_array($fields) === true) { + $fields = implode(",", $fields); + } + $this->fields = $fields; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Health.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Health.php index 1dbb5192a..d9e3e8604 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Health.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Health.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Health extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/health"; - return $uri; + return "/_cat/health"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'ts', - 'v', 's', - 'format', - ); + 'ts', + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Help.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Help.php index 945db52a4..11a1309c9 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Help.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Help.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Help extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat"; - return $uri; + return "/_cat"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'help', - 's', - 'format', - ); + 's' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Indices.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Indices.php index 595f5aa31..f57fd3abc 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Indices.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Indices.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ - class Indices extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cat/indices"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cat/indices/$index"; + if (isset($index)) { + return "/_cat/indices/$index"; } - - return $uri; + return "/_cat/indices"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'bytes', 'local', 'master_timeout', 'h', + 'health', 'help', 'pri', - 'v', - 'health', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Master.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Master.php index 4fdec3d23..c4c0e36d1 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Master.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Master.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Master extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/master"; - return $uri; + return "/_cat/master"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php index e8e773c33..22d569813 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class NodeAttrs extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/nodeattrs"; - return $uri; + return "/_cat/nodeattrs"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Nodes.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Nodes.php index 4c2b565c5..9eaa515cb 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Nodes.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Nodes.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Nodes extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/nodes"; - return $uri; + return "/_cat/nodes"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', + 'full_id', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'full_id', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/PendingTasks.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/PendingTasks.php index 0cc9519d1..0bbac1aba 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/PendingTasks.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/PendingTasks.php @@ -1,50 +1,53 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class PendingTasks extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/pending_tasks"; - return $uri; + return "/_cat/pending_tasks"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Plugins.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Plugins.php index 39b9b7e5a..1096c167f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Plugins.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Plugins.php @@ -1,50 +1,53 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Plugins extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/plugins"; - return $uri; + return "/_cat/plugins"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Recovery.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Recovery.php index 1acf6c5d4..d17d74550 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Recovery.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Recovery.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Recovery extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cat/recovery"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cat/recovery/$index"; + if (isset($index)) { + return "/_cat/recovery/$index"; } - - return $uri; + return "/_cat/recovery"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'bytes', - 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Repositories.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Repositories.php index 43cc12108..c2887cbf3 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Repositories.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Repositories.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Repositories extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cat/repositories"; - return $uri; + return "/_cat/repositories"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Segments.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Segments.php index ef969fb5c..e9b3415be 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Segments.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Segments.php @@ -1,62 +1,56 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ - class Segments extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cat/segments"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cat/segments/$index"; + if (isset($index)) { + return "/_cat/segments/$index"; } - - return $uri; + return "/_cat/segments"; } - - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', + 'bytes', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Shards.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Shards.php index 78d8f3343..bdd936da0 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Shards.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Shards.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Shards extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cat/shards"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cat/shards/$index"; + if (isset($index)) { + return "/_cat/shards/$index"; } - - return $uri; + return "/_cat/shards"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', 'bytes', 'local', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Snapshots.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Snapshots.php index 75de7725f..da2472b86 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Snapshots.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Snapshots.php @@ -1,73 +1,72 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Snapshots extends AbstractEndpoint { - private $repository; + protected $repository; - /** - * @param $fields - * - * @return $this - */ - public function setRepository($repository) + public function getURI(): string { - if (isset($repository) !== true) { - return $this; - } + $repository = $this->repository ?? null; - $this->repository = $repository; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $repository = $this->repository; - if (isset($this->repository) === true) { - return "/_cat/snapshots/$repository/"; + if (isset($repository)) { + return "/_cat/snapshots/$repository"; } - - return "/_cat/snapshots/"; + return "/_cat/snapshots"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'local', + return [ + 'format', + 'ignore_unavailable', 'master_timeout', 'h', 'help', - 'v', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setRepository($repository): Snapshots + { + if (isset($repository) !== true) { + return $this; + } + if (is_array($repository) === true) { + $repository = implode(",", $repository); + } + $this->repository = $repository; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Tasks.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Tasks.php index 92cc03353..76d0a1634 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Tasks.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Tasks.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Tasks extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { + return "/_cat/tasks"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'format', 'node_id', 'actions', 'detailed', - 'parent_node', 'parent_task', 'h', 'help', - 'v', - 's' - ); + 's', + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Templates.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Templates.php index aee9e61fb..f8c057dfe 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Templates.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/Templates.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Templates extends AbstractEndpoint { - private $name; + protected $name; - /** - * @param string $name - * @return Templates - */ - public function setName($name) + public function getURI(): string { - $this->name = $name; - return $this; - } + $name = $this->name ?? null; - /** - * @return string - */ - public function getURI() - { - if (isset($this->name)) { - return "/_cat/templates/{$this->name}"; - } else { - return "/_cat/templates"; + if (isset($name)) { + return "/_cat/templates/$name"; } + return "/_cat/templates"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'format', - 'node_id', - 'actions', - 'detailed', - 'parent_node', - 'parent_task', + 'local', + 'master_timeout', 'h', 'help', - 'v', 's', - 'local', - 'master_timeout', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setName($name): Templates + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/ThreadPool.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/ThreadPool.php index e0f0e8d77..87a28372c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/ThreadPool.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cat/ThreadPool.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ - class ThreadPool extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + protected $thread_pool_patterns; + + public function getURI(): string { - $uri = "/_cat/thread_pool"; + $thread_pool_patterns = $this->thread_pool_patterns ?? null; - return $uri; + if (isset($thread_pool_patterns)) { + return "/_cat/thread_pool/$thread_pool_patterns"; + } + return "/_cat/thread_pool"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'format', + 'size', 'local', 'master_timeout', 'h', 'help', - 'v', - 'full_id', - 'size', - 'thread_pool_patterns', 's', - 'format', - ); + 'v' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setThreadPoolPatterns($thread_pool_patterns): ThreadPool + { + if (isset($thread_pool_patterns) !== true) { + return $this; + } + if (is_array($thread_pool_patterns) === true) { + $thread_pool_patterns = implode(",", $thread_pool_patterns); + } + $this->thread_pool_patterns = $thread_pool_patterns; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php new file mode 100644 index 000000000..a327dde9d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php @@ -0,0 +1,64 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Delete_auto_follow_pattern' + ); + } + $name = $this->name; + + return "/_ccr/auto_follow/$name"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): DeleteAutoFollowPattern + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Follow.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Follow.php new file mode 100644 index 000000000..aa2215941 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Follow.php @@ -0,0 +1,65 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Follow' + ); + } + $index = $this->index; + + return "/$index/_ccr/follow"; + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_active_shards' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): Follow + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php new file mode 100644 index 000000000..3c5ed846d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php @@ -0,0 +1,51 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_ccr/info"; + } + throw new RuntimeException('Missing parameter for the endpoint ccr.follow_info'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowStats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowStats.php new file mode 100644 index 000000000..395596126 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/FollowStats.php @@ -0,0 +1,51 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_ccr/stats"; + } + throw new RuntimeException('Missing parameter for the endpoint ccr.follow_stats'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php new file mode 100644 index 000000000..4a564a785 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php @@ -0,0 +1,63 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Forget_follower' + ); + } + $index = $this->index; + + return "/$index/_ccr/forget_follower"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): ForgetFollower + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php new file mode 100644 index 000000000..65feea9ea --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php @@ -0,0 +1,61 @@ +name ?? null; + + if (isset($name)) { + return "/_ccr/auto_follow/$name"; + } + return "/_ccr/auto_follow"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetAutoFollowPattern + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php new file mode 100644 index 000000000..7b8494d92 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php @@ -0,0 +1,53 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Pause_follow' + ); + } + $index = $this->index; + + return "/$index/_ccr/pause_follow"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php new file mode 100644 index 000000000..d32bf9e09 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php @@ -0,0 +1,74 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Put_auto_follow_pattern' + ); + } + $name = $this->name; + + return "/_ccr/auto_follow/$name"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutAutoFollowPattern + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): PutAutoFollowPattern + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php new file mode 100644 index 000000000..63f7e0ef6 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php @@ -0,0 +1,63 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Resume_follow' + ); + } + $index = $this->index; + + return "/$index/_ccr/resume_follow"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): ResumeFollow + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Stats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Stats.php new file mode 100644 index 000000000..00d55d297 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ccr/Stats.php @@ -0,0 +1,46 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Unfollow' + ); + } + $index = $this->index; + + return "/$index/_ccr/unfollow"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ClearScroll.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ClearScroll.php index 68466a7f3..13cafdb83 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ClearScroll.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ClearScroll.php @@ -1,93 +1,76 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ClearScroll extends AbstractEndpoint { - // A comma-separated list of scroll IDs to clear - private $scrollId; + protected $scroll_id; - /** - * @param $scroll_id - * - * @return $this - */ - public function setScrollId($scrollId) + public function getURI(): string { - if (isset($scrollId) !== true) { - return $this; - } + $scroll_id = $this->scroll_id ?? null; - $this->scrollId = $scrollId; + if (isset($scroll_id)) { + return "/_search/scroll/$scroll_id"; + } + return "/_search/scroll"; + } - return $this; + public function getParamWhitelist(): array + { + return [ + + ]; } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getMethod(): string { - return "/_search/scroll/"; + return 'DELETE'; } - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function setBody($body): ClearScroll { if (isset($body) !== true) { return $this; } - $this->body = $body; return $this; } - /** - * @return array - */ - public function getBody() + public function setScrollId($scroll_id): ClearScroll { - if (isset($this->body)) { - return $this->body; + if (isset($scroll_id) !== true) { + return $this; } - if (is_array($this->scrollId)) { - return ['scroll_id' => $this->scrollId]; + if (is_array($scroll_id) === true) { + $scroll_id = implode(",", $scroll_id); } - return ['scroll_id' => [$this->scrollId]]; - } + $this->scroll_id = $scroll_id; - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php index 25014bf02..90950d693 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class AllocationExplain extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getURI(): string { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - return $this; + return "/_cluster/allocation/explain"; } - /** - * @return string - */ - public function getURI() + public function getParamWhitelist(): array { - return "/_cluster/allocation/explain"; + return [ + 'include_yes_decisions', + 'include_disk_info' + ]; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getMethod(): string { - return array( - 'include_yes_decisions', - 'include_disk_info', - ); + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): AllocationExplain { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/GetSettings.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/GetSettings.php new file mode 100644 index 000000000..7694cbc67 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/GetSettings.php @@ -0,0 +1,51 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Health extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cluster/health"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/_cluster/health/$index"; + if (isset($index)) { + return "/_cluster/health/$index"; } - - return $uri; + return "/_cluster/health"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_nodes', - 'wait_for_relocating_shards', - 'wait_for_status', 'wait_for_events', - 'wait_for_no_relocating_shards' - ); + 'wait_for_no_relocating_shards', + 'wait_for_no_initializing_shards', + 'wait_for_status' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/AbstractNodesEndpoint.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/AbstractNodesEndpoint.php deleted file mode 100644 index 3b817b1a3..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/AbstractNodesEndpoint.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -abstract class AbstractNodesEndpoint extends AbstractEndpoint -{ - /** @var string A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes */ - protected $nodeID; - - /** - * @param $nodeID - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * - * @return $this - */ - public function setNodeID($nodeID) - { - if (isset($nodeID) !== true) { - return $this; - } - - if (!(is_array($nodeID) === true || is_string($nodeID) === true)) { - throw new InvalidArgumentException("invalid node_id"); - } - - if (is_array($nodeID) === true) { - $nodeID = implode(',', $nodeID); - } - - $this->nodeID = $nodeID; - - return $this; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/HotThreads.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/HotThreads.php deleted file mode 100644 index eeb4a96ac..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/HotThreads.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class HotThreads extends AbstractNodesEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $node_id = $this->nodeID; - $uri = "/_cluster/nodes/hotthreads"; - - if (isset($node_id) === true) { - $uri = "/_cluster/nodes/$node_id/hotthreads"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'interval', - 'snapshots', - 'threads', - 'type', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Info.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Info.php deleted file mode 100644 index bde5305b4..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Info.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Info extends AbstractNodesEndpoint -{ - // A comma-separated list of metrics you wish returned. Leave empty to return all. - private $metric; - - /** - * @param $metric - * - * @return $this - */ - public function setMetric($metric) - { - if (isset($metric) !== true) { - return $this; - } - - if (is_array($metric) === true) { - $metric = implode(",", $metric); - } - - $this->metric = $metric; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $node_id = $this->nodeID; - $metric = $this->metric; - $uri = "/_nodes"; - - if (isset($node_id) === true && isset($metric) === true) { - $uri = "/_nodes/$node_id/$metric"; - } elseif (isset($metric) === true) { - $uri = "/_nodes/$metric"; - } elseif (isset($node_id) === true) { - $uri = "/_nodes/$node_id"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'flat_settings', - 'human', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php deleted file mode 100644 index 6b7a6f2c8..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Shutdown extends AbstractNodesEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $node_id = $this->nodeID; - $uri = "/_shutdown"; - - if (isset($node_id) === true) { - $uri = "/_cluster/nodes/$node_id/_shutdown"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'delay', - 'exit', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Stats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Stats.php deleted file mode 100644 index 94dd6cf34..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Nodes/Stats.php +++ /dev/null @@ -1,111 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Stats extends AbstractNodesEndpoint -{ - // Limit the information returned to the specified metrics - private $metric; - - // Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. - private $indexMetric; - - /** - * @param $metric - * - * @return $this - */ - public function setMetric($metric) - { - if (isset($metric) !== true) { - return $this; - } - - if (is_array($metric) === true) { - $metric = implode(",", $metric); - } - - $this->metric = $metric; - - return $this; - } - - /** - * @param $indexMetric - * - * @return $this - */ - public function setIndexMetric($indexMetric) - { - if (isset($indexMetric) !== true) { - return $this; - } - - if (is_array($indexMetric) === true) { - $indexMetric = implode(",", $indexMetric); - } - - $this->indexMetric = $indexMetric; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $metric = $this->metric; - $index_metric = $this->indexMetric; - $node_id = $this->nodeID; - $uri = "/_nodes/stats"; - - if (isset($node_id) === true && isset($metric) === true && isset($index_metric) === true) { - $uri = "/_nodes/$node_id/stats/$metric/$index_metric"; - } elseif (isset($metric) === true && isset($index_metric) === true) { - $uri = "/_nodes/stats/$metric/$index_metric"; - } elseif (isset($node_id) === true && isset($metric) === true) { - $uri = "/_nodes/$node_id/stats/$metric"; - } elseif (isset($metric) === true) { - $uri = "/_nodes/stats/$metric"; - } elseif (isset($node_id) === true) { - $uri = "/_nodes/$node_id/stats"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'completion_fields', - 'fielddata_fields', - 'fields', - 'groups', - 'human', - 'level', - 'types', - 'include_segment_file_sizes', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php index 3ceac3a07..52d285a9e 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php @@ -1,45 +1,48 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class PendingTasks extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/_cluster/pending_tasks"; - return $uri; + return "/_cluster/pending_tasks"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'local', - 'master_timeout', - ); + 'master_timeout' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PutSettings.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PutSettings.php new file mode 100644 index 000000000..9c6b6fb1e --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/PutSettings.php @@ -0,0 +1,60 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php index bd2632e19..e36850cb6 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php @@ -1,40 +1,47 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class RemoteInfo extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { + return "/_remote/info"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return []; + return [ + + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Reroute.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Reroute.php index 411305399..f14c91164 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Reroute.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Reroute.php @@ -1,68 +1,63 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Reroute extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $uri = "/_cluster/reroute"; - return $uri; + return "/_cluster/reroute"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'dry_run', - 'filter_metadata', - 'master_timeout', - 'timeout', 'explain', - 'metric' - ); + 'retry_failed', + 'metric', + 'master_timeout', + 'timeout' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setBody($body): Reroute + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Get.php deleted file mode 100644 index fda615eb5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Get.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ - -class Get extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $uri = "/_cluster/settings"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'flat_settings', - 'master_timeout', - 'timeout', - 'include_defaults' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Put.php deleted file mode 100644 index 522e7b1d9..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Settings/Put.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $uri = "/_cluster/settings"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'flat_settings', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/State.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/State.php index 94af3b19d..ee513fa49 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/State.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/State.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class State extends AbstractEndpoint { - // Limit the information returned to the specified metrics - private $metric; + protected $metric; - /** - * @param $metric - * - * @return $this - */ - public function setMetric($metric) + public function getURI(): string { - if (isset($metric) !== true) { - return $this; - } + $index = $this->index ?? null; + $metric = $this->metric ?? null; - if (is_array($metric) === true) { - $metric = implode(",", $metric); + if (isset($metric) && isset($index)) { + return "/_cluster/state/$metric/$index"; } - - $this->metric = $metric; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $metric = $this->metric; - $uri = "/_cluster/state"; - - if (isset($metric) === true && isset($index) === true) { - $uri = "/_cluster/state/$metric/$index"; - } elseif (isset($metric) === true) { - $uri = "/_cluster/state/$metric"; + if (isset($metric)) { + return "/_cluster/state/$metric"; } - - return $uri; + return "/_cluster/state"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'local', 'master_timeout', 'flat_settings', - 'index_templates', - 'expand_wildcards', + 'wait_for_metadata_version', + 'wait_for_timeout', 'ignore_unavailable', - 'allow_no_indices' - ); + 'allow_no_indices', + 'expand_wildcards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setMetric($metric): State + { + if (isset($metric) !== true) { + return $this; + } + if (is_array($metric) === true) { + $metric = implode(",", $metric); + } + $this->metric = $metric; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Stats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Stats.php index 729b611f3..7f8abd765 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Stats.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Cluster/Stats.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Stats extends AbstractEndpoint { - // A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - private $nodeID; - - /** - * @param $node_id - * - * @return $this - */ - public function setNodeID($node_id) - { - if (isset($node_id) !== true) { - return $this; - } - - $this->nodeID = $node_id; - - return $this; - } + protected $node_id; - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $node_id = $this->nodeID; - $uri = "/_cluster/stats"; + $node_id = $this->node_id ?? null; - if (isset($node_id) === true) { - $uri = "/_cluster/stats/nodes/$node_id"; + if (isset($node_id)) { + return "/_cluster/stats/nodes/$node_id"; } - - return $uri; + return "/_cluster/stats"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'flat_settings', - 'human', - ); + 'timeout' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setNodeId($node_id): Stats + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Count.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Count.php index 67db3f199..e220d9752 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Count.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Count.php @@ -1,87 +1,79 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Count extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_count"; + $index = $this->index ?? null; + $type = $this->type ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_count"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_count"; - } elseif (isset($index) === true) { - $uri = "/$index/_count"; + if (isset($index) && isset($type)) { + return "/$index/$type/_count"; } - - return $uri; + if (isset($index)) { + return "/$index/_count"; + } + return "/_count"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'ignore_unavailable', + 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'min_score', 'preference', 'routing', - 'source', 'q', - 'df', - 'default_operator', 'analyzer', - 'lowercase_expanded_terms', 'analyze_wildcard', + 'default_operator', + 'df', 'lenient', - 'lowercase_expanded_terms', 'terminate_after' - ); + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Count { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/CountPercolate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/CountPercolate.php deleted file mode 100644 index f87d6b5e5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/CountPercolate.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class CountPercolate extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for CountPercolate' - ); - } - - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for CountPercolate' - ); - } - - $index = $this->index; - $type = $this->type; - $id = $this->id; - $uri = "/$index/$type/_percolate/count"; - - if (isset($id) === true) { - $uri = "/$index/$type/$id/_percolate/count"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'routing', - 'preference', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'percolate_index', - 'percolate_type', - 'version', - 'version_type' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Create.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Create.php index bbecabeb5..409453d59 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Create.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Create.php @@ -1,107 +1,84 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Create extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { + if (isset($this->id) !== true) { + throw new RuntimeException( + 'id is required for Create' + ); + } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Create' ); } - + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Create' ); } + $type = $this->type; - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for Create' - ); - } - - $id = $this->id; - $index = $this->index; - $type = $this->type; return "/$index/$type/$id/_create"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'consistency', - 'op_type', + return [ + 'wait_for_active_shards', 'parent', - 'percolate', 'refresh', - 'replication', 'routing', 'timeout', - 'timestamp', - 'ttl', 'version', 'version_type', 'pipeline' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'PUT'; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function setBody($body): Create { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Document body must be set for create request'); - } else { - return $this->body; + if (isset($body) !== true) { + return $this; } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Delete.php index 3f51baead..026b176f6 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Delete.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Delete.php @@ -1,74 +1,74 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Delete extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'id is required for Delete' ); } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Delete' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Delete' ); } - $id = $this->id; - $index = $this->index; $type = $this->type; - $uri = "/$index/$type/$id"; - - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id"; - } - return $uri; + return "/$index/$type/$id"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'consistency', + return [ + 'wait_for_active_shards', 'parent', 'refresh', - 'replication', 'routing', 'timeout', + 'if_seq_no', + 'if_primary_term', 'version', - 'version_type', - ); + 'version_type' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'DELETE'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQuery.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQuery.php index 182658951..66f94c9aa 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQuery.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQuery.php @@ -1,103 +1,100 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class DeleteByQuery extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { - if (!$this->index) { - throw new Exceptions\RuntimeException( - 'index is required for Deletebyquery' + if (isset($this->index) !== true) { + throw new RuntimeException( + 'index is required for Delete_by_query' ); } + $index = $this->index; + $type = $this->type ?? null; - $uri = "/{$this->index}/_delete_by_query"; - if ($this->type) { - $uri = "/{$this->index}/{$this->type}/_delete_by_query"; + if (isset($type)) { + return "/$index/$type/_delete_by_query"; } - - return $uri; + return "/$index/_delete_by_query"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - '_source', - '_source_exclude', - '_source_include', - 'allow_no_indices', - 'analyze_wildcard', + return [ 'analyzer', - 'conflicts', + 'analyze_wildcard', 'default_operator', 'df', - 'expand_wildcards', 'from', 'ignore_unavailable', + 'allow_no_indices', + 'conflicts', + 'expand_wildcards', 'lenient', 'preference', - 'query', - 'refresh', - 'request_cache', - 'requests_per_second', + 'q', 'routing', 'scroll', - 'scroll_size', - 'search_timeout', 'search_type', + 'search_timeout', 'size', - 'slices', 'sort', - 'stats', + '_source', + '_source_excludes', + '_source_includes', 'terminate_after', - 'timeout', + 'stats', 'version', + 'request_cache', + 'refresh', + 'timeout', 'wait_for_active_shards', + 'scroll_size', 'wait_for_completion', - ); + 'requests_per_second', + 'slices' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setBody($body): DeleteByQuery + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php new file mode 100644 index 000000000..ac5754d0c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php @@ -0,0 +1,66 @@ +task_id) !== true) { + throw new RuntimeException( + 'task_id is required for Delete_by_query_rethrottle' + ); + } + $task_id = $this->task_id; + + return "/_delete_by_query/$task_id/_rethrottle"; + } + + public function getParamWhitelist(): array + { + return [ + 'requests_per_second' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setTaskId($task_id): DeleteByQueryRethrottle + { + if (isset($task_id) !== true) { + return $this; + } + $this->task_id = $task_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteScript.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteScript.php new file mode 100644 index 000000000..0785c24da --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/DeleteScript.php @@ -0,0 +1,56 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Delete_script' + ); + } + $id = $this->id; + + return "/_scripts/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Exists.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Exists.php index a9333d5dc..fe574c661 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Exists.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Exists.php @@ -1,73 +1,76 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Exists extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'id is required for Exists' ); } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Exists' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Exists' ); } - $id = $this->id; - $index = $this->index; $type = $this->type; - $uri = "/$index/$type/$id"; - - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id"; - } - return $uri; + return "/$index/$type/$id"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'stored_fields', 'parent', 'preference', 'realtime', 'refresh', 'routing', + '_source', + '_source_excludes', + '_source_includes', 'version', - 'stored_fields' - ); + 'version_type' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'HEAD'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ExistsSource.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ExistsSource.php new file mode 100644 index 000000000..19cc9dcc5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ExistsSource.php @@ -0,0 +1,76 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Exists_source' + ); + } + $id = $this->id; + if (isset($this->index) !== true) { + throw new RuntimeException( + 'index is required for Exists_source' + ); + } + $index = $this->index; + if (isset($this->type) !== true) { + throw new RuntimeException( + 'type is required for Exists_source' + ); + } + $type = $this->type; + + return "/$index/$type/$id/_source"; + } + + public function getParamWhitelist(): array + { + return [ + 'parent', + 'preference', + 'realtime', + 'refresh', + 'routing', + '_source', + '_source_excludes', + '_source_includes', + 'version', + 'version_type' + ]; + } + + public function getMethod(): string + { + return 'HEAD'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Explain.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Explain.php index 0858f8866..98144d8f7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Explain.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Explain.php @@ -1,100 +1,89 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Explain extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'id is required for Explain' ); } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Explain' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Explain' ); } - $id = $this->id; - $index = $this->index; $type = $this->type; - $uri = "/$index/$type/$id/_explain"; - - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id/_explain"; - } - return $uri; + return "/$index/$type/$id/_explain"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'analyze_wildcard', 'analyzer', 'default_operator', 'df', - 'fields', + 'stored_fields', 'lenient', - 'lowercase_expanded_terms', 'parent', 'preference', 'q', 'routing', - 'source', '_source', - '_source_exclude', - '_source_include', - 'stored_fields' - ); + '_source_excludes', + '_source_includes' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Explain { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldCaps.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldCaps.php index 7e821283c..858fdab67 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldCaps.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldCaps.php @@ -1,69 +1,65 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class FieldCaps extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; + $index = $this->index ?? null; - if (isset($index) === true) { + if (isset($index)) { return "/$index/_field_caps"; - } else { - return "/_field_caps"; } + return "/_field_caps"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - return 'GET'; + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): FieldCaps + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldStats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldStats.php deleted file mode 100644 index 1ca80d83e..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/FieldStats.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class FieldStats extends AbstractEndpoint -{ - - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_field_stats"; - - if (isset($index) === true) { - $uri = "/$index/_field_stats"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'fields', - 'level', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'fields' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Get.php index 34fa6669e..10e6ef481 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Get.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Get.php @@ -1,113 +1,79 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Get extends AbstractEndpoint { - /** @var bool */ - private $returnOnlySource = false; - /** @var bool */ - private $checkOnlyExistance = false; - - /** - * @return $this - */ - public function returnOnlySource() - { - $this->returnOnlySource = true; - - return $this; - } - - /** - * @return $this - */ - public function checkOnlyExistance() - { - $this->checkOnlyExistance = true; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'id is required for Get' ); } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Get' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Get' ); } - $id = $this->id; - $index = $this->index; $type = $this->type; - $uri = "/$index/$type/$id"; - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id"; - } - - if ($this->returnOnlySource === true) { - $uri .= '/_source'; - } - - return $uri; + return "/$index/$type/$id"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'fields', + return [ + 'stored_fields', 'parent', 'preference', 'realtime', 'refresh', 'routing', '_source', + '_source_excludes', + '_source_includes', '_source_exclude', '_source_include', 'version', - 'version_type', - 'stored_fields' - ); + 'version_type' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - if ($this->checkOnlyExistance === true) { - return 'HEAD'; - } else { - return 'GET'; - } + return 'GET'; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetScript.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetScript.php new file mode 100644 index 000000000..98169becb --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetScript.php @@ -0,0 +1,55 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Get_script' + ); + } + $id = $this->id; + + return "/_scripts/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetSource.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetSource.php new file mode 100644 index 000000000..2e53588d1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/GetSource.php @@ -0,0 +1,76 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Get_source' + ); + } + $id = $this->id; + if (isset($this->index) !== true) { + throw new RuntimeException( + 'index is required for Get_source' + ); + } + $index = $this->index; + if (isset($this->type) !== true) { + throw new RuntimeException( + 'type is required for Get_source' + ); + } + $type = $this->type; + + return "/$index/$type/$id/_source"; + } + + public function getParamWhitelist(): array + { + return [ + 'parent', + 'preference', + 'realtime', + 'refresh', + 'routing', + '_source', + '_source_excludes', + '_source_includes', + 'version', + 'version_type' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Graph/Explore.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Graph/Explore.php new file mode 100644 index 000000000..db8888a11 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Graph/Explore.php @@ -0,0 +1,68 @@ +index ?? null; + $type = $this->type ?? null; + + if (isset($index) && isset($type)) { + return "/$index/$type/_xpack/graph/_explore"; + } + if (isset($index)) { + return "/$index/_xpack/graph/_explore"; + } + throw new RuntimeException('Missing parameter for the endpoint xpack.graph.explore'); + } + + public function getParamWhitelist(): array + { + return [ + 'routing', + 'timeout' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): Explore + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php new file mode 100644 index 000000000..50145a81d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php @@ -0,0 +1,64 @@ +policy ?? null; + + if (isset($policy)) { + return "/_ilm/policy/$policy"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.delete_lifecycle'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setPolicy($policy): DeleteLifecycle + { + if (isset($policy) !== true) { + return $this; + } + $this->policy = $policy; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php new file mode 100644 index 000000000..2f985927b --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php @@ -0,0 +1,53 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_ilm/explain"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.explain_lifecycle'); + } + + public function getParamWhitelist(): array + { + return [ + 'human' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php new file mode 100644 index 000000000..5124b585f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php @@ -0,0 +1,63 @@ +policy ?? null; + + if (isset($policy)) { + return "/_ilm/policy/$policy"; + } + return "/_ilm/policy"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setPolicy($policy): GetLifecycle + { + if (isset($policy) !== true) { + return $this; + } + $this->policy = $policy; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetStatus.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetStatus.php new file mode 100644 index 000000000..2d2dbc09f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/GetStatus.php @@ -0,0 +1,48 @@ +index ?? null; + + if (isset($index)) { + return "/_ilm/move/$index"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.move_to_step'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): MoveToStep + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php new file mode 100644 index 000000000..c5c6208d7 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php @@ -0,0 +1,74 @@ +policy ?? null; + + if (isset($policy)) { + return "/_ilm/policy/$policy"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.put_lifecycle'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutLifecycle + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setPolicy($policy): PutLifecycle + { + if (isset($policy) !== true) { + return $this; + } + $this->policy = $policy; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php new file mode 100644 index 000000000..075552990 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php @@ -0,0 +1,53 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_ilm/remove"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.remove_policy'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Retry.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Retry.php new file mode 100644 index 000000000..58842725c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Retry.php @@ -0,0 +1,53 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_ilm/retry"; + } + throw new RuntimeException('Missing parameter for the endpoint ilm.retry'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Start.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Start.php new file mode 100644 index 000000000..89485d177 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ilm/Start.php @@ -0,0 +1,48 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Index extends AbstractEndpoint { - /** @var bool */ - private $createIfAbsent = false; - - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return $this - */ - public function createIfAbsent() - { - $this->createIfAbsent = true; - - return $this; - } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Index' ); } - + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Index' ); } + $type = $this->type; + $id = $this->id ?? null; - $id = $this->id; - $index = $this->index; - $type = $this->type; - $uri = "/$index/$type"; - - if (isset($id) === true) { - $uri = "/$index/$type/$id"; + if (isset($id)) { + return "/$index/$type/$id"; } - return $uri; + return "/$index/$type"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'consistency', + return [ + 'wait_for_active_shards', 'op_type', 'parent', - 'percolate', 'refresh', - 'replication', 'routing', 'timeout', - 'timestamp', - 'ttl', 'version', 'version_type', + 'if_seq_no', + 'if_primary_term', 'pipeline' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - if (isset($this->id) === true) { - return 'PUT'; - } else { - return 'POST'; - } + return 'POST'; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function setBody($body): Index { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Document body must be set for index request'); - } else { - return $this->body; + if (isset($body) !== true) { + return $this; } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/AbstractAliasEndpoint.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/AbstractAliasEndpoint.php deleted file mode 100644 index c3ebf8485..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/AbstractAliasEndpoint.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -abstract class AbstractAliasEndpoint extends AbstractEndpoint -{ - /** @var null|string */ - protected $name = null; - - /** - * @param $name - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * - * @return $this - */ - public function setName($name) - { - if (is_string($name) !== true) { - throw new InvalidArgumentException('Name must be a string'); - } - $this->name = urlencode($name); - - return $this; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Delete.php deleted file mode 100644 index 2ed46816d..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Delete.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - // A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Delete' - ); - } - if (isset($this->name) !== true) { - throw new Exceptions\RuntimeException( - 'name is required for Delete' - ); - } - $index = $this->index; - $name = $this->name; - $uri = "/$index/_alias/$name"; - - if (isset($index) === true && isset($name) === true) { - $uri = "/$index/_alias/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'timeout', - 'master_timeout', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Exists.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Exists.php deleted file mode 100644 index abc978a19..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Exists.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Exists extends AbstractEndpoint -{ - // A comma-separated list of alias names to return - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $name = $this->name; - $uri = "/_alias/$name"; - - if (isset($index) === true && isset($name) === true) { - $uri = "/$index/_alias/$name"; - } elseif (isset($index) === true) { - $uri = "/$index/_alias"; - } elseif (isset($name) === true) { - $uri = "/_alias/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'HEAD'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Get.php deleted file mode 100644 index 8b2ae03a7..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Get.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - // A comma-separated list of alias names to return - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $name = $this->name; - $uri = "/_alias"; - - if (isset($index) === true && isset($name) === true) { - $uri = "/$index/_alias/$name"; - } elseif (isset($index) === true) { - $uri = "/$index/_alias"; - } elseif (isset($name) === true) { - $uri = "/_alias/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Put.php deleted file mode 100644 index a91d6254f..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Alias/Put.php +++ /dev/null @@ -1,97 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - // The name of the alias to be created or updated - private $name; - - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->name) !== true) { - throw new Exceptions\RuntimeException( - 'name is required for Put' - ); - } - - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Put' - ); - } - $index = $this->index; - $name = $this->name; - $uri = "/$index/_alias/$name"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'timeout', - 'master_timeout', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Aliases/Update.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Aliases/Update.php deleted file mode 100644 index a715b0f98..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Aliases/Update.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Update extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $uri = "/_aliases"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'timeout', - 'master_timeout', - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Update Aliases'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Analyze.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Analyze.php index ac7787948..8a27daf9b 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Analyze.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Analyze.php @@ -1,79 +1,62 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Analyze extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $uri = "/_analyze"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_analyze"; + if (isset($index)) { + return "/$index/_analyze"; } + return "/_analyze"; + } - return $uri; + public function getParamWhitelist(): array + { + return [ + 'index' + ]; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getMethod(): string { - return array( - 'analyzer', - 'field', - 'filter', - 'index', - 'prefer_local', - 'text', - 'tokenizer', - 'format', - 'char_filter', - 'explain', - 'attributes', - 'format' - ); + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Analyze { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Cache/Clear.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Cache/Clear.php deleted file mode 100644 index 6789d3e91..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Cache/Clear.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Clear extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_cache/clear"; - - if (isset($index) === true) { - $uri = "/$index/_cache/clear"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'field_data', - 'fielddata', - 'fields', - 'filter', - 'filter_cache', - 'filter_keys', - 'id', - 'id_cache', - 'index', - 'recycler', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'request_cache', - 'request' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ClearCache.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ClearCache.php index 4b502ba5a..95cb42f9d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ClearCache.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ClearCache.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ClearCache extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_cache/clear"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_cache/clear"; + if (isset($index)) { + return "/$index/_cache/clear"; } - - return $uri; + return "/_cache/clear"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'field_data', 'fielddata', 'fields', - 'filter', - 'filter_cache', - 'filter_keys', - 'id', - 'id_cache', + 'query', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', - 'recycler', - ); + 'request_cache', + 'request' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - return 'GET'; + return 'POST'; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Close.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Close.php index 3d5bf7e6f..5ec8635a4 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Close.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Close.php @@ -1,60 +1,58 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Close extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Close' ); } $index = $this->index; - $uri = "/$index/_close"; - - if (isset($index) === true) { - $uri = "/$index/_close"; - } - return $uri; + return "/$index/_close"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', - 'expand_wildcards', - ); + 'expand_wildcards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Create.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Create.php index 505d252d6..5ea32497a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Create.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Create.php @@ -1,77 +1,69 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Create extends AbstractEndpoint { - /** - * @param array|object $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Create' ); } $index = $this->index; - $uri = "/$index"; - if (isset($index) === true) { - $uri = "/$index"; - } - - return $uri; + return "/$index"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'include_type_name', + 'wait_for_active_shards', 'timeout', 'master_timeout', - 'update_all_types', - 'wait_for_active_shards' - ); + 'update_all_types' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'PUT'; } + + public function setBody($body): Create + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Delete.php index 9826cbce9..3dd31fc05 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Delete.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Delete.php @@ -1,52 +1,58 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Delete extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/$index"; - if (isset($index) === true) { - $uri = "/$index"; + public function getURI(): string + { + if (isset($this->index) !== true) { + throw new RuntimeException( + 'index is required for Delete' + ); } + $index = $this->index; - return $uri; + return "/$index"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'timeout', 'master_timeout', 'ignore_unavailable', - 'allow_no_indices' - ); + 'allow_no_indices', + 'expand_wildcards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'DELETE'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php new file mode 100644 index 000000000..895c7857d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php @@ -0,0 +1,77 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Delete_alias' + ); + } + $index = $this->index; + if (isset($this->name) !== true) { + throw new RuntimeException( + 'name is required for Delete_alias' + ); + } + $name = $this->name; + + return "/$index/_aliases/$name"; + return "/$index/_alias/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): DeleteAlias + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php new file mode 100644 index 000000000..923c77b73 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php @@ -0,0 +1,67 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Delete_template' + ); + } + $name = $this->name; + + return "/_template/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): DeleteTemplate + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists.php index ac45e3f74..249c359ed 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists.php @@ -1,59 +1,59 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Exists extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Exists' ); } $index = $this->index; - $uri = "/$index"; - if (isset($index) === true) { - $uri = "/$index"; - } - - return $uri; + return "/$index"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', - 'local', - ); + 'flat_settings', + 'include_defaults' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'HEAD'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists/Types.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists/Types.php deleted file mode 100644 index a5b4b67a6..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Exists/Types.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Types extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Types Exists' - ); - } - - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Types Exists' - ); - } - - $index = $this->index; - $type = $this->type; - $uri = "/$index/$type"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'HEAD'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php new file mode 100644 index 000000000..578559003 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php @@ -0,0 +1,76 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Exists_alias' + ); + } + $name = $this->name; + $index = $this->index ?? null; + + if (isset($index)) { + return "/$index/_alias/$name"; + } + return "/_alias/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'local' + ]; + } + + public function getMethod(): string + { + return 'HEAD'; + } + + public function setName($name): ExistsAlias + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php new file mode 100644 index 000000000..0e0c411d5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php @@ -0,0 +1,71 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Exists_template' + ); + } + $name = $this->name; + + return "/_template/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'flat_settings', + 'master_timeout', + 'local' + ]; + } + + public function getMethod(): string + { + return 'HEAD'; + } + + public function setName($name): ExistsTemplate + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsType.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsType.php new file mode 100644 index 000000000..79da186ec --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ExistsType.php @@ -0,0 +1,64 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Exists_type' + ); + } + $index = $this->index; + if (isset($this->type) !== true) { + throw new RuntimeException( + 'type is required for Exists_type' + ); + } + $type = $this->type; + + return "/$index/_mapping/$type"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'local' + ]; + } + + public function getMethod(): string + { + return 'HEAD'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Field/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Field/Get.php deleted file mode 100644 index c99123462..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Field/Get.php +++ /dev/null @@ -1,88 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - // A comma-separated list of fields - private $field; - - /** - * @param $field - * - * @return $this - */ - public function setField($field) - { - if (isset($field) !== true) { - return $this; - } - - $this->field = $field; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->field) !== true) { - throw new Exceptions\RuntimeException( - 'field is required for Get' - ); - } - $index = $this->index; - $type = $this->type; - $field = $this->field; - $uri = "/_mapping/field/$field"; - - if (isset($index) === true && isset($type) === true && isset($field) === true) { - $uri = "/$index/_mapping/$type/field/$field"; - } elseif (isset($type) === true && isset($field) === true) { - $uri = "/_mapping/$type/field/$field"; - } elseif (isset($index) === true && isset($field) === true) { - $uri = "/$index/_mapping/field/$field"; - } elseif (isset($field) === true) { - $uri = "/_mapping/field/$field"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'include_defaults', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Flush.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Flush.php index f8d7c4b34..d51c5648c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Flush.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Flush.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Flush extends AbstractEndpoint { - protected $synced = false; - public function setSynced($synced) + public function getURI(): string { - $this->synced = $synced; - } + $index = $this->index ?? null; - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_flush"; - - if (isset($index) === true) { - $uri = "/$index/_flush"; - } - - if ($this->synced === true) { - $uri .= "/synced"; + if (isset($index)) { + return "/$index/_flush"; } - - return $uri; + return "/_flush"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'force', - 'full', + 'wait_if_ongoing', 'ignore_unavailable', 'allow_no_indices', - 'expand_wildcards', - 'wait_if_ongoing' - ); + 'expand_wildcards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - return 'GET'; + return 'POST'; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/FlushSynced.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/FlushSynced.php new file mode 100644 index 000000000..d05a57440 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/FlushSynced.php @@ -0,0 +1,54 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_flush/synced"; + } + return "/_flush/synced"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ForceMerge.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ForceMerge.php index 3e6e0b465..dc81b4ad2 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ForceMerge.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ForceMerge.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ForceMerge extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_forcemerge"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_forcemerge"; + if (isset($index)) { + return "/$index/_forcemerge"; } - - return $uri; + return "/_forcemerge"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'max_num_segments', - 'only_expunge_deletes', - 'operation_threading', - 'wait_for_merge', - ); + 'only_expunge_deletes' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Freeze.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Freeze.php new file mode 100644 index 000000000..2a47e1f83 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Freeze.php @@ -0,0 +1,60 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Freeze' + ); + } + $index = $this->index; + + return "/$index/_freeze"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'wait_for_active_shards' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Gateway/Snapshot.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Gateway/Snapshot.php deleted file mode 100644 index b492ceae9..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Gateway/Snapshot.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Snapshot extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_gateway/snapshot"; - - if (isset($index) === true) { - $uri = "/$index/_gateway/snapshot"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Get.php index 58a7de7b0..c32762b47 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Get.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Get.php @@ -1,78 +1,61 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Get extends AbstractEndpoint { - private $feature; - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Get' ); } - $index = $this->index; - $feature = $this->feature; - $uri = "/$index"; - - if (isset($feature) === true) { - $uri = "/$index/$feature"; - } - - return $uri; - } - - public function setFeature($feature) - { - if (isset($feature) !== true) { - return $this; - } - - if (is_array($feature) === true) { - $feature = implode(",", $feature); - } - - $this->feature = $feature; + $index = $this->index; - return $this; + return "/$index"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'include_type_name', 'local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', - 'human' - ); + 'flat_settings', + 'include_defaults', + 'master_timeout' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetAlias.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetAlias.php new file mode 100644 index 000000000..76d2a9a0f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetAlias.php @@ -0,0 +1,76 @@ +index ?? null; + $name = $this->name ?? null; + + if (isset($index) && isset($name)) { + return "/$index/_alias/$name"; + } + if (isset($index)) { + return "/$index/_alias"; + } + if (isset($name)) { + return "/_alias/$name"; + } + return "/_alias"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'local' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetAlias + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php new file mode 100644 index 000000000..125ad3d61 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php @@ -0,0 +1,85 @@ +fields) !== true) { + throw new RuntimeException( + 'fields is required for Get_field_mapping' + ); + } + $fields = $this->fields; + $index = $this->index ?? null; + $type = $this->type ?? null; + + if (isset($index) && isset($type)) { + return "/$index/_mapping/$type/field/$fields"; + } + if (isset($index)) { + return "/$index/_mapping/field/$fields"; + } + if (isset($type)) { + return "/_mapping/$type/field/$fields"; + } + return "/_mapping/field/$fields"; + } + + public function getParamWhitelist(): array + { + return [ + 'include_type_name', + 'include_defaults', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'local' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setFields($fields): GetFieldMapping + { + if (isset($fields) !== true) { + return $this; + } + if (is_array($fields) === true) { + $fields = implode(",", $fields); + } + $this->fields = $fields; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetMapping.php new file mode 100644 index 000000000..ca66a35f4 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetMapping.php @@ -0,0 +1,64 @@ +index ?? null; + $type = $this->type ?? null; + + if (isset($index) && isset($type)) { + return "/$index/_mapping/$type"; + } + if (isset($index)) { + return "/$index/_mapping"; + } + if (isset($type)) { + return "/_mapping/$type"; + } + return "/_mapping"; + } + + public function getParamWhitelist(): array + { + return [ + 'include_type_name', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'master_timeout', + 'local' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetSettings.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetSettings.php new file mode 100644 index 000000000..215ad2324 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetSettings.php @@ -0,0 +1,79 @@ +index ?? null; + $name = $this->name ?? null; + + if (isset($index) && isset($name)) { + return "/$index/_settings/$name"; + } + if (isset($index)) { + return "/$index/_settings"; + } + if (isset($name)) { + return "/_settings/$name"; + } + return "/_settings"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'flat_settings', + 'local', + 'include_defaults' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetSettings + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetTemplate.php new file mode 100644 index 000000000..c0369d81a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetTemplate.php @@ -0,0 +1,69 @@ +name ?? null; + + if (isset($name)) { + return "/_template/$name"; + } + return "/_template"; + } + + public function getParamWhitelist(): array + { + return [ + 'include_type_name', + 'flat_settings', + 'master_timeout', + 'local' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetTemplate + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php new file mode 100644 index 000000000..e40628db4 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php @@ -0,0 +1,54 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_upgrade"; + } + return "/_upgrade"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Delete.php deleted file mode 100644 index 87ac13d98..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Delete.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Delete' - ); - } - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Delete' - ); - } - $index = $this->index; - $type = $this->type; - $uri = "/$index/$type/_mapping"; - - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_mapping"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Get.php deleted file mode 100644 index 88568e6dc..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Get.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $type = $this->type; - $uri = "/_mapping"; - - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/_mapping/$type"; - } elseif (isset($type) === true) { - $uri = "/_mapping/$type"; - } elseif (isset($index) === true) { - $uri = "/$index/_mapping"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'wildcard_expansion', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/GetField.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/GetField.php deleted file mode 100644 index 068be334d..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/GetField.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class GetField extends AbstractEndpoint -{ - /** @var string */ - private $fields; - - /** - * @param string|array $fields - * - * @return $this - */ - public function setFields($fields) - { - if (isset($fields) !== true) { - return $this; - } - - if (is_array($fields) === true) { - $fields = implode(",", $fields); - } - - $this->fields = $fields; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->fields) !== true) { - throw new Exceptions\RuntimeException( - 'fields is required for Get Field Mapping' - ); - } - $uri = $this->getOptionalURI('_mapping/field'); - - return $uri.'/'.$this->fields; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'include_defaults', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'local' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Put.php deleted file mode 100644 index 1639ca72b..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Mapping/Put.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Put' - ); - } - $index = $this->index; - $type = $this->type; - $uri = "/_mapping/$type"; - - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_mapping"; - } elseif (isset($type) === true) { - $uri = "/_mapping/$type"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_conflicts', - 'timeout', - 'master_timeout', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'update_all_types' - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Put Mapping'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Open.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Open.php index 6808659b5..bd506232e 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Open.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Open.php @@ -1,60 +1,59 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Open extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Open' ); } $index = $this->index; - $uri = "/$index/_open"; - - if (isset($index) === true) { - $uri = "/$index/_open"; - } - return $uri; + return "/$index/_open"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', - ); + 'wait_for_active_shards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutAlias.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutAlias.php new file mode 100644 index 000000000..f3ffe84a8 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutAlias.php @@ -0,0 +1,84 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Put_alias' + ); + } + $index = $this->index; + if (isset($this->name) !== true) { + throw new RuntimeException( + 'name is required for Put_alias' + ); + } + $name = $this->name; + + return "/$index/_aliases/$name"; + return "/$index/_alias/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutAlias + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): PutAlias + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutMapping.php new file mode 100644 index 000000000..596bb61f2 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutMapping.php @@ -0,0 +1,91 @@ +index ?? null; + $type = $this->type ?? null; + + if (isset($index) && isset($type)) { + return "/$index/$type/_mappings"; + } + if (isset($index) && isset($type)) { + return "/$index/_mappings/$type"; + } + if (isset($index) && isset($type)) { + return "/$index/$type/_mapping"; + } + if (isset($index) && isset($type)) { + return "/$index/_mapping/$type"; + } + if (isset($type)) { + return "/_mappings/$type"; + } + if (isset($index)) { + return "/$index/_mappings"; + } + if (isset($type)) { + return "/_mapping/$type"; + } + if (isset($index)) { + return "/$index/_mapping"; + } + throw new RuntimeException('Missing parameter for the endpoint indices.put_mapping'); + } + + public function getParamWhitelist(): array + { + return [ + 'include_type_name', + 'timeout', + 'master_timeout', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'update_all_types' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutMapping + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutSettings.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutSettings.php new file mode 100644 index 000000000..4547126ca --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutSettings.php @@ -0,0 +1,68 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_settings"; + } + return "/_settings"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout', + 'preserve_existing', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'flat_settings' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutSettings + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutTemplate.php new file mode 100644 index 000000000..91f554d42 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/PutTemplate.php @@ -0,0 +1,81 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Put_template' + ); + } + $name = $this->name; + + return "/_template/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'include_type_name', + 'order', + 'create', + 'timeout', + 'master_timeout', + 'flat_settings' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutTemplate + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): PutTemplate + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Recovery.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Recovery.php index 11e11cf69..29fcb3f92 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Recovery.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Recovery.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Recovery extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_recovery"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_recovery"; + if (isset($index)) { + return "/$index/_recovery"; } - - return $uri; + return "/_recovery"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'detailed', - 'active_only', - 'human' - ); + 'active_only' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Refresh.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Refresh.php index e7938d151..895dfef2c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Refresh.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Refresh.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Refresh extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_refresh"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_refresh"; + if (isset($index)) { + return "/$index/_refresh"; } - - return $uri; + return "/_refresh"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'ignore_unavailable', 'allow_no_indices', - 'expand_wildcards', - 'force', - 'operation_threading', - ); + 'expand_wildcards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - return 'GET'; + return 'POST'; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Rollover.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Rollover.php index bc188eadf..52485dd26 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Rollover.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Rollover.php @@ -1,109 +1,95 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Rollover extends AbstractEndpoint { - private $alias; - private $newIndex; + protected $alias; + protected $new_index; - /** - * @param string $alias - * - * @return $this - */ - public function setAlias($alias) + public function getURI(): string { - if ($alias === null) { - return $this; + if (isset($this->alias) !== true) { + throw new RuntimeException( + 'alias is required for Rollover' + ); } + $alias = $this->alias; + $new_index = $this->new_index ?? null; - $this->alias = urlencode($alias); - return $this; + if (isset($new_index)) { + return "/$alias/_rollover/$new_index"; + } + return "/$alias/_rollover"; } - /** - * @param string $newIndex - * - * @return $this - */ - public function setNewIndex($newIndex) + public function getParamWhitelist(): array { - if ($newIndex === null) { - return $this; - } + return [ + 'include_type_name', + 'timeout', + 'dry_run', + 'master_timeout', + 'wait_for_active_shards' + ]; + } - $this->newIndex = urlencode($newIndex); - return $this; + public function getMethod(): string + { + return 'POST'; } - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function setBody($body): Rollover { if (isset($body) !== true) { return $this; } - $this->body = $body; return $this; } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function setAlias($alias): Rollover { - if (isset($this->alias) !== true) { - throw new Exceptions\RuntimeException( - 'alias name is required for Rollover' - ); - } - - $uri = "/{$this->alias}/_rollover"; - - if (isset($this->newIndex) === true) { - $uri .= "/{$this->newIndex}"; + if (isset($alias) !== true) { + return $this; } + $this->alias = $alias; - return $uri; + return $this; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function setNewIndex($new_index): Rollover { - return array( - 'timeout', - 'master_timeout', - 'wait_for_active_shards', - ); - } + if (isset($new_index) !== true) { + return $this; + } + $this->new_index = $new_index; - /** - * @return string - */ - public function getMethod() - { - return 'POST'; + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Seal.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Seal.php deleted file mode 100644 index c6f513829..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Seal.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Seal extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_seal"; - - if (isset($index) === true) { - $uri = "/$index/_seal"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array(); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Segments.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Segments.php index 8ade2912e..2e2d011ee 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Segments.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Segments.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Segments extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_segments"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_segments"; + if (isset($index)) { + return "/$index/_segments"; } - - return $uri; + return "/_segments"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', - 'human', - 'operation_threading', - ); + 'verbose' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Get.php deleted file mode 100644 index 943bfd983..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Get.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - // The name of the settings that should be included - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $name = $this->name; - $uri = "/_settings"; - - if (isset($index) === true && isset($name) === true) { - $uri = "/$index/_settings/$name"; - } elseif (isset($name) === true) { - $uri = "/_settings/$name"; - } elseif (isset($index) === true) { - $uri = "/$index/_settings"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'flat_settings', - 'local', - 'include_defaults' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Put.php deleted file mode 100644 index 57f211a31..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Settings/Put.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_settings"; - - if (isset($index) === true) { - $uri = "/$index/_settings"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'flat_settings', - 'preserve_existing' - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Put Settings'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ShardStores.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ShardStores.php index 10dc44726..8601899ae 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ShardStores.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ShardStores.php @@ -1,58 +1,54 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ - class ShardStores extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $uri = "/_shard_stores"; + $index = $this->index ?? null; - if (isset($index) === true) { - $uri = "/$index/_shard_stores"; + if (isset($index)) { + return "/$index/_shard_stores"; } - - return $uri; + return "/_shard_stores"; } - - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'status', 'ignore_unavailable', 'allow_no_indices', - 'expand_wildcards', - 'operation_threading' - ); + 'expand_wildcards' + ]; } - - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Shrink.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Shrink.php index b4e7832b7..2520925af 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Shrink.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Shrink.php @@ -1,101 +1,85 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Shrink extends AbstractEndpoint { - // The name of the target index to shrink into - private $target; - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @param $target - * - * @return $this - */ - public function setTarget($target) - { - if (isset($target) !== true) { - return $this; - } - $this->target = $target; - - return $this; - } + protected $target; - /** - * @throws \Elasticsearch\Common\Exceptions\BadMethodCallException - * - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Shrink' ); } + $index = $this->index; if (isset($this->target) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'target is required for Shrink' ); } - $index = $this->index; $target = $this->target; - $uri = "/$index/_shrink/$target"; - if (isset($index) === true && isset($target) === true) { - $uri = "/$index/_shrink/$target"; - } - return $uri; + return "/$index/_shrink/$target"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ + 'copy_settings', 'timeout', 'master_timeout', - ); + 'wait_for_active_shards' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { - //TODO Fix Me! return 'PUT'; } + + public function setBody($body): Shrink + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setTarget($target): Shrink + { + if (isset($target) !== true) { + return $this; + } + $this->target = $target; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Snapshotindex.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Snapshotindex.php deleted file mode 100644 index e30530b1d..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Snapshotindex.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Snapshotindex extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_gateway/snapshot"; - - if (isset($index) === true) { - $uri = "/$index/_gateway/snapshot"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Split.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Split.php new file mode 100644 index 000000000..773e98518 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Split.php @@ -0,0 +1,85 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Split' + ); + } + $index = $this->index; + if (isset($this->target) !== true) { + throw new RuntimeException( + 'target is required for Split' + ); + } + $target = $this->target; + + return "/$index/_split/$target"; + } + + public function getParamWhitelist(): array + { + return [ + 'copy_settings', + 'timeout', + 'master_timeout', + 'wait_for_active_shards' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): Split + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setTarget($target): Split + { + if (isset($target) !== true) { + return $this; + } + $this->target = $target; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Stats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Stats.php index bbdc1d2fc..e97d868a2 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Stats.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Stats.php @@ -1,4 +1,18 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Stats extends AbstractEndpoint { - // Limit the information returned the specific metrics. - private $metric; + protected $metric; - /** - * @param $metric - * - * @return $this - */ - public function setMetric($metric) + public function getURI(): string { - if (isset($metric) !== true) { - return $this; - } + $index = $this->index ?? null; + $metric = $this->metric ?? null; - if (is_array($metric)) { - $metric = implode(",", $metric); + if (isset($index) && isset($metric)) { + return "/$index/_stats/$metric"; } - - $this->metric = $metric; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $metric = $this->metric; - $uri = "/_stats"; - - if (isset($index) === true && isset($metric) === true) { - $uri = "/$index/_stats/$metric"; - } elseif (isset($index) === true) { - $uri = "/$index/_stats"; - } elseif (isset($metric) === true) { - $uri = "/_stats/$metric"; + if (isset($metric)) { + return "/_stats/$metric"; } - - return $uri; + if (isset($index)) { + return "/$index/_stats"; + } + return "/_stats"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'completion_fields', 'fielddata_fields', 'fields', 'groups', - 'human', 'level', 'types', - 'metric', 'include_segment_file_sizes' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setMetric($metric): Stats + { + if (isset($metric) !== true) { + return $this; + } + if (is_array($metric) === true) { + $metric = implode(",", $metric); + } + $this->metric = $metric; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Status.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Status.php deleted file mode 100644 index fc52f84e5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Status.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Status extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_status"; - - if (isset($index) === true) { - $uri = "/$index/_status"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'human', - 'operation_threading', - 'recovery', - 'snapshot', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/AbstractTemplateEndpoint.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/AbstractTemplateEndpoint.php deleted file mode 100644 index cde022581..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/AbstractTemplateEndpoint.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -abstract class AbstractTemplateEndpoint extends AbstractEndpoint -{ - /** @var string */ - protected $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Delete.php deleted file mode 100644 index 044dce6f1..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Delete.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ - -class Delete extends AbstractEndpoint -{ - // The name of the template - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->name) !== true) { - throw new Exceptions\RuntimeException( - 'name is required for Delete' - ); - } - $name = $this->name; - $uri = "/_template/$name"; - - if (isset($name) === true) { - $uri = "/_template/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'timeout', - 'master_timeout', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Exists.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Exists.php deleted file mode 100644 index ebf6fdfe3..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Exists.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Exists extends AbstractEndpoint -{ - // The name of the template - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->name) !== true) { - throw new Exceptions\RuntimeException( - 'name is required for Exists' - ); - } - $name = $this->name; - $uri = "/_template/$name"; - - if (isset($name) === true) { - $uri = "/_template/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'local', - 'master_timeout' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'HEAD'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Get.php deleted file mode 100644 index 77472063d..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Get.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - // The name of the template - private $name; - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - $name = $this->name; - $uri = "/_template"; - - if (isset($name) === true) { - $uri = "/_template/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'flat_settings', - 'local', - 'master_timeout' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Put.php deleted file mode 100644 index 3aca04607..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Template/Put.php +++ /dev/null @@ -1,110 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - // The name of the template - private $name; - - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @param $name - * - * @return $this - */ - public function setName($name) - { - if (isset($name) !== true) { - return $this; - } - - $this->name = $name; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->name) !== true) { - throw new Exceptions\RuntimeException( - 'name is required for Put' - ); - } - $name = $this->name; - $uri = "/_template/$name"; - - if (isset($name) === true) { - $uri = "/_template/$name"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'order', - 'timeout', - 'master_timeout', - 'flat_settings', - 'create' - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Put Template'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Type/Exists.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Type/Exists.php deleted file mode 100644 index b29518929..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Type/Exists.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Exists extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Exists' - ); - } - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Exists' - ); - } - $uri = "/{$this->index}/_mapping/{$this->type}"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'HEAD'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Unfreeze.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Unfreeze.php new file mode 100644 index 000000000..92eda44ae --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Unfreeze.php @@ -0,0 +1,60 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Unfreeze' + ); + } + $index = $this->index; + + return "/$index/_unfreeze"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards', + 'wait_for_active_shards' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php new file mode 100644 index 000000000..b6ca5e271 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php @@ -0,0 +1,59 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade.php new file mode 100644 index 000000000..6bd45fe81 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade.php @@ -0,0 +1,56 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_upgrade"; + } + return "/_upgrade"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_indices', + 'expand_wildcards', + 'ignore_unavailable', + 'wait_for_completion', + 'only_ancient_segments' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Get.php deleted file mode 100644 index d9cb7bea2..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Get.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ - -class Get extends AbstractEndpoint -{ - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_upgrade"; - - if (isset($index) === true) { - $uri = "/$index/_upgrade"; - } - - - return $uri; - } - - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'wait_for_completion', - 'only_ancient_segments', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - ); - } - - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Post.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Post.php deleted file mode 100644 index 5b00f68b6..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Upgrade/Post.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ - -class Post extends AbstractEndpoint -{ - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_upgrade"; - - if (isset($index) === true) { - $uri = "/$index/_upgrade"; - } - - - return $uri; - } - - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'wait_for_completion', - 'only_ancient_segments', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - ); - } - - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Validate/Query.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Validate/Query.php deleted file mode 100644 index a96303803..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/Validate/Query.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Query extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - return $this->getOptionalURI('_validate/query'); - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'explain', - 'ignore_indices', - 'operation_threading', - 'source', - 'q', - 'df', - 'default_operator', - 'analyzer', - 'analyze_wildcard', - 'lenient', - 'lowercase_expanded_terms' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php index df94c02a9..b949f11fd 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php @@ -1,77 +1,77 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ValidateQuery extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_validate/query"; + $index = $this->index ?? null; + $type = $this->type ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_validate/query"; - } elseif (isset($index) === true) { - $uri = "/$index/_validate/query"; + if (isset($index) && isset($type)) { + return "/$index/$type/_validate/query"; } - - return $uri; + if (isset($index)) { + return "/$index/_validate/query"; + } + return "/_validate/query"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'explain', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', - 'operation_threading', - 'source', 'q', - ); + 'analyzer', + 'analyze_wildcard', + 'default_operator', + 'df', + 'lenient', + 'rewrite', + 'all_shards' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): ValidateQuery { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Info.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Info.php index dc157d7bc..bff9c375b 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Info.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Info.php @@ -1,41 +1,47 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Info extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/"; - return $uri; + return "/"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - ); + return [ + + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php new file mode 100644 index 000000000..7ae0ec058 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php @@ -0,0 +1,56 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Delete_pipeline' + ); + } + $id = $this->id; + + return "/_ingest/pipeline/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php new file mode 100644 index 000000000..2ffa9a7a9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php @@ -0,0 +1,52 @@ +id ?? null; + + if (isset($id)) { + return "/_ingest/pipeline/$id"; + } + return "/_ingest/pipeline"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Delete.php deleted file mode 100644 index b61e9e813..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Delete.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for DeletePipeline' - ); - } - $id = $this->id; - $uri = "/_ingest/pipeline/$id"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'timeout' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Get.php deleted file mode 100644 index d5cf38fca..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Get.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - return '/_ingest/pipeline/*'; - } - - $id = $this->id; - - return "/_ingest/pipeline/$id"; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Put.php deleted file mode 100644 index d8707b3cb..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Pipeline/Put.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for PutPipeline' - ); - } - $id = $this->id; - $uri = "/_ingest/pipeline/$id"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'timeout' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php index 431b56057..8b6ba78e7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php @@ -1,42 +1,47 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ProcessorGrok extends AbstractEndpoint { - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + + public function getURI(): string { + return "/_ingest/processor/grok"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return []; + return [ + + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php new file mode 100644 index 000000000..652a35a9e --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php @@ -0,0 +1,66 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Put_pipeline' + ); + } + $id = $this->id; + + return "/_ingest/pipeline/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutPipeline + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Simulate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Simulate.php index f4570bbdf..370c1141d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Simulate.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ingest/Simulate.php @@ -1,65 +1,62 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Simulate extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; + public function getURI(): string + { + $id = $this->id ?? null; - return $this; + if (isset($id)) { + return "/_ingest/pipeline/$id/_simulate"; + } + return "/_ingest/pipeline/_simulate"; } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getParamWhitelist(): array { - if (isset($this->id) === true) { - return "/_ingest/pipeline/{$this->id}/_simulate"; - } - return "/_ingest/pipeline/_simulate"; + return [ + 'verbose' + ]; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getMethod(): string { - return array( - 'verbose', - ); + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Simulate { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/Delete.php new file mode 100644 index 000000000..1d6d0bf37 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/Delete.php @@ -0,0 +1,46 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/PostStartBasic.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/PostStartBasic.php new file mode 100644 index 000000000..5b84cec67 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/License/PostStartBasic.php @@ -0,0 +1,48 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class MPercolate extends AbstractEndpoint implements BulkEndpointInterface -{ - /** - * @param SerializerInterface $serializer - */ - public function __construct(SerializerInterface $serializer) - { - $this->serializer = $serializer; - } - - /** - * @param string|array $body - * - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - if (is_array($body) === true) { - $bulkBody = ""; - foreach ($body as $item) { - $bulkBody .= $this->serializer->serialize($item)."\n"; - } - $body = $bulkBody; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - return $this->getOptionalURI('_mpercolate'); - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MTermVectors.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MTermVectors.php index e723920d9..3b0584b76 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MTermVectors.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MTermVectors.php @@ -1,51 +1,50 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class MTermVectors extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - return $this->getOptionalURI('_mtermvectors'); + $index = $this->index ?? null; + $type = $this->type ?? null; + + if (isset($index) && isset($type)) { + return "/$index/$type/_mtermvectors"; + } + if (isset($index)) { + return "/$index/_mtermvectors"; + } + return "/_mtermvectors"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'ids', 'term_statistics', 'field_statistics', @@ -56,15 +55,24 @@ public function getParamWhitelist() 'preference', 'routing', 'parent', - 'realtime' - ); + 'realtime', + 'version', + 'version_type' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): MTermVectors { - return 'POST'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Mget.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Mget.php index 2d7dd562c..fefb3a7a0 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Mget.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Mget.php @@ -1,93 +1,73 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Mget extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_mget"; + $index = $this->index ?? null; + $type = $this->type ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_mget"; - } elseif (isset($index) === true) { - $uri = "/$index/_mget"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_mget"; + if (isset($index) && isset($type)) { + return "/$index/$type/_mget"; } - - return $uri; + if (isset($index)) { + return "/$index/_mget"; + } + return "/_mget"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'fields', + return [ + 'stored_fields', 'preference', 'realtime', 'refresh', - '_source', - '_source_exclude', - '_source_include', 'routing', - 'stored_fields' - ); + '_source', + '_source_excludes', + '_source_includes' + ]; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function getMethod(): string { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for MGet'); - } - - return $this->body; + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Mget { - return 'POST'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Deprecations.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Deprecations.php new file mode 100644 index 000000000..8903e1929 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Deprecations.php @@ -0,0 +1,52 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_xpack/migration/deprecations"; + } + return "/_xpack/migration/deprecations"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/GetAssistance.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/GetAssistance.php new file mode 100644 index 000000000..0f9a182b4 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/GetAssistance.php @@ -0,0 +1,54 @@ +index ?? null; + + if (isset($index)) { + return "/_xpack/migration/assistance/$index"; + } + return "/_xpack/migration/assistance"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_indices', + 'expand_wildcards', + 'ignore_unavailable' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Upgrade.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Upgrade.php new file mode 100644 index 000000000..e5d851ba7 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Migration/Upgrade.php @@ -0,0 +1,55 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Upgrade' + ); + } + $index = $this->index; + + return "/_xpack/migration/upgrade/$index"; + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_completion' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/CloseJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/CloseJob.php new file mode 100644 index 000000000..d321165cc --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/CloseJob.php @@ -0,0 +1,78 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Close_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/_close"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_jobs', + 'force', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): CloseJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): CloseJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php new file mode 100644 index 000000000..901e8a08b --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendar.php @@ -0,0 +1,64 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Delete_calendar' + ); + } + $calendar_id = $this->calendar_id; + + return "/_xpack/ml/calendars/$calendar_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setCalendarId($calendar_id): DeleteCalendar + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php new file mode 100644 index 000000000..a35aa762b --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarEvent.php @@ -0,0 +1,81 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Delete_calendar_event' + ); + } + $calendar_id = $this->calendar_id; + if (isset($this->event_id) !== true) { + throw new RuntimeException( + 'event_id is required for Delete_calendar_event' + ); + } + $event_id = $this->event_id; + + return "/_xpack/ml/calendars/$calendar_id/events/$event_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setCalendarId($calendar_id): DeleteCalendarEvent + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } + + public function setEventId($event_id): DeleteCalendarEvent + { + if (isset($event_id) !== true) { + return $this; + } + $this->event_id = $event_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php new file mode 100644 index 000000000..0efa83390 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteCalendarJob.php @@ -0,0 +1,81 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Delete_calendar_job' + ); + } + $calendar_id = $this->calendar_id; + if (isset($this->job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Delete_calendar_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/calendars/$calendar_id/jobs/$job_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setCalendarId($calendar_id): DeleteCalendarJob + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } + + public function setJobId($job_id): DeleteCalendarJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php new file mode 100644 index 000000000..073e52ebb --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteDatafeed.php @@ -0,0 +1,66 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Delete_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id"; + } + + public function getParamWhitelist(): array + { + return [ + 'force' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setDatafeedId($datafeed_id): DeleteDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php new file mode 100644 index 000000000..b5d19e606 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteExpiredData.php @@ -0,0 +1,46 @@ +filter_id) !== true) { + throw new RuntimeException( + 'filter_id is required for Delete_filter' + ); + } + $filter_id = $this->filter_id; + + return "/_xpack/ml/filters/$filter_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setFilterId($filter_id): DeleteFilter + { + if (isset($filter_id) !== true) { + return $this; + } + $this->filter_id = $filter_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php new file mode 100644 index 000000000..88a440a49 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteForecast.php @@ -0,0 +1,82 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Delete_forecast' + ); + } + $job_id = $this->job_id; + $forecast_id = $this->forecast_id ?? null; + + if (isset($forecast_id)) { + return "/_xpack/ml/anomaly_detectors/$job_id/_forecast/$forecast_id"; + } + return "/_xpack/ml/anomaly_detectors/$job_id/_forecast"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_forecasts', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setJobId($job_id): DeleteForecast + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setForecastId($forecast_id): DeleteForecast + { + if (isset($forecast_id) !== true) { + return $this; + } + $this->forecast_id = $forecast_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteJob.php new file mode 100644 index 000000000..8a2ceecce --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteJob.php @@ -0,0 +1,67 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Delete_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id"; + } + + public function getParamWhitelist(): array + { + return [ + 'force', + 'wait_for_completion' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setJobId($job_id): DeleteJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php new file mode 100644 index 000000000..43968de6a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/DeleteModelSnapshot.php @@ -0,0 +1,81 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Delete_model_snapshot' + ); + } + $job_id = $this->job_id; + if (isset($this->snapshot_id) !== true) { + throw new RuntimeException( + 'snapshot_id is required for Delete_model_snapshot' + ); + } + $snapshot_id = $this->snapshot_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setJobId($job_id): DeleteModelSnapshot + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setSnapshotId($snapshot_id): DeleteModelSnapshot + { + if (isset($snapshot_id) !== true) { + return $this; + } + $this->snapshot_id = $snapshot_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FindFileStructure.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FindFileStructure.php new file mode 100644 index 000000000..b75607200 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FindFileStructure.php @@ -0,0 +1,90 @@ +serializer = $serializer; + } + + public function getURI(): string + { + + return "/_xpack/ml/find_file_structure"; + } + + public function getParamWhitelist(): array + { + return [ + 'lines_to_sample', + 'timeout', + 'charset', + 'format', + 'has_header_row', + 'column_names', + 'delimiter', + 'quote', + 'should_trim_fields', + 'grok_pattern', + 'timestamp_field', + 'timestamp_format', + 'explain' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): FindFileStructure + { + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; + } + +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FlushJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FlushJob.php new file mode 100644 index 000000000..171cc8a11 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/FlushJob.php @@ -0,0 +1,80 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Flush_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/_flush"; + } + + public function getParamWhitelist(): array + { + return [ + 'calc_interim', + 'start', + 'end', + 'advance_time', + 'skip_time' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): FlushJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): FlushJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Forecast.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Forecast.php new file mode 100644 index 000000000..bc25041f1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Forecast.php @@ -0,0 +1,67 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Forecast' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/_forecast"; + } + + public function getParamWhitelist(): array + { + return [ + 'duration', + 'expires_in' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setJobId($job_id): Forecast + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetBuckets.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetBuckets.php new file mode 100644 index 000000000..b665746e5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetBuckets.php @@ -0,0 +1,99 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_buckets' + ); + } + $job_id = $this->job_id; + $timestamp = $this->timestamp ?? null; + + if (isset($timestamp)) { + return "/_xpack/ml/anomaly_detectors/$job_id/results/buckets/$timestamp"; + } + return "/_xpack/ml/anomaly_detectors/$job_id/results/buckets"; + } + + public function getParamWhitelist(): array + { + return [ + 'expand', + 'exclude_interim', + 'from', + 'size', + 'start', + 'end', + 'anomaly_score', + 'sort', + 'desc' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetBuckets + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetBuckets + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setTimestamp($timestamp): GetBuckets + { + if (isset($timestamp) !== true) { + return $this; + } + $this->timestamp = $timestamp; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php new file mode 100644 index 000000000..4cee4b15a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php @@ -0,0 +1,70 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Get_calendar_events' + ); + } + $calendar_id = $this->calendar_id; + + return "/_xpack/ml/calendars/$calendar_id/events"; + } + + public function getParamWhitelist(): array + { + return [ + 'job_id', + 'start', + 'end', + 'from', + 'size' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setCalendarId($calendar_id): GetCalendarEvents + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendars.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendars.php new file mode 100644 index 000000000..399d50ea3 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCalendars.php @@ -0,0 +1,64 @@ +calendar_id ?? null; + + if (isset($calendar_id)) { + return "/_xpack/ml/calendars/$calendar_id"; + } + return "/_xpack/ml/calendars"; + } + + public function getParamWhitelist(): array + { + return [ + 'from', + 'size' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setCalendarId($calendar_id): GetCalendars + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCategories.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCategories.php new file mode 100644 index 000000000..a226e3564 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetCategories.php @@ -0,0 +1,92 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_categories' + ); + } + $job_id = $this->job_id; + $category_id = $this->category_id ?? null; + + if (isset($category_id)) { + return "/_xpack/ml/anomaly_detectors/$job_id/results/categories/$category_id"; + } + return "/_xpack/ml/anomaly_detectors/$job_id/results/categories/"; + } + + public function getParamWhitelist(): array + { + return [ + 'from', + 'size' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetCategories + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetCategories + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setCategoryId($category_id): GetCategories + { + if (isset($category_id) !== true) { + return $this; + } + $this->category_id = $category_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php new file mode 100644 index 000000000..743556401 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php @@ -0,0 +1,63 @@ +datafeed_id ?? null; + + if (isset($datafeed_id)) { + return "/_xpack/ml/datafeeds/$datafeed_id/_stats"; + } + return "/_xpack/ml/datafeeds/_stats"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_datafeeds' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setDatafeedId($datafeed_id): GetDatafeedStats + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php new file mode 100644 index 000000000..937c86e6b --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php @@ -0,0 +1,63 @@ +datafeed_id ?? null; + + if (isset($datafeed_id)) { + return "/_xpack/ml/datafeeds/$datafeed_id"; + } + return "/_xpack/ml/datafeeds"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_datafeeds' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setDatafeedId($datafeed_id): GetDatafeeds + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetFilters.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetFilters.php new file mode 100644 index 000000000..5c3d3f39f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetFilters.php @@ -0,0 +1,64 @@ +filter_id ?? null; + + if (isset($filter_id)) { + return "/_xpack/ml/filters/$filter_id"; + } + return "/_xpack/ml/filters"; + } + + public function getParamWhitelist(): array + { + return [ + 'from', + 'size' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setFilterId($filter_id): GetFilters + { + if (isset($filter_id) !== true) { + return $this; + } + $this->filter_id = $filter_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php new file mode 100644 index 000000000..eb33045b4 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php @@ -0,0 +1,83 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_influencers' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/results/influencers"; + } + + public function getParamWhitelist(): array + { + return [ + 'exclude_interim', + 'from', + 'size', + 'start', + 'end', + 'influencer_score', + 'sort', + 'desc' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetInfluencers + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetInfluencers + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobStats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobStats.php new file mode 100644 index 000000000..a1648bd6a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobStats.php @@ -0,0 +1,63 @@ +job_id ?? null; + + if (isset($job_id)) { + return "/_xpack/ml/anomaly_detectors/$job_id/_stats"; + } + return "/_xpack/ml/anomaly_detectors/_stats"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_jobs' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setJobId($job_id): GetJobStats + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobs.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobs.php new file mode 100644 index 000000000..d23350dd5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetJobs.php @@ -0,0 +1,63 @@ +job_id ?? null; + + if (isset($job_id)) { + return "/_xpack/ml/anomaly_detectors/$job_id"; + } + return "/_xpack/ml/anomaly_detectors"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_jobs' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setJobId($job_id): GetJobs + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php new file mode 100644 index 000000000..5177b6271 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php @@ -0,0 +1,96 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_model_snapshots' + ); + } + $job_id = $this->job_id; + $snapshot_id = $this->snapshot_id ?? null; + + if (isset($snapshot_id)) { + return "/_xpack/ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id"; + } + return "/_xpack/ml/anomaly_detectors/$job_id/model_snapshots"; + } + + public function getParamWhitelist(): array + { + return [ + 'from', + 'size', + 'start', + 'end', + 'sort', + 'desc' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetModelSnapshots + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetModelSnapshots + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setSnapshotId($snapshot_id): GetModelSnapshots + { + if (isset($snapshot_id) !== true) { + return $this; + } + $this->snapshot_id = $snapshot_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php new file mode 100644 index 000000000..74741f495 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php @@ -0,0 +1,82 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_overall_buckets' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/results/overall_buckets"; + } + + public function getParamWhitelist(): array + { + return [ + 'top_n', + 'bucket_span', + 'overall_score', + 'exclude_interim', + 'start', + 'end', + 'allow_no_jobs' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetOverallBuckets + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetOverallBuckets + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetRecords.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetRecords.php new file mode 100644 index 000000000..b77259724 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/GetRecords.php @@ -0,0 +1,83 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Get_records' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/results/records"; + } + + public function getParamWhitelist(): array + { + return [ + 'exclude_interim', + 'from', + 'size', + 'start', + 'end', + 'record_score', + 'sort', + 'desc' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): GetRecords + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): GetRecords + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Info.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Info.php new file mode 100644 index 000000000..c3dc4747a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Info.php @@ -0,0 +1,46 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Open_job' + ); + } + $job_id = $this->job_id; + $ignore_downtime = $this->ignore_downtime ?? null; + $timeout = $this->timeout ?? null; + + return "/_xpack/ml/anomaly_detectors/$job_id/_open"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setJobId($job_id): OpenJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setIgnoreDowntime($ignore_downtime): OpenJob + { + if (isset($ignore_downtime) !== true) { + return $this; + } + $this->ignore_downtime = $ignore_downtime; + + return $this; + } + + public function setTimeout($timeout): OpenJob + { + if (isset($timeout) !== true) { + return $this; + } + $this->timeout = $timeout; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php new file mode 100644 index 000000000..84088a1e1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php @@ -0,0 +1,74 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Post_calendar_events' + ); + } + $calendar_id = $this->calendar_id; + + return "/_xpack/ml/calendars/$calendar_id/events"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): PostCalendarEvents + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setCalendarId($calendar_id): PostCalendarEvents + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostData.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostData.php new file mode 100644 index 000000000..85ce511c1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PostData.php @@ -0,0 +1,97 @@ +serializer = $serializer; + } + + public function getURI(): string + { + if (isset($this->job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Post_data' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/_data"; + } + + public function getParamWhitelist(): array + { + return [ + 'reset_start', + 'reset_end' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): PostData + { + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; + } + + public function setJobId($job_id): PostData + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php new file mode 100644 index 000000000..fae9c99cc --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php @@ -0,0 +1,64 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Preview_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id/_preview"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setDatafeedId($datafeed_id): PreviewDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendar.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendar.php new file mode 100644 index 000000000..4a9f0b063 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendar.php @@ -0,0 +1,74 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Put_calendar' + ); + } + $calendar_id = $this->calendar_id; + + return "/_xpack/ml/calendars/$calendar_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutCalendar + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setCalendarId($calendar_id): PutCalendar + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php new file mode 100644 index 000000000..55931b236 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php @@ -0,0 +1,81 @@ +calendar_id) !== true) { + throw new RuntimeException( + 'calendar_id is required for Put_calendar_job' + ); + } + $calendar_id = $this->calendar_id; + if (isset($this->job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Put_calendar_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/calendars/$calendar_id/jobs/$job_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setCalendarId($calendar_id): PutCalendarJob + { + if (isset($calendar_id) !== true) { + return $this; + } + $this->calendar_id = $calendar_id; + + return $this; + } + + public function setJobId($job_id): PutCalendarJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php new file mode 100644 index 000000000..1ac97ada5 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php @@ -0,0 +1,74 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Put_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutDatafeed + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setDatafeedId($datafeed_id): PutDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutFilter.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutFilter.php new file mode 100644 index 000000000..814dd8e96 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutFilter.php @@ -0,0 +1,74 @@ +filter_id) !== true) { + throw new RuntimeException( + 'filter_id is required for Put_filter' + ); + } + $filter_id = $this->filter_id; + + return "/_xpack/ml/filters/$filter_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutFilter + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setFilterId($filter_id): PutFilter + { + if (isset($filter_id) !== true) { + return $this; + } + $this->filter_id = $filter_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutJob.php new file mode 100644 index 000000000..dacf59713 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/PutJob.php @@ -0,0 +1,74 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Put_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): PutJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php new file mode 100644 index 000000000..bc16e469f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php @@ -0,0 +1,93 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Revert_model_snapshot' + ); + } + $job_id = $this->job_id; + if (isset($this->snapshot_id) !== true) { + throw new RuntimeException( + 'snapshot_id is required for Revert_model_snapshot' + ); + } + $snapshot_id = $this->snapshot_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_revert"; + } + + public function getParamWhitelist(): array + { + return [ + 'delete_intervening_results' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): RevertModelSnapshot + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): RevertModelSnapshot + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setSnapshotId($snapshot_id): RevertModelSnapshot + { + if (isset($snapshot_id) !== true) { + return $this; + } + $this->snapshot_id = $snapshot_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php new file mode 100644 index 000000000..2b57e85ff --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php @@ -0,0 +1,49 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Start_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id/_start"; + } + + public function getParamWhitelist(): array + { + return [ + 'start', + 'end', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): StartDatafeed + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setDatafeedId($datafeed_id): StartDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php new file mode 100644 index 000000000..96dde0020 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php @@ -0,0 +1,68 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Stop_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id/_stop"; + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_datafeeds', + 'force', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setDatafeedId($datafeed_id): StopDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php new file mode 100644 index 000000000..205acebfc --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php @@ -0,0 +1,74 @@ +datafeed_id) !== true) { + throw new RuntimeException( + 'datafeed_id is required for Update_datafeed' + ); + } + $datafeed_id = $this->datafeed_id; + + return "/_xpack/ml/datafeeds/$datafeed_id/_update"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): UpdateDatafeed + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setDatafeedId($datafeed_id): UpdateDatafeed + { + if (isset($datafeed_id) !== true) { + return $this; + } + $this->datafeed_id = $datafeed_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php new file mode 100644 index 000000000..7a7a74fca --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php @@ -0,0 +1,74 @@ +filter_id) !== true) { + throw new RuntimeException( + 'filter_id is required for Update_filter' + ); + } + $filter_id = $this->filter_id; + + return "/_xpack/ml/filters/$filter_id/_update"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): UpdateFilter + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setFilterId($filter_id): UpdateFilter + { + if (isset($filter_id) !== true) { + return $this; + } + $this->filter_id = $filter_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateJob.php new file mode 100644 index 000000000..6b55f2044 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateJob.php @@ -0,0 +1,74 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Update_job' + ); + } + $job_id = $this->job_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/_update"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): UpdateJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): UpdateJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php new file mode 100644 index 000000000..957c62e8a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php @@ -0,0 +1,93 @@ +job_id) !== true) { + throw new RuntimeException( + 'job_id is required for Update_model_snapshot' + ); + } + $job_id = $this->job_id; + if (isset($this->snapshot_id) !== true) { + throw new RuntimeException( + 'snapshot_id is required for Update_model_snapshot' + ); + } + $snapshot_id = $this->snapshot_id; + + return "/_xpack/ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_update"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): UpdateModelSnapshot + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setJobId($job_id): UpdateModelSnapshot + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setSnapshotId($snapshot_id): UpdateModelSnapshot + { + if (isset($snapshot_id) !== true) { + return $this; + } + $this->snapshot_id = $snapshot_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Validate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Validate.php new file mode 100644 index 000000000..3bc6dcf1d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/Validate.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php new file mode 100644 index 000000000..bbeecd6c1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Monitoring/Bulk.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Monitoring/Bulk.php new file mode 100644 index 000000000..cc5f2275f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Monitoring/Bulk.php @@ -0,0 +1,84 @@ +serializer = $serializer; + } + + public function getURI(): string + { + $type = $this->type ?? null; + + if (isset($type)) { + return "/_xpack/monitoring/$type/_bulk"; + } + return "/_xpack/monitoring/_bulk"; + } + + public function getParamWhitelist(): array + { + return [ + 'system_id', + 'system_api_version', + 'interval' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): Bulk + { + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; + } + +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Msearch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Msearch.php index 13e515f0a..7abe02b6c 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Msearch.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Msearch.php @@ -1,104 +1,91 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ -class Msearch extends AbstractEndpoint +class Msearch extends AbstractEndpoint implements BulkEndpointInterface { - /** - * @param SerializerInterface $serializer - */ + public function __construct(SerializerInterface $serializer) { $this->serializer = $serializer; } - /** - * @param array|string $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getURI(): string { - if (isset($body) !== true) { - return $this; - } + $index = $this->index ?? null; + $type = $this->type ?? null; - if (is_array($body) === true) { - $bulkBody = ""; - foreach ($body as $item) { - $bulkBody .= $this->serializer->serialize($item)."\n"; - } - $body = $bulkBody; + if (isset($index) && isset($type)) { + return "/$index/$type/_msearch"; } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $type = $this->type; - $uri = "/_msearch"; - - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_msearch"; - } elseif (isset($index) === true) { - $uri = "/$index/_msearch"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_msearch"; + if (isset($index)) { + return "/$index/_msearch"; } - - return $uri; + return "/_msearch"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'search_type', + 'max_concurrent_searches', 'typed_keys', - ); + 'pre_filter_shard_size', + 'max_concurrent_shard_requests', + 'rest_total_hits_as_int' + ]; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function getMethod(): string { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for MSearch'); - } - - return $this->body; + return isset($this->body) ? 'POST' : 'GET'; } - - /** - * @return string - */ - public function getMethod() + + public function setBody($body): Msearch { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; } + } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MsearchTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MsearchTemplate.php index 43171741b..88a5a8da7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MsearchTemplate.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/MsearchTemplate.php @@ -1,105 +1,89 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ -class MsearchTemplate extends AbstractEndpoint +class MsearchTemplate extends AbstractEndpoint implements BulkEndpointInterface { - /** - * @param SerializerInterface $serializer - */ + public function __construct(SerializerInterface $serializer) { $this->serializer = $serializer; } - /** - * @param array|string $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getURI(): string { - if (isset($body) !== true) { - return $this; - } + $index = $this->index ?? null; + $type = $this->type ?? null; - if (is_array($body) === true) { - $bulkBody = ""; - foreach ($body as $item) { - $bulkBody .= $this->serializer->serialize($item)."\n"; - } - $body = $bulkBody; + if (isset($index) && isset($type)) { + return "/$index/$type/_msearch/template"; } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $type = $this->type; - $uri = "/_msearch/template"; - - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_msearch/template"; - } elseif (isset($index) === true) { - $uri = "/$index/_msearch/template"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_msearch/template"; + if (isset($index)) { + return "/$index/_msearch/template"; } - - return $uri; + return "/_msearch/template"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'search_type', 'typed_keys', - 'max_concurrent_searches' - ); + 'max_concurrent_searches', + 'rest_total_hits_as_int' + ]; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function getMethod(): string { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for MSearch'); - } - - return $this->body; + return isset($this->body) ? 'POST' : 'GET'; } - - /** - * @return string - */ - public function getMethod() + + public function setBody($body): MsearchTemplate { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; } + } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/HotThreads.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/HotThreads.php new file mode 100644 index 000000000..bc2845248 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/HotThreads.php @@ -0,0 +1,80 @@ +node_id ?? null; + + if (isset($node_id)) { + return "/_cluster/nodes/$node_id/hot_threads"; + } + if (isset($node_id)) { + return "/_cluster/nodes/$node_id/hotthreads"; + } + if (isset($node_id)) { + return "/_nodes/$node_id/hot_threads"; + } + if (isset($node_id)) { + return "/_nodes/$node_id/hotthreads"; + } + return "/_nodes/hotthreads"; + } + + public function getParamWhitelist(): array + { + return [ + 'interval', + 'snapshots', + 'threads', + 'ignore_idle_threads', + 'type', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNodeId($node_id): HotThreads + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Info.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Info.php new file mode 100644 index 000000000..32ef0c172 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Info.php @@ -0,0 +1,88 @@ +node_id ?? null; + $metric = $this->metric ?? null; + + if (isset($node_id) && isset($metric)) { + return "/_nodes/$node_id/$metric"; + } + if (isset($node_id)) { + return "/_nodes/$node_id"; + } + if (isset($metric)) { + return "/_nodes/$metric"; + } + return "/_nodes"; + } + + public function getParamWhitelist(): array + { + return [ + 'flat_settings', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNodeId($node_id): Info + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } + + public function setMetric($metric): Info + { + if (isset($metric) !== true) { + return $this; + } + if (is_array($metric) === true) { + $metric = implode(",", $metric); + } + $this->metric = $metric; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php new file mode 100644 index 000000000..d5a4a1814 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php @@ -0,0 +1,66 @@ +node_id ?? null; + + if (isset($node_id)) { + return "/_nodes/$node_id/reload_secure_settings"; + } + return "/_nodes/reload_secure_settings"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setNodeId($node_id): ReloadSecureSettings + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Stats.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Stats.php new file mode 100644 index 000000000..2e3da2f41 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Stats.php @@ -0,0 +1,115 @@ +metric ?? null; + $index_metric = $this->index_metric ?? null; + $node_id = $this->node_id ?? null; + + if (isset($node_id) && isset($metric) && isset($index_metric)) { + return "/_nodes/$node_id/stats/$metric/$index_metric"; + } + if (isset($metric) && isset($index_metric)) { + return "/_nodes/stats/$metric/$index_metric"; + } + if (isset($node_id) && isset($metric)) { + return "/_nodes/$node_id/stats/$metric"; + } + if (isset($node_id)) { + return "/_nodes/$node_id/stats"; + } + if (isset($metric)) { + return "/_nodes/stats/$metric"; + } + return "/_nodes/stats"; + } + + public function getParamWhitelist(): array + { + return [ + 'completion_fields', + 'fielddata_fields', + 'fields', + 'groups', + 'level', + 'types', + 'timeout', + 'include_segment_file_sizes' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setMetric($metric): Stats + { + if (isset($metric) !== true) { + return $this; + } + if (is_array($metric) === true) { + $metric = implode(",", $metric); + } + $this->metric = $metric; + + return $this; + } + + public function setIndexMetric($index_metric): Stats + { + if (isset($index_metric) !== true) { + return $this; + } + if (is_array($index_metric) === true) { + $index_metric = implode(",", $index_metric); + } + $this->index_metric = $index_metric; + + return $this; + } + + public function setNodeId($node_id): Stats + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Usage.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Usage.php new file mode 100644 index 000000000..e18666bf3 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Nodes/Usage.php @@ -0,0 +1,87 @@ +metric ?? null; + $node_id = $this->node_id ?? null; + + if (isset($node_id) && isset($metric)) { + return "/_nodes/$node_id/usage/$metric"; + } + if (isset($node_id)) { + return "/_nodes/$node_id/usage"; + } + if (isset($metric)) { + return "/_nodes/usage/$metric"; + } + return "/_nodes/usage"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setMetric($metric): Usage + { + if (isset($metric) !== true) { + return $this; + } + if (is_array($metric) === true) { + $metric = implode(",", $metric); + } + $this->metric = $metric; + + return $this; + } + + public function setNodeId($node_id): Usage + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Percolate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Percolate.php deleted file mode 100644 index 4418d7dc4..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Percolate.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Percolate extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Percolate' - ); - } - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Percolate' - ); - } - $index = $this->index; - $type = $this->type; - $id = $this->id; - $uri = "/$index/$type/_percolate"; - - if (isset($id) === true) { - $uri = "/$index/$type/$id/_percolate"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'routing', - 'preference', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'percolate_index', - 'percolate_type', - 'version', - 'version_type', - 'percolate_format' - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ping.php index a11d90287..0127c8d57 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ping.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ping.php @@ -1,41 +1,47 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Ping extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $uri = "/"; - return $uri; + return "/"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - ); + return [ + + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'HEAD'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/PutScript.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/PutScript.php new file mode 100644 index 000000000..60dfb8422 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/PutScript.php @@ -0,0 +1,82 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Put_script' + ); + } + $id = $this->id; + $context = $this->context ?? null; + + if (isset($context)) { + return "/_scripts/$id/$context"; + } + return "/_scripts/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'timeout', + 'master_timeout', + 'context' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutScript + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setContext($context): PutScript + { + if (isset($context) !== true) { + return $this; + } + $this->context = $context; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RankEval.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RankEval.php new file mode 100644 index 000000000..7fbe19693 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RankEval.php @@ -0,0 +1,64 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_rank_eval"; + } + return "/_rank_eval"; + } + + public function getParamWhitelist(): array + { + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): RankEval + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Reindex.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Reindex.php index 532889beb..f35c9182d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Reindex.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Reindex.php @@ -1,62 +1,61 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Reindex extends AbstractEndpoint { - /** - * @return string[] - */ - public function getParamWhitelist() + public function getURI(): string + { + + return "/_reindex"; + } + + public function getParamWhitelist(): array { - return array( - 'slices', + return [ 'refresh', 'timeout', - 'consistency', + 'wait_for_active_shards', 'wait_for_completion', 'requests_per_second', - ); - } - - /** - * @return string - */ - public function getURI() - { - return '/_reindex'; + 'slices' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function setBody($body): Reindex { if (isset($body) !== true) { return $this; } - $this->body = $body; return $this; diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ReindexRethrottle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ReindexRethrottle.php new file mode 100644 index 000000000..2ebe67c42 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ReindexRethrottle.php @@ -0,0 +1,66 @@ +task_id) !== true) { + throw new RuntimeException( + 'task_id is required for Reindex_rethrottle' + ); + } + $task_id = $this->task_id; + + return "/_reindex/$task_id/_rethrottle"; + } + + public function getParamWhitelist(): array + { + return [ + 'requests_per_second' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setTaskId($task_id): ReindexRethrottle + { + if (isset($task_id) !== true) { + return $this; + } + $this->task_id = $task_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Remote/Info.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Remote/Info.php deleted file mode 100644 index 154c2de28..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Remote/Info.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Info extends AbstractEndpoint -{ - /** - * @return string - */ - public function getURI() - { - return "/_remote/info"; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array(); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RenderSearchTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RenderSearchTemplate.php index c31eb7238..e40b26f6d 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RenderSearchTemplate.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/RenderSearchTemplate.php @@ -1,77 +1,60 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ - class RenderSearchTemplate extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - return $this; - } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { - $id = $this->id; - - $uri = "/_render/template"; + $id = $this->id ?? null; - if (isset($id) === true) { - $uri = "/_render/template/$id"; + if (isset($id)) { + return "/_render/template/$id"; } - - return $uri; + return "/_render/template"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array(); + return []; } - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() + public function getMethod(): string { - return $this->body; + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): RenderSearchTemplate { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php new file mode 100644 index 000000000..5b942e6f8 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php @@ -0,0 +1,53 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Delete_job' + ); + } + $id = $this->id; + + return "/_xpack/rollup/job/$id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetJobs.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetJobs.php new file mode 100644 index 000000000..af813e3b7 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetJobs.php @@ -0,0 +1,50 @@ +id ?? null; + + if (isset($id)) { + return "/_xpack/rollup/job/$id"; + } + return "/_xpack/rollup/job/"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php new file mode 100644 index 000000000..4da124793 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php @@ -0,0 +1,50 @@ +id ?? null; + + if (isset($id)) { + return "/_xpack/rollup/data/$id"; + } + return "/_xpack/rollup/data/"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php new file mode 100644 index 000000000..f81689e0d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php @@ -0,0 +1,53 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Get_rollup_index_caps' + ); + } + $index = $this->index; + + return "/$index/_xpack/rollup/data"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/PutJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/PutJob.php new file mode 100644 index 000000000..4f8923878 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/PutJob.php @@ -0,0 +1,63 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Put_job' + ); + } + $id = $this->id; + + return "/_xpack/rollup/job/$id"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php new file mode 100644 index 000000000..9a6921392 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php @@ -0,0 +1,69 @@ +index) !== true) { + throw new RuntimeException( + 'index is required for Rollup_search' + ); + } + $index = $this->index; + $type = $this->type ?? null; + + if (isset($type)) { + return "/$index/$type/_rollup_search"; + } + return "/$index/_rollup_search"; + } + + public function getParamWhitelist(): array + { + return [ + 'typed_keys' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): RollupSearch + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StartJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StartJob.php new file mode 100644 index 000000000..fbe533877 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StartJob.php @@ -0,0 +1,53 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Start_job' + ); + } + $id = $this->id; + + return "/_xpack/rollup/job/$id/_start"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StopJob.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StopJob.php new file mode 100644 index 000000000..09f31c051 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Rollup/StopJob.php @@ -0,0 +1,56 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Stop_job' + ); + } + $id = $this->id; + + return "/_xpack/rollup/job/$id/_stop"; + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_completion', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Delete.php deleted file mode 100644 index 887c9f8b9..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Delete.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - /** @var String */ - private $lang; - - /** - * @param $lang - * - * @return $this - */ - public function setLang($lang) - { - if (isset($lang) !== true) { - return $this; - } - - $this->lang = $lang; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->lang) !== true) { - throw new Exceptions\RuntimeException( - 'lang is required for Put' - ); - } - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for put' - ); - } - $id = $this->id; - $lang = $this->lang; - $uri = "/_scripts/$lang/$id"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'version', - 'version_type' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Get.php deleted file mode 100644 index 78c01c8c5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Get.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - /** @var String */ - private $lang; - - /** - * @param $lang - * - * @return $this - */ - public function setLang($lang) - { - if (isset($lang) !== true) { - return $this; - } - - $this->lang = $lang; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->lang) !== true) { - throw new Exceptions\RuntimeException( - 'lang is required for Put' - ); - } - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for put' - ); - } - $id = $this->id; - $lang = $this->lang; - $uri = "/_scripts/$lang/$id"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'version_type', - 'version' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Put.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Put.php deleted file mode 100644 index 18037744e..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Script/Put.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Put extends AbstractEndpoint -{ - /** - * @param array $body - * - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for put' - ); - } - $id = $this->id; - $uri = "/_scripts/$id"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'version_type', - 'version', - 'op_type' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php new file mode 100644 index 000000000..955552777 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php @@ -0,0 +1,58 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): ScriptsPainlessExecute + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Scroll.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Scroll.php index eb46fe31e..0a13ad724 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Scroll.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Scroll.php @@ -1,102 +1,75 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Scroll extends AbstractEndpoint { + protected $scroll_id; - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getURI(): string { - if (isset($body) !== true) { - return $this; - } + $scroll_id = $this->scroll_id ?? null; - $this->body = $body; + if (isset($scroll_id)) { + return "/_search/scroll/$scroll_id"; + } + return "/_search/scroll"; + } - return $this; + public function getParamWhitelist(): array + { + return [ + 'scroll', + 'scroll_id', + 'rest_total_hits_as_int' + ]; } - /** - * @return array - */ - public function getBody() + public function getMethod(): string { - return $this->body; + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @param $scroll - * - * @return $this - */ - public function setScroll($scroll) + public function setBody($body): Scroll { - if (isset($scroll) !== true) { + if (isset($body) !== true) { return $this; } - - $this->body['scroll'] = $scroll; + $this->body = $body; return $this; } - /** - * @param $scroll_id - * - * @return $this - */ - public function setScrollId($scroll_id) + public function setScrollId($scroll_id): Scroll { if (isset($scroll_id) !== true) { return $this; } - - $this->body['scroll_id'] = $scroll_id; + $this->scroll_id = $scroll_id; return $this; } - - /** - * @return string - */ - public function getURI() - { - $uri = "/_search/scroll"; - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'scroll', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Search.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Search.php index c8f9c7c0a..0b05eb2a3 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Search.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Search.php @@ -1,113 +1,106 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Search extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - return $this; - } - - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_search"; + $index = $this->index ?? null; + $type = $this->type ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_search"; - } elseif (isset($index) === true) { - $uri = "/$index/_search"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_search"; + if (isset($index) && isset($type)) { + return "/$index/$type/_search"; } - - return $uri; + if (isset($index)) { + return "/$index/_search"; + } + return "/_search"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', + 'stored_fields', + 'docvalue_fields', 'from', 'ignore_unavailable', + 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', - 'indices_boost', 'lenient', - 'lowercase_expanded_terms', 'preference', 'q', - 'query_cache', - 'request_cache', 'routing', 'scroll', 'search_type', 'size', - 'slice', 'sort', - 'source', '_source', - '_source_exclude', - '_source_include', + '_source_excludes', + '_source_includes', + 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', + 'track_scores', + 'track_total_hits', + 'allow_partial_search_results', + 'typed_keys', 'version', - 'fielddata_fields', - 'docvalue_fields', - 'filter_path', - 'terminate_after', - 'stored_fields', + 'seq_no_primary_term', + 'request_cache', 'batched_reduce_size', - 'typed_keys', - 'pre_filter_shard_size' - ); + 'max_concurrent_shard_requests', + 'pre_filter_shard_size', + 'rest_total_hits_as_int' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): Search { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchShards.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchShards.php index 85c564adb..e43de122a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchShards.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchShards.php @@ -1,57 +1,56 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class SearchShards extends AbstractEndpoint { - /** - * @return string - */ - public function getURI() + + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_search_shards"; + $index = $this->index ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_search_shards"; - } elseif (isset($index) === true) { - $uri = "/$index/_search_shards"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_search_shards"; + if (isset($index)) { + return "/$index/_search_shards"; } - - return $uri; + return "/_search_shards"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'preference', 'routing', 'local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchTemplate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchTemplate.php index 7b5c83048..8c516b11a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchTemplate.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/SearchTemplate.php @@ -1,79 +1,77 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class SearchTemplate extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - /** - * @return string - */ - public function getURI() + public function getURI(): string { - $index = $this->index; - $type = $this->type; - $uri = "/_search/template"; + $index = $this->index ?? null; + $type = $this->type ?? null; - if (isset($index) === true && isset($type) === true) { - $uri = "/$index/$type/_search/template"; - } elseif (isset($index) === true) { - $uri = "/$index/_search/template"; - } elseif (isset($type) === true) { - $uri = "/_all/$type/_search/template"; + if (isset($index) && isset($type)) { + return "/$index/$type/_search/template"; } - - return $uri; + if (isset($index)) { + return "/$index/_search/template"; + } + return "/_search/template"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'ignore_unavailable', + 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'preference', 'routing', 'scroll', - 'search_type' - ); + 'search_type', + 'explain', + 'profile', + 'typed_keys', + 'rest_total_hits_as_int' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): SearchTemplate { - return 'GET'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/Authenticate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/Authenticate.php new file mode 100644 index 000000000..d7b8a8a13 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/Authenticate.php @@ -0,0 +1,48 @@ +username ?? null; + + if (isset($username)) { + return "/_xpack/security/user/$username/_password"; + } + return "/_xpack/security/user/_password"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): ChangePassword + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setUsername($username): ChangePassword + { + if (isset($username) !== true) { + return $this; + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php new file mode 100644 index 000000000..8fa5d2038 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php @@ -0,0 +1,69 @@ +realms) !== true) { + throw new RuntimeException( + 'realms is required for Clear_cached_realms' + ); + } + $realms = $this->realms; + + return "/_xpack/security/realm/$realms/_clear_cache"; + } + + public function getParamWhitelist(): array + { + return [ + 'usernames' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setRealms($realms): ClearCachedRealms + { + if (isset($realms) !== true) { + return $this; + } + if (is_array($realms) === true) { + $realms = implode(",", $realms); + } + $this->realms = $realms; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php new file mode 100644 index 000000000..ef3705c29 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php @@ -0,0 +1,69 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Clear_cached_roles' + ); + } + $name = $this->name; + + return "/_xpack/security/role/$name/_clear_cache"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setName($name): ClearCachedRoles + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/CreateApiKey.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/CreateApiKey.php new file mode 100644 index 000000000..d6f785c84 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/CreateApiKey.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php new file mode 100644 index 000000000..0e0dc0ff9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php @@ -0,0 +1,83 @@ +application) !== true) { + throw new RuntimeException( + 'application is required for Delete_privileges' + ); + } + $application = $this->application; + if (isset($this->name) !== true) { + throw new RuntimeException( + 'name is required for Delete_privileges' + ); + } + $name = $this->name; + + return "/_xpack/security/privilege/$application/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setApplication($application): DeletePrivileges + { + if (isset($application) !== true) { + return $this; + } + $this->application = $application; + + return $this; + } + + public function setName($name): DeletePrivileges + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRole.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRole.php new file mode 100644 index 000000000..520ea3f8f --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRole.php @@ -0,0 +1,66 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Delete_role' + ); + } + $name = $this->name; + + return "/_xpack/security/role/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): DeleteRole + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php new file mode 100644 index 000000000..59286c681 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php @@ -0,0 +1,66 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Delete_role_mapping' + ); + } + $name = $this->name; + + return "/_xpack/security/role_mapping/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): DeleteRoleMapping + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteUser.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteUser.php new file mode 100644 index 000000000..7769d2d4a --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DeleteUser.php @@ -0,0 +1,66 @@ +username) !== true) { + throw new RuntimeException( + 'username is required for Delete_user' + ); + } + $username = $this->username; + + return "/_xpack/security/user/$username"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setUsername($username): DeleteUser + { + if (isset($username) !== true) { + return $this; + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DisableUser.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DisableUser.php new file mode 100644 index 000000000..699611c93 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/DisableUser.php @@ -0,0 +1,66 @@ +username) !== true) { + throw new RuntimeException( + 'username is required for Disable_user' + ); + } + $username = $this->username; + + return "/_xpack/security/user/$username/_disable"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setUsername($username): DisableUser + { + if (isset($username) !== true) { + return $this; + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/EnableUser.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/EnableUser.php new file mode 100644 index 000000000..7ac1c7a20 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/EnableUser.php @@ -0,0 +1,66 @@ +username) !== true) { + throw new RuntimeException( + 'username is required for Enable_user' + ); + } + $username = $this->username; + + return "/_xpack/security/user/$username/_enable"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setUsername($username): EnableUser + { + if (isset($username) !== true) { + return $this; + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetApiKey.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetApiKey.php new file mode 100644 index 000000000..0acd66526 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetApiKey.php @@ -0,0 +1,51 @@ +application ?? null; + $name = $this->name ?? null; + + if (isset($application) && isset($name)) { + return "/_xpack/security/privilege/$application/$name"; + } + if (isset($application)) { + return "/_xpack/security/privilege/$application"; + } + return "/_xpack/security/privilege"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setApplication($application): GetPrivileges + { + if (isset($application) !== true) { + return $this; + } + $this->application = $application; + + return $this; + } + + public function setName($name): GetPrivileges + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRole.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRole.php new file mode 100644 index 000000000..c6a1f4db2 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRole.php @@ -0,0 +1,63 @@ +name ?? null; + + if (isset($name)) { + return "/_xpack/security/role/$name"; + } + return "/_xpack/security/role"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetRole + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php new file mode 100644 index 000000000..d394eaf9c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php @@ -0,0 +1,63 @@ +name ?? null; + + if (isset($name)) { + return "/_xpack/security/role_mapping/$name"; + } + return "/_xpack/security/role_mapping"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): GetRoleMapping + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetToken.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetToken.php new file mode 100644 index 000000000..135385bc9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetToken.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUser.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUser.php new file mode 100644 index 000000000..51c1e4c2d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUser.php @@ -0,0 +1,66 @@ +username ?? null; + + if (isset($username)) { + return "/_xpack/security/user/$username"; + } + return "/_xpack/security/user"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setUsername($username): GetUser + { + if (isset($username) !== true) { + return $this; + } + if (is_array($username) === true) { + $username = implode(",", $username); + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php new file mode 100644 index 000000000..f0a42b54d --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php @@ -0,0 +1,48 @@ +user ?? null; + + if (isset($user)) { + return "/_xpack/security/user/$user/_has_privileges"; + } + return "/_xpack/security/user/_has_privileges"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): HasPrivileges + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setUser($user): HasPrivileges + { + if (isset($user) !== true) { + return $this; + } + $this->user = $user; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php new file mode 100644 index 000000000..97da4964c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateToken.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateToken.php new file mode 100644 index 000000000..ff100e835 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/InvalidateToken.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutPrivileges.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutPrivileges.php new file mode 100644 index 000000000..e087e66bf --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutPrivileges.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRole.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRole.php new file mode 100644 index 000000000..dcd082ba2 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRole.php @@ -0,0 +1,76 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Put_role' + ); + } + $name = $this->name; + + return "/_xpack/security/role/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutRole + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): PutRole + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php new file mode 100644 index 000000000..ee4976eaa --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php @@ -0,0 +1,76 @@ +name) !== true) { + throw new RuntimeException( + 'name is required for Put_role_mapping' + ); + } + $name = $this->name; + + return "/_xpack/security/role_mapping/$name"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutRoleMapping + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): PutRoleMapping + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutUser.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutUser.php new file mode 100644 index 000000000..15cbfb7e6 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Security/PutUser.php @@ -0,0 +1,76 @@ +username) !== true) { + throw new RuntimeException( + 'username is required for Put_user' + ); + } + $username = $this->username; + + return "/_xpack/security/user/$username"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutUser + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setUsername($username): PutUser + { + if (isset($username) !== true) { + return $this; + } + $this->username = $username; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Create.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Create.php index a00a1cead..94e7e2ca8 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Create.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Create.php @@ -1,119 +1,94 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Create extends AbstractEndpoint { - // A repository name - private $repository; + protected $repository; + protected $snapshot; + + public function getURI(): string + { + if (isset($this->repository) !== true) { + throw new RuntimeException( + 'repository is required for Create' + ); + } + $repository = $this->repository; + if (isset($this->snapshot) !== true) { + throw new RuntimeException( + 'snapshot is required for Create' + ); + } + $snapshot = $this->snapshot; + + return "/_snapshot/$repository/$snapshot"; + } - // A snapshot name - private $snapshot; + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'wait_for_completion' + ]; + } - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): Create { if (isset($body) !== true) { return $this; } - $this->body = $body; return $this; } - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) + public function setRepository($repository): Create { if (isset($repository) !== true) { return $this; } - $this->repository = $repository; return $this; } - /** - * @param $snapshot - * - * @return $this - */ - public function setSnapshot($snapshot) + public function setSnapshot($snapshot): Create { if (isset($snapshot) !== true) { return $this; } - $this->snapshot = $snapshot; return $this; } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'repository is required for Create' - ); - } - if (isset($this->snapshot) !== true) { - throw new Exceptions\RuntimeException( - 'snapshot is required for Create' - ); - } - $repository = $this->repository; - $snapshot = $this->snapshot; - $uri = "/_snapshot/$repository/$snapshot"; - - if (isset($repository) === true && isset($snapshot) === true) { - $uri = "/_snapshot/$repository/$snapshot"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'wait_for_completion', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php new file mode 100644 index 000000000..3346272ea --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php @@ -0,0 +1,78 @@ +repository) !== true) { + throw new RuntimeException( + 'repository is required for Create_repository' + ); + } + $repository = $this->repository; + + return "/_snapshot/$repository"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout', + 'verify' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): CreateRepository + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setRepository($repository): CreateRepository + { + if (isset($repository) !== true) { + return $this; + } + $this->repository = $repository; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Delete.php index ca28cfc10..6044e8f23 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Delete.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Delete.php @@ -1,101 +1,83 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Delete extends AbstractEndpoint { - // A repository name - private $repository; - - // A snapshot name - private $snapshot; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @param $snapshot - * - * @return $this - */ - public function setSnapshot($snapshot) - { - if (isset($snapshot) !== true) { - return $this; - } - - $this->snapshot = $snapshot; - - return $this; - } + protected $repository; + protected $snapshot; - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'repository is required for Delete' ); } + $repository = $this->repository; if (isset($this->snapshot) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'snapshot is required for Delete' ); } - $repository = $this->repository; $snapshot = $this->snapshot; - $uri = "/_snapshot/$repository/$snapshot"; - if (isset($repository) === true && isset($snapshot) === true) { - $uri = "/_snapshot/$repository/$snapshot"; - } - - return $uri; + return "/_snapshot/$repository/$snapshot"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'master_timeout', - ); + return [ + 'master_timeout' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'DELETE'; } + + public function setRepository($repository): Delete + { + if (isset($repository) !== true) { + return $this; + } + $this->repository = $repository; + + return $this; + } + + public function setSnapshot($snapshot): Delete + { + if (isset($snapshot) !== true) { + return $this; + } + $this->snapshot = $snapshot; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php new file mode 100644 index 000000000..3a97303d3 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php @@ -0,0 +1,70 @@ +repository) !== true) { + throw new RuntimeException( + 'repository is required for Delete_repository' + ); + } + $repository = $this->repository; + + return "/_snapshot/$repository"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setRepository($repository): DeleteRepository + { + if (isset($repository) !== true) { + return $this; + } + if (is_array($repository) === true) { + $repository = implode(",", $repository); + } + $this->repository = $repository; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Get.php index 44d171f23..8f19ae664 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Get.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Get.php @@ -1,103 +1,88 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Get extends AbstractEndpoint { - // A comma-separated list of repository names - private $repository; - - // A comma-separated list of snapshot names - private $snapshot; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @param $snapshot - * - * @return $this - */ - public function setSnapshot($snapshot) - { - if (isset($snapshot) !== true) { - return $this; - } - - $this->snapshot = $snapshot; - - return $this; - } + protected $repository; + protected $snapshot; - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'repository is required for Get' ); } + $repository = $this->repository; if (isset($this->snapshot) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'snapshot is required for Get' ); } - $repository = $this->repository; $snapshot = $this->snapshot; - $uri = "/_snapshot/$repository/$snapshot"; - - if (isset($repository) === true && isset($snapshot) === true) { - $uri = "/_snapshot/$repository/$snapshot"; - } - return $uri; + return "/_snapshot/$repository/$snapshot"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'master_timeout', 'ignore_unavailable', 'verbose' - ); + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'GET'; } + + public function setRepository($repository): Get + { + if (isset($repository) !== true) { + return $this; + } + $this->repository = $repository; + + return $this; + } + + public function setSnapshot($snapshot): Get + { + if (isset($snapshot) !== true) { + return $this; + } + if (is_array($snapshot) === true) { + $snapshot = implode(",", $snapshot); + } + $this->snapshot = $snapshot; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php new file mode 100644 index 000000000..9cec750ce --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php @@ -0,0 +1,67 @@ +repository ?? null; + + if (isset($repository)) { + return "/_snapshot/$repository"; + } + return "/_snapshot"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'local' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setRepository($repository): GetRepository + { + if (isset($repository) !== true) { + return $this; + } + if (is_array($repository) === true) { + $repository = implode(",", $repository); + } + $this->repository = $repository; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Create.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Create.php deleted file mode 100644 index cfdc6306c..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Create.php +++ /dev/null @@ -1,108 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Create extends AbstractEndpoint -{ - // A repository name - private $repository; - - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'repository is required for Create' - ); - } - $repository = $this->repository; - $uri = "/_snapshot/$repository"; - - if (isset($repository) === true) { - $uri = "/_snapshot/$repository"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'timeout', - 'verify' - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Create Repository'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'PUT'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Delete.php deleted file mode 100644 index 4e0109f96..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Delete.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - // A comma-separated list of repository names - private $repository; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'repository is required for Delete' - ); - } - $repository = $this->repository; - $uri = "/_snapshot/$repository"; - - if (isset($repository) === true) { - $uri = "/_snapshot/$repository"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'timeout', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Get.php deleted file mode 100644 index 57af42b36..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Get.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - // A comma-separated list of repository names - private $repository; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $repository = $this->repository; - $uri = "/_snapshot"; - - if (isset($repository) === true) { - $uri = "/_snapshot/$repository"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Verify.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Verify.php deleted file mode 100644 index ebd8fa3ee..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Repository/Verify.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Verify extends AbstractEndpoint -{ - // A comma-separated list of repository names - private $repository; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) - { - if (isset($repository) !== true) { - return $this; - } - - $this->repository = $repository; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - $repository = $this->repository; - if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'repository is required for Verify' - ); - } - - $uri = "/_snapshot/$repository/_verify"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'local', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Restore.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Restore.php index 193d2031e..78808b6f8 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Restore.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Restore.php @@ -1,119 +1,94 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Restore extends AbstractEndpoint { - // A repository name - private $repository; + protected $repository; + protected $snapshot; + + public function getURI(): string + { + if (isset($this->repository) !== true) { + throw new RuntimeException( + 'repository is required for Restore' + ); + } + $repository = $this->repository; + if (isset($this->snapshot) !== true) { + throw new RuntimeException( + 'snapshot is required for Restore' + ); + } + $snapshot = $this->snapshot; + + return "/_snapshot/$repository/$snapshot/_restore"; + } - // A snapshot name - private $snapshot; + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'wait_for_completion' + ]; + } - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): Restore { if (isset($body) !== true) { return $this; } - $this->body = $body; return $this; } - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) + public function setRepository($repository): Restore { if (isset($repository) !== true) { return $this; } - $this->repository = $repository; return $this; } - /** - * @param $snapshot - * - * @return $this - */ - public function setSnapshot($snapshot) + public function setSnapshot($snapshot): Restore { if (isset($snapshot) !== true) { return $this; } - $this->snapshot = $snapshot; return $this; } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'repository is required for Restore' - ); - } - if (isset($this->snapshot) !== true) { - throw new Exceptions\RuntimeException( - 'snapshot is required for Restore' - ); - } - $repository = $this->repository; - $snapshot = $this->snapshot; - $uri = "/_snapshot/$repository/$snapshot/_restore"; - - if (isset($repository) === true && isset($snapshot) === true) { - $uri = "/_snapshot/$repository/$snapshot/_restore"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'wait_for_completion', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Status.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Status.php index b8e6aba83..96ed3499b 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Status.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/Status.php @@ -1,100 +1,87 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Status extends AbstractEndpoint { - // A comma-separated list of repository names - private $repository; + protected $repository; + protected $snapshot; - // A comma-separated list of snapshot names - private $snapshot; - - /** - * @param $repository - * - * @return $this - */ - public function setRepository($repository) + public function getURI(): string { - if (isset($repository) !== true) { - return $this; + if (isset($this->snapshot) === true && isset($this->repository) !== true) { + throw new \Elasticsearch\Common\Exceptions\RuntimeException( + 'Repository param must be provided if snapshot param is set' + ); } + $repository = $this->repository ?? null; + $snapshot = $this->snapshot ?? null; - $this->repository = $repository; + if (isset($repository) && isset($snapshot)) { + return "/_snapshot/$repository/$snapshot/_status"; + } + if (isset($repository)) { + return "/_snapshot/$repository/_status"; + } + return "/_snapshot/_status"; + } - return $this; + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'ignore_unavailable' + ]; } - /** - * @param $snapshot - * - * @return $this - */ - public function setSnapshot($snapshot) + public function getMethod(): string { - if (isset($snapshot) !== true) { + return 'GET'; + } + + public function setRepository($repository): Status + { + if (isset($repository) !== true) { return $this; } - - $this->snapshot = $snapshot; + $this->repository = $repository; return $this; } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function setSnapshot($snapshot): Status { - if (isset($this->snapshot) === true && isset($this->repository) !== true) { - throw new Exceptions\RuntimeException( - 'Repository param must be provided if snapshot param is set' - ); + if (isset($snapshot) !== true) { + return $this; } - - $repository = $this->repository; - $snapshot = $this->snapshot; - $uri = "/_snapshot/_status"; - - if (isset($repository) === true) { - $uri = "/_snapshot/$repository/_status"; - } elseif (isset($repository) === true && isset($snapshot) === true) { - $uri = "/_snapshot/$repository/$snapshot/_status"; + if (is_array($snapshot) === true) { + $snapshot = implode(",", $snapshot); } + $this->snapshot = $snapshot; - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'master_timeout', - 'ignore_unavailable' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php new file mode 100644 index 000000000..e848aac38 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php @@ -0,0 +1,67 @@ +repository) !== true) { + throw new RuntimeException( + 'repository is required for Verify_repository' + ); + } + $repository = $this->repository; + + return "/_snapshot/$repository/_verify"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setRepository($repository): VerifyRepository + { + if (isset($repository) !== true) { + return $this; + } + $this->repository = $repository; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Source/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Source/Get.php deleted file mode 100644 index 0e8ac26b5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Source/Get.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for Get' - ); - } - if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for Get' - ); - } - if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for Get' - ); - } - $id = $this->id; - $index = $this->index; - $type = $this->type; - $uri = "/$index/$type/$id/_source"; - - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id/_source"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'parent', - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_exclude', - '_source_include', - 'version', - 'version_type', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/ClearCursor.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/ClearCursor.php new file mode 100644 index 000000000..3fc310a9c --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/ClearCursor.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Query.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Query.php new file mode 100644 index 000000000..817920a26 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Query.php @@ -0,0 +1,58 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): Query + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Translate.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Translate.php new file mode 100644 index 000000000..e38f9a307 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Sql/Translate.php @@ -0,0 +1,58 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): Translate + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ssl/Certificates.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ssl/Certificates.php new file mode 100644 index 000000000..e226d79e7 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Ssl/Certificates.php @@ -0,0 +1,48 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Suggest extends AbstractEndpoint -{ - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - - return $this; - } - - /** - * @return string - */ - public function getURI() - { - $index = $this->index; - $uri = "/_suggest"; - - if (isset($index) === true) { - $uri = "/$index/_suggest"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'preference', - 'routing', - 'source', - ); - } - - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for Suggest'); - } - - return $this->body; - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Cancel.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Cancel.php index ff2405b2d..ff92e992f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Cancel.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Cancel.php @@ -1,71 +1,65 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Cancel extends AbstractEndpoint { - private $taskId; + protected $task_id; - /** - * @param string $taskId - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setTaskId($taskId) + public function getURI(): string { - if (isset($taskId) !== true) { - return $this; - } - - $this->taskId = $taskId; - - return $this; - } + $task_id = $this->task_id ?? null; - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) === true) { - return "/_tasks/{$this->taskId}/_cancel"; + if (isset($task_id)) { + return "/_tasks/$task_id/_cancel"; } - return "/_tasks/_cancel"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'node_id', + return [ + 'nodes', 'actions', - 'parent_node', - 'parent_task', - ); + 'parent_task_id' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setTaskId($task_id): Cancel + { + if (isset($task_id) !== true) { + return $this; + } + $this->task_id = $task_id; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Get.php index 4e7318d06..c71866a95 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Get.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/Get.php @@ -1,68 +1,67 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Get extends AbstractEndpoint { - private $taskId; + protected $task_id; - /** - * @param string $taskId - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setTaskId($taskId) + public function getURI(): string { - if (isset($taskId) !== true) { - return $this; + if (isset($this->task_id) !== true) { + throw new RuntimeException( + 'task_id is required for Get' + ); } + $task_id = $this->task_id; - $this->taskId = $taskId; - - return $this; + return "/_tasks/$task_id"; } - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getParamWhitelist(): array { - if (isset($this->taskId) === true) { - return "/_tasks/{$this->taskId}"; - } - - return "/_tasks"; + return [ + 'wait_for_completion', + 'timeout' + ]; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getMethod(): string { - return array( - 'wait_for_completion' - ); + return 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setTaskId($task_id): Get { - return 'GET'; + if (isset($task_id) !== true) { + return $this; + } + $this->task_id = $task_id; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/ListTasks.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/ListTasks.php new file mode 100644 index 000000000..9ecec6cd2 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Tasks/ListTasks.php @@ -0,0 +1,54 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class TasksList extends AbstractEndpoint -{ - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - return "/_tasks"; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'node_id', - 'actions', - 'detailed', - 'parent_node', - 'parent_task', - 'wait_for_completion', - 'group_by', - 'task_id' - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Delete.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Delete.php deleted file mode 100644 index b3593ba27..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Delete.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Delete extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for Delete' - ); - } - $templateId = $this->id; - $uri = "/_search/template/$templateId"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array(); - } - - /** - * @return string - */ - public function getMethod() - { - return 'DELETE'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Get.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Get.php deleted file mode 100644 index 954ecdda1..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Template/Get.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Get extends AbstractEndpoint -{ - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() - { - if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( - 'id is required for Get' - ); - } - $templateId = $this->id; - $uri = "/_search/template/$templateId"; - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array(); - } - - /** - * @return string - */ - public function getMethod() - { - return 'GET'; - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/TermVectors.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/TermVectors.php index 20077b121..cc65890b1 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/TermVectors.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/TermVectors.php @@ -1,77 +1,59 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class TermVectors extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( - 'index is required for TermVectors' + throw new RuntimeException( + 'index is required for Termvectors' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( - 'type is required for TermVectors' + throw new RuntimeException( + 'type is required for Termvectors' ); } - if (isset($this->id) !== true && isset($this->body['doc']) !== true) { - throw new Exceptions\RuntimeException( - 'id or doc is required for TermVectors' - ); - } - - $index = $this->index; - $type = $this->type; - $id = $this->id; - $uri = "/$index/$type/_termvectors"; + $type = $this->type; + $id = $this->id ?? null; - if ($id !== null) { - $uri = "/$index/$type/$id/_termvectors"; + if (isset($id)) { + return "/$index/$type/$id/_termvectors"; } - - return $uri; + return "/$index/$type/_termvectors"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( + return [ 'term_statistics', 'field_statistics', 'fields', @@ -81,15 +63,24 @@ public function getParamWhitelist() 'preference', 'routing', 'parent', - 'realtime' - ); + 'realtime', + 'version', + 'version_type' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; } - /** - * @return string - */ - public function getMethod() + public function setBody($body): TermVectors { - return 'POST'; + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Update.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Update.php index 9627feead..28cc1b170 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Update.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Update.php @@ -1,99 +1,91 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class Update extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - * @return string - */ - public function getURI() + public function getURI(): string { if (isset($this->id) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'id is required for Update' ); } + $id = $this->id; if (isset($this->index) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'index is required for Update' ); } + $index = $this->index; if (isset($this->type) !== true) { - throw new Exceptions\RuntimeException( + throw new RuntimeException( 'type is required for Update' ); } - $id = $this->id; - $index = $this->index; $type = $this->type; - $uri = "/$index/$type/$id/_update"; - - if (isset($index) === true && isset($type) === true && isset($id) === true) { - $uri = "/$index/$type/$id/_update"; - } - return $uri; + return "/$index/$type/$id/_update"; } - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { - return array( - 'consistency', + return [ + 'wait_for_active_shards', 'fields', + '_source', + '_source_excludes', + '_source_includes', 'lang', 'parent', 'refresh', - 'replication', 'retry_on_conflict', 'routing', - 'script', 'timeout', - 'timestamp', - 'ttl', + 'if_seq_no', + 'if_primary_term', 'version', - 'version_type', - '_source' - ); + 'version_type' + ]; } - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setBody($body): Update + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQuery.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQuery.php index 79a19e7ee..0615b0677 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQuery.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQuery.php @@ -1,84 +1,64 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class UpdateByQuery extends AbstractEndpoint { - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - if (is_array($body) !== true) { - throw new Exceptions\InvalidArgumentException( - 'Body must be an array' - ); - } - $this->body = $body; - - return $this; - } - - /** - * @throws \Elasticsearch\Common\Exceptions\BadMethodCallException - * @return string - */ - public function getURI() + public function getURI(): string { - if (!$this->index) { - throw new Exceptions\RuntimeException( - 'index is required for UpdateByQuery' + if (isset($this->index) !== true) { + throw new RuntimeException( + 'index is required for Update_by_query' ); } + $index = $this->index; + $type = $this->type ?? null; - $uri = "/{$this->index}/_update_by_query"; - if ($this->type) { - $uri = "/{$this->index}/{$this->type}/_update_by_query"; + if (isset($type)) { + return "/$index/$type/_update_by_query"; } - - return $uri; + return "/$index/_update_by_query"; } - - /** - * @return string[] - */ - public function getParamWhitelist() + public function getParamWhitelist(): array { return [ 'analyzer', 'analyze_wildcard', 'default_operator', 'df', - 'explain', - 'fields', - 'fielddata_fields', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', - 'lowercase_expanded_terms', + 'pipeline', 'preference', 'q', 'routing', @@ -88,32 +68,35 @@ public function getParamWhitelist() 'size', 'sort', '_source', - '_source_exclude', - '_source_include', + '_source_excludes', + '_source_includes', 'terminate_after', 'stats', - 'suggest_field', - 'suggest_mode', - 'suggest_size', - 'suggest_text', - 'timeout', - 'track_scores', 'version', 'version_type', 'request_cache', 'refresh', - 'consistency', + 'timeout', + 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', + 'requests_per_second', + 'slices' ]; } - - /** - * @return string - */ - public function getMethod() + public function getMethod(): string { return 'POST'; } + + public function setBody($body): UpdateByQuery + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php new file mode 100644 index 000000000..53308afdc --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/UpdateByQueryRethrottle.php @@ -0,0 +1,66 @@ +task_id) !== true) { + throw new RuntimeException( + 'task_id is required for Update_by_query_rethrottle' + ); + } + $task_id = $this->task_id; + + return "/_update_by_query/$task_id/_rethrottle"; + } + + public function getParamWhitelist(): array + { + return [ + 'requests_per_second' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setTaskId($task_id): UpdateByQueryRethrottle + { + if (isset($task_id) !== true) { + return $this; + } + $this->task_id = $task_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/AckWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/AckWatch.php new file mode 100644 index 000000000..a666839b9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/AckWatch.php @@ -0,0 +1,84 @@ +watch_id) !== true) { + throw new RuntimeException( + 'watch_id is required for Ack_watch' + ); + } + $watch_id = $this->watch_id; + $action_id = $this->action_id ?? null; + + if (isset($action_id)) { + return "/_xpack/watcher/watch/$watch_id/_ack/$action_id"; + } + return "/_xpack/watcher/watch/$watch_id/_ack"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setWatchId($watch_id): AckWatch + { + if (isset($watch_id) !== true) { + return $this; + } + $this->watch_id = $watch_id; + + return $this; + } + + public function setActionId($action_id): AckWatch + { + if (isset($action_id) !== true) { + return $this; + } + if (is_array($action_id) === true) { + $action_id = implode(",", $action_id); + } + $this->action_id = $action_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php new file mode 100644 index 000000000..3970f65ff --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ActivateWatch.php @@ -0,0 +1,66 @@ +watch_id) !== true) { + throw new RuntimeException( + 'watch_id is required for Activate_watch' + ); + } + $watch_id = $this->watch_id; + + return "/_xpack/watcher/watch/$watch_id/_activate"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setWatchId($watch_id): ActivateWatch + { + if (isset($watch_id) !== true) { + return $this; + } + $this->watch_id = $watch_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php new file mode 100644 index 000000000..cf26d06a1 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeactivateWatch.php @@ -0,0 +1,66 @@ +watch_id) !== true) { + throw new RuntimeException( + 'watch_id is required for Deactivate_watch' + ); + } + $watch_id = $this->watch_id; + + return "/_xpack/watcher/watch/$watch_id/_deactivate"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setWatchId($watch_id): DeactivateWatch + { + if (isset($watch_id) !== true) { + return $this; + } + $this->watch_id = $watch_id; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php new file mode 100644 index 000000000..de9d6075b --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/DeleteWatch.php @@ -0,0 +1,55 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Delete_watch' + ); + } + $id = $this->id; + + return "/_xpack/watcher/watch/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php new file mode 100644 index 000000000..ee96d7a11 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/ExecuteWatch.php @@ -0,0 +1,62 @@ +id ?? null; + + if (isset($id)) { + return "/_xpack/watcher/watch/$id/_execute"; + } + return "/_xpack/watcher/watch/_execute"; + } + + public function getParamWhitelist(): array + { + return [ + 'debug' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): ExecuteWatch + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/GetWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/GetWatch.php new file mode 100644 index 000000000..e1f90c915 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/GetWatch.php @@ -0,0 +1,55 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Get_watch' + ); + } + $id = $this->id; + + return "/_xpack/watcher/watch/$id"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/PutWatch.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/PutWatch.php new file mode 100644 index 000000000..7a8091455 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/PutWatch.php @@ -0,0 +1,69 @@ +id) !== true) { + throw new RuntimeException( + 'id is required for Put_watch' + ); + } + $id = $this->id; + + return "/_xpack/watcher/watch/$id"; + } + + public function getParamWhitelist(): array + { + return [ + 'master_timeout', + 'active', + 'version', + 'if_seq_no', + 'if_primary_term' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): PutWatch + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Restart.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Restart.php new file mode 100644 index 000000000..46458fbdb --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Restart.php @@ -0,0 +1,48 @@ +metric ?? null; + + if (isset($metric)) { + return "/_xpack/watcher/stats/$metric"; + } + return "/_xpack/watcher/stats"; + } + + public function getParamWhitelist(): array + { + return [ + 'metric', + 'emit_stacktraces' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setMetric($metric): Stats + { + if (isset($metric) !== true) { + return $this; + } + $this->metric = $metric; + + return $this; + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Stop.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Stop.php new file mode 100644 index 000000000..232a46b3e --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Watcher/Stop.php @@ -0,0 +1,48 @@ + - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co * @see Iterator */ class SearchHitIterator implements Iterator, \Countable @@ -128,7 +139,7 @@ public function current() */ public function key() { - return $this->current_hit_index; + return $this->current_key; } /** diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php index f8644229d..0f6d5ac87 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php @@ -1,18 +1,29 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co * @see Iterator */ class SearchResponseIterator implements Iterator @@ -44,7 +55,7 @@ class SearchResponseIterator implements Iterator private $scroll_id; /** - * @var duration + * @var string duration */ private $scroll_ttl; @@ -52,7 +63,7 @@ class SearchResponseIterator implements Iterator * Constructor * * @param Client $client - * @param array $params Associative array of parameters + * @param array $search_params Associative array of parameters * @see Client::search() */ public function __construct(Client $client, array $search_params) @@ -128,15 +139,11 @@ public function rewind() */ public function next() { - if ($this->current_key !== 0) { - $this->current_scrolled_response = $this->client->scroll( - array( - 'scroll_id' => $this->scroll_id, - 'scroll' => $this->scroll_ttl - ) - ); - $this->scroll_id = $this->current_scrolled_response['_scroll_id']; - } + $this->current_scrolled_response = $this->client->scroll([ + 'scroll_id' => $this->scroll_id, + 'scroll' => $this->scroll_ttl + ]); + $this->scroll_id = $this->current_scrolled_response['_scroll_id']; $this->current_key++; } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php index 13b2e02f6..95318f489 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ abstract class AbstractNamespace { /** @var \Elasticsearch\Transport */ protected $transport; - /** @var callback */ + /** @var callable */ protected $endpoints; /** * Abstract constructor * * @param Transport $transport Transport object - * @param $endpoints + * @param callable $endpoints */ public function __construct($transport, $endpoints) { @@ -57,7 +68,7 @@ public function extractArgument(&$params, $arg) } /** - * @param $endpoint AbstractEndpoint + * @param AbstractEndpoint $endpoint * * @throws \Exception * @return array diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php index eb9c4cd57..00cde59e0 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ trait BooleanRequestWrapper { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CatNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CatNamespace.php index 942983813..65a35028b 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CatNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CatNamespace.php @@ -1,519 +1,507 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class CatNamespace extends AbstractNamespace { + /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['name'] = (list) A comma-separated list of alias names to return + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html */ - public function aliases($params = array()) + public function aliases(array $params = []) { $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Aliases $endpoint */ $endpoint = $endpointBuilder('Cat\Aliases'); - $endpoint->setName($name); $endpoint->setParams($params); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * - * @param $params array Associative array of parameters + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html */ - public function allocation($params = array()) + public function allocation(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); + $node_id = $this->extractArgument($params, 'node_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Allocation $endpoint */ $endpoint = $endpointBuilder('Cat\Allocation'); - $endpoint->setNodeID($nodeID); $endpoint->setParams($params); + $endpoint->setNodeId($node_id); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html */ - public function count($params = array()) + public function count(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Count $endpoint */ $endpoint = $endpointBuilder('Cat\Count'); - $endpoint->setIndex($index); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['ts'] = (bool) Set to false to disable timestamping - * - * @param $params array Associative array of parameters + * $params['fields'] = (list) A comma-separated list of fields to return the fielddata size + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html */ - public function health($params = array()) + public function fielddata(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $fields = $this->extractArgument($params, 'fields'); - /** @var \Elasticsearch\Endpoints\Cat\Health $endpoint */ - $endpoint = $endpointBuilder('Cat\Health'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Fielddata'); $endpoint->setParams($params); + $endpoint->setFields($fields); return $this->performRequest($endpoint); } - /** - * $params['help'] = (bool) Return help information - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['ts'] = (boolean) Set to false to disable timestamping (Default = true) + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html */ - public function help($params = array()) + public function health(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cat\Help $endpoint */ - $endpoint = $endpointBuilder('Cat\Help'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Health'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * ['pri'] = (bool) Set to true to return stats only for primary shards - * - * @param $params array Associative array of parameters + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html */ - public function indices($params = array()) + public function help(array $params = []) { - $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Indices $endpoint */ - $endpoint = $endpointBuilder('Cat\Indices'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cat\Help'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,m,g) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['health'] = (enum) A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (Options = green,yellow,red) + * $params['help'] = (boolean) Return help information (Default = false) + * $params['pri'] = (boolean) Set to true to return stats only for primary shards (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html */ - public function master($params = array()) + public function indices(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $index = $this->extractArgument($params, 'index'); - /** @var \Elasticsearch\Endpoints\Cat\Master $endpoint */ - $endpoint = $endpointBuilder('Cat\Master'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Indices'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html */ - public function nodes($params = array()) + public function master(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cat\Nodes $endpoint */ - $endpoint = $endpointBuilder('Cat\Nodes'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Master'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html */ - public function nodeAttrs($params = array()) + public function nodeattrs(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cat\NodeAttrs $endpoint */ + $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('Cat\NodeAttrs'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html */ - public function pendingTasks($params = array()) + public function nodes(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cat\PendingTasks $endpoint */ - $endpoint = $endpointBuilder('Cat\PendingTasks'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Nodes'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html */ - public function recovery($params = array()) + public function pendingTasks(array $params = []) { - $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Recovery $endpoint */ - $endpoint = $endpointBuilder('Cat\Recovery'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cat\PendingTasks'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html */ - public function repositories($params = array()) + public function plugins(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cat\Repositories $endpoint */ - $endpoint = $endpointBuilder('Cat\Repositories'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Plugins'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html */ - public function shards($params = array()) + public function recovery(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Shards $endpoint */ - $endpoint = $endpointBuilder('Cat\Shards'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cat\Recovery'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * ['repository'] = (string) Name of repository from which to fetch the snapshot information - * - * @param $params array Associative array of parameters + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html */ - public function snapshots($params = array()) + public function repositories(array $params = []) { - $repository = $this->extractArgument($params, 'repository'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Snapshots $endpoint */ - $endpoint = $endpointBuilder('Cat\Snapshots'); - $endpoint->setRepository($repository); + $endpoint = $endpointBuilder('Cat\Repositories'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['full_id'] = (bool) Enables displaying the complete node ids - * ['size'] = (enum) The multiplier in which to display values ([ "", "k", "m", "g", "t", "p" ]) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html */ - public function threadPool($params = array()) + public function segments(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\ThreadPool $endpoint */ - $endpoint = $endpointBuilder('Cat\ThreadPool'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cat\Segments'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * ['fields'] = (list) A comma-separated list of fields to return the fielddata size - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to limit the returned information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html */ - public function fielddata($params = array()) + public function shards(array $params = []) { - $fields = $this->extractArgument($params, 'fields'); + $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Fielddata $endpoint */ - $endpoint = $endpointBuilder('Cat\Fielddata'); - $endpoint->setFields($fields); + $endpoint = $endpointBuilder('Cat\Shards'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters - * + * $params['repository'] = (list) Name of repository from which to fetch the snapshot information + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html */ - public function plugins($params = array()) + public function snapshots(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $repository = $this->extractArgument($params, 'repository'); - /** @var \Elasticsearch\Endpoints\Cat\Plugins $endpoint */ - $endpoint = $endpointBuilder('Cat\Plugins'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Snapshots'); $endpoint->setParams($params); + $endpoint->setRepository($repository); return $this->performRequest($endpoint); } - /** - * $params['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters - * + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. + * $params['detailed'] = (boolean) Return detailed task information (default: false) + * $params['parent_task'] = (number) Return tasks with specified parent task id. Set to -1 to return all. + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html */ - public function segments($params = array()) + public function tasks(array $params = []) { - $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Segments $endpoint */ - $endpoint = $endpointBuilder('Cat\Segments'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cat\Tasks'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** + * $params['name'] = (string) A pattern that returned template names must match * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml - * ['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['format'] = (string) a short version of the Accept header, e.g. json, yaml - * ['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. - * ['detailed'] = (boolean) Return detailed task information (default: false) - * ['parent_node'] = (string) Return tasks with specified parent node. - * ['parent_task'] = (number) Return tasks with specified parent task id. Set to -1 to return all. - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * - * @param $params array Associative array of parameters + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html */ - public function tasks($params = array()) + public function templates(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $name = $this->extractArgument($params, 'name'); - /** @var \Elasticsearch\Endpoints\Cat\Tasks $endpoint */ - $endpoint = $endpointBuilder('Cat\Tasks'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cat\Templates'); $endpoint->setParams($params); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['h'] = (list) Comma-separated list of column names to display - * ['help'] = (bool) Return help information - * ['v'] = (bool) Verbose mode. Display column headers - * ['bytes'] = (enum) The unit in which to display byte values - * - * @param $params array Associative array of parameters - * + * $params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['size'] = (enum) The multiplier in which to display values (Options = ,k,m,g,t,p) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['h'] = (list) Comma-separated list of column names to display + * $params['help'] = (boolean) Return help information (Default = false) + * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by + * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html */ - public function templates($params = array()) + public function threadPool(array $params = []) { - $name = $this->extractArgument($params, 'name'); + $thread_pool_patterns = $this->extractArgument($params, 'thread_pool_patterns'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cat\Templates $endpoint */ - $endpoint = $endpointBuilder('Cat\Templates'); - $endpoint->setName($name) - ->setParams($params); + $endpoint = $endpointBuilder('Cat\ThreadPool'); + $endpoint->setParams($params); + $endpoint->setThreadPoolPatterns($thread_pool_patterns); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CcrNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CcrNamespace.php new file mode 100644 index 000000000..f86985892 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/CcrNamespace.php @@ -0,0 +1,232 @@ +extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\DeleteAutoFollowPattern'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the follower index (Required) + * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) (Default = 0) + * $params['body'] = (array) The name of the leader index and other optional ccr related parameters (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + */ + public function follow(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\Follow'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + */ + public function followInfo(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\FollowInfo'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + */ + public function followStats(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\FollowStats'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) the name of the leader index for which specified follower retention leases should be removed (Required) + * $params['body'] = (array) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current + */ + public function forgetFollower(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\ForgetFollower'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) The name of the auto follow pattern. + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + */ + public function getAutoFollowPattern(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\GetAutoFollowPattern'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the follower index that should pause following its leader index. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + */ + public function pauseFollow(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\PauseFollow'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) The name of the auto follow pattern. (Required) + * $params['body'] = (array) The specification of the auto follow pattern (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + */ + public function putAutoFollowPattern(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\PutAutoFollowPattern'); + $endpoint->setParams($params); + $endpoint->setName($name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the follow index to resume following. (Required) + * $params['body'] = (array) The name of the leader index and other optional ccr related parameters + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + */ + public function resumeFollow(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\ResumeFollow'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + public function stats(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\Stats'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the follower index that should be turned into a regular index. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current + */ + public function unfollow(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ccr\Unfollow'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/ClusterNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/ClusterNamespace.php index ac9af6d4e..cb9f5d2ea 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/ClusterNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/ClusterNamespace.php @@ -1,222 +1,222 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class ClusterNamespace extends AbstractNamespace { + /** - * $params['index'] = (string) Limit the information returned to a specific index - * ['level'] = (enum) Specify the level of detail for returned information - * ['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * ['wait_for_active_shards'] = (number) Wait until the specified number of shards is active - * ['wait_for_nodes'] = (number) Wait until the specified number of nodes is available - * ['wait_for_relocating_shards'] = (number) Wait until the specified number of relocating shards is finished - * ['wait_for_status'] = (enum) Wait until cluster is in a specific state - * - * @param $params array Associative array of parameters + * $params['include_yes_decisions'] = (boolean) Return 'YES' decisions in explanation (default: false) + * $params['include_disk_info'] = (boolean) Return information about disk usage and shard sizes (default: false) + * $params['body'] = (array) The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html */ - public function health($params = array()) + public function allocationExplain(array $params = []) { - $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Health $endpoint */ - $endpoint = $endpointBuilder('Cluster\Health'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Cluster\AllocationExplain'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['dry_run'] = (boolean) Simulate the operation only and return the resulting state - * ['filter_metadata'] = (boolean) Don't return cluster state metadata (default: false) - * ['body'] = (boolean) Don't return cluster state metadata (default: false) - * ['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed - * - * @param $params array Associative array of parameters + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout + * $params['include_defaults'] = (boolean) Whether to return all default clusters setting. (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html */ - public function reroute($params = array()) + public function getSettings(array $params = []) { - $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Reroute $endpoint */ - $endpoint = $endpointBuilder('Cluster\Reroute'); - $endpoint->setBody($body); + $endpoint = $endpointBuilder('Cluster\GetSettings'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['filter_blocks'] = (boolean) Do not return information about blocks - * ['filter_index_templates'] = (boolean) Do not return information about index templates - * ['filter_indices'] = (list) Limit returned metadata information to specific indices - * ['filter_metadata'] = (boolean) Do not return information about indices metadata - * ['filter_nodes'] = (boolean) Do not return information about nodes - * ['filter_routing_table'] = (boolean) Do not return information about shard allocation (`routing_table` and `routing_nodes`) - * ['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Specify timeout for connection to master - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) Limit the information returned to a specific index + * $params['level'] = (enum) Specify the level of detail for returned information (Options = cluster,indices,shards) (Default = cluster) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout + * $params['wait_for_active_shards'] = (string) Wait until the specified number of shards is active + * $params['wait_for_nodes'] = (string) Wait until the specified number of nodes is available + * $params['wait_for_events'] = (enum) Wait until all currently queued events with the given priority are processed (Options = immediate,urgent,high,normal,low,languid) + * $params['wait_for_no_relocating_shards'] = (boolean) Whether to wait until there are no relocating shards in the cluster + * $params['wait_for_no_initializing_shards'] = (boolean) Whether to wait until there are no initializing shards in the cluster + * $params['wait_for_status'] = (enum) Wait until cluster is in a specific state (Options = green,yellow,red) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html */ - public function state($params = array()) + public function health(array $params = []) { $index = $this->extractArgument($params, 'index'); - $metric = $this->extractArgument($params, 'metric'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\State $endpoint */ - $endpoint = $endpointBuilder('Cluster\State'); - $endpoint->setParams($params) - ->setIndex($index) - ->setMetric($metric); + $endpoint = $endpointBuilder('Cluster\Health'); + $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) - * ['human'] = (boolean) Whether to return time and byte values in human-readable format. - * - * @param $params array Associative array of parameters + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html */ - public function stats($params = array()) + public function pendingTasks(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Stats $endpoint */ - $endpoint = $endpointBuilder('Cluster\Stats'); - $endpoint->setNodeID($nodeID) - ->setParams($params); + $endpoint = $endpointBuilder('Cluster\PendingTasks'); + $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['body'] = () - * - * @param $params array Associative array of parameters + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout + * $params['body'] = (array) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html */ - public function putSettings($params = array()) + public function putSettings(array $params = []) { $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Settings\Put $endpoint */ - $endpoint = $endpointBuilder('Cluster\Settings\Put'); - $endpoint->setBody($body); + $endpoint = $endpointBuilder('Cluster\PutSettings'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * @param array $params * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html */ - public function getSettings($params = array()) + public function remoteInfo(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - /** @var \Elasticsearch\Endpoints\Cluster\Settings\Put $endpoint */ - $endpoint = $endpointBuilder('Cluster\Settings\Get'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cluster\RemoteInfo'); $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['master_timeout'] = (time) Specify timeout for connection to master - * - * @param $params array Associative array of parameters - * + * $params['dry_run'] = (boolean) Simulate the operation only and return the resulting state + * $params['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed + * $params['retry_failed'] = (boolean) Retries allocation of shards that are blocked due to too many subsequent allocation failures + * $params['metric'] = (list) Limit the information returned to the specified metrics. Defaults to all but metadata (Options = _all,blocks,metadata,nodes,routing_table,master_node,version) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout + * $params['body'] = (array) The definition of `commands` to perform (`move`, `cancel`, `allocate`) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html */ - public function pendingTasks($params = array()) + public function reroute(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $body = $this->extractArgument($params, 'body'); - /** @var \Elasticsearch\Endpoints\Cluster\PendingTasks $endpoint */ - $endpoint = $endpointBuilder('Cluster\PendingTasks'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cluster\Reroute'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['include_yes_decisions'] = (bool) Return 'YES' decisions in explanation (default: false) - * - * @param $params array Associative array of parameters - * + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['metric'] = (list) Limit the information returned to the specified metrics + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['wait_for_metadata_version'] = (number) Wait for the metadata version to be equal or greater than the specified metadata version + * $params['wait_for_timeout'] = (time) The maximum time to wait for wait_for_metadata_version before timing out + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html */ - public function allocationExplain($params = array()) + public function state(array $params = []) { - $body = $this->extractArgument($params, 'body'); + $index = $this->extractArgument($params, 'index'); + $metric = $this->extractArgument($params, 'metric'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\AllocationExplain $endpoint */ - $endpoint = $endpointBuilder('Cluster\AllocationExplain'); - $endpoint->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('Cluster\State'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setMetric($metric); return $this->performRequest($endpoint); } - /** - * $params[] - * - * @param $params array Associative array of parameters + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html */ - public function remoteInfo($params = array()) + public function stats(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $node_id = $this->extractArgument($params, 'node_id'); - /** @var \Elasticsearch\Endpoints\Cluster\RemoteInfo $endpoint */ - $endpoint = $endpointBuilder('Cluster\RemoteInfo'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Cluster\Stats'); + $endpoint->setParams($params); + $endpoint->setNodeId($node_id); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/GraphNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/GraphNamespace.php new file mode 100644 index 000000000..cb8d929d9 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/GraphNamespace.php @@ -0,0 +1,56 @@ +extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Graph\Explore'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IlmNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IlmNamespace.php new file mode 100644 index 000000000..2f753a5ae --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IlmNamespace.php @@ -0,0 +1,208 @@ +extractArgument($params, 'policy'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\DeleteLifecycle'); + $endpoint->setParams($params); + $endpoint->setPolicy($policy); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the index to explain + * $params['human'] = (boolean) Return data such as dates in a human readable format (Default = true) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + */ + public function explainLifecycle(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\ExplainLifecycle'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['policy'] = (string) The name of the index lifecycle policy + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + */ + public function getLifecycle(array $params = []) + { + $policy = $this->extractArgument($params, 'policy'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\GetLifecycle'); + $endpoint->setParams($params); + $endpoint->setPolicy($policy); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + */ + public function getStatus(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\GetStatus'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the index whose lifecycle step is to change + * $params['body'] = (array) The new lifecycle step to move to + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + */ + public function moveToStep(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\MoveToStep'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['policy'] = (string) The name of the index lifecycle policy + * $params['body'] = (array) The lifecycle policy definition to register + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + */ + public function putLifecycle(array $params = []) + { + $policy = $this->extractArgument($params, 'policy'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\PutLifecycle'); + $endpoint->setParams($params); + $endpoint->setPolicy($policy); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the index to remove policy on + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + */ + public function removePolicy(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\RemovePolicy'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the indices (comma-separated) whose failed lifecycle step is to be retry + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + */ + public function retry(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\Retry'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + */ + public function start(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\Start'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + */ + public function stop(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\Stop'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php index 44d469056..e74debc84 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php @@ -1,1165 +1,1018 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class IndicesNamespace extends AbstractNamespace { + /** - * $params['index'] = (list) A comma-separated list of indices to check (Required) - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the index to scope the operation + * $params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed * - * @return boolean + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html */ - public function exists($params) + public function analyze(array $params = []) { $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); - //manually make this verbose so we can check status code - $params['client']['verbose'] = true; - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Exists $endpoint */ - $endpoint = $endpointBuilder('Indices\Exists'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Analyze'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to check (Required) - * ['feature'] = (list) A comma-separated list of features to return - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * ['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index name to limit the operation + * $params['field_data'] = (boolean) Clear field data. This is deprecated. Prefer `fielddata`. + * $params['fielddata'] = (boolean) Clear field data + * $params['fields'] = (list) A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) + * $params['query'] = (boolean) Clear query caches + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['request_cache'] = (boolean) Clear request cache + * $params['request'] = (boolean) Clear request cache * - * @return bool + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html */ - public function get($params) + public function clearCache(array $params = []) { $index = $this->extractArgument($params, 'index'); - $feature = $this->extractArgument($params, 'feature'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Get'); - $endpoint->setIndex($index) - ->setFeature($feature) - ->setParams($params); + $endpoint = $endpointBuilder('Indices\ClearCache'); + $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['operation_threading'] = () TODO: ? - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma separated list of indices to close (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html */ - public function segments($params = array()) + public function close(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Segments $endpoint */ - $endpoint = $endpointBuilder('Indices\Segments'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Close'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['name'] = (string) The name of the template (Required) - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the index (Required) + * $params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings. + * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for before the operation returns. + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['update_all_types'] = (boolean) Whether to update the mapping for all fields with the same name across all types or not + * $params['body'] = (array) The configuration for the index (`settings` and `mappings`) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html */ - public function deleteTemplate($params) + public function create(array $params = []) { - $name = $this->extractArgument($params, 'name'); + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Template\Delete $endpoint */ - $endpoint = $endpointBuilder('Indices\Template\Delete'); - $endpoint->setName($name); + $endpoint = $endpointBuilder('Indices\Create'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of indices to delete; use `_all` or empty string to delete all indices - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) + * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false) + * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html */ - public function delete($params = array()) + public function delete(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Delete $endpoint */ $endpoint = $endpointBuilder('Indices\Delete'); - $endpoint->setIndex($index); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['fields'] = (boolean) A comma-separated list of fields for `fielddata` metric (supports wildcards) - * ['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['indexing_types'] = (list) A comma-separated list of document types to include in the `indexing` statistics - * ['metric_family'] = (enum) Limit the information returned to a specific metric - * ['search_groups'] = (list) A comma-separated list of search groups to include in the `search` statistics - * ['all'] = (boolean) Return all available information - * ['clear'] = (boolean) Reset the default level of detail - * ['docs'] = (boolean) Return information about indexed and deleted documents - * ['fielddata'] = (boolean) Return information about field data - * ['filter_cache'] = (boolean) Return information about filter cache - * ['flush'] = (boolean) Return information about flush operations - * ['get'] = (boolean) Return information about get operations - * ['groups'] = (boolean) A comma-separated list of search groups for `search` statistics - * ['id_cache'] = (boolean) Return information about ID cache - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['indexing'] = (boolean) Return information about indexing operations - * ['merge'] = (boolean) Return information about merge operations - * ['refresh'] = (boolean) Return information about refresh operations - * ['search'] = (boolean) Return information about search operations; use the `groups` parameter to include information for specific search groups - * ['store'] = (boolean) Return information about the size of the index - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names (supports wildcards); use `_all` for all indices (Required) + * $params['name'] = (list) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. (Required) + * $params['timeout'] = (time) Explicit timestamp for the document + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html */ - public function stats($params = array()) + public function deleteAlias(array $params = []) { - $metric = $this->extractArgument($params, 'metric'); - $index = $this->extractArgument($params, 'index'); + $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Stats $endpoint */ - $endpoint = $endpointBuilder('Indices\Stats'); - $endpoint->setIndex($index) - ->setMetric($metric); + $endpoint = $endpointBuilder('Indices\DeleteAlias'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['body'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * - * @param $params array Associative array of parameters + * $params['name'] = (string) The name of the template (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html */ - public function putSettings($params = array()) + public function deleteTemplate(array $params = []) { - $index = $this->extractArgument($params, 'index'); - - $body = $this->extractArgument($params, 'body'); + $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Settings\Put $endpoint */ - $endpoint = $endpointBuilder('Indices\Settings\Put'); - $endpoint->setIndex($index) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\DeleteTemplate'); $endpoint->setParams($params); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names (Required) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) + * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false) + * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open) + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) * - * @return array + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html */ - public function snapshotIndex($params = array()) + public function exists(array $params = []): bool { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var \Elasticsearch\Endpoints\Indices\Gateway\Snapshot $endpoint */ - $endpoint = $endpointBuilder('Indices\Gateway\Snapshot'); - $endpoint->setIndex($index); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Indices\Exists'); $endpoint->setParams($params); + $endpoint->setIndex($index); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (string) The name of the source index to shrink - * ['target'] = (string) The name of the target index to shrink into - * ['timeout'] = (time) Explicit operation timeout - * ['master_timeout'] = (time) Specify timeout for connection to master - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to filter aliases + * $params['name'] = (list) A comma-separated list of alias names to return (Required) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = all) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * - * @return array + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html */ - public function shrink($params = array()) + public function existsAlias(array $params = []): bool { $index = $this->extractArgument($params, 'index'); - $target = $this->extractArgument($params, 'target'); - $body = $this->extractArgument($params, 'body'); + $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var \Elasticsearch\Endpoints\Indices\Shrink $endpoint */ - $endpoint = $endpointBuilder('Indices\Shrink'); - $endpoint->setIndex($index) - ->setTarget($target) - ->setBody($body); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Indices\ExistsAlias'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setName($name); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['type'] = (list) A comma-separated list of document types + * $params['name'] = (list) The comma separated names of the index templates (Required) + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * - * @param $params array Associative array of parameters - * - * @return array + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html */ - public function getMapping($params = array()) + public function existsTemplate(array $params = []): bool { - $index = $this->extractArgument($params, 'index'); + $name = $this->extractArgument($params, 'name'); - $type = $this->extractArgument($params, 'type'); + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Mapping\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Mapping\Get'); - $endpoint->setIndex($index) - ->setType($type); + $endpoint = $endpointBuilder('Indices\ExistsTemplate'); $endpoint->setParams($params); + $endpoint->setName($name); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['type'] = (list) A comma-separated list of document types - * ['field'] = (list) A comma-separated list of document fields - * ['include_defaults'] = (bool) specifies default mapping values should be returned - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices (Required) + * $params['type'] = (list) A comma-separated list of document types to check (Required) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * - * @return array + * @param array $params Associative array of parameters + * @return bool + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html */ - public function getFieldMapping($params = array()) + public function existsType(array $params = []): bool { $index = $this->extractArgument($params, 'index'); $type = $this->extractArgument($params, 'type'); - $fields = $this->extractArgument($params, 'fields'); - - if (!isset($fields)) { - $fields = $this->extractArgument($params, 'field'); - } + // manually make this verbose so we can check status code + $params['client']['verbose'] = true; - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Mapping\GetField $endpoint */ - $endpoint = $endpointBuilder('Indices\Mapping\GetField'); - $endpoint->setIndex($index) - ->setType($type) - ->setFields($fields); - + $endpoint = $endpointBuilder('Indices\ExistsType'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); - return $this->performRequest($endpoint); + return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } - /** * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['force'] = (boolean) TODO: ? - * ['full'] = (boolean) TODO: ? - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['force'] = (boolean) Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + * $params['wait_if_ongoing'] = (boolean) If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html */ - public function flush($params = array()) + public function flush(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */ $endpoint = $endpointBuilder('Indices\Flush'); - $endpoint->setIndex($index); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['force'] = (boolean) TODO: ? - * ['full'] = (boolean) TODO: ? - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html */ - public function flushSynced($params = array()) + public function flushSynced(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */ - $endpoint = $endpointBuilder('Indices\Flush'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\FlushSynced'); $endpoint->setParams($params); - $endpoint->setSynced(true); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['operation_threading'] = () TODO: ? - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic) + * $params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html */ - public function refresh($params = array()) + public function forcemerge(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Refresh $endpoint */ - $endpoint = $endpointBuilder('Indices\Refresh'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\ForceMerge'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['detailed'] = (bool) Whether to display detailed information about shard recovery - * ['active_only'] = (bool) Display only those recoveries that are currently on-going - * ['human'] = (bool) Whether to return time and byte values in human-readable format. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names (Required) + * $params['include_type_name'] = (boolean) Whether to add the type name to the response (default: true) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) + * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false) + * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open) + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) + * $params['master_timeout'] = (time) Specify timeout for connection to master * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html */ - public function recovery($params = array()) + public function get(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Flush $endpoint */ - $endpoint = $endpointBuilder('Indices\Recovery'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Get'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices (Required) - * ['type'] = (list) A comma-separated list of document types to check (Required) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters - * - * @return boolean - */ - public function existsType($params) - { - $index = $this->extractArgument($params, 'index'); - - $type = $this->extractArgument($params, 'type'); - - //manually make this verbose so we can check status code - $params['client']['verbose'] = true; - - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Type\Exists $endpoint */ - $endpoint = $endpointBuilder('Indices\Type\Exists'); - $endpoint->setIndex($index) - ->setType($type); - $endpoint->setParams($params); - - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); - } - - /** - * $params['index'] = (string) The name of the index with an alias - * ['name'] = (string) The name of the alias to be created or updated - * ['timeout'] = (time) Explicit timestamp for the document - * ['body'] = (time) Explicit timestamp for the document - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to filter aliases + * $params['name'] = (list) A comma-separated list of alias names to return + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = all) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html */ - public function putAlias($params = array()) + public function getAlias(array $params = []) { $index = $this->extractArgument($params, 'index'); - $name = $this->extractArgument($params, 'name'); - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Alias\Put $endpoint */ - $endpoint = $endpointBuilder('Indices\Alias\Put'); - $endpoint->setIndex($index) - ->setName($name) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\GetAlias'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['name'] = (string) The name of the template (Required) - * ['order'] = (number) The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) - * ['timeout'] = (time) Explicit operation timeout - * ['body'] = (time) Explicit operation timeout - * ['create'] = (bool) Whether the index template should only be added if new or can also replace an existing one - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names + * $params['type'] = (list) A comma-separated list of document types + * $params['fields'] = (list) A comma-separated list of fields (Required) + * $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. + * $params['include_defaults'] = (boolean) Whether the default mapping values should be returned as well + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html */ - public function putTemplate($params) + public function getFieldMapping(array $params = []) { - $name = $this->extractArgument($params, 'name'); - - $body = $this->extractArgument($params, 'body'); + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $fields = $this->extractArgument($params, 'fields'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Template\Put $endpoint */ - $endpoint = $endpointBuilder('Indices\Template\Put'); - $endpoint->setName($name) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\GetFieldMapping'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setFields($fields); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices - * ['type'] = (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types - * ['explain'] = (boolean) Return detailed information about the error - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['operation_threading'] = () TODO: ? - * ['source'] = (string) The URL-encoded query definition (instead of using the request body) - * ['body'] = (string) The URL-encoded query definition (instead of using the request body) - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names + * $params['type'] = (list) A comma-separated list of document types + * $params['include_type_name'] = (boolean) Whether to add the type name to the response. + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html */ - public function validateQuery($params = array()) + public function getMapping(array $params = []) { $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Validate\Query $endpoint */ - $endpoint = $endpointBuilder('Indices\Validate\Query'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\GetMapping'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); return $this->performRequest($endpoint); } - /** - * $params['name'] = (list) A comma-separated list of alias names to return (Required) - * ['index'] = (list) A comma-separated list of index names to filter aliases - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['name'] = (list) A comma-separated list of alias names to return - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['name'] = (list) The name of the settings that should be included + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open,closed) + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html */ - public function getAlias($params) + public function getSettings(array $params = []) { $index = $this->extractArgument($params, 'index'); - $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Alias\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Alias\Get'); - $endpoint->setIndex($index) - ->setName($name); + $endpoint = $endpointBuilder('Indices\GetSettings'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` to perform the operation on all indices (Required) - * ['type'] = (string) The name of the document type - * ['ignore_conflicts'] = (boolean) Specify whether to ignore conflicts while updating the mapping (default: false) - * ['timeout'] = (time) Explicit operation timeout - * ['body'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['name'] = (list) The comma separated names of the index templates + * $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html */ - public function putMapping($params) + public function getTemplate(array $params = []) { - $index = $this->extractArgument($params, 'index'); - - $type = $this->extractArgument($params, 'type'); - - $body = $this->extractArgument($params, 'body'); + $name = $this->extractArgument($params, 'name'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Mapping\Put $endpoint */ - $endpoint = $endpointBuilder('Indices\Mapping\Put'); - $endpoint->setIndex($index) - ->setType($type) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\GetTemplate'); $endpoint->setParams($params); + $endpoint->setName($name); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` for all indices (Required) - * ['type'] = (string) The name of the document type to delete (Required) - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html */ - public function deleteMapping($params) + public function getUpgrade(array $params = []) { $index = $this->extractArgument($params, 'index'); - $type = $this->extractArgument($params, 'type'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Mapping\Delete $endpoint */ - $endpoint = $endpointBuilder('Indices\Mapping\Delete'); - $endpoint->setIndex($index) - ->setType($type); + $endpoint = $endpointBuilder('Indices\GetUpgrade'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['name'] = (string) The name of the template (Required) - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma separated list of indices to open (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = closed) + * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html */ - public function getTemplate($params) + public function open(array $params = []) { - $name = $this->extractArgument($params, 'name'); + $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Template\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Template\Get'); - $endpoint->setName($name); + $endpoint = $endpointBuilder('Indices\Open'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['name'] = (string) The name of the template (Required) + * $params['index'] = (list) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. (Required) + * $params['name'] = (string) The name of the alias to be created or updated (Required) + * $params['timeout'] = (time) Explicit timestamp for the document + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['body'] = (array) The settings for the alias, such as `routing` or `filter` * - * @param $params array Associative array of parameters - * - * @return boolean + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html */ - public function existsTemplate($params) + public function putAlias(array $params = []) { + $index = $this->extractArgument($params, 'index'); $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); - //manually make this verbose so we can check status code - $params['client']['verbose'] = true; - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Template\Exists $endpoint */ - $endpoint = $endpointBuilder('Indices\Template\Exists'); - $endpoint->setName($name); + $endpoint = $endpointBuilder('Indices\PutAlias'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setName($name); + $endpoint->setBody($body); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index (Required) - * ['timeout'] = (time) Explicit operation timeout - * ['body'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * $params['type'] = (string) The name of the document type + * $params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings. + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['update_all_types'] = (boolean) Whether to update the mapping for all fields with the same name across all types or not + * $params['body'] = (array) The mapping definition (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html */ - public function create($params) + public function putMapping(array $params = []) { $index = $this->extractArgument($params, 'index'); - + $type = $this->extractArgument($params, 'type'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Create $endpoint */ - $endpoint = $endpointBuilder('Indices\Create'); - $endpoint->setIndex($index) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\PutMapping'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true) - * ['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic) - * ['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents - * ['operation_threading'] = () TODO: ? - * ['refresh'] = (boolean) Specify whether the index should be refreshed after performing the operation (default: true) - * ['wait_for_merge'] = (boolean) Specify whether the request should block until the merge process is finished (default: true) - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['timeout'] = (time) Explicit operation timeout + * $params['preserve_existing'] = (boolean) Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['body'] = (array) The index settings to be updated (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html */ - public function forceMerge($params = array()) + public function putSettings(array $params = []) { $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\ForceMerge $endpoint */ - $endpoint = $endpointBuilder('Indices\ForceMerge'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\PutSettings'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index with an alias (Required) - * ['name'] = (string) The name of the alias to be deleted (Required) - * ['timeout'] = (time) Explicit timestamp for the document - * - * @param $params array Associative array of parameters + * $params['name'] = (string) The name of the template (Required) + * $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. + * $params['order'] = (number) The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) + * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['body'] = (array) The template definition (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html */ - public function deleteAlias($params) + public function putTemplate(array $params = []) { - $index = $this->extractArgument($params, 'index'); - $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Alias\Delete $endpoint */ - $endpoint = $endpointBuilder('Indices\Alias\Delete'); - $endpoint->setIndex($index) - ->setName($name); + $endpoint = $endpointBuilder('Indices\PutTemplate'); $endpoint->setParams($params); + $endpoint->setName($name); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index (Required) - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['detailed'] = (boolean) Whether to display detailed information about shard recovery (Default = false) + * $params['active_only'] = (boolean) Display only those recoveries that are currently on-going (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html */ - public function open($params) + public function recovery(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Open $endpoint */ - $endpoint = $endpointBuilder('Indices\Open'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Recovery'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index to scope the operation - * ['analyzer'] = (string) The name of the analyzer to use - * ['field'] = (string) Use the analyzer configured for this field (instead of passing the analyzer name) - * ['filter'] = (list) A comma-separated list of filters to use for the analysis - * ['prefer_local'] = (boolean) With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true) - * ['text'] = (string) The text on which the analysis should be performed (when request body is not used) - * ['tokenizer'] = (string) The name of the tokenizer to use for the analysis - * ['format'] = (enum) Format of the output - * ['body'] = (enum) Format of the output - * ['char_filter'] = (list) A comma-separated list of character filters to use for the analysis - * ['explain'] = (bool) With `true`, outputs more advanced details. (default: false) - * ['attributes'] = (list) A comma-separated list of token attributes to output, this parameter works only with `explain=true` - * ['format'] = (enum) Format of the output (["detailed", "text"]) - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html */ - public function analyze($params = array()) + public function refresh(array $params = []) { $index = $this->extractArgument($params, 'index'); - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Analyze $endpoint */ - $endpoint = $endpointBuilder('Indices\Analyze'); - $endpoint->setIndex($index) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\Refresh'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index name to limit the operation - * ['field_data'] = (boolean) Clear field data - * ['fielddata'] = (boolean) Clear field data - * ['fields'] = (list) A comma-separated list of fields to clear when using the `field_data` parameter (default: all) - * ['filter'] = (boolean) Clear filter caches - * ['filter_cache'] = (boolean) Clear filter caches - * ['filter_keys'] = (boolean) A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all) - * ['id'] = (boolean) Clear ID caches for parent/child - * ['id_cache'] = (boolean) Clear ID caches for parent/child - * ['recycler'] = (boolean) Clear the recycler cache - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['alias'] = (string) The name of the alias to rollover (Required) + * $params['new_index'] = (string) The name of the rollover index + * $params['include_type_name'] = (boolean) Whether a type should be included in the body of the mappings. + * $params['timeout'] = (time) Explicit operation timeout + * $params['dry_run'] = (boolean) If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the newly created rollover index before the operation returns. + * $params['body'] = (array) The conditions that needs to be met for executing rollover * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html */ - public function clearCache($params = array()) + public function rollover(array $params = []) { - $index = $this->extractArgument($params, 'index'); + $alias = $this->extractArgument($params, 'alias'); + $new_index = $this->extractArgument($params, 'new_index'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Cache\Clear $endpoint */ - $endpoint = $endpointBuilder('Indices\Cache\Clear'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Rollover'); $endpoint->setParams($params); + $endpoint->setAlias($alias); + $endpoint->setNewIndex($new_index); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names to filter aliases - * ['timeout'] = (time) Explicit timestamp for the document - * ['body'] = (time) Explicit timestamp for the document - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['verbose'] = (boolean) Includes detailed memory usage by Lucene. (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html */ - public function updateAliases($params = array()) + public function segments(array $params = []) { $index = $this->extractArgument($params, 'index'); - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Aliases\Update $endpoint */ - $endpoint = $endpointBuilder('Indices\Aliases\Update'); - $endpoint->setIndex($index) - ->setBody($body); + $endpoint = $endpointBuilder('Indices\Segments'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false) - * ['timeout'] = (time) Explicit timestamp for the document - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for (Options = green,yellow,red,all) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html */ - public function getAliases($params = array()) + public function shardStores(array $params = []) { $index = $this->extractArgument($params, 'index'); - $name = $this->extractArgument($params, 'name'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Alias\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Alias\Get'); - $endpoint->setIndex($index) - ->setName($name); + $endpoint = $endpointBuilder('Indices\ShardStores'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['name'] = (list) A comma-separated list of alias names to return (Required) - * ['index'] = (list) A comma-separated list of index names to filter aliases - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the source index to shrink (Required) + * $params['target'] = (string) The name of the target index to shrink into (Required) + * $params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns. + * $params['body'] = (array) The configuration for the target index (`settings` and `aliases`) * - * @return boolean + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html */ - public function existsAlias($params) + public function shrink(array $params = []) { $index = $this->extractArgument($params, 'index'); + $target = $this->extractArgument($params, 'target'); + $body = $this->extractArgument($params, 'body'); - $name = $this->extractArgument($params, 'name'); - - //manually make this verbose so we can check status code - $params['client']['verbose'] = true; - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Alias\Exists $endpoint */ - $endpoint = $endpointBuilder('Indices\Alias\Exists'); - $endpoint->setIndex($index) - ->setName($name); + $endpoint = $endpointBuilder('Indices\Shrink'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setTarget($target); + $endpoint->setBody($body); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones - * ['operation_threading'] = () TODO: ? - * ['recovery'] = (boolean) Return information about shard recovery - * ['snapshot'] = (boolean) TODO: ? - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the source index to split (Required) + * $params['target'] = (string) The name of the target index to split into (Required) + * $params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns. + * $params['body'] = (array) The configuration for the target index (`settings` and `aliases`) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html */ - public function status($params = array()) + public function split(array $params = []) { $index = $this->extractArgument($params, 'index'); + $target = $this->extractArgument($params, 'target'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Status $endpoint */ - $endpoint = $endpointBuilder('Indices\Status'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Split'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setTarget($target); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['metric'] = (list) Limit the information returned the specific metrics. + * $params['completion_fields'] = (list) A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * $params['fielddata_fields'] = (list) A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * $params['fields'] = (list) A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * $params['groups'] = (list) A comma-separated list of search groups for `search` index metric + * $params['level'] = (enum) Return stats aggregated at cluster, index or shard level (Options = cluster,indices,shards) (Default = indices) + * $params['types'] = (list) A comma-separated list of document types for the `indexing` index metric + * $params['include_segment_file_sizes'] = (boolean) Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html */ - public function getSettings($params = array()) + public function stats(array $params = []) { $index = $this->extractArgument($params, 'index'); + $metric = $this->extractArgument($params, 'metric'); - $name = $this->extractArgument($params, 'name'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Settings\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Settings\Get'); - $endpoint->setIndex($index) - ->setName($name); + $endpoint = $endpointBuilder('Indices\Stats'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setMetric($metric); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index (Required) - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['timeout'] = (time) Request timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['body'] = (array) The definition of `actions` to perform (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html */ - public function close($params) + public function updateAliases(array $params = []) { - $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Close $endpoint */ - $endpoint = $endpointBuilder('Indices\Close'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\UpdateAliases'); $endpoint->setParams($params); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) The name of the index - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['wait_for_completion'] = (boolean) Specify whether the request should block until the all segments are upgraded (default: false) + * $params['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html */ - public function seal($params) + public function upgrade(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Seal $endpoint */ - $endpoint = $endpointBuilder('Indices\Seal'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Upgrade'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['wait_for_completion']= (boolean) Specify whether the request should block until the all segments are upgraded (default: false) - * ['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices + * $params['type'] = (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types + * $params['explain'] = (boolean) Return detailed information about the error + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['q'] = (string) Query in the Lucene query string syntax + * $params['analyzer'] = (string) The analyzer to use for the query string + * $params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false) + * $params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR) + * $params['df'] = (string) The field to use as default where no field prefix is given in the query string + * $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + * $params['rewrite'] = (boolean) Provide a more detailed explanation showing the actual Lucene query that will be executed. + * $params['all_shards'] = (boolean) Execute validation on all shards instead of one random shard per index + * $params['body'] = (array) The query definition specified with the Query DSL * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html */ - public function upgrade($params = array()) + public function validateQuery(array $params = []) { $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Upgrade\Post $endpoint */ - $endpoint = $endpointBuilder('Indices\Upgrade\Post'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\ValidateQuery'); $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices - * ['wait_for_completion']= (boolean) Specify whether the request should block until the all segments are upgraded (default: false) - * ['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded - * ['refresh'] = (boolean) Refresh the index after performing the operation - * ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the index to freeze (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = closed) + * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html */ - public function getUpgrade($params = array()) + public function freeze(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Upgrade\Get $endpoint */ - $endpoint = $endpointBuilder('Indices\Upgrade\Get'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Freeze'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } - /** - * $params['index'] = (string) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * ['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for - * ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) - * ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * ['expand_wildcards'] = (boolean) Whether to expand wildcard expression to concrete indices that are open, closed or both. - * ['operation_threading'] - * - * @param $params array Associative array of parameters + * $params['index'] = (string) The name of the index to unfreeze (Required) + * $params['timeout'] = (time) Explicit operation timeout + * $params['master_timeout'] = (time) Specify timeout for connection to master + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = closed) + * $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html */ - public function shardStores($params) + public function unfreeze(array $params = []) { $index = $this->extractArgument($params, 'index'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\ShardStores $endpoint */ - $endpoint = $endpointBuilder('Indices\ShardStores'); - $endpoint->setIndex($index); + $endpoint = $endpointBuilder('Indices\Unfreeze'); $endpoint->setParams($params); + $endpoint->setIndex($index); return $this->performRequest($endpoint); } /** - * $params['newIndex'] = (string) The name of the rollover index - * ['alias'] = (string) The name of the alias to rollover - * ['timeout'] = (time) Explicit operation timeout - * ['master_timeout'] = (time) Specify timeout for connection to master - * - * @param $params array Associative array of parameters - * - * @return array + * Proxy to getAlias() + * + * @see https://github.com/elastic/elasticsearch-php/issues/1112 */ - public function rollover($params) + public function getAliases(array $params = []) { - $newIndex = $this->extractArgument($params, 'newIndex'); - $alias = $this->extractArgument($params, 'alias'); - $body = $this->extractArgument($params, 'body'); - - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Indices\Rollover $endpoint */ - $endpoint = $endpointBuilder('Indices\Rollover'); - $endpoint->setNewIndex($newIndex) - ->setAlias($alias) - ->setParams($params) - ->setBody($body); - - return $this->performRequest($endpoint); + return $this->getAlias($params); } } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IngestNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IngestNamespace.php index 93f904615..be715c37f 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IngestNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IngestNamespace.php @@ -1,132 +1,128 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class IngestNamespace extends AbstractNamespace { + /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Pipeline ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html */ - public function deletePipeline($params = array()) + public function deletePipeline(array $params = []) { $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Delete $endpoint */ - $endpoint = $endpointBuilder('Ingest\Pipeline\Delete'); - $endpoint->setID($id); + $endpoint = $endpointBuilder('Ingest\DeletePipeline'); $endpoint->setParams($params); + $endpoint->setId($id); return $this->performRequest($endpoint); } - /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Comma separated list of pipeline ids. Wildcards supported + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html */ - public function getPipeline($params = array()) + public function getPipeline(array $params = []) { $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Get $endpoint */ - $endpoint = $endpointBuilder('Ingest\Pipeline\Get'); - $endpoint->setID($id); + $endpoint = $endpointBuilder('Ingest\GetPipeline'); $endpoint->setParams($params); + $endpoint->setId($id); return $this->performRequest($endpoint); } - /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get */ - public function putPipeline($params = array()) + public function processorGrok(array $params = []) { - $body = $this->extractArgument($params, 'body'); - $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Put $endpoint */ - $endpoint = $endpointBuilder('Ingest\Pipeline\Put'); - $endpoint->setID($id) - ->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('Ingest\ProcessorGrok'); + $endpoint->setParams($params); return $this->performRequest($endpoint); } - /** - * $params['verbose'] = (bool) Verbose mode. Display data output for each processor in executed pipeline - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Pipeline ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['timeout'] = (time) Explicit operation timeout + * $params['body'] = (array) The ingest definition (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html */ - public function simulate($params = array()) + public function putPipeline(array $params = []) { - $body = $this->extractArgument($params, 'body'); $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Simulate $endpoint */ - $endpoint = $endpointBuilder('Ingest\Simulate'); - $endpoint->setID($id) - ->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('Ingest\PutPipeline'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params[] - * - * @param $params array Associative array of parameters + * $params['id'] = (string) Pipeline ID + * $params['verbose'] = (boolean) Verbose mode. Display data output for each processor in executed pipeline (Default = false) + * $params['body'] = (array) The simulate definition (Required) * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html */ - public function processorGrok($params = []) + public function simulate(array $params = []) { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; + $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); - /** @var ProcessorGrok $endpoint */ - $endpoint = $endpointBuilder('Ingest\ProcessorGrok'); + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ingest\Simulate'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/LicenseNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/LicenseNamespace.php new file mode 100644 index 000000000..349706b17 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/LicenseNamespace.php @@ -0,0 +1,137 @@ +endpoints; + $endpoint = $endpointBuilder('License\Delete'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-license.html + */ + public function get(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\Get'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-trial-status.html + */ + public function getBasicStatus(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\GetBasicStatus'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/get-basic-status.html + */ + public function getTrialStatus(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\GetTrialStatus'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) + * $params['body'] = (array) licenses to be installed + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/update-license.html + */ + public function post(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\Post'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/start-basic.html + */ + public function postStartBasic(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\PostStartBasic'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['type'] = (string) The type of trial license to generate (default: "trial") + * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/start-trial.html + */ + public function postStartTrial(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('License\PostStartTrial'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MigrationNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MigrationNamespace.php new file mode 100644 index 000000000..f90576238 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MigrationNamespace.php @@ -0,0 +1,88 @@ +extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Migration\Deprecations'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html + */ + public function getAssistance(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Migration\GetAssistance'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The name of the index (Required) + * $params['wait_for_completion'] = (boolean) Should the request block until the upgrade operation is completed (Default = true) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html + */ + public function upgrade(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Migration\Upgrade'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MlNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MlNamespace.php new file mode 100644 index 000000000..bee1bf9dc --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MlNamespace.php @@ -0,0 +1,1010 @@ +extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\CloseJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to delete (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function deleteCalendar(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteCalendar'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to modify (Required) + * $params['event_id'] = (string) The ID of the event to remove from the calendar (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function deleteCalendarEvent(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + $event_id = $this->extractArgument($params, 'event_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteCalendarEvent'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + $endpoint->setEventId($event_id); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to modify (Required) + * $params['job_id'] = (string) The ID of the job to remove from the calendar (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function deleteCalendarJob(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteCalendarJob'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to delete (Required) + * $params['force'] = (boolean) True if the datafeed should be forcefully deleted + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + */ + public function deleteDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + + return $this->performRequest($endpoint); + } + public function deleteExpiredData(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteExpiredData'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['filter_id'] = (string) The ID of the filter to delete (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function deleteFilter(array $params = []) + { + $filter_id = $this->extractArgument($params, 'filter_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteFilter'); + $endpoint->setParams($params); + $endpoint->setFilterId($filter_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job from which to delete forecasts (Required) + * $params['forecast_id'] = (string) The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` + * $params['allow_no_forecasts'] = (boolean) Whether to ignore if `_all` matches no forecasts + * $params['timeout'] = (time) Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + */ + public function deleteForecast(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $forecast_id = $this->extractArgument($params, 'forecast_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteForecast'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setForecastId($forecast_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to delete (Required) + * $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false) + * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + */ + public function deleteJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to fetch (Required) + * $params['snapshot_id'] = (string) The ID of the snapshot to delete (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + */ + public function deleteModelSnapshot(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $snapshot_id = $this->extractArgument($params, 'snapshot_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\DeleteModelSnapshot'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setSnapshotId($snapshot_id); + + return $this->performRequest($endpoint); + } + /** + * $params['lines_to_sample'] = (int) How many lines of the file should be included in the analysis (Default = 1000) + * $params['timeout'] = (time) Timeout after which the analysis will be aborted (Default = 25s) + * $params['charset'] = (string) Optional parameter to specify the character set of the file + * $params['format'] = (enum) Optional parameter to specify the high level file format (Options = ndjson,xml,delimited,semi_structured_text) + * $params['has_header_row'] = (boolean) Optional parameter to specify whether a delimited file includes the column names in its first row + * $params['column_names'] = (list) Optional parameter containing a comma separated list of the column names for a delimited file + * $params['delimiter'] = (string) Optional parameter to specify the delimiter character for a delimited file - must be a single character + * $params['quote'] = (string) Optional parameter to specify the quote character for a delimited file - must be a single character + * $params['should_trim_fields'] = (boolean) Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them + * $params['grok_pattern'] = (string) Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file + * $params['timestamp_field'] = (string) Optional parameter to specify the timestamp field in the file + * $params['timestamp_format'] = (string) Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format + * $params['explain'] = (boolean) Whether to include a commentary on how the structure was derived (Default = false) + * $params['body'] = (array) The contents of the file to be analyzed (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/6.7/ml-find-file-structure.html + */ + public function findFileStructure(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\FindFileStructure'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The name of the job to flush (Required) + * $params['calc_interim'] = (boolean) Calculates interim results for the most recent bucket or all buckets within the latency period + * $params['start'] = (string) When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results + * $params['end'] = (string) When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results + * $params['advance_time'] = (string) Advances time to the given value generating results and updating the model for the advanced interval + * $params['skip_time'] = (string) Skips time to the given value without generating results or updating the model for the skipped interval + * $params['body'] = (array) Flush parameters + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + */ + public function flushJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\FlushJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to forecast for (Required) + * $params['duration'] = (time) The duration of the forecast + * $params['expires_in'] = (time) The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. + * + * @param array $params Associative array of parameters + * @return array + */ + public function forecast(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\Forecast'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) ID of the job to get bucket results from (Required) + * $params['timestamp'] = (string) The timestamp of the desired single bucket result + * $params['expand'] = (boolean) Include anomaly records + * $params['exclude_interim'] = (boolean) Exclude interim results + * $params['from'] = (int) skips a number of buckets + * $params['size'] = (int) specifies a max number of buckets to get + * $params['start'] = (string) Start time filter for buckets + * $params['end'] = (string) End time filter for buckets + * $params['anomaly_score'] = (double) Filter for the most anomalous buckets + * $params['sort'] = (string) Sort buckets by a particular field + * $params['desc'] = (boolean) Set the sort direction + * $params['body'] = (array) Bucket selection details if not provided in URI + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + */ + public function getBuckets(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $timestamp = $this->extractArgument($params, 'timestamp'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetBuckets'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setTimestamp($timestamp); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar containing the events (Required) + * $params['job_id'] = (string) Get events for the job. When this option is used calendar_id must be '_all' + * $params['start'] = (string) Get events after this time + * $params['end'] = (date) Get events before this time + * $params['from'] = (int) Skips a number of events + * $params['size'] = (int) Specifies a max number of events to get + * + * @param array $params Associative array of parameters + * @return array + */ + public function getCalendarEvents(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetCalendarEvents'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to fetch + * $params['from'] = (int) skips a number of calendars + * $params['size'] = (int) specifies a max number of calendars to get + * + * @param array $params Associative array of parameters + * @return array + */ + public function getCalendars(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetCalendars'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The name of the job (Required) + * $params['category_id'] = (long) The identifier of the category definition of interest + * $params['from'] = (int) skips a number of categories + * $params['size'] = (int) specifies a max number of categories to get + * $params['body'] = (array) Category selection details if not provided in URI + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + */ + public function getCategories(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $category_id = $this->extractArgument($params, 'category_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetCategories'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setCategoryId($category_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch + * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + */ + public function getDatafeedStats(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetDatafeedStats'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeeds to fetch + * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + */ + public function getDatafeeds(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetDatafeeds'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + + return $this->performRequest($endpoint); + } + /** + * $params['filter_id'] = (string) The ID of the filter to fetch + * $params['from'] = (int) skips a number of filters + * $params['size'] = (int) specifies a max number of filters to get + * + * @param array $params Associative array of parameters + * @return array + */ + public function getFilters(array $params = []) + { + $filter_id = $this->extractArgument($params, 'filter_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetFilters'); + $endpoint->setParams($params); + $endpoint->setFilterId($filter_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) (Required) + * $params['exclude_interim'] = (boolean) Exclude interim results + * $params['from'] = (int) skips a number of influencers + * $params['size'] = (int) specifies a max number of influencers to get + * $params['start'] = (string) start timestamp for the requested influencers + * $params['end'] = (string) end timestamp for the requested influencers + * $params['influencer_score'] = (double) influencer score threshold for the requested influencers + * $params['sort'] = (string) sort field for the requested influencers + * $params['desc'] = (boolean) whether the results should be sorted in decending order + * $params['body'] = (array) Influencer selection criteria + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + */ + public function getInfluencers(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetInfluencers'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the jobs stats to fetch + * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + */ + public function getJobStats(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetJobStats'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the jobs to fetch + * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + */ + public function getJobs(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetJobs'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to fetch (Required) + * $params['snapshot_id'] = (string) The ID of the snapshot to fetch + * $params['from'] = (int) Skips a number of documents + * $params['size'] = (int) The default number of documents returned in queries as a string. + * $params['start'] = (date) The filter 'start' query parameter + * $params['end'] = (date) The filter 'end' query parameter + * $params['sort'] = (string) Name of the field to sort on + * $params['desc'] = (boolean) True if the results should be sorted in descending order + * $params['body'] = (array) Model snapshot selection criteria + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + */ + public function getModelSnapshots(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $snapshot_id = $this->extractArgument($params, 'snapshot_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetModelSnapshots'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setSnapshotId($snapshot_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The job IDs for which to calculate overall bucket results (Required) + * $params['top_n'] = (int) The number of top job bucket scores to be used in the overall_score calculation + * $params['bucket_span'] = (string) The span of the overall buckets. Defaults to the longest job bucket_span + * $params['overall_score'] = (double) Returns overall buckets with overall scores higher than this value + * $params['exclude_interim'] = (boolean) If true overall buckets that include interim buckets will be excluded + * $params['start'] = (string) Returns overall buckets with timestamps after this time + * $params['end'] = (string) Returns overall buckets with timestamps earlier than this time + * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + * $params['body'] = (array) Overall bucket selection details if not provided in URI + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + */ + public function getOverallBuckets(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetOverallBuckets'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) (Required) + * $params['exclude_interim'] = (boolean) Exclude interim results + * $params['from'] = (int) skips a number of records + * $params['size'] = (int) specifies a max number of records to get + * $params['start'] = (string) Start time filter for records + * $params['end'] = (string) End time filter for records + * $params['record_score'] = (double) + * $params['sort'] = (string) Sort records by a particular field + * $params['desc'] = (boolean) Set the sort direction + * $params['body'] = (array) Record selection criteria + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + */ + public function getRecords(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetRecords'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + public function info(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\Info'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to open (Required) + * $params['ignore_downtime'] = (boolean) Controls if gaps in data are treated as anomalous or as a maintenance window after a job re-start + * $params['timeout'] = (time) Controls the time to wait until a job has opened. Default to 30 minutes + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + */ + public function openJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $ignore_downtime = $this->extractArgument($params, 'ignore_downtime'); + $timeout = $this->extractArgument($params, 'timeout'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\OpenJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setIgnoreDowntime($ignore_downtime); + $endpoint->setTimeout($timeout); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to modify (Required) + * $params['body'] = (array) A list of events (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function postCalendarEvents(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PostCalendarEvents'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The name of the job receiving the data (Required) + * $params['reset_start'] = (string) Optional parameter to specify the start of the bucket resetting range + * $params['reset_end'] = (string) Optional parameter to specify the end of the bucket resetting range + * $params['body'] = (array) The data to process (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + */ + public function postData(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PostData'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to preview (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + */ + public function previewDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PreviewDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to create (Required) + * $params['body'] = (array) The calendar details + * + * @param array $params Associative array of parameters + * @return array + */ + public function putCalendar(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PutCalendar'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['calendar_id'] = (string) The ID of the calendar to modify (Required) + * $params['job_id'] = (string) The ID of the job to add to the calendar (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function putCalendarJob(array $params = []) + { + $calendar_id = $this->extractArgument($params, 'calendar_id'); + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PutCalendarJob'); + $endpoint->setParams($params); + $endpoint->setCalendarId($calendar_id); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to create (Required) + * $params['body'] = (array) The datafeed config (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + */ + public function putDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PutDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['filter_id'] = (string) The ID of the filter to create (Required) + * $params['body'] = (array) The filter details (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function putFilter(array $params = []) + { + $filter_id = $this->extractArgument($params, 'filter_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PutFilter'); + $endpoint->setParams($params); + $endpoint->setFilterId($filter_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to create (Required) + * $params['body'] = (array) The job (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + */ + public function putJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\PutJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to fetch (Required) + * $params['snapshot_id'] = (string) The ID of the snapshot to revert to (Required) + * $params['delete_intervening_results'] = (boolean) Should we reset the results back to the time of the snapshot? + * $params['body'] = (array) Reversion options + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + */ + public function revertModelSnapshot(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $snapshot_id = $this->extractArgument($params, 'snapshot_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\RevertModelSnapshot'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setSnapshotId($snapshot_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['enabled'] = (boolean) Whether to enable upgrade_mode ML setting or not. Defaults to false. + * $params['timeout'] = (time) Controls the time to wait before action times out. Defaults to 30 seconds + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html + */ + public function setUpgradeMode(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\SetUpgradeMode'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to start (Required) + * $params['start'] = (string) The start time from where the datafeed should begin + * $params['end'] = (string) The end time when the datafeed should stop. When not set, the datafeed continues in real time + * $params['timeout'] = (time) Controls the time to wait until a datafeed has started. Default to 20 seconds + * $params['body'] = (array) The start datafeed parameters + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + */ + public function startDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\StartDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to stop (Required) + * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + * $params['force'] = (boolean) True if the datafeed should be forcefully stopped. + * $params['timeout'] = (time) Controls the time to wait until a datafeed has stopped. Default to 20 seconds + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + */ + public function stopDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\StopDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + + return $this->performRequest($endpoint); + } + /** + * $params['datafeed_id'] = (string) The ID of the datafeed to update (Required) + * $params['body'] = (array) The datafeed update settings (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + */ + public function updateDatafeed(array $params = []) + { + $datafeed_id = $this->extractArgument($params, 'datafeed_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\UpdateDatafeed'); + $endpoint->setParams($params); + $endpoint->setDatafeedId($datafeed_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['filter_id'] = (string) The ID of the filter to update (Required) + * $params['body'] = (array) The filter update (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function updateFilter(array $params = []) + { + $filter_id = $this->extractArgument($params, 'filter_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\UpdateFilter'); + $endpoint->setParams($params); + $endpoint->setFilterId($filter_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to create (Required) + * $params['body'] = (array) The job update settings (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + */ + public function updateJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\UpdateJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['job_id'] = (string) The ID of the job to fetch (Required) + * $params['snapshot_id'] = (string) The ID of the snapshot to update (Required) + * $params['body'] = (array) The model snapshot properties to update (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + */ + public function updateModelSnapshot(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $snapshot_id = $this->extractArgument($params, 'snapshot_id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\UpdateModelSnapshot'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setSnapshotId($snapshot_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['body'] = (array) The job config (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function validate(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\Validate'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['body'] = (array) The detector (Required) + * + * @param array $params Associative array of parameters + * @return array + */ + public function validateDetector(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\ValidateDetector'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MonitoringNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MonitoringNamespace.php new file mode 100644 index 000000000..a72a63637 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/MonitoringNamespace.php @@ -0,0 +1,54 @@ +extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Monitoring\Bulk'); + $endpoint->setParams($params); + $endpoint->setType($type); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php index b2fd0741e..5331b4b03 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NamespaceBuilderInterface.php @@ -1,12 +1,23 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ namespace Elasticsearch\Namespaces; diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NodesNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NodesNamespace.php index e8bbaf928..328034e3a 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NodesNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/NodesNamespace.php @@ -1,133 +1,149 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class NodesNamespace extends AbstractNamespace { + /** - * $params['fields'] = (list) A comma-separated list of fields for `fielddata` metric (supports wildcards) - * ['metric_family'] = (enum) Limit the information returned to a certain metric family - * ['metric'] = (enum) Limit the information returned for `indices` family to a specific metric - * ['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['all'] = (boolean) Return all available information - * ['clear'] = (boolean) Reset the default level of detail - * ['fs'] = (boolean) Return information about the filesystem - * ['http'] = (boolean) Return information about HTTP - * ['indices'] = (boolean) Return information about indices - * ['jvm'] = (boolean) Return information about the JVM - * ['network'] = (boolean) Return information about network - * ['os'] = (boolean) Return information about the operating system - * ['process'] = (boolean) Return information about the Elasticsearch process - * ['thread_pool'] = (boolean) Return information about the thread pool - * ['transport'] = (boolean) Return information about transport - * - * @param $params array Associative array of parameters + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['interval'] = (time) The interval for the second sampling of threads + * $params['snapshots'] = (number) Number of samples of thread stacktrace (default: 10) + * $params['threads'] = (number) Specify the number of threads to provide information for (default: 3) + * $params['ignore_idle_threads'] = (boolean) Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) + * $params['type'] = (enum) The type to sample (default: cpu) (Options = cpu,wait,block) + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html */ - public function stats($params = array()) + public function hotThreads(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); - - $metric = $this->extractArgument($params, 'metric'); + $node_id = $this->extractArgument($params, 'node_id'); - $index_metric = $this->extractArgument($params, 'index_metric'); - - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Nodes\Stats $endpoint */ - $endpoint = $endpointBuilder('Cluster\Nodes\Stats'); - $endpoint->setNodeID($nodeID) - ->setMetric($metric) - ->setIndexMetric($index_metric) - ->setParams($params); + $endpoint = $endpointBuilder('Nodes\HotThreads'); + $endpoint->setParams($params); + $endpoint->setNodeId($node_id); return $this->performRequest($endpoint); } - /** * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['metric'] = (list) A comma-separated list of metrics you wish returned. Leave empty to return all. - * ['flat_settings'] = (boolean) Return settings in flat format (default: false) - * ['human'] = (boolean) Whether to return time and byte values in human-readable format. - - * - * @param $params array Associative array of parameters + * $params['metric'] = (list) A comma-separated list of metrics you wish returned. Leave empty to return all. + * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html */ - public function info($params = array()) + public function info(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); + $node_id = $this->extractArgument($params, 'node_id'); $metric = $this->extractArgument($params, 'metric'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Nodes\Info $endpoint */ - $endpoint = $endpointBuilder('Cluster\Nodes\Info'); - $endpoint->setNodeID($nodeID)->setMetric($metric); + $endpoint = $endpointBuilder('Nodes\Info'); $endpoint->setParams($params); + $endpoint->setNodeId($node_id); + $endpoint->setMetric($metric); return $this->performRequest($endpoint); } - /** - * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['interval'] = (time) The interval for the second sampling of threads - * ['snapshots'] = (number) Number of samples of thread stacktrace (default: 10) - * ['threads'] = (number) Specify the number of threads to provide information for (default: 3) - * ['type'] = (enum) The type to sample (default: cpu) - * - * @param $params array Associative array of parameters + * $params['node_id'] = (list) A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.x/secure-settings.html#reloadable-secure-settings */ - public function hotThreads($params = array()) + public function reloadSecureSettings(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); + $node_id = $this->extractArgument($params, 'node_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Nodes\HotThreads $endpoint */ - $endpoint = $endpointBuilder('Cluster\Nodes\HotThreads'); - $endpoint->setNodeID($nodeID); + $endpoint = $endpointBuilder('Nodes\ReloadSecureSettings'); $endpoint->setParams($params); + $endpoint->setNodeId($node_id); return $this->performRequest($endpoint); } - /** - * $params['node_id'] = (list) A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes - * ['delay'] = (time) Set the delay for the operation (default: 1s) - * ['exit'] = (boolean) Exit the JVM as well (default: true) - * - * @param $params array Associative array of parameters + * $params['metric'] = (list) Limit the information returned to the specified metrics + * $params['index_metric'] = (list) Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['completion_fields'] = (list) A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + * $params['fielddata_fields'] = (list) A comma-separated list of fields for `fielddata` index metric (supports wildcards) + * $params['fields'] = (list) A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + * $params['groups'] = (boolean) A comma-separated list of search groups for `search` index metric + * $params['level'] = (enum) Return indices stats aggregated at index, node or shard level (Options = indices,node,shards) (Default = node) + * $params['types'] = (list) A comma-separated list of document types for the `indexing` index metric + * $params['timeout'] = (time) Explicit operation timeout + * $params['include_segment_file_sizes'] = (boolean) Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) (Default = false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html */ - public function shutdown($params = array()) + public function stats(array $params = []) { - $nodeID = $this->extractArgument($params, 'node_id'); + $metric = $this->extractArgument($params, 'metric'); + $index_metric = $this->extractArgument($params, 'index_metric'); + $node_id = $this->extractArgument($params, 'node_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Nodes\Stats'); + $endpoint->setParams($params); + $endpoint->setMetric($metric); + $endpoint->setIndexMetric($index_metric); + $endpoint->setNodeId($node_id); - /** @var \Elasticsearch\Endpoints\Cluster\Nodes\Shutdown $endpoint */ - $endpoint = $endpointBuilder('Cluster\Nodes\Shutdown'); - $endpoint->setNodeID($nodeID); + return $this->performRequest($endpoint); + } + /** + * $params['metric'] = (list) Limit the information returned to the specified metrics + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['timeout'] = (time) Explicit operation timeout + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html + */ + public function usage(array $params = []) + { + $metric = $this->extractArgument($params, 'metric'); + $node_id = $this->extractArgument($params, 'node_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Nodes\Usage'); $endpoint->setParams($params); + $endpoint->setMetric($metric); + $endpoint->setNodeId($node_id); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RemoteNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RemoteNamespace.php deleted file mode 100644 index 270530a54..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RemoteNamespace.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class RemoteNamespace extends AbstractNamespace -{ - /** - * @param $params array Associative array of parameters - * - * @return array - */ - public function info($params = array()) - { - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - - /** @var Info $endpoint */ - $endpoint = $endpointBuilder('Remote\Info'); - $endpoint->setParams($params); - - return $this->performRequest($endpoint); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RollupNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RollupNamespace.php new file mode 100644 index 000000000..b255b1451 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/RollupNamespace.php @@ -0,0 +1,186 @@ +extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\DeleteJob'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function getJobs(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\GetJobs'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) The ID of the index to check rollup capabilities on, or left blank for all jobs + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function getRollupCaps(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\GetRollupCaps'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The rollup index or index pattern to obtain rollup capabilities from. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function getRollupIndexCaps(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\GetRollupIndexCaps'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) The ID of the job to create (Required) + * $params['body'] = (array) The job configuration (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function putJob(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\PutJob'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['index'] = (string) The index or index-pattern (containing rollup or regular data) that should be searched (Required) + * $params['type'] = (string) The doc type inside the index + * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response + * $params['body'] = (array) The search request body (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function rollupSearch(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $type = $this->extractArgument($params, 'type'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\RollupSearch'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setType($type); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) The ID of the job to start (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function startJob(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\StartJob'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) The ID of the job to stop (Required) + * $params['wait_for_completion'] = (boolean) True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. + * $params['timeout'] = (time) Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. + * + * @param array $params Associative array of parameters + * @return array + * @see + */ + public function stopJob(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Rollup\StopJob'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SecurityNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SecurityNamespace.php new file mode 100644 index 000000000..96c594dce --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SecurityNamespace.php @@ -0,0 +1,502 @@ +extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\CreateApiKey'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) API key id of the API key to be retrieved + * $params['name'] = (string) API key name of the API key to be retrieved + * $params['username'] = (string) user name of the user who created this API key to be retrieved + * $params['realm_name'] = (string) realm name of the user who created this API key to be retrieved + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + */ + public function getApiKey(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetApiKey'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + public function invalidateApiKey(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\InvalidateApiKey'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + */ + public function authenticate(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\Authenticate'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (string) The username of the user to change the password for + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * $params['body'] = (array) the new password for the user (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + */ + public function changePassword(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\ChangePassword'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['realms'] = (list) Comma-separated list of realms to clear (Required) + * $params['usernames'] = (list) Comma-separated list of usernames to clear from the cache + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + */ + public function clearCachedRealms(array $params = []) + { + $realms = $this->extractArgument($params, 'realms'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\ClearCachedRealms'); + $endpoint->setParams($params); + $endpoint->setRealms($realms); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (list) Role name (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + */ + public function clearCachedRoles(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\ClearCachedRoles'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['application'] = (string) Application name (Required) + * $params['name'] = (string) Privilege name (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see TODO + */ + public function deletePrivileges(array $params = []) + { + $application = $this->extractArgument($params, 'application'); + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DeletePrivileges'); + $endpoint->setParams($params); + $endpoint->setApplication($application); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role name (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + */ + public function deleteRole(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DeleteRole'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role-mapping name (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + */ + public function deleteRoleMapping(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DeleteRoleMapping'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (string) username (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + */ + public function deleteUser(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DeleteUser'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (string) The username of the user to disable (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + */ + public function disableUser(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DisableUser'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (string) The username of the user to enable (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + */ + public function enableUser(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\EnableUser'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + + return $this->performRequest($endpoint); + } + /** + * $params['application'] = (string) Application name + * $params['name'] = (string) Privilege name + * + * @param array $params Associative array of parameters + * @return array + * @see TODO + */ + public function getPrivileges(array $params = []) + { + $application = $this->extractArgument($params, 'application'); + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetPrivileges'); + $endpoint->setParams($params); + $endpoint->setApplication($application); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role name + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + */ + public function getRole(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetRole'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role-Mapping name + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + */ + public function getRoleMapping(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetRoleMapping'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * $params['body'] = (array) The token request to get (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + */ + public function getToken(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetToken'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (list) A comma-separated list of usernames + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + */ + public function getUser(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetUser'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/6.7/security-api-get-privileges.html + */ + public function getUserPrivileges(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetUserPrivileges'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['user'] = (string) Username + * $params['body'] = (array) The privileges to test (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + */ + public function hasPrivileges(array $params = []) + { + $user = $this->extractArgument($params, 'user'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\HasPrivileges'); + $endpoint->setParams($params); + $endpoint->setUser($user); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['body'] = (array) The token to invalidate (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + */ + public function invalidateToken(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\InvalidateToken'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * $params['body'] = (array) The privilege(s) to add (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see TODO + */ + public function putPrivileges(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\PutPrivileges'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role name (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * $params['body'] = (array) The role to add (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + */ + public function putRole(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\PutRole'); + $endpoint->setParams($params); + $endpoint->setName($name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['name'] = (string) Role-mapping name (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * $params['body'] = (array) The role to add (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + */ + public function putRoleMapping(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\PutRoleMapping'); + $endpoint->setParams($params); + $endpoint->setName($name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['username'] = (string) The username of the User (Required) + * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * $params['body'] = (array) The user to add (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + */ + public function putUser(array $params = []) + { + $username = $this->extractArgument($params, 'username'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\PutUser'); + $endpoint->setParams($params); + $endpoint->setUsername($username); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SnapshotNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SnapshotNamespace.php index 6f22d9425..c2cbf53c6 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SnapshotNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SnapshotNamespace.php @@ -1,234 +1,234 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class SnapshotNamespace extends AbstractNamespace { + /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['wait_for_completion'] = (bool) Should this request wait until the operation has completed before returning - * - * @param $params array Associative array of parameters + * $params['repository'] = (string) A repository name (Required) + * $params['snapshot'] = (string) A snapshot name (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) + * $params['body'] = (array) The snapshot definition * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function create($params = array()) + public function create(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Create $endpoint */ $endpoint = $endpointBuilder('Snapshot\Create'); - $endpoint->setRepository($repository) - ->setSnapshot($snapshot) - ->setParams($params) - ->setBody($body); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setSnapshot($snapshot); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** + * $params['repository'] = (string) A repository name (Required) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['timeout'] = (time) Explicit operation timeout + * $params['verify'] = (boolean) Whether to verify the repository after creation + * $params['body'] = (array) The repository definition (Required) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function createRepository($params = array()) + public function createRepository(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Repository\Create $endpoint */ - $endpoint = $endpointBuilder('Snapshot\Repository\Create'); - $endpoint->setRepository($repository) - ->setBody($body) - ->setParams($params); + $endpoint = $endpointBuilder('Snapshot\CreateRepository'); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** + * $params['repository'] = (string) A repository name (Required) + * $params['snapshot'] = (string) A snapshot name (Required) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * - * @param $params array Associative array of parameters - * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function delete($params = array()) + public function delete(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Delete $endpoint */ $endpoint = $endpointBuilder('Snapshot\Delete'); - $endpoint->setRepository($repository) - ->setSnapshot($snapshot) - ->setParams($params); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setSnapshot($snapshot); return $this->performRequest($endpoint); } - /** + * $params['repository'] = (list) A comma-separated list of repository names (Required) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function deleteRepository($params = array()) + public function deleteRepository(array $params = []) { $repository = $this->extractArgument($params, 'repository'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Repository\Delete $endpoint */ - $endpoint = $endpointBuilder('Snapshot\Repository\Delete'); - $endpoint->setRepository($repository) - ->setParams($params); + $endpoint = $endpointBuilder('Snapshot\DeleteRepository'); + $endpoint->setParams($params); + $endpoint->setRepository($repository); return $this->performRequest($endpoint); } - /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * - * @param $params array Associative array of parameters + * $params['repository'] = (string) A repository name (Required) + * $params['snapshot'] = (list) A comma-separated list of snapshot names (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * $params['verbose'] = (boolean) Whether to show verbose snapshot info or only show the basic info found in the repository index blob * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function get($params = array()) + public function get(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Get $endpoint */ $endpoint = $endpointBuilder('Snapshot\Get'); - $endpoint->setRepository($repository) - ->setSnapshot($snapshot) - ->setParams($params); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setSnapshot($snapshot); return $this->performRequest($endpoint); } - /** + * $params['repository'] = (list) A comma-separated list of repository names * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function getRepository($params = array()) + public function getRepository(array $params = []) { $repository = $this->extractArgument($params, 'repository'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Repository\Get $endpoint */ - $endpoint = $endpointBuilder('Snapshot\Repository\Get'); - $endpoint->setRepository($repository) - ->setParams($params); + $endpoint = $endpointBuilder('Snapshot\GetRepository'); + $endpoint->setParams($params); + $endpoint->setRepository($repository); return $this->performRequest($endpoint); } - /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['wait_for_completion'] = (bool) Should this request wait until the operation has completed before returning - * - * @param $params array Associative array of parameters + * $params['repository'] = (string) A repository name (Required) + * $params['snapshot'] = (string) A snapshot name (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) + * $params['body'] = (array) Details of what to restore * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function restore($params = array()) + public function restore(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); $body = $this->extractArgument($params, 'body'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Restore $endpoint */ $endpoint = $endpointBuilder('Snapshot\Restore'); - $endpoint->setRepository($repository) - ->setSnapshot($snapshot) - ->setParams($params) - ->setBody($body); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setSnapshot($snapshot); + $endpoint->setBody($body); return $this->performRequest($endpoint); } - /** - * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * - * @param $params array Associative array of parameters + * $params['repository'] = (string) A repository name + * $params['snapshot'] = (list) A comma-separated list of snapshot names + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function status($params = array()) + public function status(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Status $endpoint */ $endpoint = $endpointBuilder('Snapshot\Status'); - $endpoint->setRepository($repository) - ->setSnapshot($snapshot) - ->setParams($params); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + $endpoint->setSnapshot($snapshot); return $this->performRequest($endpoint); } - /** + * $params['repository'] = (string) A repository name (Required) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node - * ['timeout'] = (time) Explicit operation timeout - * - * @param $params array Associative array of parameters + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html */ - public function verifyRepository($params = array()) + public function verifyRepository(array $params = []) { $repository = $this->extractArgument($params, 'repository'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Snapshot\Repository\Verify $endpoint */ - $endpoint = $endpointBuilder('Snapshot\Repository\Verify'); - $endpoint->setRepository($repository) - ->setParams($params); + $endpoint = $endpointBuilder('Snapshot\VerifyRepository'); + $endpoint->setParams($params); + $endpoint->setRepository($repository); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SqlNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SqlNamespace.php new file mode 100644 index 000000000..55fbb7383 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SqlNamespace.php @@ -0,0 +1,78 @@ +extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\ClearCursor'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml + * $params['body'] = (array) Use the `query` element to start a query. Use the `cursor` element to continue a query. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see Execute SQL + */ + public function query(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\Query'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['body'] = (array) Specify the query in the `query` element. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see Translate SQL into Elasticsearch queries + */ + public function translate(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\Translate'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SslNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SslNamespace.php new file mode 100644 index 000000000..063e4c115 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/SslNamespace.php @@ -0,0 +1,45 @@ +endpoints; + $endpoint = $endpointBuilder('Ssl\Certificates'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/TasksNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/TasksNamespace.php index 6782292e2..6ef0446e2 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/TasksNamespace.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/TasksNamespace.php @@ -1,90 +1,92 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co + * NOTE: this file is autogenerated using util/GenerateEndpoints.php + * and Elasticsearch 6.8.16 (1f62092) */ class TasksNamespace extends AbstractNamespace { + /** - * $params['wait_for_completion'] = (bool) Wait for the matching tasks to complete (default: false) - * - * @param $params array Associative array of parameters + * $params['task_id'] = (string) Cancel the task with specified task id (node_id:task_number) + * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all. + * $params['parent_task_id'] = (string) Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html */ - public function get($params = array()) + public function cancel(array $params = []) { - $id = $this->extractArgument($params, 'task_id'); + $task_id = $this->extractArgument($params, 'task_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Get $endpoint */ - $endpoint = $endpointBuilder('Tasks\Get'); - $endpoint->setTaskId($id) - ->setParams($params); + $endpoint = $endpointBuilder('Tasks\Cancel'); + $endpoint->setParams($params); + $endpoint->setTaskId($task_id); return $this->performRequest($endpoint); } - /** - * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all. - * ['parent_node'] = (string) Cancel tasks with specified parent node - * ['parent_task'] = (string) Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. - * ['detailed'] = (bool) Return detailed task information (default: false) - * ['wait_for_completion'] = (bool) Wait for the matching tasks to complete (default: false) - * ['group_by'] = (enum) Group tasks by nodes or parent/child relationships - * - * @param $params array Associative array of parameters + * $params['task_id'] = (string) Return the task with specified id (node_id:task_number) (Required) + * $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false) + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html */ - public function tasksList($params = array()) + public function get(array $params = []) { + $task_id = $this->extractArgument($params, 'task_id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Get $endpoint */ - $endpoint = $endpointBuilder('Tasks\TasksList'); + $endpoint = $endpointBuilder('Tasks\Get'); $endpoint->setParams($params); + $endpoint->setTaskId($task_id); return $this->performRequest($endpoint); } - /** - * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * ['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all. - * ['parent_node'] = (string) Cancel tasks with specified parent node - * ['parent_task'] = (string) Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. - * - * @param $params array Associative array of parameters + * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. + * $params['detailed'] = (boolean) Return detailed task information (default: false) + * $params['parent_task_id'] = (string) Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + * $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false) + * $params['group_by'] = (enum) Group tasks by nodes or parent/child relationships (Options = nodes,parents,none) (Default = nodes) + * $params['timeout'] = (time) Explicit operation timeout * + * @param array $params Associative array of parameters * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html */ - public function cancel($params = array()) + public function list(array $params = []) { - $id = $this->extractArgument($params, 'id'); - /** @var callback $endpointBuilder */ $endpointBuilder = $this->endpoints; - - /** @var Cancel $endpoint */ - $endpoint = $endpointBuilder('Tasks\Cancel'); - $endpoint->setTaskId($id) - ->setParams($params); + $endpoint = $endpointBuilder('Tasks\ListTasks'); + $endpoint->setParams($params); return $this->performRequest($endpoint); } diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/WatcherNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/WatcherNamespace.php new file mode 100644 index 000000000..44749aa86 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/WatcherNamespace.php @@ -0,0 +1,239 @@ +extractArgument($params, 'watch_id'); + $action_id = $this->extractArgument($params, 'action_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\AckWatch'); + $endpoint->setParams($params); + $endpoint->setWatchId($watch_id); + $endpoint->setActionId($action_id); + + return $this->performRequest($endpoint); + } + /** + * $params['watch_id'] = (string) Watch ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + */ + public function activateWatch(array $params = []) + { + $watch_id = $this->extractArgument($params, 'watch_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\ActivateWatch'); + $endpoint->setParams($params); + $endpoint->setWatchId($watch_id); + + return $this->performRequest($endpoint); + } + /** + * $params['watch_id'] = (string) Watch ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + */ + public function deactivateWatch(array $params = []) + { + $watch_id = $this->extractArgument($params, 'watch_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\DeactivateWatch'); + $endpoint->setParams($params); + $endpoint->setWatchId($watch_id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) Watch ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + */ + public function deleteWatch(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\DeleteWatch'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) Watch ID + * $params['debug'] = (boolean) indicates whether the watch should execute in debug mode + * $params['body'] = (array) Execution control + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + */ + public function executeWatch(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\ExecuteWatch'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) Watch ID (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + */ + public function getWatch(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\GetWatch'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * $params['id'] = (string) Watch ID (Required) + * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node + * $params['active'] = (boolean) Specify whether the watch is in/active by default + * $params['version'] = (number) Explicit version number for concurrency control + * $params['if_seq_no'] = (number) only update the watch if the last operation that has changed the watch has the specified sequence number + * $params['if_primary_term'] = (number) only update the watch if the last operation that has changed the watch has the specified primary term + * $params['body'] = (array) The watch + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + */ + public function putWatch(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\PutWatch'); + $endpoint->setParams($params); + $endpoint->setId($id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-restart.html + */ + public function restart(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\Restart'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + */ + public function start(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\Start'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['metric'] = (enum) Controls what additional stat metrics should be include in the response + * $params['emit_stacktraces'] = (boolean) Emits stack traces of currently running watches + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + */ + public function stats(array $params = []) + { + $metric = $this->extractArgument($params, 'metric'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\Stats'); + $endpoint->setParams($params); + $endpoint->setMetric($metric); + + return $this->performRequest($endpoint); + } + /** + * + * @param array $params Associative array of parameters + * @return array + * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + */ + public function stop(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Watcher\Stop'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/XpackNamespace.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/XpackNamespace.php new file mode 100644 index 000000000..d7756604e --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/XpackNamespace.php @@ -0,0 +1,62 @@ +endpoints; + $endpoint = $endpointBuilder('Xpack\Info'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * $params['master_timeout'] = (time) Specify timeout for watch write operation + * + * @param array $params Associative array of parameters + * @return array + * @see Retrieve information about xpack features usage + */ + public function usage(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Xpack\Usage'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php index 97b247e91..943aa5b95 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/ArrayToJSONSerializer.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class ArrayToJSONSerializer implements SerializerInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/EverythingToJSONSerializer.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/EverythingToJSONSerializer.php index 2f291daa3..699afded3 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/EverythingToJSONSerializer.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/EverythingToJSONSerializer.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class EverythingToJSONSerializer implements SerializerInterface { diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SerializerInterface.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SerializerInterface.php index a23796309..11d8b1cb5 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SerializerInterface.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SerializerInterface.php @@ -1,22 +1,33 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ interface SerializerInterface { /** * Serialize a complex data-structure into a json encoded string * - * @param mixed The data to encode + * @param mixed $data The data to encode * * @return string */ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php index af89af2dc..bb37428d7 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Serializers/SmartSerializer.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class SmartSerializer implements SerializerInterface { @@ -68,7 +79,7 @@ public function deserialize($data, $headers) /** * @todo For 2.0, remove the E_NOTICE check before raising the exception. * - * @param $data + * @param string|null $data * * @return array * @throws JsonErrorException diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php index bd7782aa8..e27d9fdbd 100644 --- a/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php @@ -1,4 +1,20 @@ - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co */ class Transport { @@ -43,14 +54,14 @@ class Transport * Transport class is responsible for dispatching requests to the * underlying cluster connections * - * @param $retries + * @param int $retries * @param bool $sniffOnStart * @param ConnectionPool\AbstractConnectionPool $connectionPool - * @param \Psr\Log\LoggerInterface $log Monolog logger object + * @param \Psr\Log\LoggerInterface $log */ // @codingStandardsIgnoreStart // "Arguments with default values must be at the end of the argument list" - cannot change the interface - public function __construct($retries, $sniffOnStart = false, AbstractConnectionPool $connectionPool, LoggerInterface $log) + public function __construct(int $retries, AbstractConnectionPool $connectionPool, LoggerInterface $log, bool $sniffOnStart = false) { // @codingStandardsIgnoreEnd @@ -118,8 +129,9 @@ function ($response) { }, //onFailure function ($response) { + $code = $response->getCode(); // Ignore 400 level errors, as that means the server responded just fine - if (!(isset($response['code']) && $response['code'] >=400 && $response['code'] < 500)) { + if ($code < 400 || $code >= 500) { // Otherwise schedule a check $this->connectionPool->scheduleCheck(); } @@ -135,23 +147,19 @@ function ($response) { * * @return callable|array */ - public function resultOrFuture($result, $options = []) + public function resultOrFuture(FutureArrayInterface $result, array $options = []) { - $response = null; $async = isset($options['client']['future']) ? $options['client']['future'] : null; if (is_null($async) || $async === false) { do { $result = $result->wait(); } while ($result instanceof FutureArrayInterface); - - return $result; - } elseif ($async === true || $async === 'lazy') { - return $result; - } + } + return $result; } /** - * @param $request + * @param array $request * * @return bool */ diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/src/autoload.php b/openml_OS/vendor/elasticsearch/elasticsearch/src/autoload.php new file mode 100644 index 000000000..ec80ccc85 --- /dev/null +++ b/openml_OS/vendor/elasticsearch/elasticsearch/src/autoload.php @@ -0,0 +1,69 @@ + '\Elasticsearch\Endpoints\Nodes\HotThreads', + '\Elasticsearch\Endpoints\Cluster\Nodes\Info' => '\Elasticsearch\Endpoints\Nodes\Info' , + '\Elasticsearch\Endpoints\Cluster\Nodes\ReloadSecureSettings' => '\Elasticsearch\Endpoints\Nodes\ReloadSecureSettings', + '\Elasticsearch\Endpoints\Cluster\Nodes\Stats' => '\Elasticsearch\Endpoints\Nodes\Stats', + '\Elasticsearch\Endpoints\Cluster\Settings\Get' => '\Elasticsearch\Endpoints\Cluster\GetSettings', + '\Elasticsearch\Endpoints\Cluster\Settings\Put' => '\Elasticsearch\Endpoints\Cluster\PutSettings', + '\Elasticsearch\Endpoints\Indices\Alias\Delete' => '\Elasticsearch\Endpoints\Indices\DeleteAlias', + '\Elasticsearch\Endpoints\Indices\Alias\Exists' => '\Elasticsearch\Endpoints\Indices\ExistsAlias', + '\Elasticsearch\Endpoints\Indices\Alias\Get' => '\Elasticsearch\Endpoints\Indices\GetAlias', + '\Elasticsearch\Endpoints\Indices\Alias\Put' => '\Elasticsearch\Endpoints\Indices\PutAlias', + '\Elasticsearch\Endpoints\Indices\Aliases\Update' => '\Elasticsearch\Endpoints\Indices\UpdateAliases', + '\Elasticsearch\Endpoints\Indices\Cache\Clear' => '\Elasticsearch\Endpoints\Indices\ClearCache', + '\Elasticsearch\Endpoints\Indices\Exists\Types' => '\Elasticsearch\Endpoints\Indices\ExistsType', + '\Elasticsearch\Endpoints\Indices\Type\Exists' => '\Elasticsearch\Endpoints\Indices\ExistsType', + '\Elasticsearch\Endpoints\Indices\Field\Get' => '\Elasticsearch\Endpoints\Indices\GetFieldMapping', + '\Elasticsearch\Endpoints\Indices\Mapping\GetField' => '\Elasticsearch\Endpoints\Indices\GetFieldMapping', + '\Elasticsearch\Endpoints\Indices\Mapping\Get' => '\Elasticsearch\Endpoints\Indices\GetMapping', + '\Elasticsearch\Endpoints\Indices\Mapping\Put' => '\Elasticsearch\Endpoints\Indices\PutMapping', + '\Elasticsearch\Endpoints\Indices\Settings\Get' => '\Elasticsearch\Endpoints\Indices\GetSettings', + '\Elasticsearch\Endpoints\Indices\Settings\Put' => '\Elasticsearch\Endpoints\Indices\PutSettings', + '\Elasticsearch\Endpoints\Indices\Template\Get' => '\Elasticsearch\Endpoints\Indices\GetTemplate', + '\Elasticsearch\Endpoints\Indices\Template\Put' => '\Elasticsearch\Endpoints\Indices\PutTemplate', + '\Elasticsearch\Endpoints\Indices\Template\Exists' => '\Elasticsearch\Endpoints\Indices\ExistsTemplate', + '\Elasticsearch\Endpoints\Indices\Template\Delete' => '\Elasticsearch\Endpoints\Indices\DeleteTemplate', + '\Elasticsearch\Endpoints\Indices\Upgrade\Get' => '\Elasticsearch\Endpoints\Indices\GetUpgrade', + '\Elasticsearch\Endpoints\Indices\Upgrade\Post' => '\Elasticsearch\Endpoints\Indices\Upgrade', + '\Elasticsearch\Endpoints\Indices\Validate\Query' => '\Elasticsearch\Endpoints\Indices\ValidateQuery', + '\Elasticsearch\Endpoints\Ingest\Pipeline\Delete' => '\Elasticsearch\Endpoints\Ingest\DeletePipeline', + '\Elasticsearch\Endpoints\Ingest\Pipeline\Get' => '\Elasticsearch\Endpoints\Ingest\GetPipeline', + '\Elasticsearch\Endpoints\Ingest\Pipeline\Put' => '\Elasticsearch\Endpoints\Ingest\PutPipeline', + '\Elasticsearch\Endpoints\Ingest\Pipeline\ProcessorGrok' => '\Elasticsearch\Endpoints\Ingest\ProcessorGrok', + '\Elasticsearch\Endpoints\Script\Get' => '\Elasticsearch\Endpoints\GetScript', + '\Elasticsearch\Endpoints\Script\Put' => '\Elasticsearch\Endpoints\PutScript', + '\Elasticsearch\Endpoints\Script\Delete' => '\Elasticsearch\Endpoints\DeleteScript', + '\Elasticsearch\Endpoints\Snapshot\Repository\Create' => '\Elasticsearch\Endpoints\Snapshot\CreateRepository', + '\Elasticsearch\Endpoints\Snapshot\Repository\Delete' => '\Elasticsearch\Endpoints\Snapshot\DeleteRepository', + '\Elasticsearch\Endpoints\Snapshot\Repository\Get' => '\Elasticsearch\Endpoints\Snapshot\GetRepository', + '\Elasticsearch\Endpoints\Snapshot\Repository\Verify' => '\Elasticsearch\Endpoints\Snapshot\VerifyRepository', + '\Elasticsearch\Endpoints\Source\Get' => '\Elasticsearch\Endpoints\GetSource', + '\Elasticsearch\Endpoints\Tasks\TasksList' => '\Elasticsearch\Endpoints\Tasks\ListTasks' +]; + +foreach ($aliasToClass as $alias => $original) { + if (!class_exists($alias, false)) { + class_alias($original, $alias); + } +} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php deleted file mode 100644 index f5c536c77..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientBuilder/DummyLogger.php +++ /dev/null @@ -1,9 +0,0 @@ -expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('$logger must implement \Psr\Log\LoggerInterface!'); - - ClientBuilder::create()->setLogger(new \Elasticsearch\Tests\ClientBuilder\DummyLogger()); - } - - public function testClientBuilderThrowsExceptionForIncorrectTracerClass() - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('$tracer must implement \Psr\Log\LoggerInterface!'); - - ClientBuilder::create()->setTracer(new \Elasticsearch\Tests\ClientBuilder\DummyLogger()); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientIntegrationTests.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientIntegrationTests.php deleted file mode 100644 index 98cb76572..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientIntegrationTests.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class ClientIntegrationTests extends \PHPUnit\Framework\TestCase -{ - public function testCustomQueryParams() - { - $client = Elasticsearch\ClientBuilder::create()->setHosts([$_SERVER['ES_TEST_HOST']])->build(); - - $getParams = [ - 'index' => 'test', - 'type' => 'test', - 'id' => 1, - 'parent' => 'abc', - 'custom' => ['customToken' => 'abc', 'otherToken' => 123], - 'client' => ['ignore' => 400] - ]; - $exists = $client->exists($getParams); - - $this->assertFalse($exists); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientTest.php deleted file mode 100644 index 50ea22497..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ClientTest.php +++ /dev/null @@ -1,405 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class ClientTest extends \PHPUnit\Framework\TestCase -{ - public function tearDown() - { - m::close(); - } - - /** - * @expectedException \Elasticsearch\Common\Exceptions\InvalidArgumentException - */ - public function testConstructorIllegalPort() - { - $client = Elasticsearch\ClientBuilder::create()->setHosts(['localhost:abc'])->build(); - } - - public function testFromConfig() - { - $params = [ - 'hosts' => [ - 'localhost:9200' - ], - 'retries' => 2, - 'handler' => ClientBuilder::multiHandler() - ]; - $client = ClientBuilder::fromConfig($params); - } - - /** - * @expectedException \Elasticsearch\Common\Exceptions\RuntimeException - */ - public function testFromConfigBadParam() - { - $params = [ - 'hosts' => [ - 'localhost:9200' - ], - 'retries' => 2, - 'imNotReal' => 5 - ]; - $client = ClientBuilder::fromConfig($params); - } - - public function testFromConfigBadParamQuiet() - { - $params = [ - 'hosts' => [ - 'localhost:9200' - ], - 'retries' => 2, - 'imNotReal' => 5 - ]; - $client = ClientBuilder::fromConfig($params, true); - } - - public function testNullDelete() - { - $client = ClientBuilder::create()->build(); - - try { - $client->delete([ - 'index' => null, - 'type' => 'test', - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => null, - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => 'test', - 'id' => null - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - } - - public function testEmptyStringDelete() - { - $client = ClientBuilder::create()->build(); - - try { - $client->delete([ - 'index' => '', - 'type' => 'test', - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => '', - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => 'test', - 'id' => '' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - } - - public function testArrayOfEmptyStringDelete() - { - $client = ClientBuilder::create()->build(); - - try { - $client->delete([ - 'index' => ['', '', ''], - 'type' => 'test', - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => ['', '', ''], - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - } - - public function testArrayOfNullDelete() - { - $client = ClientBuilder::create()->build(); - - try { - $client->delete([ - 'index' => [null, null, null], - 'type' => 'test', - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - - try { - $client->delete([ - 'index' => 'test', - 'type' => [null, null, null], - 'id' => 'test' - ]); - $this->fail("InvalidArgumentException was not thrown"); - } catch (Elasticsearch\Common\Exceptions\InvalidArgumentException $e) { - // all good - } - } - - public function testMaxRetriesException() - { - $client = Elasticsearch\ClientBuilder::create() - ->setHosts(["localhost:1"]) - ->setRetries(0) - ->build(); - - $searchParams = [ - 'index' => 'test', - 'type' => 'test', - 'body' => [ - 'query' => [ - 'match_all' => [] - ] - ] - ]; - - $client = Elasticsearch\ClientBuilder::create() - ->setHosts(["localhost:1"]) - ->setRetries(0) - ->build(); - - try { - $client->search($searchParams); - $this->fail("Should have thrown CouldNotConnectToHost"); - } catch (Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost $e) { - // All good - $previous = $e->getPrevious(); - $this->assertInstanceOf(MaxRetriesException::class, $previous); - } catch (\Exception $e) { - throw $e; - } - - - $client = Elasticsearch\ClientBuilder::create() - ->setHosts(["localhost:1"]) - ->setRetries(0) - ->build(); - - try { - $client->search($searchParams); - $this->fail("Should have thrown TransportException"); - } catch (Elasticsearch\Common\Exceptions\TransportException $e) { - // All good - $previous = $e->getPrevious(); - $this->assertInstanceOf(MaxRetriesException::class, $previous); - } catch (\Exception $e) { - throw $e; - } - } - - public function testInlineHosts() - { - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - 'localhost:9200' - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("localhost:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - 'http://localhost:9200' - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("localhost:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - 'http://foo.com:9200' - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - 'https://foo.com:9200' - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("https", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - 'https://user:pass@foo.com:9200' - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("https", $host->getTransportSchema()); - $this->assertSame("user:pass", $host->getUserPass()); - } - - public function testExtendedHosts() - { - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'localhost', - 'port' => 9200, - 'scheme' => 'http' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("localhost:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com', - 'port' => 9200, - 'scheme' => 'http' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com', - 'port' => 9200, - 'scheme' => 'https' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("https", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com', - 'scheme' => 'http' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com', - 'port' => 9500, - 'scheme' => 'https' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9500", $host->getHost()); - $this->assertSame("https", $host->getTransportSchema()); - - - try { - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'port' => 9200, - 'scheme' => 'http' - ] - ])->build(); - $this->fail("Expected RuntimeException from missing host, none thrown"); - } catch (Elasticsearch\Common\Exceptions\RuntimeException $e) { - // good - } - - // Underscore host, questionably legal, but inline method would break - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'the_foo.com' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("the_foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - - - // Special characters in user/pass, would break inline - $client = Elasticsearch\ClientBuilder::create()->setHosts([ - [ - 'host' => 'foo.com', - 'user' => 'user', - 'pass' => 'abc#$@?%!abc' - ] - ])->build(); - $host = $client->transport->getConnection(); - $this->assertSame("foo.com:9200", $host->getHost()); - $this->assertSame("http", $host->getTransportSchema()); - $this->assertSame("user:abc#$@?%!abc", $host->getUserPass()); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php deleted file mode 100644 index c7eda50de..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class RoundRobinSelectorTest extends \PHPUnit\Framework\TestCase -{ - /** - * Add Ten connections, select 15 to verify round robin - * - * @covers \Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector::select - * - * @return void - */ - public function testTenConnections() - { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector(); - - $mockConnections = []; - foreach (range(0, 9) as $index) { - $mockConnections[$index] = $this->getMockBuilder(ConnectionInterface::class) - ->disableOriginalConstructor() - ->getMock(); - } - - // select ten - $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[7], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[8], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[9], $roundRobin->select($mockConnections)); - - // select five - should start from the first one (index: 0) - $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections)); - } - - /** - * Add Ten connections, select five, remove three, test another 10 to check - * that the round-robining works after removing connections - * - * @covers \Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector::select - * - * @return void - */ - public function testAddTenConnectionsTestFiveRemoveThreeTestTen() - { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\RoundRobinSelector(); - - $mockConnections = []; - foreach (range(0, 9) as $index) { - $mockConnections[$index] = $this->getMockBuilder(ConnectionInterface::class) - ->disableOriginalConstructor() - ->getMock(); - } - - // select five - $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections)); - - // remove three - unset($mockConnections[8]); - unset($mockConnections[9]); - unset($mockConnections[10]); - - // select ten after removal - $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[7], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[0], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[1], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[2], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[3], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[4], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[5], $roundRobin->select($mockConnections)); - $this->assertSame($mockConnections[6], $roundRobin->select($mockConnections)); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php deleted file mode 100644 index d996c0403..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class StickyRoundRobinSelectorTest extends \PHPUnit\Framework\TestCase -{ - public function tearDown() - { - m::close(); - } - - public function testTenConnections() - { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector(); - - $mockConnections = []; - $mockConnections[] = m::mock(ConnectionInterface::class) - ->shouldReceive('isAlive')->times(16)->andReturn(true)->getMock(); - - foreach (range(0, 9) as $index) { - $mockConnections[] = m::mock(ConnectionInterface::class); - } - - foreach (range(0, 15) as $index) { - $retConnection = $roundRobin->select($mockConnections); - - $this->assertSame($mockConnections[0], $retConnection); - } - } - - public function testTenConnectionsFirstDies() - { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector(); - - $mockConnections = []; - $mockConnections[] = m::mock(ConnectionInterface::class) - ->shouldReceive('isAlive')->once()->andReturn(false)->getMock(); - - $mockConnections[] = m::mock(ConnectionInterface::class) - ->shouldReceive('isAlive')->times(15)->andReturn(true)->getMock(); - - foreach (range(0, 8) as $index) { - $mockConnections[] = m::mock(ConnectionInterface::class); - } - - foreach (range(0, 15) as $index) { - $retConnection = $roundRobin->select($mockConnections); - - $this->assertSame($mockConnections[1], $retConnection); - } - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php deleted file mode 100644 index 5963bf294..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class SniffingConnectionPoolIntegrationTest extends \PHPUnit\Framework\TestCase -{ - public function testSniff() - { - $client = ClientBuilder::create() - ->setHosts([$_SERVER['ES_TEST_HOST']]) - ->setConnectionPool(SniffingConnectionPool::class, ['sniffingInterval' => -10]) - ->build(); - - $pinged = $client->ping(); - $this->assertTrue($pinged); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php deleted file mode 100644 index 8e2ff578c..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/SniffingConnectionPoolTest.php +++ /dev/null @@ -1,432 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class SniffingConnectionPoolTest extends \PHPUnit\Framework\TestCase -{ - protected function setUp() - { - static::markTestSkipped("All of Sniffing unit tests use outdated cluster state format, need to redo"); - } - - - public function tearDown() - { - m::close(); - } - - public function testAddOneHostThenGetConnection() - { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(true) - ->getMock(); - - $connections = [$mockConnection]; - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturn($connections[0]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = ['randomizeHosts' => false]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($mockConnection, $retConnection); - } - - public function testAddOneHostAndTriggerSniff() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"Bl2ihSr7TcuUHxhu1GA_YQ":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}}}', true); - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock() - ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock(); - - $connections = [$mockConnection]; - $mockNewConnection = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select')->twice() - ->andReturn($mockNewConnection) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($mockNewConnection)->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - 'sniffingInterval' => -1 - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($mockNewConnection, $retConnection); - } - - public function testAddOneHostAndForceNext() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"Bl2ihSr7TcuUHxhu1GA_YQ":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}}}', true); - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock() - ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock(); - - $connections = [$mockConnection]; - $mockNewConnection = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select')->once()->andReturn($mockConnection)->getMock() - ->shouldReceive('select')->once()->andReturn($mockNewConnection)->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($mockNewConnection)->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(true); - - $this->assertSame($mockNewConnection, $retConnection); - } - - public function testAddTenNodesThenGetConnection() - { - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(true) - ->getMock(); - - $connections[] = $mockConnection; - } - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturn($connections[0]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = ['randomizeHosts' => false]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($connections[0], $retConnection); - } - - public function testAddTenNodesTimeoutAllButLast() - { - $connections = []; - - foreach (range(1, 9) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(false) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(false) - ->getMock(); - - $connections[] = $mockConnection; - } - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(true) - ->getMock(); - - $connections[] = $mockConnection; - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($connections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = ['randomizeHosts' => false]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($connections[9], $retConnection); - } - - public function testAddTenNodesAllTimeout() - { - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(false) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(false) - ->getMock(); - - $connections[] = $mockConnection; - } - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($connections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = ['randomizeHosts' => false]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $retConnection = $connectionPool->nextConnection(); - } - - public function testAddOneHostSniffTwo() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true); - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('getTransportSchema')->twice()->andReturn('http')->getMock() - ->shouldReceive('sniff')->twice()->andReturn($clusterState)->getMock(); - - $connections = [$mockConnection]; - - $newConnections = []; - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock(); - - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues([ //selects provided node first, then the new cluster list - $mockConnection, - $newConnections[0], - $newConnections[1] - ]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[0])->getMock() - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[1])->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - 'sniffingInterval' => -1 - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - $this->assertSame($newConnections[0], $retConnection); - - $retConnection = $connectionPool->nextConnection(); - $this->assertSame($newConnections[1], $retConnection); - } - - public function testAddSeedSniffTwoTimeoutTwo() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true); - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock() - ->shouldReceive('sniff')->once()->andReturn($clusterState)->getMock(); - - $connections = [$mockConnection]; - - $newConnections = []; - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(false)->getMock() - ->shouldReceive('ping')->andReturn(false)->getMock(); - - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(false)->getMock() - ->shouldReceive('ping')->andReturn(false)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues([ //selects provided node first, then the new cluster list - $mockConnection, - $newConnections[0], - $newConnections[1] - ]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[0])->getMock() - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[1])->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - 'sniffingInterval' => -1 - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $retConnection = $connectionPool->nextConnection(); - } - - public function testTenTimeoutNineSniffTenthAddTwoAlive() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true); - - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(false)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock(); - - $connections[] = $mockConnection; - } - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('sniff')->andReturn($clusterState)->getMock() - ->shouldReceive('getTransportSchema')->twice()->andReturn('http')->getMock(); - - $connections[] = $mockConnection; - - $newConnections = $connections; - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('ping')->andReturn(true)->getMock(); - - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('ping')->andReturn(true)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($newConnections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[10])->getMock() - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[11])->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - 'sniffingInterval' => -1 - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - $this->assertSame($newConnections[11], $retConnection); - - $retConnection = $connectionPool->nextConnection(); - $this->assertSame($newConnections[12], $retConnection); - } - - public function testTenTimeoutNineSniffTenthAddTwoDeadTimeoutEveryone() - { - $clusterState = json_decode('{"ok":true,"cluster_name":"elasticsearch_zach","nodes":{"node1":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9300]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9200]"}, "node2":{"name":"Vesta","transport_address":"inet[/192.168.1.119:9301]","hostname":"zach-ThinkPad-W530","version":"0.90.5","http_address":"inet[/192.168.1.119:9201]"}}}', true); - - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(false)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock(); - - $connections[] = $mockConnection; - } - - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping')->andReturn(true)->getMock() - ->shouldReceive('isAlive')->andReturn(true)->getMock() - ->shouldReceive('sniff')->andReturn($clusterState)->getMock() - ->shouldReceive('getTransportSchema')->once()->andReturn('http')->getMock() - ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock(); - - $connections[] = $mockConnection; - - $newConnections = $connections; - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(false)->getMock() - ->shouldReceive('ping')->andReturn(false)->getMock() - ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock(); - - $newConnections[] = m::mock(Connection::class) - ->shouldReceive('isAlive')->andReturn(false)->getMock() - ->shouldReceive('ping')->andReturn(false)->getMock() - ->shouldReceive('sniff')->andThrow(OperationTimeoutException::class)->getMock(); - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($newConnections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class) - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9200])->andReturn($newConnections[10])->getMock() - ->shouldReceive('create')->with(['host' => '192.168.1.119', 'port' => 9201])->andReturn($newConnections[11])->getMock(); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - 'sniffingInterval' => -1 - ]; - $connectionPool = new SniffingConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $retConnection = $connectionPool->nextConnection(); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php deleted file mode 100644 index 8251701fb..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class StaticConnectionPoolIntegrationTest extends \PHPUnit\Framework\TestCase -{ - // Issue #636 - public function test404Liveness() - { - $client = \Elasticsearch\ClientBuilder::create() - ->setHosts([$_SERVER['ES_TEST_HOST']]) - ->setConnectionPool(\Elasticsearch\ConnectionPool\StaticConnectionPool::class) - ->build(); - - $connection = $client->transport->getConnection(); - - // Ensure connection is dead - $connection->markDead(); - - // The index doesn't exist, but the server is up so this will return a 404 - $this->assertFalse($client->indices()->exists(['index' => 'not_existing_index'])); - - // But the node should be marked as alive since the server responded - $this->assertTrue($connection->isAlive()); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php deleted file mode 100644 index a87768869..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/ConnectionPool/StaticConnectionPoolTest.php +++ /dev/null @@ -1,245 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class StaticConnectionPoolTest extends \PHPUnit\Framework\TestCase -{ - public function tearDown() - { - m::close(); - } - - public function testAddOneHostThenGetConnection() - { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(true) - ->getMock() - ->shouldReceive('markDead')->once()->getMock(); - - $connections = [$mockConnection]; - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturn($connections[0]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - ]; - $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($mockConnection, $retConnection); - } - - public function testAddMultipleHostsThenGetFirst() - { - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(true) - ->getMock() - ->shouldReceive('markDead')->once()->getMock(); - - $connections[] = $mockConnection; - } - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturn($connections[0]) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - ]; - $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $retConnection = $connectionPool->nextConnection(); - - $this->assertSame($connections[0], $retConnection); - } - - public function testAllHostsFailPing() - { - $connections = []; - - foreach (range(1, 10) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(false) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(false) - ->getMock() - ->shouldReceive('markDead')->once()->getMock() - ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock() - ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock(); - - $connections[] = $mockConnection; - } - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($connections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - ]; - $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $this->expectException(\Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $connectionPool->nextConnection(); - } - - public function testAllExceptLastHostFailPingRevivesInSkip() - { - $connections = []; - - foreach (range(1, 9) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(false) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(false) - ->getMock() - ->shouldReceive('markDead')->once()->getMock() - ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock() - ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock(); - - $connections[] = $mockConnection; - } - - $goodConnection = m::mock(Connection::class) - ->shouldReceive('ping')->once() - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive')->once() - ->andReturn(false) - ->getMock() - ->shouldReceive('markDead')->once()->getMock() - ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock() - ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock(); - - $connections[] = $goodConnection; - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($connections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - ]; - $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $ret = $connectionPool->nextConnection(); - $this->assertSame($goodConnection, $ret); - } - - public function testAllExceptLastHostFailPingRevivesPreSkip() - { - $connections = []; - - foreach (range(1, 9) as $index) { - $mockConnection = m::mock(Connection::class) - ->shouldReceive('ping') - ->andReturn(false) - ->getMock() - ->shouldReceive('isAlive') - ->andReturn(false) - ->getMock() - ->shouldReceive('markDead')->once()->getMock() - ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock() - ->shouldReceive('getLastPing')->andReturn(time())->once()->getMock(); - - $connections[] = $mockConnection; - } - - $goodConnection = m::mock(Connection::class) - ->shouldReceive('ping')->once() - ->andReturn(true) - ->getMock() - ->shouldReceive('isAlive')->once() - ->andReturn(false) - ->getMock() - ->shouldReceive('markDead')->once()->getMock() - ->shouldReceive('getPingFailures')->andReturn(0)->once()->getMock() - ->shouldReceive('getLastPing')->andReturn(time()-10000)->once()->getMock(); - - $connections[] = $goodConnection; - - $selector = m::mock(RoundRobinSelector::class) - ->shouldReceive('select') - ->andReturnValues($connections) - ->getMock(); - - $connectionFactory = m::mock(ConnectionFactory::class); - - $connectionPoolParams = [ - 'randomizeHosts' => false, - ]; - $connectionPool = new StaticConnectionPool($connections, $selector, $connectionFactory, $connectionPoolParams); - - $ret = $connectionPool->nextConnection(); - $this->assertSame($goodConnection, $ret); - } - - public function testCustomConnectionPoolIT() - { - $clientBuilder = \Elasticsearch\ClientBuilder::create(); - $clientBuilder->setHosts(['localhost:1']); - $client = $clientBuilder - ->setRetries(0) - ->setConnectionPool(StaticConnectionPool::class, []) - ->build(); - - $this->expectException(Elasticsearch\Common\Exceptions\NoNodesAvailableException::class); - $this->expectExceptionMessage('No alive nodes found in your cluster'); - - $client->search([]); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php deleted file mode 100644 index 81fddf50d..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Endpoints/AbstractEndpointTest.php +++ /dev/null @@ -1,38 +0,0 @@ - 10]], - [['invalid' => 10, 'invalid2' => 'another']], - ]; - } - - /** - * @dataProvider invalidParameters - * @expectedException \Elasticsearch\Common\Exceptions\UnexpectedValueException - */ - public function testInvalidParamsCauseErrorsWhenProvidedToSetParams(array $params) - { - $this->endpoint->expects($this->once()) - ->method('getParamWhitelist') - ->willReturn(['one', 'two']); - - $this->endpoint->setParams($params); - } - - protected function setUp() - { - $this->endpoint = $this->getMockForAbstractClass(AbstractEndpoint::class); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php deleted file mode 100644 index ae5a1b9e5..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://Elasticsearch.org - */ -class SearchResponseIteratorTest extends \PHPUnit\Framework\TestCase -{ - - public function tearDown() - { - m::close(); - } - - public function testWithNoResults() - { - $search_params = [ - 'scroll' => '5m', - 'index' => 'twitter', - 'size' => 1000, - 'body' => [ - 'query' => [ - 'match_all' => new \StdClass - ] - ] - ]; - - $mock_client = m::mock(Client::class); - - $mock_client->shouldReceive('search') - ->once() - ->ordered() - ->with($search_params) - ->andReturn(['_scroll_id' => 'scroll_id_01']); - - $mock_client->shouldReceive('scroll') - ->never(); - - $mock_client->shouldReceive('clearScroll') - ->once() - ->ordered() - ->withAnyArgs(); - - - $responses = new SearchResponseIterator($mock_client, $search_params); - - $this->assertCount(0, $responses); - } - - public function testWithHits() - { - $search_params = [ - 'scroll' => '5m', - 'index' => 'twitter', - 'size' => 1000, - 'body' => [ - 'query' => [ - 'match_all' => new \StdClass - ] - ] - ]; - - $mock_client = m::mock(Client::class); - - $mock_client->shouldReceive('search') - ->once() - ->ordered() - ->with($search_params) - ->andReturn([ - '_scroll_id' => 'scroll_id_01', - 'hits' => [ - 'hits' => [ - [ - 'foo' => 'bar' - ] - ] - ] - ]); - - $mock_client->shouldReceive('scroll') - ->once() - ->ordered() - ->with( - [ - 'scroll_id' => 'scroll_id_01', - 'scroll' => '5m' - ] - ) - ->andReturn( - [ - '_scroll_id' => 'scroll_id_02', - 'hits' => [ - 'hits' => [ - [ - 'foo' => 'bar' - ] - ] - ] - ] - ); - - $mock_client->shouldReceive('scroll') - ->once() - ->ordered() - ->with( - [ - 'scroll_id' => 'scroll_id_02', - 'scroll' => '5m' - ] - ) - ->andReturn( - [ - '_scroll_id' => 'scroll_id_03', - 'hits' => [ - 'hits' => [ - [ - 'foo' => 'bar' - ] - ] - ] - ] - ); - - $mock_client->shouldReceive('scroll') - ->once() - ->ordered() - ->with( - [ - 'scroll_id' => 'scroll_id_03', - 'scroll' => '5m' - ] - ) - ->andReturn( - [ - '_scroll_id' => 'scroll_id_04', - 'hits' => [ - 'hits' => [] - ] - ] - ); - - $mock_client->shouldReceive('scroll') - ->never() - ->with( - [ - 'scroll_id' => 'scroll_id_04', - 'scroll' => '5m' - ] - ); - - $mock_client->shouldReceive('clearScroll') - ->once() - ->ordered() - ->withAnyArgs(); - - $responses = new SearchResponseIterator($mock_client, $search_params); - - $this->assertCount(4, $responses); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php deleted file mode 100644 index 910580031..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/RegisteredNamespaceTest.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class RegisteredNamespaceTest extends \PHPUnit\Framework\TestCase -{ - public function tearDown() - { - m::close(); - } - - public function testRegisteringNamespace() - { - $builder = new FooNamespaceBuilder(); - $client = ClientBuilder::create()->registerNamespace($builder)->build(); - $this->assertSame("123", $client->foo()->fooMethod()); - } - - /** - * @expectedException \Elasticsearch\Common\Exceptions\BadMethodCallException - */ - public function testNonExistingNamespace() - { - $builder = new FooNamespaceBuilder(); - $client = ClientBuilder::create()->registerNamespace($builder)->build(); - $this->assertSame("123", $client->bar()->fooMethod()); - } -} - -// @codingStandardsIgnoreStart "Each class must be in a file by itself" - not worth the extra work here -class FooNamespaceBuilder implements Elasticsearch\Namespaces\NamespaceBuilderInterface -{ - public function getName() - { - return "foo"; - } - - public function getObject(Transport $transport, SerializerInterface $serializer) - { - return new FooNamespace(); - } -} - -class FooNamespace -{ - public function fooMethod() - { - return "123"; - } -} -// @codingStandardsIgnoreEnd diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php deleted file mode 100644 index 280b3ef74..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/ArrayToJSONSerializerTest.php +++ /dev/null @@ -1,53 +0,0 @@ - 'field']; - - $ret = $serializer->serialize($body); - - $body = json_encode($body, JSON_PRESERVE_ZERO_FRACTION); - $this->assertSame($body, $ret); - } - - public function testSerializeString() - { - $serializer = new ArrayToJSONSerializer(); - $body = 'abc'; - - $ret = $serializer->serialize($body); - - $this->assertSame($body, $ret); - } - - public function testDeserializeJSON() - { - $serializer = new ArrayToJSONSerializer(); - $body = '{"field":"value"}'; - - $ret = $serializer->deserialize($body, []); - - $body = json_decode($body, true); - $this->assertSame($body, $ret); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php deleted file mode 100644 index 606e795c8..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/Serializers/EverythingToJSONSerializerTest.php +++ /dev/null @@ -1,54 +0,0 @@ - 'field']; - - $ret = $serializer->serialize($body); - - $body = json_encode($body, JSON_PRESERVE_ZERO_FRACTION); - $this->assertSame($body, $ret); - } - - public function testSerializeString() - { - $serializer = new EverythingToJSONSerializer(); - $body = 'abc'; - - $ret = $serializer->serialize($body); - - $body = '"abc"'; - $this->assertSame($body, $ret); - } - - public function testDeserializeJSON() - { - $serializer = new EverythingToJSONSerializer(); - $body = '{"field":"value"}'; - - $ret = $serializer->deserialize($body, []); - - $body = json_decode($body, true); - $this->assertSame($body, $ret); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/YamlRunnerTest.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/YamlRunnerTest.php deleted file mode 100644 index 3c6b2336b..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/Elasticsearch/Tests/YamlRunnerTest.php +++ /dev/null @@ -1,1094 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elasticsearch.org - */ -class YamlRunnerTest extends \PHPUnit\Framework\TestCase -{ - /** @var \Symfony\Component\Yaml\Yaml Yaml parser for reading integrations tests */ - private $yaml; - - /** @var Elasticsearch\Client client used by elasticsearch */ - private $client; - - /** @var string Es version */ - private static $esVersion; - - /** @var array A list of supported features */ - private static $supportedFeatures = [ - 'stash_in_path', 'warnings', 'headers' - ]; - - /** @var array A mapping for endpoint when there is a reserved keywords for the method / namespace name */ - private static $endpointMapping = [ - 'tasks' => [ - 'list' => ['tasksList', 'tasks'], - ], - ]; - - private static $skippedTests = [ - - ]; - - /** @var array A list of skipped test with their reasons */ - private static $skippedFiles = [ - - 'cat.nodeattrs/10_basic.yml' => 'Using java regex fails in PHP', - 'cat.nodeattrs/10_basic.yaml' => 'Using java regex fails in PHP', - - 'cat.repositories/10_basic.yml' => 'Using java regex fails in PHP', - 'cat.repositories/10_basic.yaml' => 'Using java regex fails in PHP', - - 'indices.shrink/10_basic.yml' => 'Shrink tests seem to require multiple nodes', - 'indices.shrink/10_basic.yaml' => 'Shrink tests seem to require multiple nodes', - - 'indices.rollover/10_basic.yml' => 'Rollover test seems buggy atm', - 'indices.rollover/10_basic.yaml' => 'Rollover test seems buggy atm', - - ]; - - /** @var array A list of files to skip completely, due to fatal parsing errors */ - private static $fatalFiles = [ - 'indices.create/10_basic.yml' => 'Temporary: Yaml parser doesnt support "inline" empty keys', - 'indices.create/10_basic.yaml' => 'Temporary: Yaml parser doesnt support "inline" empty keys', - - 'indices.put_mapping/10_basic.yml' => 'Temporary: Yaml parser doesnt support "inline" empty keys', - 'indices.put_mapping/10_basic.yaml' => 'Temporary: Yaml parser doesnt support "inline" empty keys', - - 'search/110_field_collapsing.yml' => 'Temporary: parse error, malformed inline yaml', - 'search/110_field_collapsing.yaml' => 'Temporary: parse error, malformed inline yaml', - - 'cat.nodes/10_basic.yml' => 'Temporary: parse error, something about $body: |', - 'cat.nodes/10_basic.yaml' => 'Temporary: parse error, something about $body: |', - 'search.aggregation/180_percentiles_tdigest_metric.yml' => 'array of objects, unclear how to fix', - 'search.aggregation/190_percentiles_hdr_metric.yml' => 'array of objects, unclear how to fix' - ]; - - /** - * Return the elasticsearch host - * - * @return string - */ - public static function getHost() - { - if (isset($_SERVER['ES_TEST_HOST']) === true) { - return $_SERVER['ES_TEST_HOST']; - } - - echo 'Environment variable for elasticsearch test cluster (ES_TEST_HOST) not defined. Exiting yaml test'; - exit; - } - - - public static function setUpBeforeClass() - { - $host = static::getHost(); - echo "Test Host: $host\n"; - - $ch = curl_init($host); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - - $response = json_decode($response, true); - static::$esVersion = $response['version']['number']; - echo "ES Version: ".static::$esVersion."\n"; - } - - public function setUp() - { - $this->clean(); - $this->client = Elasticsearch\ClientBuilder::create()->setHosts([self::getHost()])->build(); - } - - /** - * @dataProvider yamlProvider - * @group sync - */ - public function testIntegration($testProcedure, $skip, $setupProcedure, $fileName) - { - if ($skip) { - static::markTestIncomplete($testProcedure); - } - - if (array_key_exists($fileName, static::$skippedFiles)) { - static::markTestSkipped(static::$skippedFiles[$fileName]); - } - - if (null !== $setupProcedure) { - $this->processProcedure(current($setupProcedure), 'setup', $fileName); - $this->waitForYellow(); - } - - $this->processProcedure(current($testProcedure), key($testProcedure), $fileName); - } - - /** - * @dataProvider yamlProvider - * @group async - */ - public function testAsyncIntegration($testProcedure, $skip, $setupProcedure, $fileName) - { - if ($skip) { - static::markTestIncomplete($testProcedure); - } - - if (array_key_exists($fileName, static::$skippedFiles)) { - static::markTestSkipped(static::$skippedFiles[$fileName]); - } - - if (null !== $setupProcedure) { - $this->processProcedure(current($setupProcedure), 'setup', $fileName); - $this->waitForYellow(); - } - - $this->processProcedure(current($testProcedure), key($testProcedure), $fileName, true); - } - - /** - * Process a procedure - * - * @param $procedure - * @param $name - * @param bool $async - */ - public function processProcedure($procedure, $name, $fileName, $async = false) - { - $lastOperationResult = null; - $context = []; - - if (array_key_exists("$fileName#$name", static::$skippedTests)) { - static::markTestSkipped(static::$skippedTests["$fileName#$name"]); - } - - foreach ($procedure as $operation) { - $lastOperationResult = $this->processOperation($operation, $lastOperationResult, $context, $name, $async); - } - } - - /** - * Process an operation - * - * @param $operation - * @param $lastOperationResult - * @param $testName - * @param array $context - * @param bool $async - * - * @return mixed - */ - public function processOperation($operation, $lastOperationResult, &$context, $testName, $async = false) - { - $operationName = array_keys((array)$operation)[0]; - - if ('do' === $operationName) { - return $this->operationDo($operation->{$operationName}, $lastOperationResult, $context, $testName, $async); - } - - if ('is_false' === $operationName) { - return $this->operationIsFalse($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('is_true' === $operationName) { - return $this->operationIsTrue($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('match' === $operationName) { - return $this->operationMatch($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('gte' === $operationName) { - return $this->operationGreaterThanOrEqual($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('gt' === $operationName) { - return $this->operationGreaterThan($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('lte' === $operationName) { - return $this->operationLessThanOrEqual($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('t' === $operationName) { - return $this->operationLessThan($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('length' === $operationName) { - return $this->operationLength($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('set' === $operationName) { - return $this->operationSet($operation->{$operationName}, $lastOperationResult, $context, $testName); - } - - if ('skip' === $operationName) { - return $this->operationSkip($operation->{$operationName}, $lastOperationResult, $testName); - } - - self::markTestIncomplete(sprintf('Operation %s not supported for test "%s"', $operationName, $testName)); - } - - /** - * Do something on the client - * - * @param $operation - * @param $lastOperationResult - * @param array $context - * @param $testName - * @param bool $async - * - * @throws \Exception - * - * @return mixed - */ - public function operationDo($operation, $lastOperationResult, &$context, $testName, $async = false) - { - $expectedError = null; - $expectedWarnings = null; - $headers = null; - - // Check if a error must be caught - if ('catch' === key($operation)) { - $expectedError = current($operation); - next($operation); - } - - // Check if a warning must be caught - if ('warnings' === key($operation)) { - $expectedWarnings = current($operation); - next($operation); - } - - // Any specific headers to add? - if ('headers' === key($operation)) { - $headers = current($operation); - next($operation); - } - - $endpointInfo = explode('.', key($operation)); - $endpointParams = $this->replaceWithContext(current($operation), $context); - $caller = $this->client; - $namespace = null; - $method = null; - - if (count($endpointInfo) === 1) { - $method = Inflector::camelize($endpointInfo[0]); - } - - if (count($endpointInfo) === 2) { - $namespace = $endpointInfo[0]; - $method = Inflector::camelize($endpointInfo[1]); - } - - if (is_object($endpointParams) === true && property_exists($endpointParams, 'ignore')) { - $ignore = $endpointParams->ignore; - unset($endpointParams->ignore); - - $endpointParams->client['ignore'] = $ignore; - } - - if ($async) { - $endpointParams->client['future'] = true; - } - - if ($headers != null) { - $endpointParams->client['headers'] = $headers; - } - - if (!is_string($method)) { - throw new \Exception('$method must be string'); - } - list($method, $namespace) = $this->mapEndpoint($method, $namespace); - - if (null !== $namespace) { - $caller = $caller->$namespace(); - } - - if (null === $method) { - self::markTestIncomplete(sprintf('Invalid do operation for test "%s"', $testName)); - } - - if (!method_exists($caller, $method)) { - self::markTestIncomplete(sprintf('Method "%s" not implement in "%s"', $method, get_class($caller))); - } - - // TODO remove this after cat testing situation resolved - if ($caller instanceof Elasticsearch\Namespaces\CatNamespace) { - if (!isset($endpointParams->format)) { - $endpointParams->format = 'text'; - } - } - - // Exist* methods have to be manually 'unwrapped' into true/false for async - if (strpos($method, "exist") !== false && $async === true) { - return $this->executeAsyncExistRequest($caller, $method, $endpointParams, $expectedError, $expectedWarnings, $testName); - } - - return $this->executeRequest($caller, $method, $endpointParams, $expectedError, $expectedWarnings, $testName); - } - - /** - * Obtain the response from the server - * - * @param $caller - * @param $method - * @param $endpointParams - * @param $expectedError - * @param $testName - * - * @throws \Exception - * - * @return array|mixed - */ - public function executeRequest($caller, $method, $endpointParams, $expectedError, $expectedWarnings, $testName) - { - try { - $response = $caller->$method($endpointParams); - - while ($response instanceof FutureArrayInterface) { - $response = $response->wait(); - } - - $this->checkForWarnings($expectedWarnings); - - return $response; - } catch (\Exception $exception) { - if (null !== $expectedError) { - return $this->assertException($exception, $expectedError, $testName); - } - - $msg = $exception->getMessage() - ."\nException in ".get_class($caller)." with [$method].\n Context:\n" - .var_export($endpointParams, true); - throw new \Exception($msg, 0, $exception); - } - } - - /** - * Obtain the response when it is an Exists* method. These are converted into - * true/false responses - * - * @param $caller - * @param $method - * @param $endpointParams - * @param $expectedError - * @param $testName - * - * @throws \Exception - * - * @return bool|mixed[] - */ - public function executeAsyncExistRequest($caller, $method, $endpointParams, $expectedError, $expectedWarnings, $testName) - { - try { - $response = $caller->$method($endpointParams); - - while ($response instanceof FutureArrayInterface) { - $response = $response->wait(); - } - - $this->checkForWarnings($expectedWarnings); - - if ($response['status'] === 200) { - return true; - } else { - return false; - } - } catch (Missing404Exception $exception) { - return false; - } catch (RoutingMissingException $exception) { - return false; - } catch (\Exception $exception) { - if (null !== $expectedError) { - return $this->assertException($exception, $expectedError, $testName); - } - - throw $exception; - } - } - - public function checkForWarnings($expectedWarnings) - { - $last = $this->client->transport->getLastConnection()->getLastRequestInfo(); - - - // We have some warnings to check - if ($expectedWarnings !== null) { - if (isset($last['response']['headers']['Warning']) === true) { - foreach ($last['response']['headers']['Warning'] as $warning) { - //$position = array_search($warning, $expectedWarnings); - $position = false; - foreach ($expectedWarnings as $index => $value) { - if (stristr($warning, $value) !== false) { - $position = $index; - break; - } - } - if ($position !== false) { - // found the warning - unset($expectedWarnings[$position]); - } else { - // didn't find, throw error - //throw new \Exception("Expected to find warning [$warning] but did not."); - } - } - if (count($expectedWarnings) > 0) { - print_r($last['response']); - throw new \Exception("Expected to find more warnings: ". print_r($expectedWarnings, true)); - } - } - } - - // Check to make sure we're adding headers - $this->assertArrayHasKey('Content-Type', $last['request']['headers'], print_r($last['request']['headers'], true)); - $this->assertSame('application/json', $last['request']['headers']['Content-Type'][0], print_r($last['request']['headers'], true)); - $this->assertArrayHasKey('Accept', $last['request']['headers'], print_r($last['request']['headers'], true)); - $this->assertSame('application/json', $last['request']['headers']['Accept'][0], print_r($last['request']['headers'], true)); - } - - /** - * Check if a field in the last operation is false - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationIsFalse($operation, $lastOperationResult, &$context, $testName) - { - $value = (bool)$this->resolveValue($lastOperationResult, $operation, $context); - $msg = "Failed to assert that a value is false in test \"$testName\"\n" - ."$operation was [".print_r($value, true)."]" - .var_export($lastOperationResult, true); - $this->assertFalse($value, $msg); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation is true - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationIsTrue($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, $operation, $context); - - $msg = "Failed to assert that a value is true in test \"$testName\"\n" - ."$operation was [".print_r($value, true)."]" - .var_export($lastOperationResult, true); - $this->assertNotEquals(0, $value, $msg); - $this->assertNotFalse($value, $msg); - $this->assertNotNull($value, $msg); - $this->assertNotEquals('', $msg); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation match an expected value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationMatch($operation, $lastOperationResult, &$context, $testName) - { - $key = key($operation); - - if ($key === '$body') { - $match = $lastOperationResult; - } else { - $match = $this->resolveValue($lastOperationResult, $key, $context); - } - - $expected = $this->replaceWithContext(current($operation), $context); - $msg = "Failed to match in test \"$testName\". Expected [" - .var_export($expected, true)."] does not match [".var_export($match, true)."]\n".var_export($lastOperationResult, true); - - if ($expected instanceof \stdClass) { - // Avoid stdClass / array mismatch - $expected = json_decode(json_encode($expected), true); - $match = json_decode(json_encode($match), true); - - $this->assertEquals($expected, $match, $msg); - } elseif (is_string($expected) && preg_match('#^/.+?/$#s', $expected)) { - $this->assertRegExp($this->formatRegex($expected), $match, $msg); - } else { - $this->assertEquals($expected, $match, $msg); - } - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation is greater than or equal a value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationGreaterThanOrEqual($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, key($operation), $context); - $expected = current($operation); - - $this->assertGreaterThanOrEqual($expected, $value, 'Failed to gte in test ' . $testName); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation is greater than a value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationGreaterThan($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, key($operation), $context); - $expected = current($operation); - - $this->assertGreaterThan($expected, $value, 'Failed to gt in test ' . $testName); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation is less than or equal a value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationLessThanOrEqual($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, key($operation), $context); - $expected = current($operation); - - $this->assertLessThanOrEqual($expected, $value, 'Failed to lte in test ' . $testName); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation is less than a value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationLessThan($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, key($operation), $context); - $expected = current($operation); - - $this->assertLessThan($expected, $value, 'Failed to lt in test ' . $testName); - - return $lastOperationResult; - } - - /** - * Check if a field in the last operation has length of a value - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationLength($operation, $lastOperationResult, &$context, $testName) - { - $value = $this->resolveValue($lastOperationResult, key($operation), $context); - $expected = current($operation); - - $this->assertCount($expected, $value, 'Failed to gte in test ' . $testName); - - return $lastOperationResult; - } - - /** - * Set a variable into context from last operation - * - * @param $operation - * @param $lastOperationResult - * @param $context - * @param $testName - */ - public function operationSet($operation, $lastOperationResult, &$context, $testName) - { - $key = key($operation); - $value = $this->resolveValue($lastOperationResult, $key, $context); - $variable = current($operation); - - $context['$' . $variable] = $value; - - return $lastOperationResult; - } - - /** - * Skip an operation depending on Elasticsearch Version - * - * @param $operation - * @param $lastOperationResult - * @param $testName - */ - public function operationSkip($operation, $lastOperationResult, $testName) - { - if (is_object($operation) !== true) { - return $lastOperationResult; - } - - if (property_exists($operation, 'features')) { - if (is_array($operation->features)) { - if (count(array_intersect($operation->features, static::$supportedFeatures)) != count($operation->features)) { - static::markTestSkipped(sprintf('Feature(s) %s not supported in test "%s"', json_encode($operation->features), $testName)); - } - } else { - if (!in_array($operation->features, static::$supportedFeatures, true)) { - static::markTestSkipped(sprintf('Feature(s) %s not supported in test "%s"', json_encode($operation->features), $testName)); - } - } - } - - if (property_exists($operation, 'version')) { - $version = $operation->version; - $version = str_replace(" ", "", $version); - $version = explode("-", $version); - - if (isset($version[0]) && $version[0] == 'all') { - static::markTestSkipped(sprintf('Skip test "%s", as all versions should be skipped (%s)', $testName, $operation->reason)); - } - - if (!isset($version[0]) || $version[0] === "") { - $version[0] = ~PHP_INT_MAX; - } - - if (!isset($version[1]) || $version[1] === "") { - $version[1] = PHP_INT_MAX; - } - - if (version_compare(static::$esVersion, (string)$version[0], '>=') && version_compare(static::$esVersion, (string)$version[1], '<=')) { - static::markTestSkipped(sprintf('Skip test "%s", as version %s should be skipped (%s)', $testName, static::$esVersion, $operation->reason)); - } - } - - return $lastOperationResult; - } - - /** - * Assert an expected error - * - * @param \Exception $exception - * @param $expectedError - * @param $testName - * - * @return array - */ - private function assertException(\Exception $exception, $expectedError, $testName) - { - if (is_string($expectedError) && preg_match('#^/.+?/$#', $expectedError)) { - $this->assertRegExp($expectedError, $exception->getMessage(), 'Failed to catch error in test ' . $testName); - } elseif ($exception instanceof BadRequest400Exception && $expectedError === 'bad_request') { - $this->assertTrue(true); - } elseif ($exception instanceof Unauthorized401Exception && $expectedError === 'unauthorized') { - $this->assertTrue(true); - } elseif ($exception instanceof Missing404Exception && $expectedError === 'missing') { - $this->assertTrue(true); - } elseif ($exception instanceof Conflict409Exception && $expectedError === 'conflict') { - $this->assertTrue(true); - } elseif ($exception instanceof Forbidden403Exception && $expectedError === 'forbidden') { - $this->assertTrue(true); - } elseif ($exception instanceof RequestTimeout408Exception && $expectedError === 'request_timeout') { - $this->assertTrue(true); - } elseif ($exception instanceof BadRequest400Exception && $expectedError === 'request') { - $this->assertTrue(true); - } elseif ($exception instanceof ServerErrorResponseException && $expectedError === 'request') { - $this->assertTrue(true); - } elseif ($exception instanceof \RuntimeException && $expectedError === 'param') { - $this->assertTrue(true); - } else { - $this->assertContains($expectedError, $exception->getMessage()); - } - - if ($exception->getPrevious() !== null) { - return json_decode($exception->getPrevious()->getMessage(), true); - } - - return json_decode($exception->getMessage(), true); - } - - /** - * Provider list of document to test - * - * @return array - */ - public function yamlProvider() - { - $this->yaml = new Yaml(); - $path = __DIR__ . '/../../../util/elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/test'; - $files = []; - - $finder = new Finder(); - $finder->in($path); - $finder->files(); - $finder->name('*.yml'); - - // *.yaml files should be included until the library is ES 6.0+ only - $finder->name('*.yaml'); - - $filter = isset($_SERVER['TEST_CASE']) ? $_SERVER['TEST_CASE'] : null; - - /** @var SplFileInfo $file */ - foreach ($finder as $file) { - $files = array_merge($files, $this->splitDocument($file, $path, $filter)); - } - - return $files; - } - - /** - * Return the real namespace / method couple for elasticsearch php - * - * @param string $method - * @param string|null $namespace - * - * @return array - */ - private function mapEndpoint($method, $namespace = null) - { - if (null === $namespace && array_key_exists($method, static::$endpointMapping)) { - return static::$endpointMapping[$method]; - } - - if (null !== $namespace && array_key_exists($namespace, static::$endpointMapping) && array_key_exists($method, static::$endpointMapping[$namespace])) { - return static::$endpointMapping[$namespace][$method]; - } - - return [$method, $namespace]; - } - - /** - * Replace contextual variable into a bunch of data - * - * @param $data - * @param $context - * - * @return mixed - */ - private function replaceWithContext($data, $context) - { - if (empty($context)) { - return $data; - } - - if (is_string($data)) { - if (array_key_exists($data, $context)) { - return $context[$data]; - } - } - - if (!is_array($data) && !$data instanceof \stdClass) { - return $data; - } - - foreach ($data as $key => &$value) { - $value = $this->replaceWithContext($value, $context); - } - - return $data; - } - - /** - * Resolve a value into an array given a specific field - * - * @param $result - * @param $field - * - * @return mixed - */ - private function resolveValue($result, $field, &$context) - { - if (empty($field)) { - return $result; - } - - foreach ($context as $key => $value) { - $field = preg_replace('/('.preg_quote($key, '/').')/', $value, $field); - } - - $operationSplit = explode('.', $field); - $value = $result; - - do { - $key = array_shift($operationSplit); - - if (substr($key, -1) === '\\') { - $key = substr($key, 0, -1) . '.' . array_shift($operationSplit); - } - - if (!is_array($value)) { - return $value; - } - - if (!array_key_exists($key, $value)) { - return false; - } - - $value = $value[$key]; - } while (count($operationSplit) > 0); - - return $value; - } - - /** - * Format a regex for PHP - * - * @param $regex - * - * @return string - */ - private function formatRegex($regex) - { - $regex = trim($regex); - $regex = substr($regex, 1, -1); - $regex = str_replace('/', '\\/', $regex); - $regex = '/' . $regex . '/mx'; - - return $regex; - } - - /** - * Split file content into multiple document - * - * @param SplFileInfo $file - * @param string $path; - * - * @return array - */ - private function splitDocument($file, $path, $filter = null) - { - - $fileContent = $file->getContents(); - // cleanup some bad comments - $fileContent = str_replace('"#', '" #', $fileContent); - - $documents = explode("---\n", $fileContent); - $documents = array_filter($documents, function ($item) { - return trim($item) !== ''; - }); - - $documentsParsed = []; - $setup = null; - $setupSkip = false; - $fileName = str_replace($path . '/', '', $file); - - if (array_key_exists($fileName, static::$fatalFiles)) { - echo "Skipping: $fileName. ".static::$fatalFiles[$fileName]."\n"; - return []; - } - - if (null !== $filter && !preg_match('/'.preg_quote($filter, '/').'/', $fileName)) { - return []; - } - $skip = false; - $documentParsed = null; - foreach ($documents as $documentString) { - try { - if (!$setupSkip) { - $documentParsed = $this->yaml->parse($documentString, false, false, true); - $skip = false; - } - } catch (ParseException $exception) { - $documentParsed = sprintf( - "[ParseException]Cannot run this test as it cannot be parsed (%s) in file %s", - $exception->getMessage(), - $fileName - ); - - if (preg_match("#\nsetup:#mx", $documentString)) { - $setupSkip = true; - } - - $skip = true; - } catch (\Exception $exception) { - $documentParsed = sprintf( - "[Exception] Cannot run this test as it generated an exception (%s) in file %s", - $exception->getMessage(), - $fileName - ); - - if (preg_match("#\nsetup:#mx", $documentString)) { - $setupSkip = true; - } - - $skip = true; - } - - if (!$skip && key($documentParsed) === 'setup') { - $setup = $documentParsed; - $setupSkip = $skip; - } else { - $documentsParsed[] = [$documentParsed, $skip || $setupSkip, $setup, $fileName]; - } - } - - return $documentsParsed; - } - - /** - * Clean the cluster - */ - private function clean() - { - $host = static::getHost(); - $ch = curl_init($host."/*"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - - $ch = curl_init($host."/_template/*"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - - $ch = curl_init($host."/_analyzer/*"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - - $ch = curl_init($host."/_snapshot/_all"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - if ($response != "{}") { - $response = json_decode($response, true); - foreach ($response as $repo => $settings) { - if ($settings['type'] == 'fs') { - $ch = curl_init($host."/_snapshot/$repo/_all?ignore_unavailable"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $snapshots = json_decode(curl_exec($ch), true); - curl_close($ch); - foreach ($snapshots['snapshots'] as $snapshot) { - $snapshotName = $snapshot['snapshot']; - $ch = curl_init($host."/_snapshot/$repo/$snapshotName"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - } - $ch = curl_init($host."/_snapshot/$repo"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = curl_exec($ch); - curl_close($ch); - } - } - } - - $this->rmDirRecursively('/tmp/test_repo_create_1_loc'); - $this->rmDirRecursively('/tmp/test_repo_restore_1_loc'); - $this->rmDirRecursively('/tmp/test_cat_repo_1_loc'); - $this->rmDirRecursively('/tmp/test_cat_repo_2_loc'); - $this->rmDirRecursively('/tmp/test_cat_snapshots_1_loc'); - - $this->waitForYellow(); - } - - private function rmDirRecursively($dir) - { - if (!is_dir($dir)) { - return; - } - $files = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS), - RecursiveIteratorIterator::CHILD_FIRST - ); - - foreach ($files as $fileinfo) { - $todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink'); - $todo($fileinfo->getRealPath()); - } - - rmdir($dir); - } - - /** - * Wait for cluster to be in a "YELLOW" state - */ - private function waitForYellow() - { - $host = static::getHost(); - $ch = curl_init("$host/_cluster/health?wait_for_status=yellow&timeout=50s"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - - $response = json_decode(curl_exec($ch), true); - - $counter = 0; - while ($response['status'] === 'red') { - sleep(0.5); - $response = json_decode(curl_exec($ch), true); - ++$counter; - - if ($counter > 10) { - echo "Aborting test due to failure in clearing cluster.\n"; - echo print_r($response, true); - exit; - } - } - curl_close($ch); - } -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/tests/bootstrap.php b/openml_OS/vendor/elasticsearch/elasticsearch/tests/bootstrap.php deleted file mode 100644 index 9e4d302dd..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ -/dev/null - -which java -java -version - - -echo "Downloading Elasticsearch v${ES_VERSION}-SNAPSHOT..." - -ES_URL=$(curl -sS "https://esvm-props.kibana.rocks/builds" | jq -r ".branches[\"$ES_VERSION\"].zip") - -curl -L -o elasticsearch-latest-SNAPSHOT.zip $ES_URL -unzip "elasticsearch-latest-SNAPSHOT.zip" - -echo "Adding repo to config..." -find . -name "elasticsearch.yml" | while read TXT ; do echo 'repositories.url.allowed_urls: ["http://*"]' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'path.repo: ["/tmp"]' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'node.max_local_storage_nodes: 1' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'cluster.routing.allocation.disk.watermark.low: 0.1%' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'cluster.routing.allocation.disk.watermark.high: 0.1%' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'node.attr.testattr: test' >> $TXT ; done -find . -name "elasticsearch.yml" | while read TXT ; do echo 'script.max_compilations_rate: 2048/1m' >> $TXT ; done - -echo "Starting Elasticsearch v${ES_VERSION}" - -./elasticsearch-*/bin/elasticsearch -d - - -sleep 3 diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/travis/generate_docs.sh b/openml_OS/vendor/elasticsearch/elasticsearch/travis/generate_docs.sh deleted file mode 100755 index 88092120b..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/travis/generate_docs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -curl -O http://get.sensiolabs.org/sami.phar -php sami.phar update --force -v util/docsConfig.php diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/EnsureClusterAlive.php b/openml_OS/vendor/elasticsearch/elasticsearch/util/EnsureClusterAlive.php deleted file mode 100644 index fbf942506..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/EnsureClusterAlive.php +++ /dev/null @@ -1,48 +0,0 @@ - [$_SERVER['ES_TEST_HOST']] -]); - -$count = 0; -while (!$client->ping()) { - $count += 1; - - if ($count > 15) { - echo "Live cluster could not be found in 15s!\nContents of elasticsearch.log:\n\n"; - - $dir = new DirectoryIterator(dirname(__DIR__)); - - foreach ($dir as $fileinfo) { - if ($fileinfo->isDir() && !$fileinfo->isDot()) { - if (strpos($fileinfo->getFilename(), "elasticsearch") === 0) { - $log = file_get_contents(dirname(__DIR__)."/$fileinfo/logs/elasticsearch.log"); - echo $log; - break; - } - - } - } - - throw new \Exception(); - } - sleep(1); -} - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/RestSpecRunner.php b/openml_OS/vendor/elasticsearch/elasticsearch/util/RestSpecRunner.php deleted file mode 100644 index c4a295a72..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/RestSpecRunner.php +++ /dev/null @@ -1,37 +0,0 @@ - [$_SERVER['ES_TEST_HOST']] -]); -$serverInfo = $client->info(); -var_dump($serverInfo); - -$gitWrapper = new \GitWrapper\GitWrapper(); -echo "Git cwd: ".dirname(__DIR__) . "/util/elasticsearch\n"; -$git = $gitWrapper->workingCopy(dirname(__DIR__) . '/util/elasticsearch'); - -echo "Update elasticsearch submodule\n"; -$git->fetchAll(array('verbose' => true)); - -$hash = $serverInfo['version']['build_hash']; -echo "Checkout yaml tests (hash: $hash)\n"; -$git->checkout($hash, array('force' => true, 'quiet' => true)); diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/SpecParser.php b/openml_OS/vendor/elasticsearch/elasticsearch/util/SpecParser.php deleted file mode 100755 index 386367224..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/SpecParser.php +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/env php -loadTemplate('endpoint.twig'); - -$counter = 0; - - -function getApiPath() -{ - $path = dirname(__FILE__).'/elasticsearch/rest-api-spec/api'; - if (file_exists($path) !== true) { - $path = dirname(__FILE__).'/elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/api'; - } - return $path; -} - - -if ($handle = opendir(getApiPath())) { - while (false !== ($entry = readdir($handle))) { - if ($entry != "." && $entry != "..") { - generateTemplate($entry, $template); - } - } - closedir($handle); -} - -function processURLPaths($data) -{ - $final = array(); - - $containsType = false; - $containsIndex = false; - foreach ($data['url']['paths'] as $path) { - $params = array(); - preg_match_all('/{(.*?)}/', $path, $params); - $params = $params[1]; - $count = count($params); - $parsedPath = str_replace('}', '', $path); - $parsedPath = str_replace('{', '$', $parsedPath); - - if (array_search('index', $params) !== false) { - $containsIndex = true; - } - - if (array_search('type', $params) !== false) { - $containsType = true; - } - - $duplicate = false; - foreach ($final as $existing) { - if ($existing['params'] === $params) { - $duplicate = true; - } - } - - if ($duplicate !== true) { - $final[] = array( - 'path' => $path, - 'parsedPath' => $parsedPath, - 'params' => $params, - 'count' => $count - ); - } - } - - /* - foreach ($final as &$existing) { - if ($containsIndex === true && array_search('index', $existing['params']) === false && array_search('type', $existing['params']) !== false) { - $existing['parsedPath'] = '/_all'.$existing['parsedPath']; - } - } - */ - - usort($final, function ($a, $b) { - if ($a['count'] == $b['count']) { - return 0; - } - - return ($a['count'] > $b['count']) ? -1 : 1; - }); - - return $final; -} - -function getDefaultPath($path) -{ - if ($path['count'] === 0) { - return $path['path']; - } else { - $final = str_replace('}', '', $path['path']); - $final = str_replace('{', '$', $final); - - return $final; - } -} - -function forbid($key, $value) -{ - $forbid = array( - 'GET' => array( - '/_nodes/hotthreads', - '/_nodes/{node_id}/hotthreads', - '/_nodes/{metric}' - ), - 'HEAD' => array(), - 'PUT' => array( - '/{index}/{type}/_mapping' - ), - 'POST' => array( - '/_all/{type}/_bulk', - '/_all/{type}/_mget' - ), - 'DELETE' => array( - '/{index}/{type}', - '/{index}/{type}/_mapping' - ), - 'QS' => array( - 'operation_threading', - 'field_data' - ) - ); - - if (isset($forbid['key']) && $forbid['key'] === $value) { - return true; - } else { - return false; - } -} - -function generateTemplate($path, $template) -{ - $ignoreList = array( - 'index.json', 'bulk.json' - ); - - if (array_search($path, $ignoreList) !== false) { - return; - } - - $path = getApiPath().DIRECTORY_SEPARATOR.$path; - $json = file_get_contents($path); - $data = json_decode($json, true); - - reset($data); - $namespace = key($data); - $data = $data[$namespace]; - $namespace = explode('.', $namespace); - - $underscoreNamespace = array( - 'get', - 'put', - 'post', - 'delete', - 'exists', - 'update', - 'create' - ); - - $exceptions = array( - 'delete_by_query', - 'update_by_query', - ); - - if (strpos($namespace[count($namespace)-1], '_')) { - $temp = explode('_', $namespace[count($namespace)-1]); - - if (array_search($temp[0], $underscoreNamespace) !== false && array_search($namespace[count($namespace)-1], $exceptions) === false) { - $namespace[count($namespace)-1] = $temp[1]; - $namespace[] = $temp[0]; - } else { - $namespace[count($namespace)-1] = str_replace('_', '', $namespace[count($namespace)-1]); - } - } - - $data['url']['processed'] = processURLPaths($data); - $data['url']['default'] = getDefaultPath($data['url']['processed'][count($data['url']['processed'])-1]); - if (count($data['methods']) > 1) { - if (in_array("GET", $data['methods'])) { - $data['methods'] = "GET"; - } else { - $data['methods'] = $data['methods'][0]; - } - } - $renderVars = array( - 'json' => $json, - 'data' => $data, - 'namespace' => $namespace, - 'className' => ucfirst($namespace[count($namespace)-1]), - ); - - $ret = $template->render($renderVars); - - $dir = __DIR__.'/output/'.implode('/', array_map('ucfirst', array_splice($namespace, 0, count($namespace)-1))); - - if (substr($dir, -1) !== '/') { - $dir .= '/'; - } - if (!file_exists($dir)) { - echo 'making dir: '.$dir."\n\n"; - $oldumask = umask(0); - mkdir($dir, 0777, true); - umask($oldumask); - } - - echo $dir."\n\n"; - $path = $dir.$renderVars['className'].'.php'; - echo $path."\n\n"; - - file_put_contents($path, $ret); -} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docsConfig.php b/openml_OS/vendor/elasticsearch/elasticsearch/util/docsConfig.php deleted file mode 100644 index d0a5690c3..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docsConfig.php +++ /dev/null @@ -1,22 +0,0 @@ -files() - ->name('*Namespace.php') - ->name("Client.php") - ->name("ClientBuilder.php") - ->notName("AbstractNamespace.php") - ->in(__DIR__.'/../src/'); - -return new Sami($iterator, [ - 'theme' => 'asciidoc', - 'template_dirs' => [__DIR__.'/docstheme/'], - 'title' => 'Elasticsearch-php', - 'build_dir' => __DIR__.'/../docs/build', - 'cache_dir' => __DIR__.'/cache/', -]); diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/layout/base.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/layout/base.twig deleted file mode 100644 index 70610e193..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/layout/base.twig +++ /dev/null @@ -1,13 +0,0 @@ -{% from "macros.twig" import replace_backslash, sanitize %} - -{% block title %} -{% set parts = title|split("\\") %} -{% set path = parts|slice(0, -1)|join("\\") %} -{% set name = parts|slice(-1, 1)|join("\\") %} - -[[{{ sanitize(replace_backslash(title)) }}]] -=== {{ title }} - -{% endblock %} -{% block content %} -{% endblock %} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/macros.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/macros.twig deleted file mode 100644 index 9ea1834e8..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/macros.twig +++ /dev/null @@ -1,138 +0,0 @@ -{% macro class_item(class, short = false, indent = "") -%} -{{ indent }}{{ _self.class_name(class, short) }}{% if class.shortdesc %} -- {{ class.shortdesc }}{% endif %} -{%- endmacro -%} - -{% macro class_name(class, short = false, suffix = "") -%} -{% spaceless -%} -{% if class.projectclass or class.phpclass %} -{% if class.projectclass %} -<<{{_self.replace_backslash( (short ? class.shortname : class)~suffix) }},{{ class }}>> -{% else %} -http://php.net/class.{{ class }}[{{ short ? class.shortname : class }}{{ suffix }}] -{% endif %}) -{% else %} -`{{ class }}` -{% endif %} -{%- endspaceless %} -{%- endmacro -%} - -{% macro class_type(class, sentence = false) -%} -{% spaceless %} -{% if class.interface %} -{% if sentence %}an {% endif %} -interface -{%- else -%} -{% if sentence %}{% if class.abstract %}an{% else %}a{% endif %} {% endif %} -{% if class.abstract %}abstract {% endif %} -class -{%- endif -%} -{% endspaceless %} -{%- endmacro -%} - -{% macro hint(hint) -%} -{% spaceless %} -{% if hint.class -%} -{{ _self.class_name(hint.name) }} -{%- elseif hint.name -%} -{{ hint.name }} -{%- endif %} -{% endspaceless %} -{%- endmacro -%} - -{% macro markdown_path(path) -%} -{% spaceless %} -{{- path|replace({".html": ".md"}) -}} -{% endspaceless %} -{%- endmacro -%} - -{% macro replace_backslash(path) -%} - {% spaceless %} - {{- path|replace({"\\": "_"}) -}} - {% endspaceless %} -{%- endmacro -%} - -{% macro back_to_forward(path) -%} - {% spaceless %} - {{- path|replace({"\\": "/"}) -}} - {% endspaceless %} -{%- endmacro -%} - -{% macro sanitize(path) -%} - {% spaceless %} - {{- path|replace({"$": "", "::": "", "__": "-"}) -}} - {% endspaceless %} -{%- endmacro -%} - -{% macro get_namespace(class) -%} - {% spaceless %} - {% if class.shortname == 'Client' %} - $client - {% else %} - $client->{{ class.shortname|lower|replace({"namespace": ""}) }}() - {% endif %} - {% endspaceless %} -{%- endmacro -%} - - - -{% macro param_list(member) -%} - {% spaceless %} - {% for parameter in member.parameters %}${{ parameter.name }},{% endfor %} - {% endspaceless %} -{%- endmacro -%} - -{% macro member_signature(type, member) -%} -* It is a **{{ _self.member_visibility(member) }}{% if member.abstract is defined and member.abstract %} abstract{% endif %}** {{ type }}. -{% if member.final %} -* It is a **finalized** {{ type }}. -{% endif %} -{% if "property" == type %} -{% if member.hint|length > 1 %} -* It can be one of the following types: -{%- for hint in member.hint %} - - * {{ _self.hint(hint) }} -{%- endfor -%} -{%- elseif member.hint|length > 0 %} -* It is a(n) {{ _self.hint(member.hint[0]) }} value. -{%- else %} -* Its type is not specified. -{% endif %} -{% elseif "method" == type %} -{% if member.parameters %} -* It accepts the following parameter(s): -{% for parameter in member.parameters %} - * `${{ parameter.name }}`{% if parameter.hint %} ({% for hint in parameter.hint %}{{ _self.hint(hint) }}{% if not loop.last %}|{% endif %}{% endfor %}){% endif %}{% if parameter.shortdesc %} -- {{ parameter.shortdesc }}{% endif %} - -{% endfor %} -{% endif %} -{% if (member.hint|length > 1) or member.hintDesc %} -{% if member.hintDesc %} -* _Returns:_ {{ member.hintDesc }} -{% else %} -* It can return one of the following values: -{% endif %} -{% for hint in member.hint %} - * {{ _self.hint(hint) }} -{% endfor -%} -{% elseif member.hint|length > 0 %} -* It returns a(n) {{ _self.hint(member.hint[0]) }} value. -{% else %} -* It does not return anything. -{% endif %} -{% if member.exceptions %} -* It throws one of the following exceptions: -{% for exception in member.exceptions %} - * {{ _self.class_name(exception[0]) }}{% if exception[1] is defined and exception[1] is not empty %} -- {{ exception[1] }}{% endif %} - -{% endfor %} -{% endif %} -{% endif %} -{%- endmacro -%} - -{% macro member_visibility(member) -%} -{% spaceless %} -{% if member.private %}private{% elseif member.protected %}protected{% else %}public{% endif %} -{% if member.static %} static{% endif %} -{% endspaceless %} -{%- endmacro -%} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/manifest.yml b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/manifest.yml deleted file mode 100644 index c1b212dc9..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/manifest.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: asciidoc - -global: - "pages/namespaces.twig": "namespaces.asciidoc" - "pages/interfaces.twig": "interfaces.asciidoc" - "pages/classes.twig": "classes.asciidoc" - -class: - "pages/class.twig": "%s.asciidoc" diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/class.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/class.twig deleted file mode 100644 index 633ca1266..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/class.twig +++ /dev/null @@ -1,82 +0,0 @@ -{% extends "layout/base.twig" %} - -{% from "macros.twig" import class_item, class_name, class_type, member_signature, replace_backslash, sanitize, param_list, get_namespace %} - -{% block title %} -{% set title = class %} -{{ parent() }} -{% endblock %} - -{% block content %} -{% if class.shortdesc %} - -{{ class.shortdesc|raw }} -{% endif %} -{% if class.longdesc %} - -*Description* - - -{{ class.longdesc|raw }} -{% endif %} - -{% if class.methods %} - -*Methods* - -The {{ class_type(class) }} defines the following methods: - -{% for method in class.methods %} -{% if method.name != "__construct" %} -* <<{{ sanitize(replace_backslash(method)~"_"~method.name) }},`{{ method.name }}()`>> -{% endif %} -{% endfor %} - -{% for method in class.methods %} -{% if method.name != "__construct" %} - - -{% if class.shortname != "ClientBuilder" %} -[[{{ sanitize(replace_backslash(method)~"_"~method.name) }}]] -.`{{ method.name }}()` -**** -[source,php] ----- -/* -{% if method.shortdesc %} -{{ method.shortdesc|raw }} - ['body'] = (array) Request body -{% endif %} -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = {{ get_namespace(class) }}->{{ method.name }}({{ param_list(method)|trim(',') }}); ----- -**** -{% else %} -[[{{ sanitize(replace_backslash(method)~"_"~method.name) }}]] -.`{{ method.name }}()` -**** -[source,php] ----- -/* -{% if method.shortdesc %} - {{ method.shortdesc|raw }} - ['body'] = (array) Request body -{% endif %} -*/ - ----- -**** -{% endif %} -{% endif %} - -{% endfor %} -{% endif %} - -{% endblock %} - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/classes.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/classes.twig deleted file mode 100644 index f8c652179..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/classes.twig +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "layout/base.twig" %} - -{% from "macros.twig" import class_item, replace_backslash, back_to_forward, sanitize %} - -{% block title %} -[[{{ sanitize(replace_backslash("ElasticsearchPHP_Endpoints")) }}]] -== {{ "Reference - Endpoints" }} -{% endblock %} - -{% block content %} - -This is a complete list of namespaces and their associated endpoints. - -NOTE: This is auto-generated documentation - -{% for class in classes if not class.interface %} -* <<{{ replace_backslash(class) }}, {{ class }}>> -{% else %} -* There are no endpoints available. -{% endfor %} -{% for class in classes if not class.interface %} -include::{{ back_to_forward(class) }}.asciidoc[] -{% else %} -{% endfor %} -{% endblock %} - - diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/interfaces.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/interfaces.twig deleted file mode 100644 index dfa5a9458..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/interfaces.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "layout/base.twig" %} - -{% from "macros.twig" import class_item, replace_backslash, back_to_forward, sanitize %} - -{% block title %} -[[{{ sanitize(replace_backslash("ElasticsearchPHP_Interfaces")) }}]] -== {{ "Reference - Interfaces" }} -{% endblock %} - -{% block content %} - -This is a complete list of available interfaces: - -{% for interface in classes if interface.interface %} -* <<{{ replace_backslash(interface) }}, {{ interface }}>> -{% else %} -* There are no interfaces available. -{% endfor %} -{% for interface in classes if interface.interface %} -include::{{ back_to_forward(interface) }}.asciidoc[] -{% else %} -{% endfor %} -{% endblock %} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/namespaces.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/namespaces.twig deleted file mode 100644 index 8b82c2f65..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/docstheme/pages/namespaces.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "layout/base.twig" %} - -{% from "macros.twig" import markdown_path, replace_backslash, back_to_forward, sanitize %} - -{% block title %} -[[{{ sanitize(replace_backslash("ElasticsearchPHP_Namespaces")) }}]] -== {{ "Reference - Namespaces" }} -{% endblock %} - -{% block content %} - -This is a complete list of available namespaces: - -{% for namespace in namespaces %} -* <<{{ replace_backslash(namespace) }}, {{ namespace }}>> -{% else %} -* There are no namespaces available. -{% endfor %} -{% for namespace in namespaces %} -include::{{ back_to_forward(namespace) }}.asciidoc[] -{% else %} -{% endfor %} -{% endblock %} diff --git a/openml_OS/vendor/elasticsearch/elasticsearch/util/templates/endpoint.twig b/openml_OS/vendor/elasticsearch/elasticsearch/util/templates/endpoint.twig deleted file mode 100644 index 5a704af8e..000000000 --- a/openml_OS/vendor/elasticsearch/elasticsearch/util/templates/endpoint.twig +++ /dev/null @@ -1,150 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ - -class {{ className|title }} extends AbstractEndpoint -{ -{% for part, info in data.url.parts %} -{% if part != 'index' and part != 'type' and part != 'id' %} - // {{info.description }} - private ${{part}}; -{% endif %} -{% endfor %} -{% if data.body is not null %} - /** - * @param array $body - * - * @throws \Elasticsearch\Common\Exceptions\InvalidArgumentException - * @return $this - */ - public function setBody($body) - { - if (isset($body) !== true) { - return $this; - } - - $this->body = $body; - return $this; - } - - - -{% endif %} -{% for part, info in data.url.parts %} -{% if part != 'index' and part != 'type' and part != 'id' %} - /** - * @param ${{part}} - * - * @return $this - */ - public function set{{part|title|replace({'_': ""})}}(${{part}}) - { - if (isset(${{part}}) !== true) { - return $this; - } -{% if info.type == 'list' %} - if (is_array(${{part}}) === true) { - ${{part}} = implode(",", ${{part}}); - } -{% endif %} - $this->{{part}} = ${{part}}; - return $this; - } - -{% endif %} -{% endfor %} -{% set exception = '' %} - /** -{% for part, info in data.url.parts %}{% if info.required is not null %}{% set exception = ' * @throws \\Elasticsearch\\Common\\Exceptions\\BadMethodCallException - ' %}{% endif %}{% endfor %} - {% autoescape false %}{{ exception }}{% endautoescape %} - * @return string - */ - protected function getURI() - { -{% for part, info in data.url.parts %} -{% if info.required == true %} - if (isset($this->{{ part }}) !== true) { - throw new Exceptions\RuntimeException( - '{{ part }} is required for {{ className }}' - ); - } -{% endif %} -{% endfor %} -{% for part, info in data.url.parts %} - ${{ part }} = $this->{{ part }}; -{% endfor %} - $uri = "{{ data.url.default }}"; -{% set loopCounter = 0 %} -{% for part, info in data.url.processed %} -{% if info.count > 0 %} -{% set counter = 0 %} -{% if loopCounter != 0 %} - else{% endif %}if ({% for param in info.params %}{% if counter == 0 %}isset(${{ param }}) === true{% else %} && isset(${{ param }}) === true{% endif %}{% set counter = counter + 1 %}{% endfor %}) - { - $uri = "{{ info.parsedPath }}"; - } -{% set loopCounter = 1 %} -{% endif %} -{% endfor %} - - return $uri; - } - - - /** - * @return string[] - */ - protected function getParamWhitelist() - { - return array( -{% for param, options in data.url.params %} - '{{ param }}', -{% endfor %} - ); - } - - -{% if data.body.required == true %} - /** - * @return array - * @throws \Elasticsearch\Common\Exceptions\RuntimeException - */ - protected function getBody() - { - if (isset($this->body) !== true) { - throw new Exceptions\RuntimeException('Body is required for {{ className|title }}'); - } - return $this->body; - } - - -{% endif %} - /** - * @return string - */ - protected function getMethod() - { -{% if data.methods|length > 1 %} - //TODO Fix Me! - return '{{ data.methods|join(',') }}'; -{% else %} - return '{{ data.methods[0] }}'; -{% endif %} - } -} \ No newline at end of file diff --git a/openml_OS/vendor/ezimuel/guzzlestreams/.github/workflows/test.yml b/openml_OS/vendor/ezimuel/guzzlestreams/.github/workflows/test.yml new file mode 100644 index 000000000..b0f1a0aa1 --- /dev/null +++ b/openml_OS/vendor/ezimuel/guzzlestreams/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: PHP test + +on: [push, pull_request] + +jobs: + test: + name: Test + runs-on: ${{ matrix.os }} + + strategy: + matrix: + php-version: [7.4, 8.0, 8.1] + os: [ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: zip, curl + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get composer cache directory + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}- + + - name: Install dependencies + run: | + composer install --prefer-dist + + - name: Unit tests + run: | + composer run-script test \ No newline at end of file diff --git a/openml_OS/vendor/guzzlehttp/streams/.gitignore b/openml_OS/vendor/ezimuel/guzzlestreams/.gitignore similarity index 66% rename from openml_OS/vendor/guzzlehttp/streams/.gitignore rename to openml_OS/vendor/ezimuel/guzzlestreams/.gitignore index c33d3965f..f8c3f6e5c 100644 --- a/openml_OS/vendor/guzzlehttp/streams/.gitignore +++ b/openml_OS/vendor/ezimuel/guzzlestreams/.gitignore @@ -4,3 +4,5 @@ coverage phpunit.xml composer.lock vendor/ +.vscode/ +.phpunit.result.cache \ No newline at end of file diff --git a/openml_OS/vendor/guzzlehttp/streams/CHANGELOG.rst b/openml_OS/vendor/ezimuel/guzzlestreams/CHANGELOG.rst similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/CHANGELOG.rst rename to openml_OS/vendor/ezimuel/guzzlestreams/CHANGELOG.rst diff --git a/openml_OS/vendor/guzzlehttp/ringphp/LICENSE b/openml_OS/vendor/ezimuel/guzzlestreams/LICENSE similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/LICENSE rename to openml_OS/vendor/ezimuel/guzzlestreams/LICENSE diff --git a/openml_OS/vendor/guzzlehttp/streams/Makefile b/openml_OS/vendor/ezimuel/guzzlestreams/Makefile similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/Makefile rename to openml_OS/vendor/ezimuel/guzzlestreams/Makefile diff --git a/openml_OS/vendor/guzzlehttp/streams/README.rst b/openml_OS/vendor/ezimuel/guzzlestreams/README.rst similarity index 92% rename from openml_OS/vendor/guzzlehttp/streams/README.rst rename to openml_OS/vendor/ezimuel/guzzlestreams/README.rst index baff63b37..cad8c51db 100644 --- a/openml_OS/vendor/guzzlehttp/streams/README.rst +++ b/openml_OS/vendor/ezimuel/guzzlestreams/README.rst @@ -2,6 +2,8 @@ Guzzle Streams ============== +**Note:** this is a fork of the original project since it was abandoned. + Provides a simple abstraction over streams of data. This library is used in `Guzzle 5 `_, and is diff --git a/openml_OS/vendor/guzzlehttp/streams/composer.json b/openml_OS/vendor/ezimuel/guzzlestreams/composer.json similarity index 71% rename from openml_OS/vendor/guzzlehttp/streams/composer.json rename to openml_OS/vendor/ezimuel/guzzlestreams/composer.json index 6d7034370..6bbc35ae4 100644 --- a/openml_OS/vendor/guzzlehttp/streams/composer.json +++ b/openml_OS/vendor/ezimuel/guzzlestreams/composer.json @@ -1,6 +1,6 @@ { - "name": "guzzlehttp/streams", - "description": "Provides a simple abstraction over streams of data", + "name": "ezimuel/guzzlestreams", + "description": "Fork of guzzle/streams (abandoned) to be used with elasticsearch-php", "homepage": "http://guzzlephp.org/", "keywords": ["stream", "guzzle"], "license": "MIT", @@ -15,11 +15,14 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~9.0" }, "autoload": { "psr-4": { "GuzzleHttp\\Stream\\": "src/" } }, + "scripts": { + "test": "make test" + }, "extra": { "branch-alias": { "dev-master": "3.0-dev" diff --git a/openml_OS/vendor/ezimuel/guzzlestreams/phpunit.xml.dist b/openml_OS/vendor/ezimuel/guzzlestreams/phpunit.xml.dist new file mode 100644 index 000000000..78cab9eb6 --- /dev/null +++ b/openml_OS/vendor/ezimuel/guzzlestreams/phpunit.xml.dist @@ -0,0 +1,9 @@ + + + + + tests + + + diff --git a/openml_OS/vendor/guzzlehttp/streams/src/AppendStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/AppendStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/AppendStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/AppendStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/AsyncReadStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/AsyncReadStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/AsyncReadStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/AsyncReadStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/BufferStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/BufferStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/BufferStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/BufferStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/CachingStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/CachingStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/CachingStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/CachingStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/DroppingStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/DroppingStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/DroppingStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/DroppingStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/Exception/CannotAttachException.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/Exception/CannotAttachException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/Exception/CannotAttachException.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/Exception/CannotAttachException.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/Exception/SeekException.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/Exception/SeekException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/Exception/SeekException.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/Exception/SeekException.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/FnStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/FnStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/FnStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/FnStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/GuzzleStreamWrapper.php similarity index 94% rename from openml_OS/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/GuzzleStreamWrapper.php index 4d049a693..fc215d284 100644 --- a/openml_OS/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/src/GuzzleStreamWrapper.php @@ -36,8 +36,8 @@ public static function getResource(StreamInterface $stream) . 'writable, or both.'); } - return fopen('guzzle://stream', $mode, null, stream_context_create([ - 'guzzle' => ['stream' => $stream] + return fopen('guzzle://stream', $mode, false, stream_context_create([ + 'guzzle' => ['stream' => $stream], ])); } @@ -95,7 +95,7 @@ public function stream_stat() static $modeMap = [ 'r' => 33060, 'r+' => 33206, - 'w' => 33188 + 'w' => 33188, ]; return [ diff --git a/openml_OS/vendor/guzzlehttp/streams/src/InflateStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/InflateStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/InflateStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/InflateStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/LazyOpenStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/LazyOpenStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/LazyOpenStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/LazyOpenStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/LimitStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/LimitStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/LimitStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/LimitStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/MetadataStreamInterface.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/MetadataStreamInterface.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/MetadataStreamInterface.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/NoSeekStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/NoSeekStream.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/src/NoSeekStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/NoSeekStream.php diff --git a/openml_OS/vendor/guzzlehttp/streams/src/NullStream.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/NullStream.php similarity index 99% rename from openml_OS/vendor/guzzlehttp/streams/src/NullStream.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/NullStream.php index 41ee77668..aeda6bec5 100644 --- a/openml_OS/vendor/guzzlehttp/streams/src/NullStream.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/src/NullStream.php @@ -1,5 +1,6 @@ true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a+' => true + 'x+t' => true, 'c+t' => true, 'a+' => true, ], 'write' => [ 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true - ] + 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true, + ], ]; /** diff --git a/openml_OS/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php b/openml_OS/vendor/ezimuel/guzzlestreams/src/StreamDecoratorTrait.php similarity index 99% rename from openml_OS/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php rename to openml_OS/vendor/ezimuel/guzzlestreams/src/StreamDecoratorTrait.php index 39c19c58c..0f551d364 100644 --- a/openml_OS/vendor/guzzlehttp/streams/src/StreamDecoratorTrait.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/src/StreamDecoratorTrait.php @@ -1,5 +1,6 @@ eof()) { if (false === ($byte = $stream->read(1))) { @@ -169,7 +171,7 @@ public static function readline(StreamInterface $stream, $maxLength = null) } $buffer .= $byte; // Break when a new line is found or the max length - 1 is reached - if ($byte == PHP_EOL || ++$size == $maxLength - 1) { + if (++$size == $maxLength || substr($buffer, $negEolLen) === $eol) { break; } } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/AppendStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/AppendStreamTest.php similarity index 92% rename from openml_OS/vendor/guzzlehttp/streams/tests/AppendStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/AppendStreamTest.php index 78798d9f7..aa049c677 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/AppendStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/AppendStreamTest.php @@ -2,9 +2,11 @@ namespace GuzzleHttp\Tests\Stream; use GuzzleHttp\Stream\AppendStream; +use GuzzleHttp\Stream\Exception\CannotAttachException; use GuzzleHttp\Stream\Stream; +use PHPUnit\Framework\TestCase; -class AppendStreamTest extends \PHPUnit_Framework_TestCase +class AppendStreamTest extends TestCase { /** * @expectedException \InvalidArgumentException @@ -14,11 +16,10 @@ public function testValidatesStreamsAreReadable() { $a = new AppendStream(); $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable']) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('isReadable') - ->will($this->returnValue(false)); + ->will($this->returnValue(true)); $a->addStream($s); } @@ -32,7 +33,6 @@ public function testTriesToRewindOnSeek() { $a = new AppendStream(); $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'seek', 'isSeekable']) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('isReadable') @@ -109,6 +109,7 @@ public function testCanReadFromMultipleStreams() $this->assertEquals('foo', $a->read(3)); $this->assertEquals('bar', $a->read(3)); $this->assertEquals('baz', $a->read(3)); + $this->assertEmpty($a->read(1)); $this->assertTrue($a->eof()); $this->assertSame(9, $a->tell()); $this->assertEquals('foobarbaz', (string) $a); @@ -118,12 +119,11 @@ public function testCanDetermineSizeFromMultipleStreams() { $a = new AppendStream([ Stream::factory('foo'), - Stream::factory('bar') + Stream::factory('bar'), ]); $this->assertEquals(6, $a->getSize()); $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isSeekable', 'isReadable']) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('isSeekable') @@ -138,7 +138,6 @@ public function testCanDetermineSizeFromMultipleStreams() public function testCatchesExceptionsWhenCastingToString() { $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['read', 'isReadable', 'eof']) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('read') @@ -154,6 +153,9 @@ public function testCatchesExceptionsWhenCastingToString() $this->assertSame('', (string) $a); } + /** + * @doesNotPerformAssertions + */ public function testCanDetach() { $s = new AppendStream(); @@ -167,12 +169,10 @@ public function testReturnsEmptyMetadata() $this->assertNull($s->getMetadata('foo')); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ public function testCannotAttach() { $p = new AppendStream(); + $this->expectException(CannotAttachException::class); $p->attach('a'); } } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/AsyncReadStreamTest.php similarity index 76% rename from openml_OS/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/AsyncReadStreamTest.php index 8c7899596..0a07f80a8 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/AsyncReadStreamTest.php @@ -5,27 +5,26 @@ use GuzzleHttp\Stream\BufferStream; use GuzzleHttp\Stream\FnStream; use GuzzleHttp\Stream\Stream; +use InvalidArgumentException; +use PHPUnit\Framework\TestCase; +use ReflectionProperty; -class AsyncReadStreamTest extends \PHPUnit_Framework_TestCase +class AsyncReadStreamTest extends TestCase { - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Buffer must be readable and writable - */ public function testValidatesReadableBuffer() { + $this->expectException(InvalidArgumentException::class); + $this->expectErrorMessage('Buffer must be readable and writable'); new AsyncReadStream(FnStream::decorate( Stream::factory(), ['isReadable' => function () { return false; }] )); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Buffer must be readable and writable - */ public function testValidatesWritableBuffer() { + $this->expectException(InvalidArgumentException::class); + $this->expectErrorMessage('Buffer must be readable and writable'); new AsyncReadStream(FnStream::decorate( Stream::factory(), ['isWritable' => function () { return false; }] @@ -37,24 +36,22 @@ public function testValidatesHwmMetadata() $a = new AsyncReadStream(Stream::factory(), [ 'drain' => function() {} ]); - $this->assertNull($this->readAttribute($a, 'drain')); + $drain = new ReflectionProperty(AsyncReadStream::class, 'drain'); + $drain->setAccessible(true); + $this->assertNull($drain->getValue($a)); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage pump must be callable - */ public function testValidatesPumpIsCallable() { + $this->expectException(InvalidArgumentException::class); + $this->expectErrorMessage('pump must be callable'); new AsyncReadStream(new BufferStream(), ['pump' => true]); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage drain must be callable - */ public function testValidatesDrainIsCallable() { + $this->expectException(InvalidArgumentException::class); + $this->expectErrorMessage('drain must be callable'); new AsyncReadStream(new BufferStream(), ['drain' => true]); } @@ -66,9 +63,16 @@ public function testCanInitialize() 'drain' => function () {}, 'pump' => function () {}, ]); - $this->assertSame($buffer, $this->readAttribute($a, 'stream')); - $this->assertTrue(is_callable($this->readAttribute($a, 'drain'))); - $this->assertTrue(is_callable($this->readAttribute($a, 'pump'))); + $size = new ReflectionProperty(AsyncReadStream::class, 'size'); + $size->setAccessible(true); + $drain = new ReflectionProperty(AsyncReadStream::class, 'drain'); + $drain->setAccessible(true); + $pump = new ReflectionProperty(AsyncReadStream::class, 'pump'); + $pump->setAccessible(true); + + $this->assertSame($buffer, $a->stream); + $this->assertTrue(is_callable($drain->getValue($a))); + $this->assertTrue(is_callable($pump->getValue($a))); $this->assertTrue($a->isReadable()); $this->assertFalse($a->isSeekable()); $this->assertFalse($a->isWritable()); @@ -120,14 +124,17 @@ public function testCallsDrainWhenNeeded() $this->assertEquals(6, $buffer->getSize()); $this->assertEquals(0, $called); + $needsDrain = new ReflectionProperty(AsyncReadStream::class, 'needsDrain'); + $needsDrain->setAccessible(true); + $a->read(3); - $this->assertTrue($this->readAttribute($a, 'needsDrain')); + $this->assertTrue($needsDrain->getValue($a)); $this->assertEquals(3, $buffer->getSize()); $this->assertEquals(0, $called); $a->read(3); $this->assertEquals(0, $buffer->getSize()); - $this->assertFalse($this->readAttribute($a, 'needsDrain')); + $this->assertFalse($needsDrain->getValue($a)); $this->assertEquals(1, $called); } @@ -172,7 +179,7 @@ public function testCreatesOnWriteStream() $this->assertSame($buf, $b); $this->assertEquals('foo', $data); $c++; - } + }, ]); $this->assertInstanceOf('GuzzleHttp\Stream\FnStream', $buffer); $this->assertInstanceOf('GuzzleHttp\Stream\AsyncReadStream', $async); diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/BufferStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/BufferStreamTest.php similarity index 91% rename from openml_OS/vendor/guzzlehttp/streams/tests/BufferStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/BufferStreamTest.php index f9bfea21d..070347633 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/BufferStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/BufferStreamTest.php @@ -2,8 +2,10 @@ namespace GuzzleHttp\Tests\Stream; use GuzzleHttp\Stream\BufferStream; +use GuzzleHttp\Stream\Exception\CannotAttachException; +use PHPUnit\Framework\TestCase; -class BufferStreamTest extends \PHPUnit_Framework_TestCase +class BufferStreamTest extends TestCase { public function testHasMetadata() { @@ -58,11 +60,9 @@ public function testExceedingHighwaterMarkReturnsFalseButStillBuffers() $this->assertEquals(4, $b->write('test')); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ public function testCannotAttach() { + $this->expectException(CannotAttachException::class); $p = new BufferStream(); $p->attach('a'); } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/CachingStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/CachingStreamTest.php similarity index 82% rename from openml_OS/vendor/guzzlehttp/streams/tests/CachingStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/CachingStreamTest.php index ea969b3ad..67f7153ca 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/CachingStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/CachingStreamTest.php @@ -4,11 +4,14 @@ use GuzzleHttp\Stream\Stream; use GuzzleHttp\Stream\CachingStream; use GuzzleHttp\Stream\Utils; +use PHPUnit\Framework\TestCase; +use ReflectionProperty; +use RuntimeException; /** * @covers GuzzleHttp\Stream\CachingStream */ -class CachingStreamTest extends \PHPUnit_Framework_TestCase +class CachingStreamTest extends TestCase { /** @var CachingStream */ protected $body; @@ -16,13 +19,13 @@ class CachingStreamTest extends \PHPUnit_Framework_TestCase /** @var Stream */ protected $decorated; - public function setUp() + public function setUp(): void { $this->decorated = Stream::factory('testing'); $this->body = new CachingStream($this->decorated); } - public function tearDown() + public function tearDown(): void { $this->decorated->close(); $this->body->close(); @@ -35,12 +38,10 @@ public function testUsesRemoteSizeIfPossible() $this->assertEquals(4, $caching->getSize()); } - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Cannot seek to byte 10 - */ public function testCannotSeekPastWhatHasBeenRead() { + $this->expectException(RuntimeException::class); + $this->expectErrorMessage('Cannot seek to byte 10'); $this->body->seek(10); } @@ -53,7 +54,6 @@ public function testRewindUsesSeek() { $a = Stream::factory('foo'); $d = $this->getMockBuilder('GuzzleHttp\Stream\CachingStream') - ->setMethods(array('seek')) ->setConstructorArgs(array($a)) ->getMock(); $d->expects($this->once()) @@ -94,35 +94,38 @@ public function testSkipsOverwrittenBytes() $body = new CachingStream($decorated); + $skipReadBytes = new ReflectionProperty(CachingStream::class, 'skipReadBytes'); + $skipReadBytes->setAccessible(true); + $this->assertEquals("0000\n", Utils::readline($body)); $this->assertEquals("0001\n", Utils::readline($body)); // Write over part of the body yet to be read, so skip some bytes $this->assertEquals(5, $body->write("TEST\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); + $this->assertEquals(5, $skipReadBytes->getValue($body)); // Read, which skips bytes, then reads $this->assertEquals("0003\n", Utils::readline($body)); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); + $this->assertEquals(0, $skipReadBytes->getValue($body)); $this->assertEquals("0004\n", Utils::readline($body)); $this->assertEquals("0005\n", Utils::readline($body)); // Overwrite part of the cached body (so don't skip any bytes) $body->seek(5); $this->assertEquals(5, $body->write("ABCD\n")); - $this->assertEquals(0, $this->readAttribute($body, 'skipReadBytes')); + $this->assertEquals(0, $skipReadBytes->getValue($body)); $this->assertEquals("TEST\n", Utils::readline($body)); $this->assertEquals("0003\n", Utils::readline($body)); $this->assertEquals("0004\n", Utils::readline($body)); $this->assertEquals("0005\n", Utils::readline($body)); $this->assertEquals("0006\n", Utils::readline($body)); $this->assertEquals(5, $body->write("1234\n")); - $this->assertEquals(5, $this->readAttribute($body, 'skipReadBytes')); + $this->assertEquals(5, $skipReadBytes->getValue($body)); // Seek to 0 and ensure the overwritten bit is replaced $body->seek(0); $this->assertEquals("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", $body->read(50)); // Ensure that casting it to a string does not include the bit that was overwritten - $this->assertContains("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", (string) $body); + $this->assertStringContainsString("0000\nABCD\nTEST\n0003\n0004\n0005\n0006\n1234\n0008\n0009\n", (string) $body); } public function testClosesBothStreams() diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/DroppingStreamTest.php similarity index 92% rename from openml_OS/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/DroppingStreamTest.php index bb2cb2204..dba6c7abe 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/DroppingStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/DroppingStreamTest.php @@ -3,8 +3,9 @@ use GuzzleHttp\Stream\BufferStream; use GuzzleHttp\Stream\DroppingStream; +use PHPUnit\Framework\TestCase; -class DroppingStreamTest extends \PHPUnit_Framework_TestCase +class DroppingStreamTest extends TestCase { public function testBeginsDroppingWhenSizeExceeded() { diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/Exception/SeekExceptionTest.php similarity index 68% rename from openml_OS/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/Exception/SeekExceptionTest.php index fd8cd1ad2..8c12e21b4 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/Exception/SeekExceptionTest.php @@ -3,14 +3,15 @@ use GuzzleHttp\Stream\Exception\SeekException; use GuzzleHttp\Stream\Stream; +use PHPUnit\Framework\TestCase; -class SeekExceptionTest extends \PHPUnit_Framework_TestCase +class SeekExceptionTest extends TestCase { public function testHasStream() { $s = Stream::factory('foo'); $e = new SeekException($s, 10); $this->assertSame($s, $e->getStream()); - $this->assertContains('10', $e->getMessage()); + $this->assertStringContainsString('10', $e->getMessage()); } } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/FnStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/FnStreamTest.php similarity index 84% rename from openml_OS/vendor/guzzlehttp/streams/tests/FnStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/FnStreamTest.php index 6cc336b91..0dfbe0265 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/FnStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/FnStreamTest.php @@ -1,20 +1,20 @@ expectException(BadMethodCallException::class); + $this->expectExceptionMessage('seek() is not implemented in the FnStream'); (new FnStream([]))->seek(1); } @@ -24,7 +24,7 @@ public function testProxiesToFunction() 'read' => function ($len) { $this->assertEquals(3, $len); return 'foo'; - } + }, ]); $this->assertEquals('foo', $s->read(3)); @@ -36,12 +36,15 @@ public function testCanCloseOnDestruct() $s = new FnStream([ 'close' => function () use (&$called) { $called = true; - } + }, ]); unset($s); $this->assertTrue($called); } + /** + * @doesNotPerformAssertions + */ public function testDoesNotRequireClose() { $s = new FnStream([]); @@ -59,6 +62,7 @@ public function testDecoratesStream() $this->assertEquals($b->read(3), 'foo'); $this->assertEquals($b->tell(), 3); $this->assertEquals($a->tell(), 3); + $this->assertEmpty($b->read(1)); $this->assertEquals($b->eof(), true); $this->assertEquals($a->eof(), true); $b->seek(0); @@ -69,7 +73,7 @@ public function testDecoratesStream() $b->seek(0, SEEK_END); $b->write('bar'); $this->assertEquals('foobar', (string) $b); - $this->assertInternalType('resource', $b->detach()); + $this->assertIsResource($b->detach()); $b->close(); } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/GuzzleStreamWrapperTest.php similarity index 88% rename from openml_OS/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/GuzzleStreamWrapperTest.php index 33c3eccb4..60ae00b8c 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/GuzzleStreamWrapperTest.php @@ -3,11 +3,13 @@ use GuzzleHttp\Stream\GuzzleStreamWrapper; use GuzzleHttp\Stream\Stream; +use InvalidArgumentException; +use PHPUnit\Framework\TestCase; /** * @covers GuzzleHttp\Stream\GuzzleStreamWrapper */ -class GuzzleStreamWrapperTest extends \PHPUnit_Framework_TestCase +class GuzzleStreamWrapperTest extends TestCase { public function testResource() { @@ -18,6 +20,7 @@ public function testResource() $this->assertSame(3, fwrite($handle, 'bar')); $this->assertSame(0, fseek($handle, 0)); $this->assertSame('foobar', fread($handle, 6)); + $this->assertEmpty(fread($handle, 1)); $this->assertTrue(feof($handle)); // This fails on HHVM for some reason @@ -56,13 +59,10 @@ public function testResource() $this->assertSame('foobar', (string) $stream); } - /** - * @expectedException \InvalidArgumentException - */ public function testValidatesStream() { + $this->expectException(InvalidArgumentException::class); $stream = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'isWritable']) ->getMockForAbstractClass(); $stream->expects($this->once()) ->method('isReadable') @@ -73,18 +73,16 @@ public function testValidatesStream() GuzzleStreamWrapper::getResource($stream); } - /** - * @expectedException \PHPUnit_Framework_Error_Warning - */ public function testReturnsFalseWhenStreamDoesNotExist() { + + $this->expectWarning(); fopen('guzzle://foo', 'r'); } public function testCanOpenReadonlyStream() { $stream = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['isReadable', 'isWritable']) ->getMockForAbstractClass(); $stream->expects($this->once()) ->method('isReadable') @@ -93,7 +91,7 @@ public function testCanOpenReadonlyStream() ->method('isWritable') ->will($this->returnValue(true)); $r = GuzzleStreamWrapper::getResource($stream); - $this->assertInternalType('resource', $r); + $this->assertIsResource($r); fclose($r); } } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/InflateStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/InflateStreamTest.php similarity index 81% rename from openml_OS/vendor/guzzlehttp/streams/tests/InflateStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/InflateStreamTest.php index ead9356a5..076d9affd 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/InflateStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/InflateStreamTest.php @@ -3,8 +3,9 @@ use GuzzleHttp\Stream\InflateStream; use GuzzleHttp\Stream\Stream; +use PHPUnit\Framework\TestCase; -class InflateStreamtest extends \PHPUnit_Framework_TestCase +class InflateStreamtest extends TestCase { public function testInflatesStreams() { diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/LazyOpenStreamTest.php similarity index 83% rename from openml_OS/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/LazyOpenStreamTest.php index 79e0078e8..290c52ab3 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/LazyOpenStreamTest.php @@ -2,12 +2,13 @@ namespace GuzzleHttp\Tests\Stream; use GuzzleHttp\Stream\LazyOpenStream; +use PHPUnit\Framework\TestCase; -class LazyOpenStreamTest extends \PHPUnit_Framework_TestCase +class LazyOpenStreamTest extends TestCase { private $fname; - public function setup() + public function setup(): void { $this->fname = tempnam('/tmp', 'tfile'); @@ -16,7 +17,7 @@ public function setup() } } - public function tearDown() + public function tearDown(): void { if (file_exists($this->fname)) { unlink($this->fname); @@ -27,7 +28,7 @@ public function testOpensLazily() { $l = new LazyOpenStream($this->fname, 'w+'); $l->write('foo'); - $this->assertInternalType('array', $l->getMetadata()); + $this->assertIsArray($l->getMetadata()); $this->assertFileExists($this->fname); $this->assertEquals('foo', file_get_contents($this->fname)); $this->assertEquals('foo', (string) $l); @@ -47,7 +48,7 @@ public function testProxiesToFile() $this->assertEquals('oo', $l->getContents()); $this->assertEquals('foo', (string) $l); $this->assertEquals(3, $l->getSize()); - $this->assertInternalType('array', $l->getMetadata()); + $this->assertIsArray($l->getMetadata()); $l->close(); } @@ -56,7 +57,7 @@ public function testDetachesUnderlyingStream() file_put_contents($this->fname, 'foo'); $l = new LazyOpenStream($this->fname, 'r'); $r = $l->detach(); - $this->assertInternalType('resource', $r); + $this->assertIsResource($r); fseek($r, 0); $this->assertEquals('foo', stream_get_contents($r)); fclose($r); diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/LimitStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/LimitStreamTest.php similarity index 92% rename from openml_OS/vendor/guzzlehttp/streams/tests/LimitStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/LimitStreamTest.php index efb1dc58f..ae454909f 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/LimitStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/LimitStreamTest.php @@ -1,15 +1,17 @@ decorated = Stream::factory(fopen(__FILE__, 'r')); $this->body = new LimitStream($this->decorated, 10, 3); @@ -31,6 +33,7 @@ public function testReturnsSubset() $body->seek(0); $this->assertFalse($body->eof()); $this->assertEquals('oo', $body->read(100)); + $this->assertEmpty($body->read(1)); $this->assertTrue($body->eof()); } @@ -83,12 +86,10 @@ public function testReadsOnlySubsetOfData() $this->assertNotSame($data, $newData); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\SeekException - * @expectedExceptionMessage Could not seek the stream to position 2 - */ public function testThrowsWhenCurrentGreaterThanOffsetSeek() { + $this->expectException(SeekException::class); + $this->expectExceptionMessage('Could not seek the stream to position 2'); $a = Stream::factory('foo_bar'); $b = new NoSeekStream($a); $c = new LimitStream($b); diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/NoSeekStreamTest.php similarity index 94% rename from openml_OS/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/NoSeekStreamTest.php index 21b7c6d22..fe3553965 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/NoSeekStreamTest.php @@ -3,12 +3,13 @@ use GuzzleHttp\Stream\Stream; use GuzzleHttp\Stream\NoSeekStream; +use PHPUnit\Framework\TestCase; /** * @covers GuzzleHttp\Stream\NoSeekStream * @covers GuzzleHttp\Stream\StreamDecoratorTrait */ -class NoSeekStreamTest extends \PHPUnit_Framework_TestCase +class NoSeekStreamTest extends TestCase { public function testCannotSeek() { diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/NullStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/NullStreamTest.php similarity index 83% rename from openml_OS/vendor/guzzlehttp/streams/tests/NullStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/NullStreamTest.php index 8e4143159..4d7768f5d 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/NullStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/NullStreamTest.php @@ -1,9 +1,11 @@ close(); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ public function testCannotAttach() { + $this->expectException(CannotAttachException::class); $p = new NullStream(); $p->attach('a'); } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/PumpStreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/PumpStreamTest.php similarity index 92% rename from openml_OS/vendor/guzzlehttp/streams/tests/PumpStreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/PumpStreamTest.php index 2d20ce90c..311de1915 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/PumpStreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/PumpStreamTest.php @@ -1,11 +1,13 @@ assertTrue($p->eof()); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ public function testCannotAttach() { + $this->expectException(CannotAttachException::class); $p = Stream::factory(function () {}); $p->attach('a'); } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamDecoratorTraitTest.php similarity index 88% rename from openml_OS/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamDecoratorTraitTest.php index 2ba79addf..6664b0989 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamDecoratorTraitTest.php @@ -1,9 +1,13 @@ c = fopen('php://temp', 'r+'); fwrite($this->c, 'foo'); @@ -31,7 +35,6 @@ public function setUp() public function testCatchesExceptionsWhenCastingToString() { $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface') - ->setMethods(['read']) ->getMockForAbstractClass(); $s->expects($this->once()) ->method('read') @@ -40,7 +43,7 @@ public function testCatchesExceptionsWhenCastingToString() set_error_handler(function ($errNo, $str) use (&$msg) { $msg = $str; }); echo new Str($s); restore_error_handler(); - $this->assertContains('foo', $msg); + $this->assertStringContainsString('foo', $msg); } public function testToString() @@ -100,11 +103,9 @@ public function testDetaches() $this->assertFalse($this->b->isReadable()); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\CannotAttachException - */ public function testCannotAttachByDefault() { + $this->expectException(CannotAttachException::class); $this->b->attach('a'); } @@ -121,19 +122,15 @@ public function testWrapsWrites() $this->assertEquals('foofoo', (string) $this->a); } - /** - * @expectedException \UnexpectedValueException - */ public function testThrowsWithInvalidGetter() { + $this->expectException(UnexpectedValueException::class); $this->b->foo; } - /** - * @expectedException \BadMethodCallException - */ public function testThrowsWhenGetterNotImplemented() { + $this->expectException(BadMethodCallException::class); $s = new BadStream(); $s->stream; } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/StreamTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamTest.php similarity index 96% rename from openml_OS/vendor/guzzlehttp/streams/tests/StreamTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamTest.php index 2985bfbb1..bf75b299b 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/StreamTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/StreamTest.php @@ -2,17 +2,17 @@ namespace GuzzleHttp\Tests\Stream; use GuzzleHttp\Stream\Stream; +use InvalidArgumentException; +use PHPUnit\Framework\TestCase; /** * @covers GuzzleHttp\Stream\Stream */ -class StreamTest extends \PHPUnit_Framework_TestCase +class StreamTest extends TestCase { - /** - * @expectedException \InvalidArgumentException - */ public function testConstructorThrowsExceptionOnInvalidArgument() { + $this->expectException(InvalidArgumentException::class); new Stream(true); } @@ -25,7 +25,7 @@ public function testConstructorInitializesProperties() $this->assertTrue($stream->isWritable()); $this->assertTrue($stream->isSeekable()); $this->assertEquals('php://temp', $stream->getMetadata('uri')); - $this->assertInternalType('array', $stream->getMetadata()); + $this->assertIsArray($stream->getMetadata()); $this->assertEquals(4, $stream->getSize()); $this->assertFalse($stream->eof()); $stream->close(); @@ -206,11 +206,9 @@ public function testCreatePassesThrough() $this->assertSame($s, Stream::factory($s)); } - /** - * @expectedException \InvalidArgumentException - */ public function testThrowsExceptionForUnknown() { + $this->expectException(InvalidArgumentException::class); Stream::factory(new \stdClass()); } diff --git a/openml_OS/vendor/guzzlehttp/streams/tests/UtilsTest.php b/openml_OS/vendor/ezimuel/guzzlestreams/tests/UtilsTest.php similarity index 80% rename from openml_OS/vendor/guzzlehttp/streams/tests/UtilsTest.php rename to openml_OS/vendor/ezimuel/guzzlestreams/tests/UtilsTest.php index 6e3e3b216..a16645e7b 100644 --- a/openml_OS/vendor/guzzlehttp/streams/tests/UtilsTest.php +++ b/openml_OS/vendor/ezimuel/guzzlestreams/tests/UtilsTest.php @@ -1,12 +1,15 @@ assertEquals("foo\n", Utils::readline($s)); - $this->assertEquals("baz\n", Utils::readline($s)); + $s = Stream::factory("foo" . PHP_EOL . "baz" . PHP_EOL . "bar"); + $this->assertEquals("foo" . PHP_EOL, Utils::readline($s)); + $this->assertEquals("baz" . PHP_EOL, Utils::readline($s)); $this->assertEquals("bar", Utils::readline($s)); } public function testReadsLinesUpToMaxLength() { - $s = Stream::factory("12345\n"); - $this->assertEquals("123", Utils::readline($s, 4)); - $this->assertEquals("45\n", Utils::readline($s)); + $s = Stream::factory("12345" . PHP_EOL); + $this->assertEquals("123", Utils::readline($s, 3)); + $this->assertEquals("45" . PHP_EOL, Utils::readline($s)); + } + + public function testReadsLinesWithCustomEol() + { + $s = Stream::factory("foo\tbaz\t\tbar"); + $this->assertEquals("foo\tbaz\t\t", Utils::readline($s, null, "\t\t")); + $this->assertEquals("bar", Utils::readline($s)); } public function testReadsLineUntilFalseReturnedFromRead() @@ -114,11 +124,9 @@ public function testCalculatesHash() $this->assertEquals(md5('foobazbar'), Utils::hash($s, 'md5')); } - /** - * @expectedException \GuzzleHttp\Stream\Exception\SeekException - */ public function testCalculatesHashThrowsWhenSeekFails() { + $this->expectException(SeekException::class); $s = new NoSeekStream(Stream::factory('foobazbar')); $s->read(2); Utils::hash($s, 'md5'); @@ -135,16 +143,14 @@ public function testCalculatesHashSeeksToOriginalPosition() public function testOpensFilesSuccessfully() { $r = Utils::open(__FILE__, 'r'); - $this->assertInternalType('resource', $r); + $this->assertIsResource($r); fclose($r); } - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Unable to open /path/to/does/not/exist using mode r - */ public function testThrowsExceptionNotWarning() { + $this->expectException(RuntimeException::class); + $this->expectErrorMessage('Unable to open /path/to/does/not/exist using mode r'); Utils::open('/path/to/does/not/exist', 'r'); } diff --git a/openml_OS/vendor/guzzlehttp/ringphp/.editorconfig b/openml_OS/vendor/ezimuel/ringphp/.editorconfig similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/.editorconfig rename to openml_OS/vendor/ezimuel/ringphp/.editorconfig diff --git a/openml_OS/vendor/ezimuel/ringphp/.github/workflows/test.yml b/openml_OS/vendor/ezimuel/ringphp/.github/workflows/test.yml new file mode 100644 index 000000000..b4b4e04b1 --- /dev/null +++ b/openml_OS/vendor/ezimuel/ringphp/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: PHP test + +on: [push, pull_request] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: [7.4, 8.0, 8.1] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: zip, curl + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get composer cache directory + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: | + composer install --prefer-dist + + - name: Unit tests + run: | + composer run-script test + \ No newline at end of file diff --git a/openml_OS/vendor/guzzlehttp/ringphp/CHANGELOG.md b/openml_OS/vendor/ezimuel/ringphp/CHANGELOG.md similarity index 74% rename from openml_OS/vendor/guzzlehttp/ringphp/CHANGELOG.md rename to openml_OS/vendor/ezimuel/ringphp/CHANGELOG.md index 8e12bf3cc..7808ea52d 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/CHANGELOG.md +++ b/openml_OS/vendor/ezimuel/ringphp/CHANGELOG.md @@ -6,8 +6,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.2.1] - 2022-10-25 -## [Unreleased] +- Fixed the support of PHP 8.1 with [#7](https://github.com/ezimuel/ringphp/pull/7) and [#8](https://github.com/ezimuel/ringphp/pull/8) +- Fixed the integration with Symfony, adding explicit @return annotations to suppress User Deprecated notices [#5](https://github.com/ezimuel/ringphp/pull/5) + +## [1.2.0] - 2021-11-16 + +### Added + +- Add attribute to avoid Deprecated notice for PHP 8.1 [#4](https://github.com/ezimuel/ringphp/pull/4) +- Add replace guzzlehttp/ringphp in composer [#3](https://github.com/ezimuel/ringphp/pull/3) +- Add .gitattributes file [#2](https://github.com/ezimuel/ringphp/pull/2) + +### Changed + +- Updated to PHPUnit 9 and fixed the unit tests for PHP 8 + [d386b25](https://github.com/ezimuel/ringphp/commit/d386b2597389dafe3b437ab90d115eb092fff109) + +## [1.1.2] - 2020-02-15 + +### Changed + +- Required guzzlestreams 3.0.1+ [0b78f89](https://github.com/ezimuel/ringphp/commit/0b78f89d8e0bb9e380046c31adfa40347e9f663b) ## [1.1.1] - 2018-07-31 diff --git a/openml_OS/vendor/guzzlehttp/streams/LICENSE b/openml_OS/vendor/ezimuel/ringphp/LICENSE similarity index 100% rename from openml_OS/vendor/guzzlehttp/streams/LICENSE rename to openml_OS/vendor/ezimuel/ringphp/LICENSE diff --git a/openml_OS/vendor/guzzlehttp/ringphp/Makefile b/openml_OS/vendor/ezimuel/ringphp/Makefile similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/Makefile rename to openml_OS/vendor/ezimuel/ringphp/Makefile diff --git a/openml_OS/vendor/ezimuel/ringphp/README.md b/openml_OS/vendor/ezimuel/ringphp/README.md new file mode 100644 index 000000000..2fd832413 --- /dev/null +++ b/openml_OS/vendor/ezimuel/ringphp/README.md @@ -0,0 +1,48 @@ +RingPHP +======= + +[![Build status](https://github.com/ezimuel/ringphp/workflows/PHP%20test/badge.svg)](https://github.com/ezimuel/ringphp/actions) [![Latest Stable Version](https://poser.pugx.org/ezimuel/ringphp/v/stable)](https://packagist.org/packages/ezimuel/ringphp) + +**Note:** this is a fork of the original project since it was abandoned. + +Provides a simple API and specification that abstracts away the details of HTTP +into a single PHP function. RingPHP be used to power HTTP clients and servers +through a PHP function that accepts a request hash and returns a response hash +that is fulfilled using a [promise](https://github.com/reactphp/promise), +allowing RingPHP to support both synchronous and asynchronous workflows. + +By abstracting the implementation details of different HTTP clients and +servers, RingPHP allows you to utilize pluggable HTTP clients and servers +without tying your application to a specific implementation. + +```php +require 'vendor/autoload.php'; + +use GuzzleHttp\Ring\Client\CurlHandler; + +$handler = new CurlHandler(); +$response = $handler([ + 'http_method' => 'GET', + 'uri' => '/', + 'headers' => [ + 'host' => ['www.google.com'], + 'x-foo' => ['baz'] + ] +]); + +$response->then(function (array $response) { + echo $response['status']; +}); + +$response->wait(); +``` + +RingPHP is inspired by Clojure's [Ring](https://github.com/ring-clojure/ring), +which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is +utilized as the handler layer in [Guzzle](https://guzzlephp.org) 5.0+ to send +HTTP requests. + +Documentation +------------- + +See https://ringphp.readthedocs.io/en/latest/ for the full online documentation. diff --git a/openml_OS/vendor/guzzlehttp/ringphp/composer.json b/openml_OS/vendor/ezimuel/ringphp/composer.json similarity index 75% rename from openml_OS/vendor/guzzlehttp/ringphp/composer.json rename to openml_OS/vendor/ezimuel/ringphp/composer.json index 8df60eccc..9f81b8429 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/composer.json +++ b/openml_OS/vendor/ezimuel/ringphp/composer.json @@ -1,6 +1,6 @@ { - "name": "guzzlehttp/ringphp", - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "name": "ezimuel/ringphp", + "description": "Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php", "license": "MIT", "authors": [ { @@ -11,12 +11,15 @@ ], "require": { "php": ">=5.4.0", - "guzzlehttp/streams": "~3.0", + "ezimuel/guzzlestreams": "^3.0.1", "react/promise": "~2.0" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~9.0" + }, + "replace": { + "guzzlehttp/ringphp": "self.version" }, "suggest": { "ext-curl": "Guzzle will use specific adapters if cURL is present" diff --git a/openml_OS/vendor/guzzlehttp/ringphp/phpunit.xml.dist b/openml_OS/vendor/ezimuel/ringphp/phpunit.xml.dist similarity index 60% rename from openml_OS/vendor/guzzlehttp/ringphp/phpunit.xml.dist rename to openml_OS/vendor/ezimuel/ringphp/phpunit.xml.dist index 1d1929025..5edbc93b4 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/phpunit.xml.dist +++ b/openml_OS/vendor/ezimuel/ringphp/phpunit.xml.dist @@ -2,13 +2,8 @@ - + tests - - - src - - diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/ClientUtils.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/ClientUtils.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/CurlFactory.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/CurlFactory.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/CurlHandler.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/CurlHandler.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/CurlMultiHandler.php similarity index 99% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/CurlMultiHandler.php index f84cf1993..5bb3962ec 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php +++ b/openml_OS/vendor/ezimuel/ringphp/src/Client/CurlMultiHandler.php @@ -16,12 +16,13 @@ * * @property resource $_mh Internal use only. Lazy loaded multi-handle. */ +#[\AllowDynamicProperties] class CurlMultiHandler { /** @var callable */ private $factory; private $selectTimeout; - private $active; + private $active = 0; private $handles = []; private $delays = []; private $maxHandles; diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/Middleware.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/Middleware.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/Middleware.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/Middleware.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/MockHandler.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/MockHandler.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/MockHandler.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/MockHandler.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php b/openml_OS/vendor/ezimuel/ringphp/src/Client/StreamHandler.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php rename to openml_OS/vendor/ezimuel/ringphp/src/Client/StreamHandler.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Core.php b/openml_OS/vendor/ezimuel/ringphp/src/Core.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Core.php rename to openml_OS/vendor/ezimuel/ringphp/src/Core.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Exception/CancelledException.php b/openml_OS/vendor/ezimuel/ringphp/src/Exception/CancelledException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Exception/CancelledException.php rename to openml_OS/vendor/ezimuel/ringphp/src/Exception/CancelledException.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Exception/CancelledFutureAccessException.php b/openml_OS/vendor/ezimuel/ringphp/src/Exception/CancelledFutureAccessException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Exception/CancelledFutureAccessException.php rename to openml_OS/vendor/ezimuel/ringphp/src/Exception/CancelledFutureAccessException.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Exception/ConnectException.php b/openml_OS/vendor/ezimuel/ringphp/src/Exception/ConnectException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Exception/ConnectException.php rename to openml_OS/vendor/ezimuel/ringphp/src/Exception/ConnectException.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Exception/RingException.php b/openml_OS/vendor/ezimuel/ringphp/src/Exception/RingException.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Exception/RingException.php rename to openml_OS/vendor/ezimuel/ringphp/src/Exception/RingException.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/BaseFutureTrait.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/BaseFutureTrait.php similarity index 96% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/BaseFutureTrait.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/BaseFutureTrait.php index e6a7ca77c..30465e77c 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/BaseFutureTrait.php +++ b/openml_OS/vendor/ezimuel/ringphp/src/Future/BaseFutureTrait.php @@ -47,6 +47,9 @@ public function __construct( $this->cancelfn = $cancel; } + /** + * @return mixed + */ public function wait() { if (!$this->isRealized) { @@ -66,11 +69,17 @@ public function wait() return $this->result; } + /** + * @return PromiseInterface + */ public function promise() { return $this->wrappedPromise; } + /** + * @return PromiseInterface + */ public function then( callable $onFulfilled = null, callable $onRejected = null, diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureArray.php similarity index 68% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureArray.php index 0a90c939f..52ba4a927 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php +++ b/openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureArray.php @@ -11,31 +11,55 @@ public function __construct(array $result) parent::__construct($result); } + #[\ReturnTypeWillChange] + /** + * @return bool + */ public function offsetExists($offset) { return isset($this->result[$offset]); } + #[\ReturnTypeWillChange] + /** + * @return mixed + */ public function offsetGet($offset) { return $this->result[$offset]; } + #[\ReturnTypeWillChange] + /** + * @return void + */ public function offsetSet($offset, $value) { $this->result[$offset] = $value; } + #[\ReturnTypeWillChange] + /** + * @return void + */ public function offsetUnset($offset) { unset($this->result[$offset]); } + #[\ReturnTypeWillChange] + /** + * @return int + */ public function count() { return count($this->result); } + #[\ReturnTypeWillChange] + /** + * @return \ArrayIterator + */ public function getIterator() { return new \ArrayIterator($this->result); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureValue.php similarity index 89% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureValue.php index 0d25af72d..7a4e226c9 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php +++ b/openml_OS/vendor/ezimuel/ringphp/src/Future/CompletedFutureValue.php @@ -3,6 +3,7 @@ use React\Promise\FulfilledPromise; use React\Promise\RejectedPromise; +use React\Promise\PromiseInterface; /** * Represents a future value that has been resolved or rejected. @@ -25,6 +26,9 @@ public function __construct($result, \Exception $e = null) $this->error = $e; } + /** + * @return mixed + */ public function wait() { if ($this->error) { @@ -36,6 +40,9 @@ public function wait() public function cancel() {} + /** + * @return PromiseInterface + */ public function promise() { if (!$this->cachedPromise) { @@ -47,6 +54,9 @@ public function promise() return $this->cachedPromise; } + /** + * @return PromiseInterface + */ public function then( callable $onFulfilled = null, callable $onRejected = null, diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/FutureArray.php similarity index 63% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/FutureArray.php index 3d64c9643..cb6af6902 100644 --- a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php +++ b/openml_OS/vendor/ezimuel/ringphp/src/Future/FutureArray.php @@ -4,35 +4,60 @@ /** * Represents a future array value that when dereferenced returns an array. */ +#[\AllowDynamicProperties] class FutureArray implements FutureArrayInterface { use MagicFutureTrait; + #[\ReturnTypeWillChange] + /** + * @return bool + */ public function offsetExists($offset) { return isset($this->_value[$offset]); } + #[\ReturnTypeWillChange] + /** + * @return mixed + */ public function offsetGet($offset) { return $this->_value[$offset]; } + #[\ReturnTypeWillChange] + /** + * @return void + */ public function offsetSet($offset, $value) { $this->_value[$offset] = $value; } + #[\ReturnTypeWillChange] + /** + * @return void + */ public function offsetUnset($offset) { unset($this->_value[$offset]); } + #[\ReturnTypeWillChange] + /** + * @return int + */ public function count() { return count($this->_value); } + #[\ReturnTypeWillChange] + /** + * @return \ArrayIterator + */ public function getIterator() { return new \ArrayIterator($this->_value); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/FutureArrayInterface.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/FutureArrayInterface.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/FutureInterface.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/FutureInterface.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureValue.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/FutureValue.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/FutureValue.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/FutureValue.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/src/Future/MagicFutureTrait.php b/openml_OS/vendor/ezimuel/ringphp/src/Future/MagicFutureTrait.php similarity index 100% rename from openml_OS/vendor/guzzlehttp/ringphp/src/Future/MagicFutureTrait.php rename to openml_OS/vendor/ezimuel/ringphp/src/Future/MagicFutureTrait.php diff --git a/openml_OS/vendor/guzzlehttp/ringphp/.gitignore b/openml_OS/vendor/guzzlehttp/ringphp/.gitignore deleted file mode 100644 index 290a94524..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -vendor -build/artifacts/ -composer.lock -docs/_build/ diff --git a/openml_OS/vendor/guzzlehttp/ringphp/.travis.yml b/openml_OS/vendor/guzzlehttp/ringphp/.travis.yml deleted file mode 100644 index 18562e427..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache/files - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - hhvm - - nightly - -env: - global: - - TEST_COMMAND="composer test" - -matrix: - allow_failures: - - php: hhvm - - php: nightly - fast_finish: true - include: - - php: 5.4 - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" - -before_install: - - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - -install: - # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction - -before_script: - - ~/.nvm/nvm.sh install v0.6.14 - - ~/.nvm/nvm.sh run v0.6.14 - -script: - - $TEST_COMMAND diff --git a/openml_OS/vendor/guzzlehttp/ringphp/README.rst b/openml_OS/vendor/guzzlehttp/ringphp/README.rst deleted file mode 100644 index 10374e813..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -======= -RingPHP -======= - -Provides a simple API and specification that abstracts away the details of HTTP -into a single PHP function. RingPHP be used to power HTTP clients and servers -through a PHP function that accepts a request hash and returns a response hash -that is fulfilled using a `promise `_, -allowing RingPHP to support both synchronous and asynchronous workflows. - -By abstracting the implementation details of different HTTP clients and -servers, RingPHP allows you to utilize pluggable HTTP clients and servers -without tying your application to a specific implementation. - -.. code-block:: php - - 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => ['www.google.com'], - 'x-foo' => ['baz'] - ] - ]); - - $response->then(function (array $response) { - echo $response['status']; - }); - - $response->wait(); - -RingPHP is inspired by Clojure's `Ring `_, -which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is -utilized as the handler layer in `Guzzle `_ 5.0+ to send -HTTP requests. - -Documentation -------------- - -See http://ringphp.readthedocs.org/ for the full online documentation. diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/Makefile b/openml_OS/vendor/guzzlehttp/ringphp/docs/Makefile deleted file mode 100644 index 51270aa5d..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GuzzleRing.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GuzzleRing.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/GuzzleRing" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GuzzleRing" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/client_handlers.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/client_handlers.rst deleted file mode 100644 index 3151f0021..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/client_handlers.rst +++ /dev/null @@ -1,173 +0,0 @@ -=============== -Client Handlers -=============== - -Client handlers accept a request array and return a future response array that -can be used synchronously as an array or asynchronously using a promise. - -Built-In Handlers ------------------ - -RingPHP comes with three built-in client handlers. - -Stream Handler -~~~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\StreamHandler`` uses PHP's -`http stream wrapper `_ to send -requests. - -.. note:: - - This handler cannot send requests concurrently. - -You can provide an associative array of custom stream context options to the -StreamHandler using the ``stream_context`` key of the ``client`` request -option. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\StreamHandler; - - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']], - 'client' => [ - 'stream_context' => [ - 'http' => [ - 'request_fulluri' => true, - 'method' => 'HEAD' - ], - 'socket' => [ - 'bindto' => '127.0.0.1:0' - ], - 'ssl' => [ - 'verify_peer' => false - ] - ] - ] - ]); - - // Even though it's already completed, you can still use a promise - $response->then(function ($response) { - echo $response['status']; // 200 - }); - - // Or access the response using the future interface - echo $response['status']; // 200 - -cURL Handler -~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\CurlHandler`` can be used with PHP 5.5+ to send -requests using cURL easy handles. This handler is great for sending requests -one at a time because the execute and select loop is implemented in C code -which executes faster and consumes less memory than using PHP's -``curl_multi_*`` interface. - -.. note:: - - This handler cannot send requests concurrently. - -When using the CurlHandler, custom curl options can be specified as an -associative array of `cURL option constants `_ -mapping to values in the ``client`` option of a requst using the **curl** key. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['curl' => [CURLOPT_LOW_SPEED_LIMIT => 10]] - ]; - - $response = $handler($request); - - // The response can be used directly as an array. - echo $response['status']; // 200 - - // Or, it can be used as a promise (that has already fulfilled). - $response->then(function ($response) { - echo $response['status']; // 200 - }); - -cURL Multi Handler -~~~~~~~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\CurlMultiHandler`` transfers requests using -cURL's `multi API `_. The -``CurlMultiHandler`` is great for sending requests concurrently. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $handler = new CurlMultiHandler(); - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]] - ]; - - // this call returns a future array immediately. - $response = $handler($request); - - // Ideally, you should use the promise API to not block. - $response - ->then(function ($response) { - // Got the response at some point in the future - echo $response['status']; // 200 - // Don't break the chain - return $response; - })->then(function ($response) { - // ... - }); - - // If you really need to block, then you can use the response as an - // associative array. This will block until it has completed. - echo $response['status']; // 200 - -Just like the ``CurlHandler``, the ``CurlMultiHandler`` accepts custom curl -option in the ``curl`` key of the ``client`` request option. - -Mock Handler -~~~~~~~~~~~~ - -The ``GuzzleHttp\Ring\Client\MockHandler`` is used to return mock responses. -When constructed, the handler can be configured to return the same response -array over and over, a future response, or a the evaluation of a callback -function. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\MockHandler; - - // Return a canned response. - $mock = new MockHandler(['status' => 200]); - $response = $mock([]); - assert(200 == $response['status']); - assert([] == $response['headers']); - -Implementing Handlers ---------------------- - -Client handlers are just PHP callables (functions or classes that have the -``__invoke`` magic method). The callable accepts a request array and MUST -return an instance of ``GuzzleHttp\Ring\Future\FutureArrayInterface`` so that -the response can be used by both blocking and non-blocking consumers. - -Handlers need to follow a few simple rules: - -1. Do not throw exceptions. If an error is encountered, return an array that - contains the ``error`` key that maps to an ``\Exception`` value. -2. If the request has a ``delay`` client option, then the handler should only - send the request after the specified delay time in seconds. Blocking - handlers may find it convenient to just let the - ``GuzzleHttp\Ring\Core::doSleep($request)`` function handle this for them. -3. Always return an instance of ``GuzzleHttp\Ring\Future\FutureArrayInterface``. -4. Complete any outstanding requests when the handler is destructed. diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/client_middleware.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/client_middleware.rst deleted file mode 100644 index 5a2c1a8ab..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/client_middleware.rst +++ /dev/null @@ -1,165 +0,0 @@ -================= -Client Middleware -================= - -Middleware intercepts requests before they are sent over the wire and can be -used to add functionality to handlers. - -Modifying Requests ------------------- - -Let's say you wanted to modify requests before they are sent over the wire -so that they always add specific headers. This can be accomplished by creating -a function that accepts a handler and returns a new function that adds the -composed behavior. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $addHeaderHandler = function (callable $handler, array $headers = []) { - return function (array $request) use ($handler, $headers) { - // Add our custom headers - foreach ($headers as $key => $value) { - $request['headers'][$key] = $value; - } - - // Send the request using the handler and return the response. - return $handler($request); - } - }; - - // Create a new handler that adds headers to each request. - $handler = $addHeaderHandler($handler, [ - 'X-AddMe' => 'hello', - 'Authorization' => 'Basic xyz' - ]); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['httpbin.org']] - ]); - -Modifying Responses -------------------- - -You can change a response as it's returned from a middleware. Remember that -responses returned from an handler (including middleware) must implement -``GuzzleHttp\Ring\Future\FutureArrayInterface``. In order to be a good citizen, -you should not expect that the responses returned through your middleware will -be completed synchronously. Instead, you should use the -``GuzzleHttp\Ring\Core::proxy()`` function to modify the response when the -underlying promise is resolved. This function is a helper function that makes it -easy to create a new instance of ``FutureArrayInterface`` that wraps an existing -``FutureArrayInterface`` object. - -Let's say you wanted to add headers to a response as they are returned from -your middleware, but you want to make sure you aren't causing future -responses to be dereferenced right away. You can achieve this by modifying the -incoming request and using the ``Core::proxy`` function. - -.. code-block:: php - - use GuzzleHttp\Ring\Core; - use GuzzleHttp\Ring\Client\CurlHandler; - - $handler = new CurlHandler(); - - $responseHeaderHandler = function (callable $handler, array $headers) { - return function (array $request) use ($handler, $headers) { - // Send the request using the wrapped handler. - return Core::proxy($handler($request), function ($response) use ($headers) { - // Add the headers to the response when it is available. - foreach ($headers as $key => $value) { - $response['headers'][$key] = (array) $value; - } - // Note that you can return a regular response array when using - // the proxy method. - return $response; - }); - } - }; - - // Create a new handler that adds headers to each response. - $handler = $responseHeaderHandler($handler, ['X-Header' => 'hello!']); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['httpbin.org']] - ]); - - assert($response['headers']['X-Header'] == 'hello!'); - -Built-In Middleware -------------------- - -RingPHP comes with a few basic client middlewares that modify requests -and responses. - -Streaming Middleware -~~~~~~~~~~~~~~~~~~~~ - -If you want to send all requests with the ``streaming`` option to a specific -handler but other requests to a different handler, then use the streaming -middleware. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Client\StreamHandler; - use GuzzleHttp\Ring\Client\Middleware; - - $defaultHandler = new CurlHandler(); - $streamingHandler = new StreamHandler(); - $streamingHandler = Middleware::wrapStreaming( - $defaultHandler, - $streamingHandler - ); - - // Send the request using the streaming handler. - $response = $streamingHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com']], - 'stream' => true - ]); - - // Send the request using the default handler. - $response = $streamingHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com']] - ]); - -Future Middleware -~~~~~~~~~~~~~~~~~ - -If you want to send all requests with the ``future`` option to a specific -handler but other requests to a different handler, then use the future -middleware. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Client\CurlMultiHandler; - use GuzzleHttp\Ring\Client\Middleware; - - $defaultHandler = new CurlHandler(); - $futureHandler = new CurlMultiHandler(); - $futureHandler = Middleware::wrapFuture( - $defaultHandler, - $futureHandler - ); - - // Send the request using the blocking CurlHandler. - $response = $futureHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com']] - ]); - - // Send the request using the non-blocking CurlMultiHandler. - $response = $futureHandler([ - 'http_method' => 'GET', - 'headers' => ['Host' => ['www.google.com']], - 'future' => true - ]); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/conf.py b/openml_OS/vendor/guzzlehttp/ringphp/docs/conf.py deleted file mode 100644 index c6404aa1e..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/conf.py +++ /dev/null @@ -1,23 +0,0 @@ -import sys, os -import sphinx_rtd_theme -from sphinx.highlighting import lexers -from pygments.lexers.web import PhpLexer - - -lexers['php'] = PhpLexer(startinline=True, linenos=1) -lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) -primary_domain = 'php' - -extensions = [] -templates_path = ['_templates'] -source_suffix = '.rst' -master_doc = 'index' -project = u'RingPHP' -copyright = u'2014, Michael Dowling' -version = '1.0.0-alpha' -exclude_patterns = ['_build'] - -html_title = "RingPHP" -html_short_title = "RingPHP" -html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/futures.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/futures.rst deleted file mode 100644 index af29cb378..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/futures.rst +++ /dev/null @@ -1,164 +0,0 @@ -======= -Futures -======= - -Futures represent a computation that may have not yet completed. RingPHP -uses hybrid of futures and promises to provide a consistent API that can be -used for both blocking and non-blocking consumers. - -Promises --------- - -You can get the result of a future when it is ready using the promise interface -of a future. Futures expose a promise API via a ``then()`` method that utilizes -`React's promise library `_. You should -use this API when you do not wish to block. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $request = [ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']] - ]; - - $response = $handler($request); - - // Use the then() method to use the promise API of the future. - $response->then(function ($response) { - echo $response['status']; - }); - -You can get the promise used by a future, an instance of -``React\Promise\PromiseInterface``, by calling the ``promise()`` method. - -.. code-block:: php - - $response = $handler($request); - $promise = $response->promise(); - $promise->then(function ($response) { - echo $response['status']; - }); - -This promise value can be used with React's -`aggregate promise functions `_. - -Waiting -------- - -You can wait on a future to complete and retrieve the value, or *dereference* -the future, using the ``wait()`` method. Calling the ``wait()`` method of a -future will block until the result is available. The result is then returned or -an exception is thrown if and exception was encountered while waiting on the -the result. Subsequent calls to dereference a future will return the previously -completed result or throw the previously encountered exception. Futures can be -cancelled, which stops the computation if possible. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['httpbin.org']] - ]); - - // You can explicitly call block to wait on a result. - $realizedResponse = $response->wait(); - - // Future responses can be used like a regular PHP array. - echo $response['status']; - -In addition to explicitly calling the ``wait()`` function, using a future like -a normal value will implicitly trigger the ``wait()`` function. - -Future Responses ----------------- - -RingPHP uses futures to return asynchronous responses immediately. Client -handlers always return future responses that implement -``GuzzleHttp\Ring\Future\ArrayFutureInterface``. These future responses act -just like normal PHP associative arrays for blocking access and provide a -promise interface for non-blocking access. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlMultiHandler; - - $handler = new CurlMultiHandler(); - - $request = [ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['Host' => ['www.google.com']] - ]; - - $response = $handler($request); - - // Use the promise API for non-blocking access to the response. The actual - // response value will be delivered to the promise. - $response->then(function ($response) { - echo $response['status']; - }); - - // You can wait (block) until the future is completed. - $response->wait(); - - // This will implicitly call wait(), and will block too! - $response['status']; - -.. important:: - - Futures that are not completed by the time the underlying handler is - destructed will be completed when the handler is shutting down. - -Cancelling ----------- - -Futures can be cancelled if they have not already been dereferenced. - -RingPHP futures are typically implemented with the -``GuzzleHttp\Ring\Future\BaseFutureTrait``. This trait provides the cancellation -functionality that should be common to most implementations. Cancelling a -future response will try to prevent the request from sending over the wire. - -When a future is cancelled, the cancellation function is invoked and performs -the actual work needed to cancel the request from sending if possible -(e.g., telling an event loop to stop sending a request or to close a socket). -If no cancellation function is provided, then a request cannot be cancelled. If -a cancel function is provided, then it should accept the future as an argument -and return true if the future was successfully cancelled or false if it could -not be cancelled. - -Wrapping an existing Promise ----------------------------- - -You can easily create a future from any existing promise using the -``GuzzleHttp\Ring\Future\FutureValue`` class. This class's constructor -accepts a promise as the first argument, a wait function as the second -argument, and a cancellation function as the third argument. The dereference -function is used to force the promise to resolve (for example, manually ticking -an event loop). The cancel function is optional and is used to tell the thing -that created the promise that it can stop computing the result (for example, -telling an event loop to stop transferring a request). - -.. code-block:: php - - use GuzzleHttp\Ring\Future\FutureValue; - use React\Promise\Deferred; - - $deferred = new Deferred(); - $promise = $deferred->promise(); - - $f = new FutureValue( - $promise, - function () use ($deferred) { - // This function is responsible for blocking and resolving the - // promise. Here we pass in a reference to the deferred so that - // it can be resolved or rejected. - $deferred->resolve('foo'); - } - ); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/index.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/index.rst deleted file mode 100644 index 4bbce631c..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/index.rst +++ /dev/null @@ -1,50 +0,0 @@ -======= -RingPHP -======= - -Provides a simple API and specification that abstracts away the details of HTTP -into a single PHP function. RingPHP be used to power HTTP clients and servers -through a PHP function that accepts a request hash and returns a response hash -that is fulfilled using a `promise `_, -allowing RingPHP to support both synchronous and asynchronous workflows. - -By abstracting the implementation details of different HTTP clients and -servers, RingPHP allows you to utilize pluggable HTTP clients and servers -without tying your application to a specific implementation. - -.. toctree:: - :maxdepth: 2 - - spec - futures - client_middleware - client_handlers - testing - -.. code-block:: php - - 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => ['www.google.com'], - 'x-foo' => ['baz'] - ] - ]); - - $response->then(function (array $response) { - echo $response['status']; - }); - - $response->wait(); - -RingPHP is inspired by Clojure's `Ring `_, -which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is -utilized as the handler layer in `Guzzle `_ 5.0+ to send -HTTP requests. diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/requirements.txt b/openml_OS/vendor/guzzlehttp/ringphp/docs/requirements.txt deleted file mode 100644 index 483a4e960..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -sphinx_rtd_theme diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/spec.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/spec.rst deleted file mode 100644 index bc9107898..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/spec.rst +++ /dev/null @@ -1,311 +0,0 @@ -============= -Specification -============= - -RingPHP applications consist of handlers, requests, responses, and -middleware. - -Handlers --------- - -Handlers are implemented as a PHP ``callable`` that accept a request array -and return a response array (``GuzzleHttp\Ring\Future\FutureArrayInterface``). - -For example: - -.. code-block:: php - - use GuzzleHttp\Ring\Future\CompletedFutureArray; - - $mockHandler = function (array $request) { - return new CompletedFutureArray([ - 'status' => 200, - 'headers' => ['X-Foo' => ['Bar']], - 'body' => 'Hello!' - ]); - }; - -This handler returns the same response each time it is invoked. All RingPHP -handlers must return a ``GuzzleHttp\Ring\Future\FutureArrayInterface``. Use -``GuzzleHttp\Ring\Future\CompletedFutureArray`` when returning a response that -has already completed. - -Requests --------- - -A request array is a PHP associative array that contains the configuration -settings need to send a request. - -.. code-block:: php - - $request = [ - 'http_method' => 'GET', - 'scheme' => 'http', - 'uri' => '/', - 'body' => 'hello!', - 'client' => ['timeout' => 1.0], - 'headers' => [ - 'host' => ['httpbin.org'], - 'X-Foo' => ['baz', 'bar'] - ] - ]; - -The request array contains the following key value pairs: - -request_method - (string, required) The HTTP request method, must be all caps corresponding - to a HTTP request method, such as ``GET`` or ``POST``. - -scheme - (string) The transport protocol, must be one of ``http`` or ``https``. - Defaults to ``http``. - -uri - (string, required) The request URI excluding the query string. Must - start with "/". - -query_string - (string) The query string, if present (e.g., ``foo=bar``). - -version - (string) HTTP protocol version. Defaults to ``1.1``. - -headers - (required, array) Associative array of headers. Each key represents the - header name. Each value contains an array of strings where each entry of - the array SHOULD be sent over the wire on a separate header line. - -body - (string, fopen resource, ``Iterator``, ``GuzzleHttp\Stream\StreamInterface``) - The body of the request, if present. Can be a string, resource returned - from fopen, an ``Iterator`` that yields chunks of data, an object that - implemented ``__toString``, or a ``GuzzleHttp\Stream\StreamInterface``. - -future - (bool, string) Controls the asynchronous behavior of a response. - - Set to ``true`` or omit the ``future`` option to *request* that a request - will be completed asynchronously. Keep in mind that your request might not - necessarily be completed asynchronously based on the handler you are using. - Set the ``future`` option to ``false`` to request that a synchronous - response be provided. - - You can provide a string value to specify fine-tuned future behaviors that - may be specific to the underlying handlers you are using. There are, - however, some common future options that handlers should implement if - possible. - - lazy - Requests that the handler does not open and send the request - immediately, but rather only opens and sends the request once the - future is dereferenced. This option is often useful for sending a large - number of requests concurrently to allow handlers to take better - advantage of non-blocking transfers by first building up a pool of - requests. - - If an handler does not implement or understand a provided string value, - then the request MUST be treated as if the user provided ``true`` rather - than the string value. - - Future responses created by asynchronous handlers MUST attempt to complete - any outstanding future responses when they are destructed. Asynchronous - handlers MAY choose to automatically complete responses when the number - of outstanding requests reaches an handler-specific threshold. - -Client Specific Options -~~~~~~~~~~~~~~~~~~~~~~~ - -The following options are only used in ring client handlers. - -.. _client-options: - -client - (array) Associative array of client specific transfer options. The - ``client`` request key value pair can contain the following keys: - - cert - (string, array) Set to a string to specify the path to a file - containing a PEM formatted SSL client side certificate. If a password - is required, then set ``cert`` to an array containing the path to the - PEM file in the first array element followed by the certificate - password in the second array element. - - connect_timeout - (float) Float describing the number of seconds to wait while trying to - connect to a server. Use ``0`` to wait indefinitely (the default - behavior). - - debug - (bool, fopen() resource) Set to true or set to a PHP stream returned by - fopen() to enable debug output with the handler used to send a request. - If set to ``true``, the output is written to PHP's STDOUT. If a PHP - ``fopen`` resource handle is provided, the output is written to the - stream. - - "Debug output" is handler specific: different handlers will yield - different output and various various level of detail. For example, when - using cURL to transfer requests, cURL's `CURLOPT_VERBOSE `_ - will be used. When using the PHP stream wrapper, `stream notifications `_ - will be emitted. - - decode_content - (bool) Specify whether or not ``Content-Encoding`` responses - (gzip, deflate, etc.) are automatically decoded. Set to ``true`` to - automatically decode encoded responses. Set to ``false`` to not decode - responses. By default, content is *not* decoded automatically. - - delay - (int) The number of milliseconds to delay before sending the request. - This is often used for delaying before retrying a request. Handlers - SHOULD implement this if possible, but it is not a strict requirement. - - progress - (function) Defines a function to invoke when transfer progress is made. - The function accepts the following arguments: - - 1. The total number of bytes expected to be downloaded - 2. The number of bytes downloaded so far - 3. The number of bytes expected to be uploaded - 4. The number of bytes uploaded so far - - proxy - (string, array) Pass a string to specify an HTTP proxy, or an - associative array to specify different proxies for different protocols - where the scheme is the key and the value is the proxy address. - - .. code-block:: php - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => ['httpbin.org']], - 'client' => [ - // Use different proxies for different URI schemes. - 'proxy' => [ - 'http' => 'http://proxy.example.com:5100', - 'https' => 'https://proxy.example.com:6100' - ] - ] - ]; - - ssl_key - (string, array) Specify the path to a file containing a private SSL key - in PEM format. If a password is required, then set to an array - containing the path to the SSL key in the first array element followed - by the password required for the certificate in the second element. - - save_to - (string, fopen resource, ``GuzzleHttp\Stream\StreamInterface``) - Specifies where the body of the response is downloaded. Pass a string to - open a local file on disk and save the output to the file. Pass an fopen - resource to save the output to a PHP stream resource. Pass a - ``GuzzleHttp\Stream\StreamInterface`` to save the output to a Guzzle - StreamInterface. Omitting this option will typically save the body of a - response to a PHP temp stream. - - stream - (bool) Set to true to stream a response rather than download it all - up-front. This option will only be utilized when the corresponding - handler supports it. - - timeout - (float) Float describing the timeout of the request in seconds. Use 0 to - wait indefinitely (the default behavior). - - verify - (bool, string) Describes the SSL certificate verification behavior of a - request. Set to true to enable SSL certificate verification using the - system CA bundle when available (the default). Set to false to disable - certificate verification (this is insecure!). Set to a string to provide - the path to a CA bundle on disk to enable verification using a custom - certificate. - - version - (string) HTTP protocol version to use with the request. - -Server Specific Options -~~~~~~~~~~~~~~~~~~~~~~~ - -The following options are only used in ring server handlers. - -server_port - (integer) The port on which the request is being handled. This is only - used with ring servers, and is required. - -server_name - (string) The resolved server name, or the server IP address. Required when - using a Ring server. - -remote_addr - (string) The IP address of the client or the last proxy that sent the - request. Required when using a Ring server. - -Responses ---------- - -A response is an array-like object that implements -``GuzzleHttp\Ring\Future\FutureArrayInterface``. Responses contain the -following key value pairs: - -body - (string, fopen resource, ``Iterator``, ``GuzzleHttp\Stream\StreamInterface``) - The body of the response, if present. Can be a string, resource returned - from fopen, an ``Iterator`` that yields chunks of data, an object that - implemented ``__toString``, or a ``GuzzleHttp\Stream\StreamInterface``. - -effective_url - (string) The URL that returned the resulting response. - -error - (``\Exception``) Contains an exception describing any errors that were - encountered during the transfer. - -headers - (Required, array) Associative array of headers. Each key represents the - header name. Each value contains an array of strings where each entry of - the array is a header line. The headers array MAY be an empty array in the - event an error occurred before a response was received. - -reason - (string) Optional reason phrase. This option should be provided when the - reason phrase does not match the typical reason phrase associated with the - ``status`` code. See `RFC 7231 `_ - for a list of HTTP reason phrases mapped to status codes. - -status - (Required, integer) The HTTP status code. The status code MAY be set to - ``null`` in the event an error occurred before a response was received - (e.g., a networking error). - -transfer_stats - (array) Provides an associative array of arbitrary transfer statistics if - provided by the underlying handler. - -version - (string) HTTP protocol version. Defaults to ``1.1``. - -Middleware ----------- - -Ring middleware augments the functionality of handlers by invoking them in the -process of generating responses. Middleware is typically implemented as a -higher-order function that takes one or more handlers as arguments followed by -an optional associative array of options as the last argument, returning a new -handler with the desired compound behavior. - -Here's an example of a middleware that adds a Content-Type header to each -request. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\CurlHandler; - use GuzzleHttp\Ring\Core; - - $contentTypeHandler = function(callable $handler, $contentType) { - return function (array $request) use ($handler, $contentType) { - return $handler(Core::setHeader('Content-Type', $contentType)); - }; - }; - - $baseHandler = new CurlHandler(); - $wrappedHandler = $contentTypeHandler($baseHandler, 'text/html'); - $response = $wrappedHandler([/** request hash **/]); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/docs/testing.rst b/openml_OS/vendor/guzzlehttp/ringphp/docs/testing.rst deleted file mode 100644 index 9df2562ed..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/docs/testing.rst +++ /dev/null @@ -1,74 +0,0 @@ -======= -Testing -======= - -RingPHP tests client handlers using `PHPUnit `_ and a -built-in node.js web server. - -Running Tests -------------- - -First, install the dependencies using `Composer `_. - - composer.phar install - -Next, run the unit tests using ``Make``. - - make test - -The tests are also run on Travis-CI on each commit: https://travis-ci.org/guzzle/guzzle-ring - -Test Server ------------ - -Testing client handlers usually involves actually sending HTTP requests. -RingPHP provides a node.js web server that returns canned responses and -keep a list of the requests that have been received. The server can then -be queried to get a list of the requests that were sent by the client so that -you can ensure that the client serialized and transferred requests as intended. - -The server keeps a list of queued responses and returns responses that are -popped off of the queue as HTTP requests are received. When there are not -more responses to serve, the server returns a 500 error response. - -The test server uses the ``GuzzleHttp\Tests\Ring\Client\Server`` class to -control the server. - -.. code-block:: php - - use GuzzleHttp\Ring\Client\StreamHandler; - use GuzzleHttp\Tests\Ring\Client\Server; - - // First return a 200 followed by a 404 response. - Server::enqueue([ - ['status' => 200], - ['status' => 404] - ]); - - $handler = new StreamHandler(); - - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/' - ]); - - assert(200 == $response['status']); - - $response = $handler([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/' - ]); - - assert(404 == $response['status']); - -After requests have been sent, you can get a list of the requests as they -were sent over the wire to ensure they were sent correctly. - -.. code-block:: php - - $received = Server::received(); - - assert('GET' == $received[0]['http_method']); - assert('HEAD' == $received[1]['http_method']); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php deleted file mode 100644 index ebde187cf..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php +++ /dev/null @@ -1,821 +0,0 @@ - 200, - 'headers' => [ - 'Foo' => ['Bar'], - 'Baz' => ['bam'], - 'Content-Length' => [2], - ], - 'body' => 'hi', - ]]); - - $stream = Stream::factory(); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'host' => [Server::$url], - 'Hi' => [' 123'], - ], - 'body' => 'testing', - 'client' => ['save_to' => $stream], - ]; - - $f = new CurlFactory(); - $result = $f($request); - $this->assertInternalType('array', $result); - $this->assertCount(3, $result); - $this->assertInternalType('resource', $result[0]); - $this->assertInternalType('array', $result[1]); - $this->assertSame($stream, $result[2]); - curl_close($result[0]); - - $this->assertEquals('PUT', $_SERVER['_curl'][CURLOPT_CUSTOMREQUEST]); - $this->assertEquals( - 'http://http://127.0.0.1:8125/', - $_SERVER['_curl'][CURLOPT_URL] - ); - // Sends via post fields when the request is small enough - $this->assertEquals('testing', $_SERVER['_curl'][CURLOPT_POSTFIELDS]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_RETURNTRANSFER]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_HEADER]); - $this->assertEquals(150, $_SERVER['_curl'][CURLOPT_CONNECTTIMEOUT]); - $this->assertInstanceOf('Closure', $_SERVER['_curl'][CURLOPT_HEADERFUNCTION]); - - if (defined('CURLOPT_PROTOCOLS')) { - $this->assertEquals( - CURLPROTO_HTTP | CURLPROTO_HTTPS, - $_SERVER['_curl'][CURLOPT_PROTOCOLS] - ); - } - - $this->assertContains('Expect:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Accept:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Content-Type:', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('Hi: 123', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - $this->assertContains('host: http://127.0.0.1:8125/', $_SERVER['_curl'][CURLOPT_HTTPHEADER]); - } - - public function testSendsHeadRequests() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_NOBODY]); - $checks = [CURLOPT_WRITEFUNCTION, CURLOPT_READFUNCTION, CURLOPT_FILE, CURLOPT_INFILE]; - foreach ($checks as $check) { - $this->assertArrayNotHasKey($check, $_SERVER['_curl']); - } - $this->assertEquals('HEAD', Server::received()[0]['http_method']); - } - - public function testCanAddCustomCurlOptions() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['curl' => [CURLOPT_LOW_SPEED_LIMIT => 10]], - ]); - $this->assertEquals(10, $_SERVER['_curl'][CURLOPT_LOW_SPEED_LIMIT]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL CA bundle not found: /does/not/exist - */ - public function testValidatesVerify() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => '/does/not/exist'], - ]); - } - - public function testCanSetVerifyToFile() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_CAINFO]); - $this->assertEquals(2, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - } - - public function testAddsVerifyAsTrue() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => true], - ]); - $this->assertEquals(2, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(true, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - $this->assertArrayNotHasKey(CURLOPT_CAINFO, $_SERVER['_curl']); - } - - public function testCanDisableVerify() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['verify' => false], - ]); - $this->assertEquals(0, $_SERVER['_curl'][CURLOPT_SSL_VERIFYHOST]); - $this->assertEquals(false, $_SERVER['_curl'][CURLOPT_SSL_VERIFYPEER]); - } - - public function testAddsProxy() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['proxy' => 'http://bar.com'], - ]); - $this->assertEquals('http://bar.com', $_SERVER['_curl'][CURLOPT_PROXY]); - } - - public function testAddsViaScheme() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'client' => [ - 'proxy' => ['http' => 'http://bar.com', 'https' => 'https://t'], - ], - ]); - $this->assertEquals('http://bar.com', $_SERVER['_curl'][CURLOPT_PROXY]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL private key not found: /does/not/exist - */ - public function testValidatesSslKey() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => '/does/not/exist'], - ]); - } - - public function testAddsSslKey() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLKEY]); - } - - public function testAddsSslKeyWithPassword() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['ssl_key' => [__FILE__, 'test']], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLKEY]); - $this->assertEquals('test', $_SERVER['_curl'][CURLOPT_SSLKEYPASSWD]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage SSL certificate not found: /does/not/exist - */ - public function testValidatesCert() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => '/does/not/exist'], - ]); - } - - public function testAddsCert() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => __FILE__], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLCERT]); - } - - public function testAddsCertWithPassword() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['cert' => [__FILE__, 'test']], - ]); - $this->assertEquals(__FILE__, $_SERVER['_curl'][CURLOPT_SSLCERT]); - $this->assertEquals('test', $_SERVER['_curl'][CURLOPT_SSLCERTPASSWD]); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage progress client option must be callable - */ - public function testValidatesProgress() - { - $f = new CurlFactory(); - $f([ - 'http_method' => 'GET', - 'headers' => ['host' => ['foo.com']], - 'client' => ['progress' => 'foo'], - ]); - } - - public function testEmitsDebugInfoToStream() - { - $res = fopen('php://memory', 'r+'); - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'client' => ['debug' => $res], - ]); - $response->wait(); - rewind($res); - $output = str_replace("\r", '', stream_get_contents($res)); - $this->assertContains( - "> HEAD / HTTP/1.1\nhost: 127.0.0.1:8125\n\n", - $output - ); - $this->assertContains("< HTTP/1.1 200", $output); - fclose($res); - } - - public function testEmitsProgressToFunction() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $called = []; - $response = $a([ - 'http_method' => 'HEAD', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ], - ]); - $response->wait(); - $this->assertNotEmpty($called); - foreach ($called as $call) { - $this->assertCount(4, $call); - } - } - - private function addDecodeResponse($withEncoding = true) - { - $content = gzencode('test'); - $response = [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => ['Content-Length' => [strlen($content)]], - 'body' => $content, - ]; - - if ($withEncoding) { - $response['headers']['Content-Encoding'] = ['gzip']; - } - - Server::flush(); - Server::enqueue([$response]); - - return $content; - } - - public function testDecodesGzippedResponses() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['decode_content' => true], - ]); - $response->wait(); - $this->assertEquals('test', Core::body($response)); - $this->assertEquals('', $_SERVER['_curl'][CURLOPT_ENCODING]); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Accept-Encoding')); - } - - public function testDecodesGzippedResponsesWithHeader() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'Accept-Encoding' => ['gzip'], - ], - 'client' => ['decode_content' => true], - ]); - $response->wait(); - $this->assertEquals('gzip', $_SERVER['_curl'][CURLOPT_ENCODING]); - $sent = Server::received()[0]; - $this->assertEquals('gzip', Core::header($sent, 'Accept-Encoding')); - $this->assertEquals('test', Core::body($response)); - } - - public function testDoesNotForceDecode() - { - $content = $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['decode_content' => false], - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Accept-Encoding')); - $this->assertEquals($content, Core::body($response)); - } - - public function testProtocolVersion() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'version' => 1.0, - ]); - $this->assertEquals(CURL_HTTP_VERSION_1_0, $_SERVER['_curl'][CURLOPT_HTTP_VERSION]); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesSaveTo() - { - $handler = new CurlMultiHandler(); - $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => true], - ]); - } - - public function testSavesToStream() - { - $stream = fopen('php://memory', 'r+'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $stream, - ], - ]); - $response->wait(); - rewind($stream); - $this->assertEquals('test', stream_get_contents($stream)); - } - - public function testSavesToGuzzleStream() - { - $stream = Stream::factory(); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $stream, - ], - ]); - $response->wait(); - $this->assertEquals('test', (string) $stream); - } - - public function testSavesToFileOnDisk() - { - $tmpfile = tempnam(sys_get_temp_dir(), 'testfile'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'decode_content' => true, - 'save_to' => $tmpfile, - ], - ]); - $response->wait(); - $this->assertEquals('test', file_get_contents($tmpfile)); - unlink($tmpfile); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testValidatesBody() - { - $handler = new CurlMultiHandler(); - $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => false, - ]); - } - - public function testAddsLargePayloadFromStreamWithNoSizeUsingChunked() - { - $stream = Stream::factory('foo'); - $stream = FnStream::decorate($stream, [ - 'getSize' => function () { - return null; - } - ]); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $stream, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals('chunked', Core::header($sent, 'Transfer-Encoding')); - $this->assertNull(Core::header($sent, 'Content-Length')); - $this->assertEquals('foo', $sent['body']); - } - - public function testAddsPayloadFromIterator() - { - $iter = new \ArrayIterator(['f', 'o', 'o']); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $iter, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals('chunked', Core::header($sent, 'Transfer-Encoding')); - $this->assertNull(Core::header($sent, 'Content-Length')); - $this->assertEquals('foo', $sent['body']); - } - - public function testAddsPayloadFromResource() - { - $res = fopen('php://memory', 'r+'); - $data = str_repeat('.', 1000000); - fwrite($res, $data); - rewind($res); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'content-length' => [1000000], - ], - 'body' => $res, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals(1000000, Core::header($sent, 'Content-Length')); - $this->assertEquals($data, $sent['body']); - } - - public function testAddsContentLengthFromStream() - { - $stream = Stream::factory('foo'); - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'body' => $stream, - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals(3, Core::header($sent, 'Content-Length')); - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals('foo', $sent['body']); - } - - public function testDoesNotAddMultipleContentLengthHeaders() - { - $this->addDecodeResponse(); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => [ - 'host' => [Server::$host], - 'content-length' => [3], - ], - 'body' => 'foo', - ]); - $response->wait(); - $sent = Server::received()[0]; - $this->assertEquals(3, Core::header($sent, 'Content-Length')); - $this->assertNull(Core::header($sent, 'Transfer-Encoding')); - $this->assertEquals('foo', $sent['body']); - } - - public function testSendsPostWithNoBodyOrDefaultContentType() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $handler = new CurlMultiHandler(); - $response = $handler([ - 'http_method' => 'POST', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $received = Server::received()[0]; - $this->assertEquals('POST', $received['http_method']); - $this->assertNull(Core::header($received, 'content-type')); - $this->assertSame('0', Core::firstHeader($received, 'content-length')); - } - - public function testParseProtocolVersion() - { - $res = CurlFactory::createResponse( - function () {}, - [], - ['curl' => ['errno' => null]], - ['HTTP/1.1 200 Ok'], - null - ); - - $this->assertSame('1.1', $res['version']); - } - - public function testFailsWhenNoResponseAndNoBody() - { - $res = CurlFactory::createResponse(function () {}, [], [], [], null); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\RingException', $res['error']); - $this->assertContains( - 'No response was received for a request with no body', - $res['error']->getMessage() - ); - } - - public function testFailsWhenCannotRewindRetry() - { - $res = CurlFactory::createResponse(function () {}, [ - 'body' => new NoSeekStream(Stream::factory('foo')) - ], [], [], null); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\RingException', $res['error']); - $this->assertContains( - 'rewind the request body failed', - $res['error']->getMessage() - ); - } - - public function testRetriesWhenBodyCanBeRewound() - { - $callHandler = $called = false; - $res = CurlFactory::createResponse(function () use (&$callHandler) { - $callHandler = true; - return ['status' => 200]; - }, [ - 'body' => FnStream::decorate(Stream::factory('test'), [ - 'seek' => function () use (&$called) { - $called = true; - return true; - } - ]) - ], [], [], null); - - $this->assertTrue($callHandler); - $this->assertTrue($called); - $this->assertEquals('200', $res['status']); - } - - public function testFailsWhenRetryMoreThanThreeTimes() - { - $call = 0; - $mock = new MockHandler(function (array $request) use (&$mock, &$call) { - $call++; - return CurlFactory::createResponse($mock, $request, [], [], null); - }); - $response = $mock([ - 'http_method' => 'GET', - 'body' => 'test', - ]); - $this->assertEquals(3, $call); - $this->assertArrayHasKey('error', $response); - $this->assertContains( - 'The cURL request was retried 3 times', - $response['error']->getMessage() - ); - } - - public function testHandles100Continue() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => '200', - 'reason' => 'OK', - 'headers' => [ - 'Test' => ['Hello'], - 'Content-Length' => ['4'], - ], - 'body' => 'test', - ], - ]); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'Host' => [Server::$host], - 'Expect' => ['100-Continue'], - ], - 'body' => 'test', - ]; - - $handler = new CurlMultiHandler(); - $response = $handler($request)->wait(); - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Hello'], $response['headers']['Test']); - $this->assertEquals(['4'], $response['headers']['Content-Length']); - $this->assertEquals('test', Core::body($response)); - } - - public function testCreatesConnectException() - { - $m = new \ReflectionMethod('GuzzleHttp\Ring\Client\CurlFactory', 'createErrorResponse'); - $m->setAccessible(true); - $response = $m->invoke( - null, - function () {}, - [], - [ - 'err_message' => 'foo', - 'curl' => [ - 'errno' => CURLE_COULDNT_CONNECT, - ] - ] - ); - $this->assertInstanceOf('GuzzleHttp\Ring\Exception\ConnectException', $response['error']); - } - - public function testParsesLastResponseOnly() - { - $response1 = [ - 'status' => 301, - 'headers' => [ - 'Content-Length' => ['0'], - 'Location' => ['/foo'] - ] - ]; - - $response2 = [ - 'status' => 200, - 'headers' => [ - 'Content-Length' => ['0'], - 'Foo' => ['bar'] - ] - ]; - - Server::flush(); - Server::enqueue([$response1, $response2]); - - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['Host' => [Server::$host]], - 'client' => [ - 'curl' => [ - CURLOPT_FOLLOWLOCATION => true - ] - ] - ])->wait(); - - $this->assertEquals(1, $response['transfer_stats']['redirect_count']); - $this->assertEquals('http://127.0.0.1:8125/foo', $response['effective_url']); - $this->assertEquals(['bar'], $response['headers']['Foo']); - $this->assertEquals(200, $response['status']); - $this->assertFalse(Core::hasHeader($response, 'Location')); - } - - public function testMaintainsMultiHeaderOrder() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => 200, - 'headers' => [ - 'Content-Length' => ['0'], - 'Foo' => ['a', 'b'], - 'foo' => ['c', 'd'], - ] - ] - ]); - - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['Host' => [Server::$host]] - ])->wait(); - - $this->assertEquals( - ['a', 'b', 'c', 'd'], - Core::headerLines($response, 'Foo') - ); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Directory /path/to/does/not does not exist for save_to value of /path/to/does/not/exist.txt - */ - public function testThrowsWhenDirNotFound() - { - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$url]], - 'client' => ['save_to' => '/path/to/does/not/exist.txt'], - ]; - - $f = new CurlFactory(); - $f($request); - } -} - -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php deleted file mode 100644 index ba03b8cd3..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php +++ /dev/null @@ -1,96 +0,0 @@ -markTestSkipped('curl_reset() is not available'); - } - } - - protected function getHandler($factory = null, $options = []) - { - return new CurlHandler($options); - } - - public function testCanSetMaxHandles() - { - $a = new CurlHandler(['max_handles' => 10]); - $this->assertEquals(10, $this->readAttribute($a, 'maxHandles')); - } - - public function testCreatesCurlErrors() - { - $handler = new CurlHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => ['localhost:123']], - 'client' => ['timeout' => 0.001, 'connect_timeout' => 0.001], - ]); - $this->assertNull($response['status']); - $this->assertNull($response['reason']); - $this->assertEquals([], $response['headers']); - $this->assertInstanceOf( - 'GuzzleHttp\Ring\Exception\RingException', - $response['error'] - ); - - $this->assertEquals( - 1, - preg_match('/^cURL error \d+: .*$/', $response['error']->getMessage()) - ); - } - - public function testReleasesAdditionalEasyHandles() - { - Server::flush(); - $response = [ - 'status' => 200, - 'headers' => ['Content-Length' => [4]], - 'body' => 'test', - ]; - - Server::enqueue([$response, $response, $response, $response]); - $a = new CurlHandler(['max_handles' => 2]); - - $fn = function () use (&$calls, $a, &$fn) { - if (++$calls < 4) { - $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['progress' => $fn], - ]); - } - }; - - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => [ - 'progress' => $fn, - ], - ]; - - $a($request); - $this->assertCount(2, $this->readAttribute($a, 'handles')); - } - - public function testReusesHandles() - { - Server::flush(); - $response = ['status' => 200]; - Server::enqueue([$response, $response]); - $a = new CurlHandler(); - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]; - $a($request); - $a($request); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php deleted file mode 100644 index 530b2394a..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php +++ /dev/null @@ -1,181 +0,0 @@ - 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - $this->assertArrayHasKey('transfer_stats', $response); - $realUrl = trim($response['transfer_stats']['url'], '/'); - $this->assertEquals(trim(Server::$url, '/'), $realUrl); - $this->assertArrayHasKey('effective_url', $response); - $this->assertEquals( - trim(Server::$url, '/'), - trim($response['effective_url'], '/') - ); - } - - public function testCreatesErrorResponses() - { - $url = 'http://localhost:123/'; - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => ['localhost:123']], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertNull($response['status']); - $this->assertNull($response['reason']); - $this->assertEquals([], $response['headers']); - $this->assertArrayHasKey('error', $response); - $this->assertContains('cURL error ', $response['error']->getMessage()); - $this->assertArrayHasKey('transfer_stats', $response); - $this->assertEquals( - trim($url, '/'), - trim($response['transfer_stats']['url'], '/') - ); - $this->assertArrayHasKey('effective_url', $response); - $this->assertEquals( - trim($url, '/'), - trim($response['effective_url'], '/') - ); - } - - public function testSendsFuturesWhenDestructed() - { - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $a->__destruct(); - $this->assertEquals(200, $response['status']); - } - - public function testCanSetMaxHandles() - { - $a = new CurlMultiHandler(['max_handles' => 2]); - $this->assertEquals(2, $this->readAttribute($a, 'maxHandles')); - } - - public function testCanSetSelectTimeout() - { - $a = new CurlMultiHandler(['select_timeout' => 2]); - $this->assertEquals(2, $this->readAttribute($a, 'selectTimeout')); - } - - public function testSendsFuturesWhenMaxHandlesIsReached() - { - $request = [ - 'http_method' => 'PUT', - 'headers' => ['host' => [Server::$host]], - 'future' => 'lazy', // passing this to control the test - ]; - $response = ['status' => 200]; - Server::flush(); - Server::enqueue([$response, $response, $response]); - $a = new CurlMultiHandler(['max_handles' => 3]); - for ($i = 0; $i < 5; $i++) { - $responses[] = $a($request); - } - $this->assertCount(3, Server::received()); - $responses[3]->cancel(); - $responses[4]->cancel(); - } - - public function testCanCancel() - { - Server::flush(); - $response = ['status' => 200]; - Server::enqueue(array_fill_keys(range(0, 10), $response)); - $a = new CurlMultiHandler(); - $responses = []; - - for ($i = 0; $i < 10; $i++) { - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'future' => 'lazy', - ]); - $response->cancel(); - $responses[] = $response; - } - - $this->assertCount(0, Server::received()); - - foreach ($responses as $response) { - $this->assertTrue($this->readAttribute($response, 'isRealized')); - } - } - - public function testCannotCancelFinished() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - ]); - $response->wait(); - $response->cancel(); - } - - public function testDelaysInParallel() - { - Server::flush(); - Server::enqueue([['status' => 200]]); - $a = new CurlMultiHandler(); - $expected = microtime(true) + (100 / 1000); - $response = $a([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'client' => ['delay' => 100], - ]); - $response->wait(); - $this->assertGreaterThanOrEqual($expected, microtime(true)); - } - - public function testSendsNonLazyFutures() - { - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'future' => true, - ]; - Server::flush(); - Server::enqueue([['status' => 202]]); - $a = new CurlMultiHandler(); - $response = $a($request); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(202, $response['status']); - } - - public function testExtractsErrors() - { - $request = [ - 'http_method' => 'GET', - 'headers' => ['host' => ['127.0.0.1:123']], - 'future' => true, - ]; - Server::flush(); - Server::enqueue([['status' => 202]]); - $a = new CurlMultiHandler(); - $response = $a($request); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(CURLE_COULDNT_CONNECT, $response['curl']['errno']); - $this->assertNotEmpty($response['curl']['error']); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php deleted file mode 100644 index a47bb30ba..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MiddlewareTest.php +++ /dev/null @@ -1,65 +0,0 @@ - 200]); - $calledA = false; - $a = function (array $req) use (&$calledA, $future) { - $calledA = true; - return $future; - }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapFuture($a, $b); - $s([]); - $this->assertTrue($calledA); - $this->assertFalse($calledB); - } - - public function testFutureCallsStreamingHandler() - { - $future = new CompletedFutureArray(['status' => 200]); - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB, $future) { - $calledB = true; - return $future; - }; - $s = Middleware::wrapFuture($a, $b); - $result = $s(['client' => ['future' => true]]); - $this->assertFalse($calledA); - $this->assertTrue($calledB); - $this->assertSame($future, $result); - } - - public function testStreamingCallsDefaultHandler() - { - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapStreaming($a, $b); - $s([]); - $this->assertTrue($calledA); - $this->assertFalse($calledB); - } - - public function testStreamingCallsStreamingHandler() - { - $calledA = false; - $a = function (array $req) use (&$calledA) { $calledA = true; }; - $calledB = false; - $b = function (array $req) use (&$calledB) { $calledB = true; }; - $s = Middleware::wrapStreaming($a, $b); - $s(['client' => ['stream' => true]]); - $this->assertFalse($calledA); - $this->assertTrue($calledB); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php deleted file mode 100644 index 26bcd6cdc..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/MockHandlerTest.php +++ /dev/null @@ -1,86 +0,0 @@ - 200]); - $response = $mock([]); - $this->assertEquals(200, $response['status']); - $this->assertEquals([], $response['headers']); - $this->assertNull($response['body']); - $this->assertNull($response['reason']); - $this->assertNull($response['effective_url']); - } - - public function testReturnsFutures() - { - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred) { - $deferred->resolve(['status' => 200]); - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - } - - public function testReturnsFuturesWithThenCall() - { - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () use ($deferred) { - $deferred->resolve(['status' => 200]); - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $this->assertEquals(200, $response['status']); - $req = null; - $promise = $response->then(function ($value) use (&$req) { - $req = $value; - $this->assertEquals(200, $req['status']); - }); - $this->assertInstanceOf('React\Promise\PromiseInterface', $promise); - $this->assertEquals(200, $req['status']); - } - - public function testReturnsFuturesAndProxiesCancel() - { - $c = null; - $deferred = new Deferred(); - $future = new FutureArray( - $deferred->promise(), - function () {}, - function () use (&$c) { - $c = true; - return true; - } - ); - $mock = new MockHandler($future); - $response = $mock([]); - $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); - $response->cancel(); - $this->assertTrue($c); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Response must be an array or FutureArrayInterface. Found - */ - public function testEnsuresMockIsValid() - { - $mock = new MockHandler('foo'); - $mock([]); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/Server.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/Server.php deleted file mode 100644 index 14665a556..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/Server.php +++ /dev/null @@ -1,183 +0,0 @@ - [], 'reason' => '', 'body' => '']; - $data[] = $response; - } - - self::send('PUT', '/guzzle-server/responses', json_encode($data)); - } - - /** - * Get all of the received requests as a RingPHP request structure. - * - * @return array - * @throws \RuntimeException - */ - public static function received() - { - if (!self::$started) { - return []; - } - - $response = self::send('GET', '/guzzle-server/requests'); - $body = Core::body($response); - $result = json_decode($body, true); - if ($result === false) { - throw new \RuntimeException('Error decoding response: ' - . json_last_error()); - } - - foreach ($result as &$res) { - if (isset($res['uri'])) { - $res['resource'] = $res['uri']; - } - if (isset($res['query_string'])) { - $res['resource'] .= '?' . $res['query_string']; - } - if (!isset($res['resource'])) { - $res['resource'] = ''; - } - // Ensure that headers are all arrays - if (isset($res['headers'])) { - foreach ($res['headers'] as &$h) { - $h = (array) $h; - } - unset($h); - } - } - - unset($res); - return $result; - } - - /** - * Stop running the node.js server - */ - public static function stop() - { - if (self::$started) { - self::send('DELETE', '/guzzle-server'); - } - - self::$started = false; - } - - public static function wait($maxTries = 20) - { - $tries = 0; - while (!self::isListening() && ++$tries < $maxTries) { - usleep(100000); - } - - if (!self::isListening()) { - throw new \RuntimeException('Unable to contact node.js server'); - } - } - - public static function start() - { - if (self::$started) { - return; - } - - try { - self::wait(); - } catch (\Exception $e) { - exec('node ' . __DIR__ . \DIRECTORY_SEPARATOR . 'server.js ' - . self::$port . ' >> /tmp/server.log 2>&1 &'); - self::wait(); - } - - self::$started = true; - } - - private static function isListening() - { - $response = self::send('GET', '/guzzle-server/perf', null, [ - 'connect_timeout' => 1, - 'timeout' => 1 - ]); - - return !isset($response['error']); - } - - private static function send( - $method, - $path, - $body = null, - array $client = [] - ) { - $handler = new StreamHandler(); - - $request = [ - 'http_method' => $method, - 'uri' => $path, - 'request_port' => 8125, - 'headers' => ['host' => ['127.0.0.1:8125']], - 'body' => $body, - 'client' => $client, - ]; - - if ($body) { - $request['headers']['content-length'] = [strlen($body)]; - } - - return $handler($request); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php deleted file mode 100644 index 3cb9a8e1e..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php +++ /dev/null @@ -1,480 +0,0 @@ -queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => [ - 'host' => [Server::$host], - 'Foo' => ['Bar'], - ], - ]); - - $this->assertEquals('1.1', $response['version']); - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Bar'], $response['headers']['Foo']); - $this->assertEquals(['8'], $response['headers']['Content-Length']); - $this->assertEquals('hi there', Core::body($response)); - - $sent = Server::received()[0]; - $this->assertEquals('GET', $sent['http_method']); - $this->assertEquals('/', $sent['resource']); - $this->assertEquals(['127.0.0.1:8125'], $sent['headers']['host']); - $this->assertEquals('Bar', Core::header($sent, 'foo')); - } - - public function testAddsErrorToResponse() - { - $handler = new StreamHandler(); - $result = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => ['localhost:123']], - 'client' => ['timeout' => 0.01], - ]); - $this->assertInstanceOf( - 'GuzzleHttp\Ring\Future\CompletedFutureArray', - $result - ); - $this->assertNull($result['status']); - $this->assertNull($result['body']); - $this->assertEquals([], $result['headers']); - $this->assertInstanceOf( - 'GuzzleHttp\Ring\Exception\RingException', - $result['error'] - ); - } - - public function testEnsuresTheHttpProtocol() - { - $handler = new StreamHandler(); - $result = $handler([ - 'http_method' => 'GET', - 'url' => 'ftp://localhost:123', - ]); - $this->assertArrayHasKey('error', $result); - $this->assertContains( - 'URL is invalid: ftp://localhost:123', - $result['error']->getMessage() - ); - } - - public function testStreamAttributeKeepsStreamOpen() - { - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'PUT', - 'uri' => '/foo', - 'query_string' => 'baz=bar', - 'headers' => [ - 'host' => [Server::$host], - 'Foo' => ['Bar'], - ], - 'body' => 'test', - 'client' => ['stream' => true], - ]); - - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals('8', Core::header($response, 'Content-Length')); - $body = $response['body']; - $this->assertTrue(is_resource($body)); - $this->assertEquals('http', stream_get_meta_data($body)['wrapper_type']); - $this->assertEquals('hi there', stream_get_contents($body)); - fclose($body); - $sent = Server::received()[0]; - $this->assertEquals('PUT', $sent['http_method']); - $this->assertEquals('/foo', $sent['uri']); - $this->assertEquals('baz=bar', $sent['query_string']); - $this->assertEquals('/foo?baz=bar', $sent['resource']); - $this->assertEquals('127.0.0.1:8125', Core::header($sent, 'host')); - $this->assertEquals('Bar', Core::header($sent, 'foo')); - } - - public function testDrainsResponseIntoTempStream() - { - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - ]); - $body = $response['body']; - $this->assertEquals('php://temp', stream_get_meta_data($body)['uri']); - $this->assertEquals('hi', fread($body, 2)); - fclose($body); - } - - public function testDrainsResponseIntoSaveToBody() - { - $r = fopen('php://temp', 'r+'); - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => $r], - ]); - $body = $response['body']; - $this->assertEquals('php://temp', stream_get_meta_data($body)['uri']); - $this->assertEquals('hi', fread($body, 2)); - $this->assertEquals(' there', stream_get_contents($r)); - fclose($r); - } - - public function testDrainsResponseIntoSaveToBodyAtPath() - { - $tmpfname = tempnam('/tmp', 'save_to_path'); - $this->queueRes(); - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => ['save_to' => $tmpfname], - ]); - $body = $response['body']; - $this->assertInstanceOf('GuzzleHttp\Stream\StreamInterface', $body); - $this->assertEquals($tmpfname, $body->getMetadata('uri')); - $this->assertEquals('hi', $body->read(2)); - $body->close(); - unlink($tmpfname); - } - - public function testAutomaticallyDecompressGzip() - { - Server::flush(); - $content = gzencode('test'); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Content-Encoding' => ['gzip'], - 'Content-Length' => [strlen($content)], - ], - 'body' => $content, - ], - ]); - - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/', - 'client' => ['decode_content' => true], - ]); - $this->assertEquals('test', Core::body($response)); - } - - public function testDoesNotForceGzipDecode() - { - Server::flush(); - $content = gzencode('test'); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Content-Encoding' => ['gzip'], - 'Content-Length' => [strlen($content)], - ], - 'body' => $content, - ], - ]); - - $handler = new StreamHandler(); - $response = $handler([ - 'http_method' => 'GET', - 'headers' => ['host' => [Server::$host]], - 'uri' => '/', - 'client' => ['stream' => true, 'decode_content' => false], - ]); - $this->assertSame($content, Core::body($response)); - } - - public function testProtocolVersion() - { - $this->queueRes(); - $handler = new StreamHandler(); - $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'version' => 1.0, - ]); - - $this->assertEquals(1.0, Server::received()[0]['version']); - } - - protected function getSendResult(array $opts) - { - $this->queueRes(); - $handler = new StreamHandler(); - $opts['stream'] = true; - return $handler([ - 'http_method' => 'GET', - 'uri' => '/', - 'headers' => ['host' => [Server::$host]], - 'client' => $opts, - ]); - } - - public function testAddsProxy() - { - $res = $this->getSendResult(['stream' => true, 'proxy' => '127.0.0.1:8125']); - $opts = stream_context_get_options($res['body']); - $this->assertEquals('127.0.0.1:8125', $opts['http']['proxy']); - } - - public function testAddsTimeout() - { - $res = $this->getSendResult(['stream' => true, 'timeout' => 200]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals(200, $opts['http']['timeout']); - } - - public function testVerifiesVerifyIsValidIfPath() - { - $res = $this->getSendResult(['verify' => '/does/not/exist']); - $this->assertContains( - 'SSL CA bundle not found: /does/not/exist', - (string) $res['error'] - ); - } - - public function testVerifyCanBeDisabled() - { - $res = $this->getSendResult(['verify' => false]); - $this->assertArrayNotHasKey('error', $res); - } - - public function testVerifiesCertIfValidPath() - { - $res = $this->getSendResult(['cert' => '/does/not/exist']); - $this->assertContains( - 'SSL certificate not found: /does/not/exist', - (string) $res['error'] - ); - } - - public function testVerifyCanBeSetToPath() - { - $path = $path = ClientUtils::getDefaultCaBundle(); - $res = $this->getSendResult(['verify' => $path]); - $this->assertArrayNotHasKey('error', $res); - $opts = stream_context_get_options($res['body']); - $this->assertEquals(true, $opts['ssl']['verify_peer']); - $this->assertEquals($path, $opts['ssl']['cafile']); - $this->assertTrue(file_exists($opts['ssl']['cafile'])); - } - - public function testUsesSystemDefaultBundle() - { - $path = $path = ClientUtils::getDefaultCaBundle(); - $res = $this->getSendResult(['verify' => true]); - $this->assertArrayNotHasKey('error', $res); - $opts = stream_context_get_options($res['body']); - if (PHP_VERSION_ID < 50600) { - $this->assertEquals($path, $opts['ssl']['cafile']); - } - } - - public function testEnsuresVerifyOptionIsValid() - { - $res = $this->getSendResult(['verify' => 10]); - $this->assertContains( - 'Invalid verify request option', - (string) $res['error'] - ); - } - - public function testCanSetPasswordWhenSettingCert() - { - $path = __FILE__; - $res = $this->getSendResult(['cert' => [$path, 'foo']]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals($path, $opts['ssl']['local_cert']); - $this->assertEquals('foo', $opts['ssl']['passphrase']); - } - - public function testDebugAttributeWritesToStream() - { - $this->queueRes(); - $f = fopen('php://temp', 'w+'); - $this->getSendResult(['debug' => $f]); - fseek($f, 0); - $contents = stream_get_contents($f); - $this->assertContains(' [CONNECT]', $contents); - $this->assertContains(' [FILE_SIZE_IS]', $contents); - $this->assertContains(' [PROGRESS]', $contents); - } - - public function testDebugAttributeWritesStreamInfoToBuffer() - { - $called = false; - $this->queueRes(); - $buffer = fopen('php://temp', 'r+'); - $this->getSendResult([ - 'progress' => function () use (&$called) { $called = true; }, - 'debug' => $buffer, - ]); - fseek($buffer, 0); - $contents = stream_get_contents($buffer); - $this->assertContains(' [CONNECT]', $contents); - $this->assertContains(' [FILE_SIZE_IS] message: "Content-Length: 8"', $contents); - $this->assertContains(' [PROGRESS] bytes_max: "8"', $contents); - $this->assertTrue($called); - } - - public function testEmitsProgressInformation() - { - $called = []; - $this->queueRes(); - $this->getSendResult([ - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ]); - $this->assertNotEmpty($called); - $this->assertEquals(8, $called[0][0]); - $this->assertEquals(0, $called[0][1]); - } - - public function testEmitsProgressInformationAndDebugInformation() - { - $called = []; - $this->queueRes(); - $buffer = fopen('php://memory', 'w+'); - $this->getSendResult([ - 'debug' => $buffer, - 'progress' => function () use (&$called) { - $called[] = func_get_args(); - }, - ]); - $this->assertNotEmpty($called); - $this->assertEquals(8, $called[0][0]); - $this->assertEquals(0, $called[0][1]); - rewind($buffer); - $this->assertNotEmpty(stream_get_contents($buffer)); - fclose($buffer); - } - - public function testAddsProxyByProtocol() - { - $url = str_replace('http', 'tcp', Server::$url); - $res = $this->getSendResult(['proxy' => ['http' => $url]]); - $opts = stream_context_get_options($res['body']); - $this->assertEquals($url, $opts['http']['proxy']); - } - - public function testPerformsShallowMergeOfCustomContextOptions() - { - $res = $this->getSendResult([ - 'stream_context' => [ - 'http' => [ - 'request_fulluri' => true, - 'method' => 'HEAD', - ], - 'socket' => [ - 'bindto' => '127.0.0.1:0', - ], - 'ssl' => [ - 'verify_peer' => false, - ], - ], - ]); - - $opts = stream_context_get_options($res['body']); - $this->assertEquals('HEAD', $opts['http']['method']); - $this->assertTrue($opts['http']['request_fulluri']); - $this->assertFalse($opts['ssl']['verify_peer']); - $this->assertEquals('127.0.0.1:0', $opts['socket']['bindto']); - } - - public function testEnsuresThatStreamContextIsAnArray() - { - $res = $this->getSendResult(['stream_context' => 'foo']); - $this->assertContains( - 'stream_context must be an array', - (string) $res['error'] - ); - } - - public function testDoesNotAddContentTypeByDefault() - { - $this->queueRes(); - $handler = new StreamHandler(); - $handler([ - 'http_method' => 'PUT', - 'uri' => '/', - 'headers' => ['host' => [Server::$host], 'content-length' => [3]], - 'body' => 'foo', - ]); - $req = Server::received()[0]; - $this->assertEquals('', Core::header($req, 'Content-Type')); - $this->assertEquals(3, Core::header($req, 'Content-Length')); - } - - private function queueRes() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => 200, - 'reason' => 'OK', - 'headers' => [ - 'Foo' => ['Bar'], - 'Content-Length' => [8], - ], - 'body' => 'hi there', - ], - ]); - } - - public function testSupports100Continue() - { - Server::flush(); - Server::enqueue([ - [ - 'status' => '200', - 'reason' => 'OK', - 'headers' => [ - 'Test' => ['Hello'], - 'Content-Length' => ['4'], - ], - 'body' => 'test', - ], - ]); - - $request = [ - 'http_method' => 'PUT', - 'headers' => [ - 'Host' => [Server::$host], - 'Expect' => ['100-Continue'], - ], - 'body' => 'test', - ]; - - $handler = new StreamHandler(); - $response = $handler($request); - $this->assertEquals(200, $response['status']); - $this->assertEquals('OK', $response['reason']); - $this->assertEquals(['Hello'], $response['headers']['Test']); - $this->assertEquals(['4'], $response['headers']['Content-Length']); - $this->assertEquals('test', Core::body($response)); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/server.js b/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/server.js deleted file mode 100644 index 6a03e33ab..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Client/server.js +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Guzzle node.js test server to return queued responses to HTTP requests and - * expose a RESTful API for enqueueing responses and retrieving the requests - * that have been received. - * - * - Delete all requests that have been received: - * > DELETE /guzzle-server/requests - * > Host: 127.0.0.1:8125 - * - * - Enqueue responses - * > PUT /guzzle-server/responses - * > Host: 127.0.0.1:8125 - * > - * > [{'status': 200, 'reason': 'OK', 'headers': {}, 'body': '' }] - * - * - Get the received requests - * > GET /guzzle-server/requests - * > Host: 127.0.0.1:8125 - * - * < HTTP/1.1 200 OK - * < - * < [{'http_method': 'GET', 'uri': '/', 'headers': {}, 'body': 'string'}] - * - * - Attempt access to the secure area - * > GET /secure/by-digest/qop-auth/guzzle-server/requests - * > Host: 127.0.0.1:8125 - * - * < HTTP/1.1 401 Unauthorized - * < WWW-Authenticate: Digest realm="Digest Test", qop="auth", nonce="0796e98e1aeef43141fab2a66bf4521a", algorithm="MD5", stale="false" - * < - * < 401 Unauthorized - * - * - Shutdown the server - * > DELETE /guzzle-server - * > Host: 127.0.0.1:8125 - * - * @package Guzzle PHP - * @license See the LICENSE file that was distributed with this source code. - */ - -var http = require('http'); -var url = require('url'); - -/** - * Guzzle node.js server - * @class - */ -var GuzzleServer = function(port, log) { - - this.port = port; - this.log = log; - this.responses = []; - this.requests = []; - var that = this; - - var md5 = function(input) { - var crypto = require('crypto'); - var hasher = crypto.createHash('md5'); - hasher.update(input); - return hasher.digest('hex'); - } - - /** - * Node.js HTTP server authentication module. - * - * It is only initialized on demand (by loadAuthentifier). This avoids - * requiring the dependency to http-auth on standard operations, and the - * performance hit at startup. - */ - var auth; - - /** - * Provides authentication handlers (Basic, Digest). - */ - var loadAuthentifier = function(type, options) { - var typeId = type; - if (type == 'digest') { - typeId += '.'+(options && options.qop ? options.qop : 'none'); - } - if (!loadAuthentifier[typeId]) { - if (!auth) { - try { - auth = require('http-auth'); - } catch (e) { - if (e.code == 'MODULE_NOT_FOUND') { - return; - } - } - } - switch (type) { - case 'digest': - var digestParams = { - realm: 'Digest Test', - login: 'me', - password: 'test' - }; - if (options && options.qop) { - digestParams.qop = options.qop; - } - loadAuthentifier[typeId] = auth.digest(digestParams, function(username, callback) { - callback(md5(digestParams.login + ':' + digestParams.realm + ':' + digestParams.password)); - }); - break - } - } - return loadAuthentifier[typeId]; - }; - - var firewallRequest = function(request, req, res, requestHandlerCallback) { - var securedAreaUriParts = request.uri.match(/^\/secure\/by-(digest)(\/qop-([^\/]*))?(\/.*)$/); - if (securedAreaUriParts) { - var authentifier = loadAuthentifier(securedAreaUriParts[1], { qop: securedAreaUriParts[2] }); - if (!authentifier) { - res.writeHead(501, 'HTTP authentication not implemented', { 'Content-Length': 0 }); - res.end(); - return; - } - authentifier.check(req, res, function(req, res) { - req.url = securedAreaUriParts[4]; - requestHandlerCallback(request, req, res); - }); - } else { - requestHandlerCallback(request, req, res); - } - }; - - var controlRequest = function(request, req, res) { - if (req.url == '/guzzle-server/perf') { - res.writeHead(200, 'OK', {'Content-Length': 16}); - res.end('Body of response'); - } else if (req.method == 'DELETE') { - if (req.url == '/guzzle-server/requests') { - // Clear the received requests - that.requests = []; - res.writeHead(200, 'OK', { 'Content-Length': 0 }); - res.end(); - if (that.log) { - console.log('Flushing requests'); - } - } else if (req.url == '/guzzle-server') { - // Shutdown the server - res.writeHead(200, 'OK', { 'Content-Length': 0, 'Connection': 'close' }); - res.end(); - if (that.log) { - console.log('Shutting down'); - } - that.server.close(); - } - } else if (req.method == 'GET') { - if (req.url === '/guzzle-server/requests') { - if (that.log) { - console.log('Sending received requests'); - } - // Get received requests - var body = JSON.stringify(that.requests); - res.writeHead(200, 'OK', { 'Content-Length': body.length }); - res.end(body); - } - } else if (req.method == 'PUT' && req.url == '/guzzle-server/responses') { - if (that.log) { - console.log('Adding responses...'); - } - if (!request.body) { - if (that.log) { - console.log('No response data was provided'); - } - res.writeHead(400, 'NO RESPONSES IN REQUEST', { 'Content-Length': 0 }); - } else { - that.responses = eval('(' + request.body + ')'); - for (var i = 0; i < that.responses.length; i++) { - if (that.responses[i].body) { - that.responses[i].body = new Buffer(that.responses[i].body, 'base64'); - } - } - if (that.log) { - console.log(that.responses); - } - res.writeHead(200, 'OK', { 'Content-Length': 0 }); - } - res.end(); - } - }; - - var receivedRequest = function(request, req, res) { - if (req.url.indexOf('/guzzle-server') === 0) { - controlRequest(request, req, res); - } else if (req.url.indexOf('/guzzle-server') == -1 && !that.responses.length) { - res.writeHead(500); - res.end('No responses in queue'); - } else { - if (that.log) { - console.log('Returning response from queue and adding request'); - } - that.requests.push(request); - var response = that.responses.shift(); - res.writeHead(response.status, response.reason, response.headers); - res.end(response.body); - } - }; - - this.start = function() { - - that.server = http.createServer(function(req, res) { - - var parts = url.parse(req.url, false); - var request = { - http_method: req.method, - scheme: parts.scheme, - uri: parts.pathname, - query_string: parts.query, - headers: req.headers, - version: req.httpVersion, - body: '' - }; - - // Receive each chunk of the request body - req.addListener('data', function(chunk) { - request.body += chunk; - }); - - // Called when the request completes - req.addListener('end', function() { - firewallRequest(request, req, res, receivedRequest); - }); - }); - - that.server.listen(this.port, '127.0.0.1'); - - if (this.log) { - console.log('Server running at http://127.0.0.1:8125/'); - } - }; -}; - -// Get the port from the arguments -port = process.argv.length >= 3 ? process.argv[2] : 8125; -log = process.argv.length >= 4 ? process.argv[3] : false; - -// Start the server -server = new GuzzleServer(port, log); -server.start(); diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/CoreTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/CoreTest.php deleted file mode 100644 index 49522f26b..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/CoreTest.php +++ /dev/null @@ -1,336 +0,0 @@ -assertNull(Core::header([], 'Foo')); - $this->assertNull(Core::firstHeader([], 'Foo')); - } - - public function testChecksIfHasHeader() - { - $message = [ - 'headers' => [ - 'Foo' => ['Bar', 'Baz'], - 'foo' => ['hello'], - 'bar' => ['1'] - ] - ]; - $this->assertTrue(Core::hasHeader($message, 'Foo')); - $this->assertTrue(Core::hasHeader($message, 'foo')); - $this->assertTrue(Core::hasHeader($message, 'FoO')); - $this->assertTrue(Core::hasHeader($message, 'bar')); - $this->assertFalse(Core::hasHeader($message, 'barr')); - } - - public function testReturnsFirstHeaderWhenSimple() - { - $this->assertEquals('Bar', Core::firstHeader([ - 'headers' => ['Foo' => ['Bar', 'Baz']], - ], 'Foo')); - } - - public function testReturnsFirstHeaderWhenMultiplePerLine() - { - $this->assertEquals('Bar', Core::firstHeader([ - 'headers' => ['Foo' => ['Bar, Baz']], - ], 'Foo')); - } - - public function testExtractsCaseInsensitiveHeader() - { - $this->assertEquals( - 'hello', - Core::header(['headers' => ['foo' => ['hello']]], 'FoO') - ); - } - - public function testExtractsCaseInsensitiveHeaderLines() - { - $this->assertEquals( - ['a', 'b', 'c', 'd'], - Core::headerLines([ - 'headers' => [ - 'foo' => ['a', 'b'], - 'Foo' => ['c', 'd'] - ] - ], 'foo') - ); - } - - public function testExtractsHeaderLines() - { - $this->assertEquals( - ['bar', 'baz'], - Core::headerLines([ - 'headers' => [ - 'Foo' => ['bar', 'baz'], - ], - ], 'Foo') - ); - } - - public function testExtractsHeaderAsString() - { - $this->assertEquals( - 'bar, baz', - Core::header([ - 'headers' => [ - 'Foo' => ['bar', 'baz'], - ], - ], 'Foo', true) - ); - } - - public function testReturnsNullWhenHeaderNotFound() - { - $this->assertNull(Core::header(['headers' => []], 'Foo')); - } - - public function testRemovesHeaders() - { - $message = [ - 'headers' => [ - 'foo' => ['bar'], - 'Foo' => ['bam'], - 'baz' => ['123'], - ], - ]; - - $this->assertSame($message, Core::removeHeader($message, 'bam')); - $this->assertEquals([ - 'headers' => ['baz' => ['123']], - ], Core::removeHeader($message, 'foo')); - } - - public function testCreatesUrl() - { - $req = [ - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'uri' => '/', - ]; - - $this->assertEquals('http://foo.com/', Core::url($req)); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage No Host header was provided - */ - public function testEnsuresHostIsAvailableWhenCreatingUrls() - { - Core::url([]); - } - - public function testCreatesUrlWithQueryString() - { - $req = [ - 'scheme' => 'http', - 'headers' => ['host' => ['foo.com']], - 'uri' => '/', - 'query_string' => 'foo=baz', - ]; - - $this->assertEquals('http://foo.com/?foo=baz', Core::url($req)); - } - - public function testUsesUrlIfSet() - { - $req = ['url' => 'http://foo.com']; - $this->assertEquals('http://foo.com', Core::url($req)); - } - - public function testReturnsNullWhenNoBody() - { - $this->assertNull(Core::body([])); - } - - public function testReturnsStreamAsString() - { - $this->assertEquals( - 'foo', - Core::body(['body' => Stream::factory('foo')]) - ); - } - - public function testReturnsString() - { - $this->assertEquals('foo', Core::body(['body' => 'foo'])); - } - - public function testReturnsResourceContent() - { - $r = fopen('php://memory', 'w+'); - fwrite($r, 'foo'); - rewind($r); - $this->assertEquals('foo', Core::body(['body' => $r])); - fclose($r); - } - - public function testReturnsIteratorContent() - { - $a = new \ArrayIterator(['a', 'b', 'cd', '']); - $this->assertEquals('abcd', Core::body(['body' => $a])); - } - - public function testReturnsObjectToString() - { - $this->assertEquals('foo', Core::body(['body' => new StrClass])); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testEnsuresBodyIsValid() - { - Core::body(['body' => false]); - } - - public function testParsesHeadersFromLines() - { - $lines = ['Foo: bar', 'Foo: baz', 'Abc: 123', 'Def: a, b']; - $this->assertEquals([ - 'Foo' => ['bar', 'baz'], - 'Abc' => ['123'], - 'Def' => ['a, b'], - ], Core::headersFromLines($lines)); - } - - public function testParsesHeadersFromLinesWithMultipleLines() - { - $lines = ['Foo: bar', 'Foo: baz', 'Foo: 123']; - $this->assertEquals([ - 'Foo' => ['bar', 'baz', '123'], - ], Core::headersFromLines($lines)); - } - - public function testCreatesArrayCallFunctions() - { - $called = []; - $a = function ($a, $b) use (&$called) { - $called['a'] = func_get_args(); - }; - $b = function ($a, $b) use (&$called) { - $called['b'] = func_get_args(); - }; - $c = Core::callArray([$a, $b]); - $c(1, 2); - $this->assertEquals([1, 2], $called['a']); - $this->assertEquals([1, 2], $called['b']); - } - - public function testRewindsGuzzleStreams() - { - $str = Stream::factory('foo'); - $this->assertTrue(Core::rewindBody(['body' => $str])); - } - - public function testRewindsStreams() - { - $str = Stream::factory('foo')->detach(); - $this->assertTrue(Core::rewindBody(['body' => $str])); - } - - public function testRewindsIterators() - { - $iter = new \ArrayIterator(['foo']); - $this->assertTrue(Core::rewindBody(['body' => $iter])); - } - - public function testRewindsStrings() - { - $this->assertTrue(Core::rewindBody(['body' => 'hi'])); - } - - public function testRewindsToStrings() - { - $this->assertTrue(Core::rewindBody(['body' => new StrClass()])); - } - - public function typeProvider() - { - return [ - ['foo', 'string(3) "foo"'], - [true, 'bool(true)'], - [false, 'bool(false)'], - [10, 'int(10)'], - [1.0, 'float(1)'], - [new StrClass(), 'object(GuzzleHttp\Tests\Ring\StrClass)'], - [['foo'], 'array(1)'] - ]; - } - - /** - * @dataProvider typeProvider - */ - public function testDescribesType($input, $output) - { - $this->assertEquals($output, Core::describeType($input)); - } - - public function testDoesSleep() - { - $t = microtime(true); - $expected = $t + (100 / 1000); - Core::doSleep(['client' => ['delay' => 100]]); - $this->assertGreaterThanOrEqual($expected, microtime(true)); - } - - public function testProxiesFuture() - { - $f = new CompletedFutureArray(['status' => 200]); - $res = null; - $proxied = Core::proxy($f, function ($value) use (&$res) { - $value['foo'] = 'bar'; - $res = $value; - return $value; - }); - $this->assertNotSame($f, $proxied); - $this->assertEquals(200, $f->wait()['status']); - $this->assertArrayNotHasKey('foo', $f->wait()); - $this->assertEquals('bar', $proxied->wait()['foo']); - $this->assertEquals(200, $proxied->wait()['status']); - } - - public function testProxiesDeferredFuture() - { - $d = new Deferred(); - $f = new FutureArray($d->promise()); - $f2 = Core::proxy($f); - $d->resolve(['foo' => 'bar']); - $this->assertEquals('bar', $f['foo']); - $this->assertEquals('bar', $f2['foo']); - } - - public function testProxiesDeferredFutureFailure() - { - $d = new Deferred(); - $f = new FutureArray($d->promise()); - $f2 = Core::proxy($f); - $d->reject(new \Exception('foo')); - try { - $f2['hello?']; - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertEquals('foo', $e->getMessage()); - } - - } -} - -final class StrClass -{ - public function __toString() - { - return 'foo'; - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php deleted file mode 100644 index 82d7efbf5..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureArrayTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'bar']); - $this->assertEquals('bar', $f['foo']); - $this->assertFalse(isset($f['baz'])); - $f['abc'] = '123'; - $this->assertTrue(isset($f['abc'])); - $this->assertEquals(['foo' => 'bar', 'abc' => '123'], iterator_to_array($f)); - $this->assertEquals(2, count($f)); - unset($f['abc']); - $this->assertEquals(1, count($f)); - $this->assertEquals(['foo' => 'bar'], iterator_to_array($f)); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php deleted file mode 100644 index 6ded40dfb..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/CompletedFutureValueTest.php +++ /dev/null @@ -1,46 +0,0 @@ -assertEquals('hi', $f->wait()); - $f->cancel(); - - $a = null; - $f->then(function ($v) use (&$a) { - $a = $v; - }); - $this->assertSame('hi', $a); - } - - public function testThrows() - { - $ex = new \Exception('foo'); - $f = new CompletedFutureValue(null, $ex); - $f->cancel(); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertSame($e, $ex); - } - } - - public function testMarksAsCancelled() - { - $ex = new CancelledFutureAccessException(); - $f = new CompletedFutureValue(null, $ex); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (\Exception $e) { - $this->assertSame($e, $ex); - } - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php deleted file mode 100644 index 0e09f5afa..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureArrayTest.php +++ /dev/null @@ -1,56 +0,0 @@ -promise(), - function () use (&$c, $deferred) { - $c = true; - $deferred->resolve(['status' => 200]); - } - ); - $this->assertFalse($c); - $this->assertFalse($this->readAttribute($f, 'isRealized')); - $this->assertEquals(200, $f['status']); - $this->assertTrue($c); - } - - public function testActsLikeArray() - { - $deferred = new Deferred(); - $f = new FutureArray( - $deferred->promise(), - function () use (&$c, $deferred) { - $deferred->resolve(['status' => 200]); - } - ); - - $this->assertTrue(isset($f['status'])); - $this->assertEquals(200, $f['status']); - $this->assertEquals(['status' => 200], $f->wait()); - $this->assertEquals(1, count($f)); - $f['baz'] = 10; - $this->assertEquals(10, $f['baz']); - unset($f['baz']); - $this->assertFalse(isset($f['baz'])); - $this->assertEquals(['status' => 200], iterator_to_array($f)); - } - - /** - * @expectedException \RuntimeException - */ - public function testThrowsWhenAccessingInvalidProperty() - { - $deferred = new Deferred(); - $f = new FutureArray($deferred->promise(), function () {}); - $f->foo; - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php deleted file mode 100644 index d59c543d0..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php +++ /dev/null @@ -1,109 +0,0 @@ -promise(), - function () use ($deferred, &$called) { - $called++; - $deferred->resolve('foo'); - } - ); - - $this->assertEquals('foo', $f->wait()); - $this->assertEquals(1, $called); - $this->assertEquals('foo', $f->wait()); - $this->assertEquals(1, $called); - $f->cancel(); - $this->assertTrue($this->readAttribute($f, 'isRealized')); - } - - /** - * @expectedException \GuzzleHttp\Ring\Exception\CancelledFutureAccessException - */ - public function testThrowsWhenAccessingCancelled() - { - $f = new FutureValue( - (new Deferred())->promise(), - function () {}, - function () { return true; } - ); - $f->cancel(); - $f->wait(); - } - - /** - * @expectedException \OutOfBoundsException - */ - public function testThrowsWhenDerefFailure() - { - $called = false; - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use(&$called) { - $called = true; - } - ); - $deferred->reject(new \OutOfBoundsException()); - $f->wait(); - $this->assertFalse($called); - } - - /** - * @expectedException \GuzzleHttp\Ring\Exception\RingException - * @expectedExceptionMessage Waiting did not resolve future - */ - public function testThrowsWhenDerefDoesNotResolve() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use(&$called) { - $called = true; - } - ); - $f->wait(); - } - - public function testThrowingCancelledFutureAccessExceptionCancels() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () use ($deferred) { - throw new CancelledFutureAccessException(); - } - ); - try { - $f->wait(); - $this->fail('did not throw'); - } catch (CancelledFutureAccessException $e) {} - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage foo - */ - public function testThrowingExceptionInDerefMarksAsFailed() - { - $deferred = new Deferred(); - $f = new FutureValue( - $deferred->promise(), - function () { - throw new \Exception('foo'); - } - ); - $f->wait(); - } -} diff --git a/openml_OS/vendor/guzzlehttp/ringphp/tests/bootstrap.php b/openml_OS/vendor/guzzlehttp/ringphp/tests/bootstrap.php deleted file mode 100644 index 017610fe0..000000000 --- a/openml_OS/vendor/guzzlehttp/ringphp/tests/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ - - - - - tests - - - - - src - - src/functions.php - - - - diff --git a/openml_OS/vendor/mikey179/vfsstream/.github/workflows/runTests.yml b/openml_OS/vendor/mikey179/vfsstream/.github/workflows/runTests.yml new file mode 100644 index 000000000..a833ef505 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/.github/workflows/runTests.yml @@ -0,0 +1,75 @@ +name: Tests + +on: + push: + branches: + - v1.6 + pull_request: + branches: + - v1.6 + +jobs: + tests: + name: PHP ${{ matrix.php-versions }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + php-versions: + - '5.3' + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - '7.1' + - '7.2' + - '7.3' + - '7.4' + - '8.0' + - '8.1' + - '8.2' + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up PHP ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring + coverage: pcov + + - name: Setup Problem Matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Setup Problem Matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies for PHP < 8.0 + if: matrix.php-versions != '8.0' && matrix.php-versions != '8.1' && matrix.php-versions != '8.2' + run: composer install --prefer-dist --no-progress + + - name: Install PHPUnit 8 for PHP 8 + if: matrix.php-versions == '8.0' || matrix.php-versions == '8.1' || matrix.php-versions == '8.2' + run: | + composer require --dev phpunit/phpunit:8.5.17 --ignore-platform-reqs + git apply --reject --whitespace=fix src/test/patches/php8-return-types.diff + + - name: Run test suite + run: composer run-script test -- --coverage-text diff --git a/openml_OS/vendor/mikey179/vfsstream/CHANGELOG.md b/openml_OS/vendor/mikey179/vfsstream/CHANGELOG.md new file mode 100644 index 000000000..b4ba58fe6 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/CHANGELOG.md @@ -0,0 +1,270 @@ +1.6.?? (2022-??-??) +------------------- + + * Add support for PHP 8.2's `$content` property in `vfsStreamWrapper` + +1.6.10 (2021-09-25) +------------------- + + * Fix more deprecation warnings for PHP 8.1 support affecting the following: + - `vfsStreamContainerIterator::current()` + - `vfsStreamContainerIterator::next()` + - `vfsStreamContainerIterator::key()` + - `vfsStreamContainerIterator::rewind()` + - `vfsStreamDirectory::getIterator()` + - `vfsStreamPrintVisitor::printContent()` + * Fix PHP 8.1 support in `vfsStreamPrintVisitor` + +1.6.9 (2021-07-16) +------------------ + + * Fix deprecation warning on `StringBasedFileContent` for PHP 8.1 (#252) + * Fix return type for `FileContent::write()` to fix static analysis tools + +1.6.8 (2019-10-30) +------------------ + + * Fix `StringBasedFileContent::doRead` to always return a string (#204) + +1.6.7 (2019-07-31) +------------------ + + * fix PHP 7.4 deprecation warnings (backported #189 from master) + +1.6.6 (2019-04-08) +------------------ + + * backported #174 from master, original PR provided by @localheinz + + +1.6.5 (2017-08-01) +------------------ + + * fixed #157 seeking before beginning of file should fail, reported and fixed by @merijnvdk + * structure array in `vfsStream::create()` and `vfsStream::setup()` now can contain instances of `org\bovigo\vfs\content\FileContent` and `org\bovigo\vfs\vfsStreamFile`, patch provivded by Joshua Smith (@jsmitty12) + + +1.6.4 (2016-07-18) +------------------ + + * fixed #134 type safe directory names, reported and fixed by Sebastian Hopfe + + +1.6.3 (2016-04-09) +------------------ + + * fixed #131 recursive mkdir() fails if the last dirname is '0' + + +1.6.2 (2016-01-13) +------------------ + + * fixed #128 duplicate "valid" files/directories and incorrect file names + + +1.6.1 (2015-12-04) +------------------ + + * `vfsStream::url()` didn't urlencode single path parts while `vfsStream::path()` did urldecode them + * fixed #120, #122: create directory with trailing slash results in "Uninitialized string offset: 0" + + +1.6.0 (2015-10-06) +------------------ + + * added `vfsStreamWrapper::unregister()`, provided by @malkusch with #114 + * fixed #115: incorrect handling of `..` in root directory on PHP 5.5, fix provided by @acoulton with #116 + + +1.5.0 (2015-03-29) +------------------ + + * implemented #91: `vfsStream::copyFromFileSystem()` should create large file instances + * implemented #92: `vfsStream::copyFromFileSystem()` should respect block devices + * fixed #107: `touch()` does not respect file permissions + * fixed #105: vfs directory structure is not reset after each test + * fixed #104: vfsStream can't handle url encoded pathes + + +1.4.0 (2014-09-14) +------------------ + + * implemented #85: Added support for emulating block devices in the virtual filesystem, feature provided by Harris Borawski + * fixed #68: Unlink a non-existing file now triggers a PHP warning + + +1.3.0 (2014-07-21) +------------------ + + * implemented #79: possibility to mock large files without large memory footprint, see https://github.com/mikey179/vfsStream/wiki/MockingLargeFiles + * implemented #67: added partial support for text-mode translation flag (i.e., no actual translation of line endings takes place) so it no longer throws an exception (provided by Anthon Pang) + * fixed issue #74: issue with trailing windows path separators (provided by Sebastian Krüger) + * fixed issue #50: difference between real file system and vfs with `RecursiveDirectoryIterator` + * fixed issue #80: touch with no arguments for modification and access time behave incorrect + * deprecated `org\bovigo\vfs\vfsStreamFile::readUntilEnd()` + * deprecated `org\bovigo\vfs\vfsStreamFile::getBytesRead()` + + +1.2.0 (2013-04-01) +------------------ + + * implemented issue #34: provide `url()` method on all `vfsStreamContent` instances + * added `org\bovigo\vfs\vfsStreamContent::url()` + * added `org\bovigo\vfs\vfsStreamContent::path()` + * fixed issue #40: flock implementation doesn't work correctly, patch provided by Kamil Dziedzic + * fixed issue #49: call to member function on a non-object when trying to delete a file one above root where a file with same name in root exists + * fixed issue #51: `unlink()` must consider permissions of directory where file is inside, not of the file to unlink itself + * fixed issue #52: `chmod()`, `chown()` and `chgrp()` must consider permissions of directory where file/directory is inside + * fixed issue #53: `chmod()`, `chown()` and `chgrp()` must consider current user and current owner of file/directoy to change + + +1.1.0 (2012-08-25) +------------------ + + * implemented issue #11: add support for `streamWrapper::stream_metadata()` vfsStream now supports `touch()`, `chown()`, `chgrp()` and `chmod()` + * implemented issue #33: add support for `stream_truncate()` (provided by https://github.com/nikcorg) + * implemented issue #35: size limit (quota) for VFS + + +1.0.0 (2012-05-15) +------------------ + + * raised requirement for PHP version to 5.3.0 + * migrated codebase to use namespaces + * changed distribution from PEAR to Composer + * implemented issue #30: support "c" mode for `fopen()` + * fixed issue #31: prohibit aquiring locks when already locked / release lock on `fclose()` + * fixed issue #32: problems when subfolder has same name as folder + * fixed issue #36: `vfsStreamWrapper::stream_open()` should return false while trying to open existing non-writable file, patch provided by Alexander Peresypkin + + +0.11.2 (2012-01-14) +------------------- + + * fixed issue #29: set permissions properly when using `vfsStream::copyFromFileSystem()`, patch provided by predakanga + * fixed failing tests under PHP > 5.3.2 + + +0.11.1 (2011-12-04) +------------------- + + * fixed issue #28: `mkdir()` overwrites existing directories/files + + +0.11.0 (2011-11-29) +------------------- + + * implemented issue #20: `vfsStream::create()` removes old structure + * implemented issue #4: possibility to copy structure from existing file system + * fixed issue #23: `unlink()` should not remove any directory + * fixed issue #25: `vfsStreamDirectory::hasChild()` gives false positives for nested paths, patch provided by Andrew Coulton + * fixed issue #26: opening a file for reading only should not update its modification time, reported and initial patch provided by Ludovic Chabant + + +0.10.1 (2011-08-22) +------------------- + + * fixed issue #16: replace `vfsStreamContent` to `vfsStreamContainer` for autocompletion + * fixed issue #17: `vfsStream::create()` has issues with numeric directories, patch provided by mathieuk + + +0.10.0 (2011-07-22) +------------------- + + * added new method `vfsStreamContainer::hasChildren()` and `vfsStreamDirectory::hasChildren()` + * implemented issue #14: less verbose way to initialize vfsStream + * implemented issue #13: remove deprecated method `vfsStreamContent::setFilemtime()` + * implemented issue #6: locking meachanism for files + * ensured that `stream_set_blocking()`, `stream_set_timeout()` and `stream_set_write_buffer()` on vfsStream urls have the same behaviour with PHP 5.2 and 5.3 + * implemented issue #10: method to print directory structure + + +0.9.0 (2011-07-13) +------------------ + + * implemented feature request issue #7: add support for `fileatime()` and `filectime()` + * fixed issue #3: add support for `streamWrapper::stream_cast()` + * fixed issue #9: resolve path not called everywhere its needed + * deprecated `vfsStreamAbstractContent::setFilemtime()`, use `vfsStreamAbstractContent::lastModified()` instead, will be removed with 0.10.0 + + +0.8.0 (2010-10-08) +------------------ + + * implemented enhancement #6: use `vfsStream::umask()` to influence initial file mode for files and directories + * implemented enhancement #19: support of .. in the url, patch provided by Guislain Duthieuw + * fixed issue #18: `getChild()` returns NULL when child's name contains parent name + * fixed bug with incomplete error message when accessing non-existing files on root level + + +0.7.0 (2010-06-08) +------------------ + + * added new `vfsStream::setup()` method to simplify vfsStream usage + * fixed issue #15: `mkdir()` creates a subfolder in a folder without permissions + + +0.6.0 (2010-02-15) +------------------ + + * added support for `$mode` param when opening files, implements enhancement #7 and fixes issue #13 + * `vfsStreamWrapper::stream_open()` now evaluates `$options` for `STREAM_REPORT_ERRORS` + + +0.5.0 (2010-01-25) +------------------ + + * added support for `rename()`, patch provided by Benoit Aubuchon + * added support for . as directory alias so that `vfs://foo/.` resolves to `vfs://foo`, can be used as workaround for bug #8 + + +0.4.0 (2009-07-13) +------------------ + + * added support for file modes, users and groups (with restrictions, see http://code.google.com/p/bovigo/wiki/vfsStreamDocsKnownIssues) + * fixed bug #5: `vfsStreamDirectory::addChild()` does not replace child with same name + * fixed bug with `is_writable()` because of missing `stat()` fields, patch provided by Sergey Galkin + + +0.3.2 (2009-02-16) +------------------ + + * support trailing slashes on directories in vfsStream urls, patch provided by Gabriel Birke + * fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer + * enabled multiple iterations at the same time over the same directory + + +0.3.1 (2008-02-18) +------------------ + + * fixed path/directory separator issues under linux systems + * fixed uid/gid issues under linux systems + + +0.3.0 (2008-01-02) +------------------ + + * added support for `rmdir()` + * added `vfsStream::newDirectory()`, dropped `vfsStreamDirectory::ceate()` + * added new interface `vfsStreamContainer` + * added `vfsStreamContent::at()` which allows code like `$file = vfsStream::newFile('file.txt.')->withContent('foo')->at($otherDir);` + * added `vfsStreamContent::lastModified()`, made `vfsStreamContent::setFilemtime()` an alias for this + * moved from Stubbles development environment to bovigo + * refactorings to reduce crap index of various methods + + +0.2.0 (2007-12-29) +------------------ + + * moved `vfsStreamWrapper::PROTOCOL` to `vfsStream::SCHEME` + * added new `vfsStream::url()` method to assist in creating correct vfsStream urls + * added `vfsStream::path()` method as opposite to `vfsStream::url()` + * a call to `vfsStreamWrapper::register()` will now reset the root to null, implemented on request from David Zuelke + * added support for `is_readable()`, `is_dir()`, `is_file()` + * added `vfsStream::newFile()` to be able to do `$file = vfsStream::newFile("foo.txt")->withContent("bar");` + + +0.1.0 (2007-12-14) +------------------ + + * Initial release. diff --git a/openml_OS/vendor/mikey179/vfsstream/LICENSE b/openml_OS/vendor/mikey179/vfsstream/LICENSE new file mode 100644 index 000000000..1d41ab934 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2007-2015, Frank Kleine +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of Stubbles nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/openml_OS/vendor/mikey179/vfsstream/README.md b/openml_OS/vendor/mikey179/vfsstream/README.md new file mode 100644 index 000000000..a1b47ee66 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/README.md @@ -0,0 +1,8 @@ +You can find documentation in the [wiki](https://github.com/mikey179/vfsStream/wiki). + +Also you might want to check [vfsStream examples](https://github.com/mikey179/vfsStream-examples). + + +[![Build Status](https://secure.travis-ci.org/mikey179/vfsStream.png)](http://travis-ci.org/mikey179/vfsStream) [![Build Status Windows](https://ci.appveyor.com/api/projects/status/6whqgluyeggspjp1/branch/master?svg=true)](https://ci.appveyor.com/project/mikey179/vfsstream) [![Coverage Status](https://coveralls.io/repos/github/bovigo/vfsStream/badge.svg?branch=v1.x)](https://coveralls.io/github/bovigo/vfsStream?branch=v1.x) + +[![Latest Stable Version](https://poser.pugx.org/mikey179/vfsStream/version.png)](https://packagist.org/packages/mikey179/vfsStream) [![Latest Unstable Version](https://poser.pugx.org/mikey179/vfsStream/v/unstable.png)](//packagist.org/packages/mikey179/vfsStream) diff --git a/openml_OS/vendor/mikey179/vfsstream/composer.json b/openml_OS/vendor/mikey179/vfsstream/composer.json new file mode 100644 index 000000000..2f5b8a943 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/composer.json @@ -0,0 +1,36 @@ +{ + "name": "mikey179/vfsstream", + "type": "library", + "homepage": "http://vfs.bovigo.org/", + "description": "Virtual file system to mock the real file system in unit tests.", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "autoload": { + "psr-0": { "org\\bovigo\\vfs\\": "src/main/php" } + }, + "scripts": { + "test": "phpunit" + }, + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/phpunit.xml.dist b/openml_OS/vendor/mikey179/vfsstream/phpunit.xml.dist new file mode 100644 index 000000000..e48588e46 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/phpunit.xml.dist @@ -0,0 +1,44 @@ + + + + + ./src/test/phpt + ./src/test/php + + + + + + src/main/php + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/DotDirectory.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/DotDirectory.php new file mode 100644 index 000000000..edc975129 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/DotDirectory.php @@ -0,0 +1,36 @@ +amount = $amount; + } + + /** + * create with unlimited space + * + * @return Quota + */ + public static function unlimited() + { + return new self(self::UNLIMITED); + } + + /** + * checks if a quota is set + * + * @return bool + */ + public function isLimited() + { + return self::UNLIMITED < $this->amount; + } + + /** + * checks if given used space exceeda quota limit + * + * + * @param int $usedSpace + * @return int + */ + public function spaceLeft($usedSpace) + { + if (self::UNLIMITED === $this->amount) { + return $usedSpace; + } + + if ($usedSpace >= $this->amount) { + return 0; + } + + $spaceLeft = $this->amount - $usedSpace; + if (0 >= $spaceLeft) { + return 0; + } + + return $spaceLeft; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/FileContent.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/FileContent.php new file mode 100644 index 000000000..e62e30987 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/FileContent.php @@ -0,0 +1,71 @@ +size = $size; + } + + /** + * create large file with given size in kilobyte + * + * @param int $kilobyte + * @return LargeFileContent + */ + public static function withKilobytes($kilobyte) + { + return new self($kilobyte * 1024); + } + + /** + * create large file with given size in megabyte + * + * @param int $megabyte + * @return LargeFileContent + */ + public static function withMegabytes($megabyte) + { + return self::withKilobytes($megabyte * 1024); + } + + /** + * create large file with given size in gigabyte + * + * @param int $gigabyte + * @return LargeFileContent + */ + public static function withGigabytes($gigabyte) + { + return self::withMegabytes($gigabyte * 1024); + } + + /** + * returns actual content + * + * @return string + */ + public function content() + { + return $this->doRead(0, $this->size); + } + + /** + * returns size of content + * + * @return int + */ + public function size() + { + return $this->size; + } + + /** + * actual reading of given byte count starting at given offset + * + * @param int $offset + * @param int $count + */ + protected function doRead($offset, $count) + { + if (($offset + $count) > $this->size) { + $count = $this->size - $offset; + } + + $result = ''; + for ($i = 0; $i < $count; $i++) { + if (isset($this->content[$i + $offset])) { + $result .= $this->content[$i + $offset]; + } else { + $result .= ' '; + } + } + + return $result; + } + + /** + * actual writing of data with specified length at given offset + * + * @param string $data + * @param int $offset + * @param int $length + */ + protected function doWrite($data, $offset, $length) + { + for ($i = 0; $i < $length; $i++) { + $this->content[$i + $offset] = substr($data, $i, 1); + } + + if ($offset >= $this->size) { + $this->size += $length; + } elseif (($offset + $length) > $this->size) { + $this->size = $offset + $length; + } + } + + /** + * Truncates a file to a given length + * + * @param int $size length to truncate file to + * @return bool + */ + public function truncate($size) + { + $this->size = $size; + foreach (array_filter(array_keys($this->content), + function($pos) use ($size) + { + return $pos >= $size; + } + ) as $removePos) { + unset($this->content[$removePos]); + } + + return true; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php new file mode 100644 index 000000000..960284cf1 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php @@ -0,0 +1,134 @@ +doRead($this->offset, $count); + $this->offset += $count; + return $data; + } + + /** + * actual reading of given byte count starting at given offset + * + * @param int $offset + * @param int $count + */ + protected abstract function doRead($offset, $count); + + /** + * seeks to the given offset + * + * @param int $offset + * @param int $whence + * @return bool + */ + public function seek($offset, $whence) + { + $newOffset = $this->offset; + switch ($whence) { + case SEEK_CUR: + $newOffset += $offset; + break; + + case SEEK_END: + $newOffset = $this->size() + $offset; + break; + + case SEEK_SET: + $newOffset = $offset; + break; + + default: + return false; + } + + if ($newOffset<0) { + return false; + } + $this->offset = $newOffset; + return true; + } + + /** + * checks whether pointer is at end of file + * + * @return bool + */ + public function eof() + { + return $this->size() <= $this->offset; + } + + /** + * writes an amount of data + * + * @param string $data + * @return int amount of written bytes + */ + public function write($data) + { + $dataLength = strlen($data); + $this->doWrite($data, $this->offset, $dataLength); + $this->offset += $dataLength; + return $dataLength; + } + + /** + * actual writing of data with specified length at given offset + * + * @param string $data + * @param int $offset + * @param int $length + */ + protected abstract function doWrite($data, $offset, $length); + + /** + * for backwards compatibility with vfsStreamFile::bytesRead() + * + * @return int + * @deprecated + */ + public function bytesRead() + { + return $this->offset; + } + + /** + * for backwards compatibility with vfsStreamFile::readUntilEnd() + * + * @return string + * @deprecated + */ + public function readUntilEnd() + { + return substr($this->content(), $this->offset); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php new file mode 100644 index 000000000..77adf8e56 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php @@ -0,0 +1,97 @@ +content = $content; + } + + /** + * returns actual content + * + * @return string + */ + public function content() + { + return $this->content; + } + + /** + * returns size of content + * + * @return int + */ + public function size() + { + return strlen($this->content); + } + + /** + * actual reading of length starting at given offset + * + * @param int $offset + * @param int $count + */ + protected function doRead($offset, $count) + { + return (string) substr($this->content, $offset, $count); + } + + /** + * actual writing of data with specified length at given offset + * + * @param string $data + * @param int $offset + * @param int $length + */ + protected function doWrite($data, $offset, $length) + { + $this->content = substr($this->content, 0, $offset) + . $data + . substr($this->content, $offset + $length); + } + + /** + * Truncates a file to a given length + * + * @param int $size length to truncate file to + * @return bool + */ + public function truncate($size) + { + if ($size > $this->size()) { + // Pad with null-chars if we're "truncating up" + $this->content .= str_repeat("\0", $size - $this->size()); + } else { + $this->content = substr($this->content, 0, $size); + } + + return true; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php new file mode 100644 index 000000000..1eb382dfa --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php @@ -0,0 +1,479 @@ + + * array('Core' = array('AbstractFactory' => array('test.php' => 'some text content', + * 'other.php' => 'Some more text content', + * 'Invalid.csv' => 'Something else', + * ), + * 'AnEmptyFolder' => array(), + * 'badlocation.php' => 'some bad content', + * ) + * ) + * + * the resulting directory tree will look like this: + *
+     * root
+     * \- Core
+     *  |- badlocation.php
+     *  |- AbstractFactory
+     *  | |- test.php
+     *  | |- other.php
+     *  | \- Invalid.csv
+     *  \- AnEmptyFolder
+     * 
+ * Arrays will become directories with their key as directory name, and + * strings becomes files with their key as file name and their value as file + * content. + * + * @param string $rootDirName name of root directory + * @param int $permissions file permissions of root directory + * @param array $structure directory structure to add under root directory + * @return \org\bovigo\vfs\vfsStreamDirectory + * @since 0.7.0 + * @see https://github.com/mikey179/vfsStream/issues/14 + * @see https://github.com/mikey179/vfsStream/issues/20 + */ + public static function setup($rootDirName = 'root', $permissions = null, array $structure = array()) + { + vfsStreamWrapper::register(); + return self::create($structure, vfsStreamWrapper::setRoot(self::newDirectory($rootDirName, $permissions))); + } + + /** + * creates vfsStream directory structure from an array and adds it to given base dir + * + * Assumed $structure contains an array like this: + * + * array('Core' = array('AbstractFactory' => array('test.php' => 'some text content', + * 'other.php' => 'Some more text content', + * 'Invalid.csv' => 'Something else', + * ), + * 'AnEmptyFolder' => array(), + * 'badlocation.php' => 'some bad content', + * ) + * ) + * + * the resulting directory tree will look like this: + *
+     * baseDir
+     * \- Core
+     *  |- badlocation.php
+     *  |- AbstractFactory
+     *  | |- test.php
+     *  | |- other.php
+     *  | \- Invalid.csv
+     *  \- AnEmptyFolder
+     * 
+ * Arrays will become directories with their key as directory name, and + * strings becomes files with their key as file name and their value as file + * content. + * + * If no baseDir is given it will try to add the structure to the existing + * root directory without replacing existing childs except those with equal + * names. + * + * @param array $structure directory structure to add under root directory + * @param vfsStreamDirectory $baseDir base directory to add structure to + * @return vfsStreamDirectory + * @throws \InvalidArgumentException + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/14 + * @see https://github.com/mikey179/vfsStream/issues/20 + */ + public static function create(array $structure, vfsStreamDirectory $baseDir = null) + { + if (null === $baseDir) { + $baseDir = vfsStreamWrapper::getRoot(); + } + + if (null === $baseDir) { + throw new \InvalidArgumentException('No baseDir given and no root directory set.'); + } + + return self::addStructure($structure, $baseDir); + } + + /** + * helper method to create subdirectories recursively + * + * @param array $structure subdirectory structure to add + * @param vfsStreamDirectory $baseDir directory to add the structure to + * @return vfsStreamDirectory + */ + protected static function addStructure(array $structure, vfsStreamDirectory $baseDir) + { + foreach ($structure as $name => $data) { + $name = (string) $name; + if (is_array($data) === true) { + self::addStructure($data, self::newDirectory($name)->at($baseDir)); + } elseif (is_string($data) === true) { + $matches = null; + preg_match('/^\[(.*)\]$/', $name, $matches); + if ($matches !== array()) { + self::newBlock($matches[1])->withContent($data)->at($baseDir); + } else { + self::newFile($name)->withContent($data)->at($baseDir); + } + } elseif ($data instanceof FileContent) { + self::newFile($name)->withContent($data)->at($baseDir); + } elseif ($data instanceof vfsStreamFile) { + $baseDir->addChild($data); + } + } + + return $baseDir; + } + + /** + * copies the file system structure from given path into the base dir + * + * If no baseDir is given it will try to add the structure to the existing + * root directory without replacing existing childs except those with equal + * names. + * File permissions are copied as well. + * Please note that file contents will only be copied if their file size + * does not exceed the given $maxFileSize which defaults to 1024 KB. In case + * the file is larger file content will be mocked, see + * https://github.com/mikey179/vfsStream/wiki/MockingLargeFiles. + * + * @param string $path path to copy the structure from + * @param vfsStreamDirectory $baseDir directory to add the structure to + * @param int $maxFileSize maximum file size of files to copy content from + * @return vfsStreamDirectory + * @throws \InvalidArgumentException + * @since 0.11.0 + * @see https://github.com/mikey179/vfsStream/issues/4 + */ + public static function copyFromFileSystem($path, vfsStreamDirectory $baseDir = null, $maxFileSize = 1048576) + { + if (null === $baseDir) { + $baseDir = vfsStreamWrapper::getRoot(); + } + + if (null === $baseDir) { + throw new \InvalidArgumentException('No baseDir given and no root directory set.'); + } + + $dir = new \DirectoryIterator($path); + foreach ($dir as $fileinfo) { + switch (filetype($fileinfo->getPathname())) { + case 'file': + if ($fileinfo->getSize() <= $maxFileSize) { + $content = file_get_contents($fileinfo->getPathname()); + } else { + $content = new LargeFileContent($fileinfo->getSize()); + } + + self::newFile( + $fileinfo->getFilename(), + octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4)) + ) + ->withContent($content) + ->at($baseDir); + break; + + case 'dir': + if (!$fileinfo->isDot()) { + self::copyFromFileSystem( + $fileinfo->getPathname(), + self::newDirectory( + $fileinfo->getFilename(), + octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4)) + )->at($baseDir), + $maxFileSize + ); + } + + break; + + case 'block': + self::newBlock( + $fileinfo->getFilename(), + octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4)) + )->at($baseDir); + break; + } + } + + return $baseDir; + } + + /** + * returns a new file with given name + * + * @param string $name name of file to create + * @param int $permissions permissions of file to create + * @return vfsStreamFile + */ + public static function newFile($name, $permissions = null) + { + return new vfsStreamFile($name, $permissions); + } + + /** + * returns a new directory with given name + * + * If the name contains slashes, a new directory structure will be created. + * The returned directory will always be the parent directory of this + * directory structure. + * + * @param string $name name of directory to create + * @param int $permissions permissions of directory to create + * @return vfsStreamDirectory + */ + public static function newDirectory($name, $permissions = null) + { + if ('/' === substr($name, 0, 1)) { + $name = substr($name, 1); + } + + $firstSlash = strpos($name, '/'); + if (false === $firstSlash) { + return new vfsStreamDirectory($name, $permissions); + } + + $ownName = substr($name, 0, $firstSlash); + $subDirs = substr($name, $firstSlash + 1); + $directory = new vfsStreamDirectory($ownName, $permissions); + if (is_string($subDirs) && strlen($subDirs) > 0) { + self::newDirectory($subDirs, $permissions)->at($directory); + } + + return $directory; + } + + /** + * returns a new block with the given name + * + * @param string $name name of the block device + * @param int $permissions permissions of block to create + * @return vfsStreamBlock + */ + public static function newBlock($name, $permissions = null) + { + return new vfsStreamBlock($name, $permissions); + } + + /** + * returns current user + * + * If the system does not support posix_getuid() the current user will be root (0). + * + * @return int + */ + public static function getCurrentUser() + { + return function_exists('posix_getuid') ? posix_getuid() : self::OWNER_ROOT; + } + + /** + * returns current group + * + * If the system does not support posix_getgid() the current group will be root (0). + * + * @return int + */ + public static function getCurrentGroup() + { + return function_exists('posix_getgid') ? posix_getgid() : self::GROUP_ROOT; + } + + /** + * use visitor to inspect a content structure + * + * If the given content is null it will fall back to use the current root + * directory of the stream wrapper. + * + * Returns given visitor for method chaining comfort. + * + * @param vfsStreamVisitor $visitor the visitor who inspects + * @param vfsStreamContent $content directory structure to inspect + * @return vfsStreamVisitor + * @throws \InvalidArgumentException + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/10 + */ + public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null) + { + if (null !== $content) { + return $visitor->visit($content); + } + + $root = vfsStreamWrapper::getRoot(); + if (null === $root) { + throw new \InvalidArgumentException('No content given and no root directory set.'); + } + + return $visitor->visitDirectory($root); + } + + /** + * sets quota to given amount of bytes + * + * @param int $bytes + * @since 1.1.0 + */ + public static function setQuota($bytes) + { + vfsStreamWrapper::setQuota(new Quota($bytes)); + } + + /** + * checks if vfsStream lists dotfiles in directory listings + * + * @return bool + * @since 1.3.0 + */ + public static function useDotfiles() + { + return self::$dotFiles; + } + + /** + * disable dotfiles in directory listings + * + * @since 1.3.0 + */ + public static function disableDotfiles() + { + self::$dotFiles = false; + } + + /** + * enable dotfiles in directory listings + * + * @since 1.3.0 + */ + public static function enableDotfiles() + { + self::$dotFiles = true; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php new file mode 100644 index 000000000..7db2be28b --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php @@ -0,0 +1,418 @@ +name = "{$name}"; + $time = time(); + if (null === $permissions) { + $permissions = $this->getDefaultPermissions() & ~vfsStream::umask(); + } + + $this->lastAccessed = $time; + $this->lastAttributeModified = $time; + $this->lastModified = $time; + $this->permissions = $permissions; + $this->user = vfsStream::getCurrentUser(); + $this->group = vfsStream::getCurrentGroup(); + } + + /** + * returns default permissions for concrete implementation + * + * @return int + * @since 0.8.0 + */ + protected abstract function getDefaultPermissions(); + + /** + * returns the file name of the content + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * renames the content + * + * @param string $newName + */ + public function rename($newName) + { + $this->name = "{$newName}"; + } + + /** + * checks whether the container can be applied to given name + * + * @param string $name + * @return bool + */ + public function appliesTo($name) + { + if ($name === $this->name) { + return true; + } + + $segment_name = $this->name.'/'; + return (strncmp($segment_name, $name, strlen($segment_name)) == 0); + } + + /** + * returns the type of the container + * + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * sets the last modification time of the stream content + * + * @param int $filemtime + * @return $this + */ + public function lastModified($filemtime) + { + $this->lastModified = $filemtime; + return $this; + } + + /** + * returns the last modification time of the stream content + * + * @return int + */ + public function filemtime() + { + return $this->lastModified; + } + + /** + * sets last access time of the stream content + * + * @param int $fileatime + * @return $this + * @since 0.9 + */ + public function lastAccessed($fileatime) + { + $this->lastAccessed = $fileatime; + return $this; + } + + /** + * returns the last access time of the stream content + * + * @return int + * @since 0.9 + */ + public function fileatime() + { + return $this->lastAccessed; + } + + /** + * sets the last attribute modification time of the stream content + * + * @param int $filectime + * @return $this + * @since 0.9 + */ + public function lastAttributeModified($filectime) + { + $this->lastAttributeModified = $filectime; + return $this; + } + + /** + * returns the last attribute modification time of the stream content + * + * @return int + * @since 0.9 + */ + public function filectime() + { + return $this->lastAttributeModified; + } + + /** + * adds content to given container + * + * @param vfsStreamContainer $container + * @return $this + */ + public function at(vfsStreamContainer $container) + { + $container->addChild($this); + return $this; + } + + /** + * change file mode to given permissions + * + * @param int $permissions + * @return $this + */ + public function chmod($permissions) + { + $this->permissions = $permissions; + $this->lastAttributeModified = time(); + clearstatcache(); + return $this; + } + + /** + * returns permissions + * + * @return int + */ + public function getPermissions() + { + return $this->permissions; + } + + /** + * checks whether content is readable + * + * @param int $user id of user to check for + * @param int $group id of group to check for + * @return bool + */ + public function isReadable($user, $group) + { + if ($this->user === $user) { + $check = 0400; + } elseif ($this->group === $group) { + $check = 0040; + } else { + $check = 0004; + } + + return (bool) ($this->permissions & $check); + } + + /** + * checks whether content is writable + * + * @param int $user id of user to check for + * @param int $group id of group to check for + * @return bool + */ + public function isWritable($user, $group) + { + if ($this->user === $user) { + $check = 0200; + } elseif ($this->group === $group) { + $check = 0020; + } else { + $check = 0002; + } + + return (bool) ($this->permissions & $check); + } + + /** + * checks whether content is executable + * + * @param int $user id of user to check for + * @param int $group id of group to check for + * @return bool + */ + public function isExecutable($user, $group) + { + if ($this->user === $user) { + $check = 0100; + } elseif ($this->group === $group) { + $check = 0010; + } else { + $check = 0001; + } + + return (bool) ($this->permissions & $check); + } + + /** + * change owner of file to given user + * + * @param int $user + * @return $this + */ + public function chown($user) + { + $this->user = $user; + $this->lastAttributeModified = time(); + return $this; + } + + /** + * checks whether file is owned by given user + * + * @param int $user + * @return bool + */ + public function isOwnedByUser($user) + { + return $this->user === $user; + } + + /** + * returns owner of file + * + * @return int + */ + public function getUser() + { + return $this->user; + } + + /** + * change owner group of file to given group + * + * @param int $group + * @return $this + */ + public function chgrp($group) + { + $this->group = $group; + $this->lastAttributeModified = time(); + return $this; + } + + /** + * checks whether file is owned by group + * + * @param int $group + * @return bool + */ + public function isOwnedByGroup($group) + { + return $this->group === $group; + } + + /** + * returns owner group of file + * + * @return int + */ + public function getGroup() + { + return $this->group; + } + + /** + * sets parent path + * + * @param string $parentPath + * @internal only to be set by parent + * @since 1.2.0 + */ + public function setParentPath($parentPath) + { + $this->parentPath = $parentPath; + } + + /** + * returns path to this content + * + * @return string + * @since 1.2.0 + */ + public function path() + { + if (null === $this->parentPath) { + return $this->name; + } + + return $this->parentPath . '/' . $this->name; + } + + /** + * returns complete vfsStream url for this content + * + * @return string + * @since 1.2.0 + */ + public function url() + { + return vfsStream::url($this->path()); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php new file mode 100644 index 000000000..128a96a31 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamBlock.php @@ -0,0 +1,34 @@ +type = vfsStreamContent::TYPE_BLOCK; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php new file mode 100644 index 000000000..74faa9a12 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php @@ -0,0 +1,61 @@ +children = $children; + if (vfsStream::useDotfiles()) { + array_unshift($this->children, new DotDirectory('.'), new DotDirectory('..')); + } + + reset($this->children); + } + + /** + * resets children pointer + */ + #[\ReturnTypeWillChange] + public function rewind() + { + reset($this->children); + } + + /** + * returns the current child + * + * @return vfsStreamContent + */ + #[\ReturnTypeWillChange] + public function current() + { + $child = current($this->children); + if (false === $child) { + return null; + } + + return $child; + } + + /** + * returns the name of the current child + * + * @return string + */ + #[\ReturnTypeWillChange] + public function key() + { + $child = current($this->children); + if (false === $child) { + return null; + } + + return $child->getName(); + } + + /** + * iterates to next child + */ + #[\ReturnTypeWillChange] + public function next() + { + next($this->children); + } + + /** + * checks if the current value is valid + * + * @return bool + */ + #[\ReturnTypeWillChange] + public function valid() + { + return (false !== current($this->children)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContent.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContent.php new file mode 100644 index 000000000..03b5bab70 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamContent.php @@ -0,0 +1,213 @@ +type = vfsStreamContent::TYPE_DIR; + parent::__construct($name, $permissions); + } + + /** + * returns default permissions for concrete implementation + * + * @return int + * @since 0.8.0 + */ + protected function getDefaultPermissions() + { + return 0777; + } + + /** + * returns size of directory + * + * The size of a directory is always 0 bytes. To calculate the summarized + * size of all children in the directory use sizeSummarized(). + * + * @return int + */ + public function size() + { + return 0; + } + + /** + * returns summarized size of directory and its children + * + * @return int + */ + public function sizeSummarized() + { + $size = 0; + foreach ($this->children as $child) { + if ($child->getType() === vfsStreamContent::TYPE_DIR) { + $size += $child->sizeSummarized(); + } else { + $size += $child->size(); + } + } + + return $size; + } + + /** + * renames the content + * + * @param string $newName + * @throws vfsStreamException + */ + public function rename($newName) + { + if (strstr($newName, '/') !== false) { + throw new vfsStreamException('Directory name can not contain /.'); + } + + parent::rename($newName); + } + + + /** + * sets parent path + * + * @param string $parentPath + * @internal only to be set by parent + * @since 1.2.0 + */ + public function setParentPath($parentPath) + { + parent::setParentPath($parentPath); + foreach ($this->children as $child) { + $child->setParentPath($this->path()); + } + } + + /** + * adds child to the directory + * + * @param vfsStreamContent $child + */ + public function addChild(vfsStreamContent $child) + { + $child->setParentPath($this->path()); + $this->children[$child->getName()] = $child; + $this->updateModifications(); + } + + /** + * removes child from the directory + * + * @param string $name + * @return bool + */ + public function removeChild($name) + { + foreach ($this->children as $key => $child) { + if ($child->appliesTo($name)) { + $child->setParentPath(null); + unset($this->children[$key]); + $this->updateModifications(); + return true; + } + } + + return false; + } + + /** + * updates internal timestamps + */ + protected function updateModifications() + { + $time = time(); + $this->lastAttributeModified = $time; + $this->lastModified = $time; + } + + /** + * checks whether the container contains a child with the given name + * + * @param string $name + * @return bool + */ + public function hasChild($name) + { + return ($this->getChild($name) !== null); + } + + /** + * returns the child with the given name + * + * @param string $name + * @return vfsStreamContent + */ + public function getChild($name) + { + $childName = $this->getRealChildName($name); + foreach ($this->children as $child) { + if ($child->getName() === $childName) { + return $child; + } + + if ($child->appliesTo($childName) === true && $child->hasChild($childName) === true) { + return $child->getChild($childName); + } + } + + return null; + } + + /** + * helper method to detect the real child name + * + * @param string $name + * @return string + */ + protected function getRealChildName($name) + { + if ($this->appliesTo($name) === true) { + return self::getChildName($name, $this->name); + } + + return $name; + } + + /** + * helper method to calculate the child name + * + * @param string $name + * @param string $ownName + * @return string + */ + protected static function getChildName($name, $ownName) + { + if ($name === $ownName) { + return $name; + } + + return substr($name, strlen($ownName) + 1); + } + + /** + * checks whether directory contains any children + * + * @return bool + * @since 0.10.0 + */ + public function hasChildren() + { + return (count($this->children) > 0); + } + + /** + * returns a list of children for this directory + * + * @return vfsStreamContent[] + */ + public function getChildren() + { + return array_values($this->children); + } + + /** + * returns iterator for the children + * + * @return vfsStreamContainerIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return new vfsStreamContainerIterator($this->children); + } + + /** + * checks whether dir is a dot dir + * + * @return bool + */ + public function isDot() + { + if ('.' === $this->name || '..' === $this->name) { + return true; + } + + return false; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamException.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamException.php new file mode 100644 index 000000000..b78afd182 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamException.php @@ -0,0 +1,19 @@ +content = new StringBasedFileContent(''); + $this->type = vfsStreamContent::TYPE_FILE; + parent::__construct($name, $permissions); + } + + /** + * returns default permissions for concrete implementation + * + * @return int + * @since 0.8.0 + */ + protected function getDefaultPermissions() + { + return 0666; + } + + /** + * checks whether the container can be applied to given name + * + * @param string $name + * @return bool + */ + public function appliesTo($name) + { + return ($name === $this->name); + } + + /** + * alias for withContent() + * + * @param string $content + * @return vfsStreamFile + * @see withContent() + */ + public function setContent($content) + { + return $this->withContent($content); + } + + /** + * sets the contents of the file + * + * Setting content with this method does not change the time when the file + * was last modified. + * + * @param string]FileContent $content + * @return vfsStreamFile + * @throws \InvalidArgumentException + */ + public function withContent($content) + { + if (is_string($content)) { + $this->content = new StringBasedFileContent($content); + } elseif ($content instanceof FileContent) { + $this->content = $content; + } else { + throw new \InvalidArgumentException('Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent'); + } + + return $this; + } + + /** + * returns the contents of the file + * + * Getting content does not change the time when the file + * was last accessed. + * + * @return string + */ + public function getContent() + { + return $this->content->content(); + } + + /** + * simply open the file + * + * @since 0.9 + */ + public function open() + { + $this->content->seek(0, SEEK_SET); + $this->lastAccessed = time(); + } + + /** + * open file and set pointer to end of file + * + * @since 0.9 + */ + public function openForAppend() + { + $this->content->seek(0, SEEK_END); + $this->lastAccessed = time(); + } + + /** + * open file and truncate content + * + * @since 0.9 + */ + public function openWithTruncate() + { + $this->open(); + $this->content->truncate(0); + $time = time(); + $this->lastAccessed = $time; + $this->lastModified = $time; + } + + /** + * reads the given amount of bytes from content + * + * Using this method changes the time when the file was last accessed. + * + * @param int $count + * @return string + */ + public function read($count) + { + $this->lastAccessed = time(); + return $this->content->read($count); + } + + /** + * returns the content until its end from current offset + * + * Using this method changes the time when the file was last accessed. + * + * @return string + * @deprecated since 1.3.0 + */ + public function readUntilEnd() + { + $this->lastAccessed = time(); + return $this->content->readUntilEnd(); + } + + /** + * writes an amount of data + * + * Using this method changes the time when the file was last modified. + * + * @param string $data + * @return int amount of written bytes + */ + public function write($data) + { + $this->lastModified = time(); + return $this->content->write($data); + } + + /** + * Truncates a file to a given length + * + * @param int $size length to truncate file to + * @return bool + * @since 1.1.0 + */ + public function truncate($size) + { + $this->content->truncate($size); + $this->lastModified = time(); + return true; + } + + /** + * checks whether pointer is at end of file + * + * @return bool + */ + public function eof() + { + return $this->content->eof(); + } + + /** + * returns the current position within the file + * + * @return int + * @deprecated since 1.3.0 + */ + public function getBytesRead() + { + return $this->content->bytesRead(); + } + + /** + * seeks to the given offset + * + * @param int $offset + * @param int $whence + * @return bool + */ + public function seek($offset, $whence) + { + return $this->content->seek($offset, $whence); + } + + /** + * returns size of content + * + * @return int + */ + public function size() + { + return $this->content->size(); + } + + + /** + * locks file for + * + * @param resource|vfsStreamWrapper $resource + * @param int $operation + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/6 + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function lock($resource, $operation) + { + if ((LOCK_NB & $operation) == LOCK_NB) { + $operation = $operation - LOCK_NB; + } + + // call to lock file on the same file handler firstly releases the lock + $this->unlock($resource); + + if (LOCK_EX === $operation) { + if ($this->isLocked()) { + return false; + } + + $this->setExclusiveLock($resource); + } elseif(LOCK_SH === $operation) { + if ($this->hasExclusiveLock()) { + return false; + } + + $this->addSharedLock($resource); + } + + return true; + } + + /** + * Removes lock from file acquired by given resource + * + * @param resource|vfsStreamWrapper $resource + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function unlock($resource) { + if ($this->hasExclusiveLock($resource)) { + $this->exclusiveLock = null; + } + if ($this->hasSharedLock($resource)) { + unset($this->sharedLock[$this->getResourceId($resource)]); + } + } + + /** + * Set exlusive lock on file by given resource + * + * @param resource|vfsStreamWrapper $resource + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + protected function setExclusiveLock($resource) { + $this->exclusiveLock = $this->getResourceId($resource); + } + + /** + * Add shared lock on file by given resource + * + * @param resource|vfsStreamWrapper $resource + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + protected function addSharedLock($resource) { + $this->sharedLock[$this->getResourceId($resource)] = true; + } + + /** + * checks whether file is locked + * + * @param resource|vfsStreamWrapper $resource + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/6 + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function isLocked($resource = null) + { + return $this->hasSharedLock($resource) || $this->hasExclusiveLock($resource); + } + + /** + * checks whether file is locked in shared mode + * + * @param resource|vfsStreamWrapper $resource + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/6 + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function hasSharedLock($resource = null) + { + if (null !== $resource) { + return isset($this->sharedLock[$this->getResourceId($resource)]); + } + + return !empty($this->sharedLock); + } + + /** + * Returns unique resource id + * + * @param resource|vfsStreamWrapper $resource + * @return string + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function getResourceId($resource) { + if (is_resource($resource)) { + $data = stream_get_meta_data($resource); + $resource = $data['wrapper_data']; + } + + return spl_object_hash($resource); + } + + /** + * checks whether file is locked in exclusive mode + * + * @param resource|vfsStreamWrapper $resource + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/6 + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function hasExclusiveLock($resource = null) + { + if (null !== $resource) { + return $this->exclusiveLock === $this->getResourceId($resource); + } + + return null !== $this->exclusiveLock; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php new file mode 100644 index 000000000..a31e6d22b --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php @@ -0,0 +1,1018 @@ +getName() === $path) { + return self::$root; + } + + if ($this->isInRoot($path) && self::$root->hasChild($path) === true) { + return self::$root->getChild($path); + } + + return null; + } + + /** + * helper method to detect whether given path is in root path + * + * @param string $path + * @return bool + */ + private function isInRoot($path) + { + return substr($path, 0, strlen(self::$root->getName())) === self::$root->getName(); + } + + /** + * returns content for given path but only when it is of given type + * + * @param string $path + * @param int $type + * @return vfsStreamContent + */ + protected function getContentOfType($path, $type) + { + $content = $this->getContent($path); + if (null !== $content && $content->getType() === $type) { + return $content; + } + + return null; + } + + /** + * splits path into its dirname and the basename + * + * @param string $path + * @return string[] + */ + protected function splitPath($path) + { + $lastSlashPos = strrpos($path, '/'); + if (false === $lastSlashPos) { + return array('dirname' => '', 'basename' => $path); + } + + return array('dirname' => substr($path, 0, $lastSlashPos), + 'basename' => substr($path, $lastSlashPos + 1) + ); + } + + /** + * helper method to resolve a path from /foo/bar/. to /foo/bar + * + * @param string $path + * @return string + */ + protected function resolvePath($path) + { + $newPath = array(); + foreach (explode('/', $path) as $pathPart) { + if ('.' !== $pathPart) { + if ('..' !== $pathPart) { + $newPath[] = $pathPart; + } elseif (count($newPath) > 1) { + array_pop($newPath); + } + } + } + + return implode('/', $newPath); + } + + /** + * open the stream + * + * @param string $path the path to open + * @param string $mode mode for opening + * @param string $options options for opening + * @param string $opened_path full path that was actually opened + * @return bool + */ + public function stream_open($path, $mode, $options, $opened_path) + { + $extended = ((strstr($mode, '+') !== false) ? (true) : (false)); + $mode = str_replace(array('t', 'b', '+'), '', $mode); + if (in_array($mode, array('r', 'w', 'a', 'x', 'c')) === false) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Illegal mode ' . $mode . ', use r, w, a, x or c, flavoured with t, b and/or +', E_USER_WARNING); + } + + return false; + } + + $this->mode = $this->calculateMode($mode, $extended); + $path = $this->resolvePath(vfsStream::path($path)); + $this->content = $this->getContentOfType($path, vfsStreamContent::TYPE_FILE); + if (null !== $this->content) { + if (self::WRITE === $mode) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('File ' . $path . ' already exists, can not open with mode x', E_USER_WARNING); + } + + return false; + } + + if ( + (self::TRUNCATE === $mode || self::APPEND === $mode) && + $this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false + ) { + return false; + } + + if (self::TRUNCATE === $mode) { + $this->content->openWithTruncate(); + } elseif (self::APPEND === $mode) { + $this->content->openForAppend(); + } else { + if (!$this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Permission denied', E_USER_WARNING); + } + return false; + } + $this->content->open(); + } + + return true; + } + + $content = $this->createFile($path, $mode, $options); + if (false === $content) { + return false; + } + + $this->content = $content; + return true; + } + + /** + * creates a file at given path + * + * @param string $path the path to open + * @param string $mode mode for opening + * @param string $options options for opening + * @return bool + */ + private function createFile($path, $mode = null, $options = null) + { + $names = $this->splitPath($path); + if (empty($names['dirname']) === true) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('File ' . $names['basename'] . ' does not exist', E_USER_WARNING); + } + + return false; + } + + $dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR); + if (null === $dir) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Directory ' . $names['dirname'] . ' does not exist', E_USER_WARNING); + } + + return false; + } elseif ($dir->hasChild($names['basename']) === true) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Directory ' . $names['dirname'] . ' already contains a director named ' . $names['basename'], E_USER_WARNING); + } + + return false; + } + + if (self::READ === $mode) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Can not open non-existing file ' . $path . ' for reading', E_USER_WARNING); + } + + return false; + } + + if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) { + trigger_error('Can not create new file in non-writable path ' . $names['dirname'], E_USER_WARNING); + } + + return false; + } + + return vfsStream::newFile($names['basename'])->at($dir); + } + + /** + * calculates the file mode + * + * @param string $mode opening mode: r, w, a or x + * @param bool $extended true if + was set with opening mode + * @return int + */ + protected function calculateMode($mode, $extended) + { + if (true === $extended) { + return self::ALL; + } + + if (self::READ === $mode) { + return self::READONLY; + } + + return self::WRITEONLY; + } + + /** + * closes the stream + * + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function stream_close() + { + $this->content->lock($this, LOCK_UN); + } + + /** + * read the stream up to $count bytes + * + * @param int $count amount of bytes to read + * @return string + */ + public function stream_read($count) + { + if (self::WRITEONLY === $this->mode) { + return ''; + } + + if ($this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return ''; + } + + return $this->content->read($count); + } + + /** + * writes data into the stream + * + * @param string $data + * @return int amount of bytes written + */ + public function stream_write($data) + { + if (self::READONLY === $this->mode) { + return 0; + } + + if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return 0; + } + + if (self::$quota->isLimited()) { + $data = substr($data, 0, self::$quota->spaceLeft(self::$root->sizeSummarized())); + } + + return $this->content->write($data); + } + + /** + * truncates a file to a given length + * + * @param int $size length to truncate file to + * @return bool + * @since 1.1.0 + */ + public function stream_truncate($size) + { + if (self::READONLY === $this->mode) { + return false; + } + + if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return false; + } + + if ($this->content->getType() !== vfsStreamContent::TYPE_FILE) { + return false; + } + + if (self::$quota->isLimited() && $this->content->size() < $size) { + $maxSize = self::$quota->spaceLeft(self::$root->sizeSummarized()); + if (0 === $maxSize) { + return false; + } + + if ($size > $maxSize) { + $size = $maxSize; + } + } + + return $this->content->truncate($size); + } + + /** + * sets metadata like owner, user or permissions + * + * @param string $path + * @param int $option + * @param mixed $var + * @return bool + * @since 1.1.0 + */ + public function stream_metadata($path, $option, $var) + { + $path = $this->resolvePath(vfsStream::path($path)); + $content = $this->getContent($path); + switch ($option) { + case STREAM_META_TOUCH: + if (null === $content) { + $content = $this->createFile($path, null, STREAM_REPORT_ERRORS); + // file creation may not be allowed at provided path + if (false === $content) { + return false; + } + } + + $currentTime = time(); + $content->lastModified(((isset($var[0])) ? ($var[0]) : ($currentTime))) + ->lastAccessed(((isset($var[1])) ? ($var[1]) : ($currentTime))); + return true; + + case STREAM_META_OWNER_NAME: + return false; + + case STREAM_META_OWNER: + if (null === $content) { + return false; + } + + return $this->doPermChange($path, + $content, + function() use ($content, $var) + { + $content->chown($var); + } + ); + + case STREAM_META_GROUP_NAME: + return false; + + case STREAM_META_GROUP: + if (null === $content) { + return false; + } + + return $this->doPermChange($path, + $content, + function() use ($content, $var) + { + $content->chgrp($var); + } + ); + + case STREAM_META_ACCESS: + if (null === $content) { + return false; + } + + return $this->doPermChange($path, + $content, + function() use ($content, $var) + { + $content->chmod($var); + } + ); + + default: + return false; + } + } + + /** + * executes given permission change when necessary rights allow such a change + * + * @param string $path + * @param vfsStreamAbstractContent $content + * @param \Closure $change + * @return bool + */ + private function doPermChange($path, vfsStreamAbstractContent $content, \Closure $change) + { + if (!$content->isOwnedByUser(vfsStream::getCurrentUser())) { + return false; + } + + if (self::$root->getName() !== $path) { + $names = $this->splitPath($path); + $parent = $this->getContent($names['dirname']); + if (!$parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { + return false; + } + } + + $change(); + return true; + } + + /** + * checks whether stream is at end of file + * + * @return bool + */ + public function stream_eof() + { + return $this->content->eof(); + } + + /** + * returns the current position of the stream + * + * @return int + */ + public function stream_tell() + { + return $this->content->getBytesRead(); + } + + /** + * seeks to the given offset + * + * @param int $offset + * @param int $whence + * @return bool + */ + public function stream_seek($offset, $whence) + { + return $this->content->seek($offset, $whence); + } + + /** + * flushes unstored data into storage + * + * @return bool + */ + public function stream_flush() + { + return true; + } + + /** + * returns status of stream + * + * @return array + */ + public function stream_stat() + { + $fileStat = array('dev' => 0, + 'ino' => 0, + 'mode' => $this->content->getType() | $this->content->getPermissions(), + 'nlink' => 0, + 'uid' => $this->content->getUser(), + 'gid' => $this->content->getGroup(), + 'rdev' => 0, + 'size' => $this->content->size(), + 'atime' => $this->content->fileatime(), + 'mtime' => $this->content->filemtime(), + 'ctime' => $this->content->filectime(), + 'blksize' => -1, + 'blocks' => -1 + ); + return array_merge(array_values($fileStat), $fileStat); + } + + /** + * retrieve the underlaying resource + * + * Please note that this method always returns false as there is no + * underlaying resource to return. + * + * @param int $cast_as + * @since 0.9.0 + * @see https://github.com/mikey179/vfsStream/issues/3 + * @return bool + */ + public function stream_cast($cast_as) + { + return false; + } + + /** + * set lock status for stream + * + * @param int $operation + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/6 + * @see https://github.com/mikey179/vfsStream/issues/31 + * @see https://github.com/mikey179/vfsStream/issues/40 + */ + public function stream_lock($operation) + { + if ((LOCK_NB & $operation) == LOCK_NB) { + $operation = $operation - LOCK_NB; + } + + return $this->content->lock($this, $operation); + } + + /** + * sets options on the stream + * + * @param int $option key of option to set + * @param int $arg1 + * @param int $arg2 + * @return bool + * @since 0.10.0 + * @see https://github.com/mikey179/vfsStream/issues/15 + * @see http://www.php.net/manual/streamwrapper.stream-set-option.php + */ + public function stream_set_option($option, $arg1, $arg2) + { + switch ($option) { + case STREAM_OPTION_BLOCKING: + // break omitted + + case STREAM_OPTION_READ_TIMEOUT: + // break omitted + + case STREAM_OPTION_WRITE_BUFFER: + // break omitted + + default: + // nothing to do here + } + + return false; + } + + /** + * remove the data under the given path + * + * @param string $path + * @return bool + */ + public function unlink($path) + { + $realPath = $this->resolvePath(vfsStream::path($path)); + $content = $this->getContent($realPath); + if (null === $content) { + trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING); + return false; + } + + if ($content->getType() !== vfsStreamContent::TYPE_FILE) { + trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING); + return false; + } + + return $this->doUnlink($realPath); + } + + /** + * removes a path + * + * @param string $path + * @return bool + */ + protected function doUnlink($path) + { + if (self::$root->getName() === $path) { + // delete root? very brave. :) + self::$root = null; + clearstatcache(); + return true; + } + + $names = $this->splitPath($path); + $content = $this->getContent($names['dirname']); + if (!$content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { + return false; + } + + clearstatcache(); + return $content->removeChild($names['basename']); + } + + /** + * rename from one path to another + * + * @param string $path_from + * @param string $path_to + * @return bool + * @author Benoit Aubuchon + */ + public function rename($path_from, $path_to) + { + $srcRealPath = $this->resolvePath(vfsStream::path($path_from)); + $dstRealPath = $this->resolvePath(vfsStream::path($path_to)); + $srcContent = $this->getContent($srcRealPath); + if (null == $srcContent) { + trigger_error(' No such file or directory', E_USER_WARNING); + return false; + } + $dstNames = $this->splitPath($dstRealPath); + $dstParentContent = $this->getContent($dstNames['dirname']); + if (null == $dstParentContent) { + trigger_error('No such file or directory', E_USER_WARNING); + return false; + } + if (!$dstParentContent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) { + trigger_error('Permission denied', E_USER_WARNING); + return false; + } + if ($dstParentContent->getType() !== vfsStreamContent::TYPE_DIR) { + trigger_error('Target is not a directory', E_USER_WARNING); + return false; + } + + // remove old source first, so we can rename later + // (renaming first would lead to not being able to remove the old path) + if (!$this->doUnlink($srcRealPath)) { + return false; + } + + $dstContent = $srcContent; + // Renaming the filename + $dstContent->rename($dstNames['basename']); + // Copying to the destination + $dstParentContent->addChild($dstContent); + return true; + } + + /** + * creates a new directory + * + * @param string $path + * @param int $mode + * @param int $options + * @return bool + */ + public function mkdir($path, $mode, $options) + { + $umask = vfsStream::umask(); + if (0 < $umask) { + $permissions = $mode & ~$umask; + } else { + $permissions = $mode; + } + + $path = $this->resolvePath(vfsStream::path($path)); + if (null !== $this->getContent($path)) { + trigger_error('mkdir(): Path vfs://' . $path . ' exists', E_USER_WARNING); + return false; + } + + if (null === self::$root) { + self::$root = vfsStream::newDirectory($path, $permissions); + return true; + } + + $maxDepth = count(explode('/', $path)); + $names = $this->splitPath($path); + $newDirs = $names['basename']; + $dir = null; + $i = 0; + while ($dir === null && $i < $maxDepth) { + $dir = $this->getContent($names['dirname']); + $names = $this->splitPath($names['dirname']); + if (null == $dir) { + $newDirs = $names['basename'] . '/' . $newDirs; + } + + $i++; + } + + if (null === $dir + || $dir->getType() !== vfsStreamContent::TYPE_DIR + || $dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return false; + } + + $recursive = ((STREAM_MKDIR_RECURSIVE & $options) !== 0) ? (true) : (false); + if (strpos($newDirs, '/') !== false && false === $recursive) { + return false; + } + + vfsStream::newDirectory($newDirs, $permissions)->at($dir); + return true; + } + + /** + * removes a directory + * + * @param string $path + * @param int $options + * @return bool + * @todo consider $options with STREAM_MKDIR_RECURSIVE + */ + public function rmdir($path, $options) + { + $path = $this->resolvePath(vfsStream::path($path)); + $child = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR); + if (null === $child) { + return false; + } + + // can only remove empty directories + if (count($child->getChildren()) > 0) { + return false; + } + + if (self::$root->getName() === $path) { + // delete root? very brave. :) + self::$root = null; + clearstatcache(); + return true; + } + + $names = $this->splitPath($path); + $dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR); + if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return false; + } + + clearstatcache(); + return $dir->removeChild($child->getName()); + } + + /** + * opens a directory + * + * @param string $path + * @param int $options + * @return bool + */ + public function dir_opendir($path, $options) + { + $path = $this->resolvePath(vfsStream::path($path)); + $this->dir = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR); + if (null === $this->dir || $this->dir->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) { + return false; + } + + $this->dirIterator = $this->dir->getIterator(); + return true; + } + + /** + * reads directory contents + * + * @return string + */ + public function dir_readdir() + { + $dir = $this->dirIterator->current(); + if (null === $dir) { + return false; + } + + $this->dirIterator->next(); + return $dir->getName(); + } + + /** + * reset directory iteration + * + * @return bool + */ + public function dir_rewinddir() + { + return $this->dirIterator->rewind(); + } + + /** + * closes directory + * + * @return bool + */ + public function dir_closedir() + { + $this->dirIterator = null; + return true; + } + + /** + * returns status of url + * + * @param string $path path of url to return status for + * @param int $flags flags set by the stream API + * @return array + */ + public function url_stat($path, $flags) + { + $content = $this->getContent($this->resolvePath(vfsStream::path($path))); + if (null === $content) { + if (($flags & STREAM_URL_STAT_QUIET) != STREAM_URL_STAT_QUIET) { + trigger_error(' No such file or directory: ' . $path, E_USER_WARNING); + } + + return false; + + } + + $fileStat = array('dev' => 0, + 'ino' => 0, + 'mode' => $content->getType() | $content->getPermissions(), + 'nlink' => 0, + 'uid' => $content->getUser(), + 'gid' => $content->getGroup(), + 'rdev' => 0, + 'size' => $content->size(), + 'atime' => $content->fileatime(), + 'mtime' => $content->filemtime(), + 'ctime' => $content->filectime(), + 'blksize' => -1, + 'blocks' => -1 + ); + return array_merge(array_values($fileStat), $fileStat); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php new file mode 100644 index 000000000..f9e597b91 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php @@ -0,0 +1,64 @@ +getType()) { + case vfsStreamContent::TYPE_BLOCK: + $this->visitBlockDevice($content); + break; + + case vfsStreamContent::TYPE_FILE: + $this->visitFile($content); + break; + + case vfsStreamContent::TYPE_DIR: + if (!$content->isDot()) { + $this->visitDirectory($content); + } + + break; + + default: + throw new \InvalidArgumentException('Unknown content type ' . $content->getType() . ' for ' . $content->getName()); + } + + return $this; + } + + /** + * visit a block device and process it + * + * @param vfsStreamBlock $block + * @return vfsStreamVisitor + */ + public function visitBlockDevice(vfsStreamBlock $block) + { + return $this->visitFile($block); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php new file mode 100644 index 000000000..b039a7dda --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php @@ -0,0 +1,108 @@ +out = $out; + $this->depth = 0; + } + + /** + * visit a file and process it + * + * @param vfsStreamFile $file + * @return vfsStreamPrintVisitor + */ + public function visitFile(vfsStreamFile $file) + { + $this->printContent($file->getName()); + return $this; + } + + /** + * visit a block device and process it + * + * @param vfsStreamBlock $block + * @return vfsStreamPrintVisitor + */ + public function visitBlockDevice(vfsStreamBlock $block) + { + $name = '[' . $block->getName() . ']'; + $this->printContent($name); + return $this; + } + + /** + * visit a directory and process it + * + * @param vfsStreamDirectory $dir + * @return vfsStreamPrintVisitor + */ + public function visitDirectory(vfsStreamDirectory $dir) + { + $this->printContent($dir->getName()); + $this->depth++; + foreach ($dir as $child) { + $this->visit($child); + } + + $this->depth--; + return $this; + } + + /** + * helper method to print the content + * + * @param string $name + */ + protected function printContent($name) + { + fwrite($this->out, str_repeat(' ', $this->depth) . '- ' . $name . "\n"); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php new file mode 100644 index 000000000..47acc45cd --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php @@ -0,0 +1,111 @@ +reset(); + } + + /** + * visit a file and process it + * + * @param vfsStreamFile $file + * @return vfsStreamStructureVisitor + */ + public function visitFile(vfsStreamFile $file) + { + $this->current[$file->getName()] = $file->getContent(); + return $this; + } + + /** + * visit a block device and process it + * + * @param vfsStreamBlock $block + * @return vfsStreamStructureVisitor + */ + public function visitBlockDevice(vfsStreamBlock $block) + { + $this->current['[' . $block->getName() . ']'] = $block->getContent(); + return $this; + } + + /** + * visit a directory and process it + * + * @param vfsStreamDirectory $dir + * @return vfsStreamStructureVisitor + */ + public function visitDirectory(vfsStreamDirectory $dir) + { + $this->current[$dir->getName()] = array(); + $tmp =& $this->current; + $this->current =& $tmp[$dir->getName()]; + foreach ($dir as $child) { + $this->visit($child); + } + + $this->current =& $tmp; + return $this; + } + + /** + * returns structure of visited contents + * + * @return array + * @api + */ + public function getStructure() + { + return $this->structure; + } + + /** + * resets structure so visitor could be reused + * + * @return vfsStreamStructureVisitor + */ + public function reset() + { + $this->structure = array(); + $this->current =& $this->structure; + return $this; + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php new file mode 100644 index 000000000..217010587 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php @@ -0,0 +1,55 @@ +expectException($exception); + } elseif (method_exists($this, 'setExpectedException')) { + $this->setExpectedException($exception); + } + } + + // A BC hack to get handle the deprecation of this method in PHPUnit + public function bc_getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false, $proxyTarget = null) + { + if (method_exists($this, "getMockBuilder")) { + return $this + ->getMockBuilder($originalClassName) + ->setMethods($methods) + ->getMock() + ; + } + + return parent::getMock($originalClassName, $methods, $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods, $proxyTarget); + } +} + +// The only deprecation warnings we need to ignore/handle are in PHP 7.4 so far +if (PHP_VERSION_ID >= 70400) { + function customErrorHandler($errno, $errstr, $errfile, $errline) { + // We know about this deprecation warning exists and it's already been + // fixed in the 2.x branch. For BC reasons in the 1.x branch, we'll + // ignore this warning to let tests pass. + if ($errno === E_DEPRECATED) { + if ($errstr === "Function ReflectionType::__toString() is deprecated") { + return true; + } + } + + // Any other error should be left up to PHPUnit to handle + return \PHPUnit_Util_ErrorHandler::handleError($errno, $errstr, $errfile, $errline); + } + + set_error_handler("customErrorHandler"); +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/patches/php8-return-types.diff b/openml_OS/vendor/mikey179/vfsstream/src/test/patches/php8-return-types.diff new file mode 100644 index 000000000..040906d7c --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/patches/php8-return-types.diff @@ -0,0 +1,21 @@ +diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php +index 1223ca0c8..b5725af4c 100644 +--- a/vendor/phpunit/phpunit/src/Framework/TestCase.php ++++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php +@@ -475,14 +475,14 @@ public static function tearDownAfterClass(): void + /** + * This method is called before each test. + */ +- protected function setUp(): void ++ protected function setUp() + { + } + + /** + * This method is called after each test. + */ +- protected function tearDown(): void ++ protected function tearDown() + { + } + diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php new file mode 100644 index 000000000..4f30b038b --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/DirectoryIterationTestCase.php @@ -0,0 +1,318 @@ +assertEquals($expectedCount, + $actualCount, + 'Directory foo contains ' . $expectedCount . ' children, but got ' . $actualCount . ' children while iterating over directory contents' + ); + } + + /** + * @param \Closure $dotFilesSwitch + * @param string[] $expectedDirectories + * @test + * @dataProvider provideSwitchWithExpectations + */ + public function directoryIteration(\Closure $dotFilesSwitch, array $expectedDirectories) + { + $dotFilesSwitch(); + $dir = dir($this->fooURL); + $i = 0; + while (false !== ($entry = $dir->read())) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + $dir->rewind(); + $i = 0; + while (false !== ($entry = $dir->read())) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + $dir->close(); + } + + /** + * @param \Closure $dotFilesSwitch + * @param string[] $expectedDirectories + * @test + * @dataProvider provideSwitchWithExpectations + */ + public function directoryIterationWithDot(\Closure $dotFilesSwitch, array $expectedDirectories) + { + $dotFilesSwitch(); + $dir = dir($this->fooURL . '/.'); + $i = 0; + while (false !== ($entry = $dir->read())) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + $dir->rewind(); + $i = 0; + while (false !== ($entry = $dir->read())) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + $dir->close(); + } + + /** + * assure that a directory iteration works as expected + * + * @param \Closure $dotFilesSwitch + * @param string[] $expectedDirectories + * @test + * @dataProvider provideSwitchWithExpectations + * @group regression + * @group bug_2 + */ + public function directoryIterationWithOpenDir_Bug_2(\Closure $dotFilesSwitch, array $expectedDirectories) + { + $dotFilesSwitch(); + $handle = opendir($this->fooURL); + $i = 0; + while (false !== ($entry = readdir($handle))) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + + rewinddir($handle); + $i = 0; + while (false !== ($entry = readdir($handle))) { + $i++; + $this->assertTrue(in_array($entry, $expectedDirectories)); + } + + $this->assertDirectoryCount(count($expectedDirectories), $i); + closedir($handle); + } + + /** + * assure that a directory iteration works as expected + * + * @author Christoph Bloemer + * @param \Closure $dotFilesSwitch + * @param string[] $expectedDirectories + * @test + * @dataProvider provideSwitchWithExpectations + * @group regression + * @group bug_4 + */ + public function directoryIteration_Bug_4(\Closure $dotFilesSwitch, array $expectedDirectories) + { + $dotFilesSwitch(); + $dir = $this->fooURL; + $list1 = array(); + if ($handle = opendir($dir)) { + while (false !== ($listItem = readdir($handle))) { + if ('.' != $listItem && '..' != $listItem) { + if (is_file($dir . '/' . $listItem) === true) { + $list1[] = 'File:[' . $listItem . ']'; + } elseif (is_dir($dir . '/' . $listItem) === true) { + $list1[] = 'Folder:[' . $listItem . ']'; + } + } + } + + closedir($handle); + } + + $list2 = array(); + if ($handle = opendir($dir)) { + while (false !== ($listItem = readdir($handle))) { + if ('.' != $listItem && '..' != $listItem) { + if (is_file($dir . '/' . $listItem) === true) { + $list2[] = 'File:[' . $listItem . ']'; + } elseif (is_dir($dir . '/' . $listItem) === true) { + $list2[] = 'Folder:[' . $listItem . ']'; + } + } + } + + closedir($handle); + } + + $this->assertEquals($list1, $list2); + $this->assertEquals(2, count($list1)); + $this->assertEquals(2, count($list2)); + } + + /** + * assure that a directory iteration works as expected + * + * @param \Closure $dotFilesSwitch + * @param string[] $expectedDirectories + * @test + * @dataProvider provideSwitchWithExpectations + */ + public function directoryIterationShouldBeIndependent(\Closure $dotFilesSwitch, array $expectedDirectories) + { + $dotFilesSwitch(); + $list1 = array(); + $list2 = array(); + $handle1 = opendir($this->fooURL); + if (false !== ($listItem = readdir($handle1))) { + $list1[] = $listItem; + } + + $handle2 = opendir($this->fooURL); + if (false !== ($listItem = readdir($handle2))) { + $list2[] = $listItem; + } + + if (false !== ($listItem = readdir($handle1))) { + $list1[] = $listItem; + } + + if (false !== ($listItem = readdir($handle2))) { + $list2[] = $listItem; + } + + closedir($handle1); + closedir($handle2); + $this->assertEquals($list1, $list2); + $this->assertEquals(2, count($list1)); + $this->assertEquals(2, count($list2)); + } + + /** + * @test + * @group issue_50 + */ + public function recursiveDirectoryIterationWithDotsEnabled() + { + vfsStream::enableDotfiles(); + vfsStream::setup(); + $structure = array( + 'Core' => array( + 'AbstractFactory' => array( + 'test.php' => 'some text content', + 'other.php' => 'Some more text content', + 'Invalid.csv' => 'Something else', + ), + 'AnEmptyFolder' => array(), + 'badlocation.php' => 'some bad content', + ) + ); + $root = vfsStream::create($structure); + $rootPath = vfsStream::url($root->getName()); + + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath), + \RecursiveIteratorIterator::CHILD_FIRST); + $pathes = array(); + foreach ($iterator as $fullFileName => $fileSPLObject) { + $pathes[] = $fullFileName; + } + + $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'.', + 'vfs://root'.DIRECTORY_SEPARATOR.'..', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'.', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'..', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'.', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'..', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'.', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder'.DIRECTORY_SEPARATOR.'..', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core' + ), + $pathes + ); + } + + /** + * @test + * @group issue_50 + */ + public function recursiveDirectoryIterationWithDotsDisabled() + { + vfsStream::disableDotfiles(); + vfsStream::setup(); + $structure = array( + 'Core' => array( + 'AbstractFactory' => array( + 'test.php' => 'some text content', + 'other.php' => 'Some more text content', + 'Invalid.csv' => 'Something else', + ), + 'AnEmptyFolder' => array(), + 'badlocation.php' => 'some bad content', + ) + ); + $root = vfsStream::create($structure); + $rootPath = vfsStream::url($root->getName()); + + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath), + \RecursiveIteratorIterator::CHILD_FIRST); + $pathes = array(); + foreach ($iterator as $fullFileName => $fileSPLObject) { + $pathes[] = $fullFileName; + } + + $this->assertEquals(array('vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'test.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'other.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory'.DIRECTORY_SEPARATOR.'Invalid.csv', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AbstractFactory', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'AnEmptyFolder', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'badlocation.php', + 'vfs://root'.DIRECTORY_SEPARATOR.'Core' + ), + $pathes + ); + } +} \ No newline at end of file diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/FilenameTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/FilenameTestCase.php new file mode 100644 index 000000000..4b4413060 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/FilenameTestCase.php @@ -0,0 +1,88 @@ +rootDir = vfsStream::url('root'); + $this->lostAndFound = $this->rootDir . '/lost+found/'; + mkdir($this->lostAndFound); + } + + /** + * @test + */ + public function worksWithCorrectName() + { + $results = array(); + $it = new \RecursiveDirectoryIterator($this->lostAndFound); + foreach ($it as $f) { + $results[] = $f->getPathname(); + } + + $this->assertEquals( + array( + 'vfs://root/lost+found' . DIRECTORY_SEPARATOR . '.', + 'vfs://root/lost+found' . DIRECTORY_SEPARATOR . '..' + ), + $results + ); + } + + /** + * @test + * @expectedException UnexpectedValueException + * @expectedExceptionMessage ailed to open dir + */ + public function doesNotWorkWithInvalidName() + { + $results = array(); + $it = new \RecursiveDirectoryIterator($this->rootDir . '/lost found/'); + foreach ($it as $f) { + $results[] = $f->getPathname(); + } + } + + /** + * @test + */ + public function returnsCorrectNames() + { + $results = array(); + $it = new \RecursiveDirectoryIterator($this->rootDir); + foreach ($it as $f) { + $results[] = $f->getPathname(); + } + + $this->assertEquals( + array( + 'vfs://root' . DIRECTORY_SEPARATOR . '.', + 'vfs://root' . DIRECTORY_SEPARATOR . '..', + 'vfs://root' . DIRECTORY_SEPARATOR . 'lost+found' + ), + $results + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/Issue104TestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/Issue104TestCase.php new file mode 100644 index 000000000..895f601df --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/Issue104TestCase.php @@ -0,0 +1,52 @@ + array( + 'schema.xsd' => ' + + ', + ) + ); + vfsStream::setup('root', null, $structure); + $doc = new \DOMDocument(); + $this->assertTrue($doc->load(vfsStream::url('root/foo bar/schema.xsd'))); + } + + /** + * @test + */ + public function vfsStreamCanHandleUrlEncodedPath() + { + $content = ' + + '; + $structure = array('foo bar' => array( + 'schema.xsd' => $content, + ) + ); + vfsStream::setup('root', null, $structure); + $this->assertEquals( + $content, + file_get_contents(vfsStream::url('root/foo bar/schema.xsd')) + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php new file mode 100644 index 000000000..e99a55a4e --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/PermissionsTestCase.php @@ -0,0 +1,118 @@ + array('test.file' => '')); + $this->root = vfsStream::setup('root', null, $structure); + } + + /** + * @test + * @group issue_52 + */ + public function canNotChangePermissionWhenDirectoryNotWriteable() + { + $this->root->getChild('test_directory')->chmod(0444); + $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777)); + } + + /** + * @test + * @group issue_53 + */ + public function canNotChangePermissionWhenFileNotOwned() + { + $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); + $this->assertFalse(@chmod(vfsStream::url('root/test_directory/test.file'), 0777)); + } + + /** + * @test + * @group issue_52 + */ + public function canNotChangeOwnerWhenDirectoryNotWriteable() + { + $this->root->getChild('test_directory')->chmod(0444); + $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2)); + } + + /** + * @test + * @group issue_53 + */ + public function canNotChangeOwnerWhenFileNotOwned() + { + $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); + $this->assertFalse(@chown(vfsStream::url('root/test_directory/test.file'), vfsStream::OWNER_USER_2)); + } + + /** + * @test + * @group issue_52 + */ + public function canNotChangeGroupWhenDirectoryNotWriteable() + { + $this->root->getChild('test_directory')->chmod(0444); + $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2)); + } + + /** + * @test + * @group issue_53 + */ + public function canNotChangeGroupWhenFileNotOwned() + { + $this->root->getChild('test_directory')->getChild('test.file')->chown(vfsStream::OWNER_USER_1); + $this->assertFalse(@chgrp(vfsStream::url('root/test_directory/test.file'), vfsStream::GROUP_USER_2)); + } + + /** + * @test + * @group issue_107 + * @expectedException PHPUnit_Framework_Error + * @expectedExceptionMessage Can not create new file in non-writable path root + * @requires PHP 5.4 + * @since 1.5.0 + */ + public function touchOnNonWriteableDirectoryTriggersError() + { + $this->root->chmod(0555); + touch($this->root->url() . '/touch.txt'); + } + + /** + * @test + * @group issue_107 + * @requires PHP 5.4 + * @since 1.5.0 + */ + public function touchOnNonWriteableDirectoryDoesNotCreateFile() + { + $this->root->chmod(0555); + $this->assertFalse(@touch($this->root->url() . '/touch.txt')); + $this->assertFalse($this->root->hasChild('touch.txt')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/QuotaTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/QuotaTestCase.php new file mode 100644 index 000000000..8c0f5b244 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/QuotaTestCase.php @@ -0,0 +1,80 @@ +quota = new Quota(10); + } + + /** + * @test + */ + public function unlimitedQuotaIsNotLimited() + { + $this->assertFalse(Quota::unlimited()->isLimited()); + } + + /** + * @test + */ + public function limitedQuotaIsLimited() + { + $this->assertTrue($this->quota->isLimited()); + } + + /** + * @test + */ + public function unlimitedQuotaHasAlwaysSpaceLeft() + { + $this->assertEquals(303, Quota::unlimited()->spaceLeft(303)); + } + + /** + * @test + */ + public function hasNoSpaceLeftWhenUsedSpaceIsLargerThanQuota() + { + $this->assertEquals(0, $this->quota->spaceLeft(11)); + } + + /** + * @test + */ + public function hasNoSpaceLeftWhenUsedSpaceIsEqualToQuota() + { + $this->assertEquals(0, $this->quota->spaceLeft(10)); + } + + /** + * @test + */ + public function hasSpaceLeftWhenUsedSpaceIsLowerThanQuota() + { + $this->assertEquals(1, $this->quota->spaceLeft(9)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php new file mode 100644 index 000000000..c33a4c2ea --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php @@ -0,0 +1,58 @@ + array('test.file' => '')); + $root = vfsStream::setup('root', null, $structure); + $root->getChild('test_directory')->chmod(0777); + $root->getChild('test_directory')->getChild('test.file')->chmod(0444); + $this->assertTrue(@unlink(vfsStream::url('root/test_directory/test.file'))); + } + + /** + * @test + * @group issue_51 + */ + public function canNotRemoveWritableFileFromNonWritableDirectory() + { + $structure = array('test_directory' => array('test.file' => '')); + $root = vfsStream::setup('root', null, $structure); + $root->getChild('test_directory')->chmod(0444); + $root->getChild('test_directory')->getChild('test.file')->chmod(0777); + $this->assertFalse(@unlink(vfsStream::url('root/test_directory/test.file'))); + } + + /** + * @test + * @since 1.4.0 + * @group issue_68 + */ + public function unlinkNonExistingFileTriggersError() + { + vfsStream::setup(); + try { + $this->assertFalse(unlink('vfs://root/foo.txt')); + } catch (\PHPUnit_Framework_Error $fe) { + $this->assertEquals('unlink(vfs://root/foo.txt): No such file or directory', $fe->getMessage()); + } + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php new file mode 100644 index 000000000..c9015e16a --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/LargeFileContentTestCase.php @@ -0,0 +1,225 @@ +largeFileContent = new LargeFileContent(100); + } + + /** + * @test + */ + public function hasSizeOriginallyGiven() + { + $this->assertEquals(100, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function contentIsFilledUpWithSpacesIfNoDataWritten() + { + $this->assertEquals( + str_repeat(' ', 100), + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function readReturnsSpacesWhenNothingWrittenAtOffset() + { + $this->assertEquals( + str_repeat(' ', 10), + $this->largeFileContent->read(10) + ); + } + + /** + * @test + */ + public function readReturnsContentFilledWithSpaces() + { + $this->largeFileContent->write('foobarbaz'); + $this->largeFileContent->seek(0, SEEK_SET); + $this->assertEquals( + 'foobarbaz ', + $this->largeFileContent->read(10) + ); + } + + /** + * @test + */ + public function writesDataAtStartWhenOffsetNotMoved() + { + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals( + 'foobarbaz' . str_repeat(' ', 91), + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function writeDataAtStartDoesNotIncreaseSize() + { + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals(100, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function writesDataAtOffsetWhenOffsetMoved() + { + $this->largeFileContent->seek(50, SEEK_SET); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals( + str_repeat(' ', 50) . 'foobarbaz' . str_repeat(' ', 41), + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function writeDataInBetweenDoesNotIncreaseSize() + { + $this->largeFileContent->seek(50, SEEK_SET); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals(100, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function writesDataOverEndWhenOffsetAndDataLengthLargerThanSize() + { + $this->largeFileContent->seek(95, SEEK_SET); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals( + str_repeat(' ', 95) . 'foobarbaz', + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function writeDataOverLastOffsetIncreasesSize() + { + $this->largeFileContent->seek(95, SEEK_SET); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals(104, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function writesDataAfterEndWhenOffsetAfterEnd() + { + $this->largeFileContent->seek(0, SEEK_END); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals( + str_repeat(' ', 100) . 'foobarbaz', + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function writeDataAfterLastOffsetIncreasesSize() + { + $this->largeFileContent->seek(0, SEEK_END); + $this->assertEquals(9, $this->largeFileContent->write('foobarbaz')); + $this->assertEquals(109, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function truncateReducesSize() + { + $this->assertTrue($this->largeFileContent->truncate(50)); + $this->assertEquals(50, $this->largeFileContent->size()); + } + + /** + * @test + */ + public function truncateRemovesWrittenContentAfterOffset() + { + $this->largeFileContent->seek(45, SEEK_SET); + $this->largeFileContent->write('foobarbaz'); + $this->assertTrue($this->largeFileContent->truncate(50)); + $this->assertEquals( + str_repeat(' ', 45) . 'fooba', + $this->largeFileContent->content() + ); + } + + /** + * @test + */ + public function createInstanceWithKilobytes() + { + $this->assertEquals( + 100 * 1024, + LargeFileContent::withKilobytes(100) + ->size() + ); + } + + /** + * @test + */ + public function createInstanceWithMegabytes() + { + $this->assertEquals( + 100 * 1024 * 1024, + LargeFileContent::withMegabytes(100) + ->size() + ); + } + + /** + * @test + */ + public function createInstanceWithGigabytes() + { + $this->assertEquals( + 100 * 1024 * 1024 * 1024, + LargeFileContent::withGigabytes(100) + ->size() + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php new file mode 100644 index 000000000..137a09253 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php @@ -0,0 +1,232 @@ +stringBasedFileContent = new StringBasedFileContent('foobarbaz'); + } + + /** + * @test + */ + public function hasContentOriginallySet() + { + $this->assertEquals('foobarbaz', $this->stringBasedFileContent->content()); + } + + /** + * @test + */ + public function hasNotReachedEofAfterCreation() + { + $this->assertFalse($this->stringBasedFileContent->eof()); + } + + /** + * @test + */ + public function sizeEqualsLengthOfGivenString() + { + $this->assertEquals(9, $this->stringBasedFileContent->size()); + } + + /** + * @test + */ + public function readReturnsSubstringWithRequestedLength() + { + $this->assertEquals('foo', $this->stringBasedFileContent->read(3)); + } + + /** + * @test + */ + public function readMovesOffset() + { + $this->assertEquals('foo', $this->stringBasedFileContent->read(3)); + $this->assertEquals('bar', $this->stringBasedFileContent->read(3)); + $this->assertEquals('baz', $this->stringBasedFileContent->read(3)); + } + + /** + * @test + */ + public function reaMoreThanSizeReturnsWholeContent() + { + $this->assertEquals('foobarbaz', $this->stringBasedFileContent->read(10)); + } + + /** + * @test + */ + public function readAfterEndReturnsEmptyString() + { + // Read more than the length of the string to test substr() returning + // false. + $this->stringBasedFileContent->read(10); + $this->assertSame('', $this->stringBasedFileContent->read(3)); + } + + /** + * @test + */ + public function readDoesNotChangeSize() + { + $this->stringBasedFileContent->read(3); + $this->assertEquals(9, $this->stringBasedFileContent->size()); + } + + /** + * @test + */ + public function readLessThenSizeDoesNotReachEof() + { + $this->stringBasedFileContent->read(3); + $this->assertFalse($this->stringBasedFileContent->eof()); + } + + /** + * @test + */ + public function readSizeReachesEof() + { + $this->stringBasedFileContent->read(9); + $this->assertTrue($this->stringBasedFileContent->eof()); + } + + /** + * @test + */ + public function readMoreThanSizeReachesEof() + { + $this->stringBasedFileContent->read(10); + $this->assertTrue($this->stringBasedFileContent->eof()); + } + + /** + * @test + */ + public function seekWithInvalidOptionReturnsFalse() + { + $this->assertFalse($this->stringBasedFileContent->seek(0, 55)); + } + + /** + * @test + */ + public function canSeekToGivenOffset() + { + $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET)); + $this->assertEquals('rbaz', $this->stringBasedFileContent->read(10)); + } + + /** + * @test + */ + public function canSeekFromCurrentOffset() + { + $this->assertTrue($this->stringBasedFileContent->seek(5, SEEK_SET)); + $this->assertTrue($this->stringBasedFileContent->seek(2, SEEK_CUR)); + $this->assertEquals('az', $this->stringBasedFileContent->read(10)); + } + + /** + * @test + */ + public function canSeekToEnd() + { + $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END)); + $this->assertEquals('', $this->stringBasedFileContent->read(10)); + } + + /** + * @test + */ + public function writeOverwritesExistingContentWhenOffsetNotAtEof() + { + $this->assertEquals(3, $this->stringBasedFileContent->write('bar')); + $this->assertEquals('barbarbaz', $this->stringBasedFileContent->content()); + } + + /** + * @test + */ + public function writeAppendsContentWhenOffsetAtEof() + { + $this->assertTrue($this->stringBasedFileContent->seek(0, SEEK_END)); + $this->assertEquals(3, $this->stringBasedFileContent->write('bar')); + $this->assertEquals('foobarbazbar', $this->stringBasedFileContent->content()); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateRemovesSuperflouosContent() + { + $this->assertTrue($this->stringBasedFileContent->truncate(6)); + $this->assertEquals('foobar', $this->stringBasedFileContent->content()); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateDecreasesSize() + { + $this->assertTrue($this->stringBasedFileContent->truncate(6)); + $this->assertEquals(6, $this->stringBasedFileContent->size()); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateToGreaterSizeAddsZeroBytes() + { + $this->assertTrue($this->stringBasedFileContent->truncate(25)); + $this->assertEquals( + "foobarbaz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + $this->stringBasedFileContent->content() + ); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateToGreaterSizeIncreasesSize() + { + $this->assertTrue($this->stringBasedFileContent->truncate(25)); + $this->assertEquals(25, $this->stringBasedFileContent->size()); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php new file mode 100644 index 000000000..1ed84b5ae --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/proxy/vfsStreamWrapperRecordingProxy.php @@ -0,0 +1,325 @@ + + */ + public static function getMethodCalls($path) + { + if (isset(self::$calledMethods[$path]) === true) { + return self::$calledMethods[$path]; + } + + return array(); + } + + /** + * helper method for setting up vfsStream with the proxy + * + * @param string $rootDirName optional name of root directory + * @param int $permissions optional file permissions of root directory + * @return vfsStreamDirectory + * @throws vfsStreamException + */ + public static function setup($rootDirName = 'root', $permissions = null) + { + self::$root = vfsStream::newDirectory($rootDirName, $permissions); + if (true === self::$registered) { + return self::$root; + } + + if (@stream_wrapper_register(vfsStream::SCHEME, __CLASS__) === false) { + throw new vfsStreamException('A handler has already been registered for the ' . vfsStream::SCHEME . ' protocol.'); + } + + self::$registered = true; + return self::$root; + } + + /** + * open the stream + * + * @param string $path the path to open + * @param string $mode mode for opening + * @param string $options options for opening + * @param string $opened_path full path that was actually opened + * @return bool + */ + public function stream_open($path, $mode, $options, $opened_path) + { + $this->path = $path; + self::recordMethodCall('stream_open', $this->path); + return parent::stream_open($path, $mode, $options, $opened_path); + } + + /** + * closes the stream + */ + public function stream_close() + { + self::recordMethodCall('stream_close', $this->path); + return parent::stream_close(); + } + + /** + * read the stream up to $count bytes + * + * @param int $count amount of bytes to read + * @return string + */ + public function stream_read($count) + { + self::recordMethodCall('stream_read', $this->path); + return parent::stream_read($count); + } + + /** + * writes data into the stream + * + * @param string $data + * @return int amount of bytes written + */ + public function stream_write($data) + { + self::recordMethodCall('stream_write', $this->path); + return parent::stream_write($data); + } + + /** + * checks whether stream is at end of file + * + * @return bool + */ + public function stream_eof() + { + self::recordMethodCall('stream_eof', $this->path); + return parent::stream_eof(); + } + + /** + * returns the current position of the stream + * + * @return int + */ + public function stream_tell() + { + self::recordMethodCall('stream_tell', $this->path); + return parent::stream_tell(); + } + + /** + * seeks to the given offset + * + * @param int $offset + * @param int $whence + * @return bool + */ + public function stream_seek($offset, $whence) + { + self::recordMethodCall('stream_seek', $this->path); + return parent::stream_seek($offset, $whence); + } + + /** + * flushes unstored data into storage + * + * @return bool + */ + public function stream_flush() + { + self::recordMethodCall('stream_flush', $this->path); + return parent::stream_flush(); + } + + /** + * returns status of stream + * + * @return array + */ + public function stream_stat() + { + self::recordMethodCall('stream_stat', $this->path); + return parent::stream_stat(); + } + + /** + * retrieve the underlaying resource + * + * @param int $cast_as + * @return bool + */ + public function stream_cast($cast_as) + { + self::recordMethodCall('stream_cast', $this->path); + return parent::stream_cast($cast_as); + } + + /** + * set lock status for stream + * + * @param int $operation + * @return bool + */ + public function stream_lock($operation) + { + self::recordMethodCall('stream_link', $this->path); + return parent::stream_lock($operation); + } + + /** + * remove the data under the given path + * + * @param string $path + * @return bool + */ + public function unlink($path) + { + self::recordMethodCall('unlink', $path); + return parent::unlink($path); + } + + /** + * rename from one path to another + * + * @param string $path_from + * @param string $path_to + * @return bool + */ + public function rename($path_from, $path_to) + { + self::recordMethodCall('rename', $path_from); + return parent::rename($path_from, $path_to); + } + + /** + * creates a new directory + * + * @param string $path + * @param int $mode + * @param int $options + * @return bool + */ + public function mkdir($path, $mode, $options) + { + self::recordMethodCall('mkdir', $path); + return parent::mkdir($path, $mode, $options); + } + + /** + * removes a directory + * + * @param string $path + * @param int $options + * @return bool + */ + public function rmdir($path, $options) + { + self::recordMethodCall('rmdir', $path); + return parent::rmdir($path, $options); + } + + /** + * opens a directory + * + * @param string $path + * @param int $options + * @return bool + */ + public function dir_opendir($path, $options) + { + $this->path = $path; + self::recordMethodCall('dir_opendir', $this->path); + return parent::dir_opendir($path, $options); + } + + /** + * reads directory contents + * + * @return string + */ + public function dir_readdir() + { + self::recordMethodCall('dir_readdir', $this->path); + return parent::dir_readdir(); + } + + /** + * reset directory iteration + * + * @return bool + */ + public function dir_rewinddir() + { + self::recordMethodCall('dir_rewinddir', $this->path); + return parent::dir_rewinddir(); + } + + /** + * closes directory + * + * @return bool + */ + public function dir_closedir() + { + self::recordMethodCall('dir_closedir', $this->path); + return parent::dir_closedir(); + } + + /** + * returns status of url + * + * @param string $path path of url to return status for + * @param int $flags flags set by the stream API + * @return array + */ + public function url_stat($path, $flags) + { + self::recordMethodCall('url_stat', $path); + return parent::url_stat($path, $flags); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php new file mode 100644 index 000000000..faff3d6a0 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamAbstractContentTestCase.php @@ -0,0 +1,1053 @@ +assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executePermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0100); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executePermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0010); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executePermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0001); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function writePermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0200); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function writePermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0020); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function writePermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0002); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executeAndWritePermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0300); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executeAndWritePermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0030); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function executeAndWritePermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0003); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readPermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0400); + $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readPermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0040); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readPermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0004); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndExecutePermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0500); + $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndExecutePermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0050); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndExecutePermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0005); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndWritePermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0600); + $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndWritePermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0060); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function readAndWritePermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0006); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function allPermissionsForUser() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0700); + $this->assertTrue($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertTrue($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function allPermissionsForGroup() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0070); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + -1 + ) + ); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function allPermissionsForOther() + { + $abstractContent = new TestvfsStreamAbstractContent('foo', 0007); + $this->assertFalse($abstractContent->isReadable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isReadable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isReadable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isWritable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isWritable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isWritable(-1, + -1 + ) + ); + $this->assertFalse($abstractContent->isExecutable(vfsStream::getCurrentUser(), + vfsStream::getCurrentGroup() + ) + ); + $this->assertFalse($abstractContent->isExecutable(-1, + vfsStream::getCurrentGroup() + ) + ); + $this->assertTrue($abstractContent->isExecutable(-1, + -1 + ) + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php new file mode 100644 index 000000000..cd8e1a481 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamBlockTestCase.php @@ -0,0 +1,89 @@ +block = new vfsStreamBlock('foo'); + } + + /** + * test default values and methods + * + * @test + */ + public function defaultValues() + { + $this->assertEquals(vfsStreamContent::TYPE_BLOCK, $this->block->getType()); + $this->assertEquals('foo', $this->block->getName()); + $this->assertTrue($this->block->appliesTo('foo')); + $this->assertFalse($this->block->appliesTo('foo/bar')); + $this->assertFalse($this->block->appliesTo('bar')); + } + + /** + * tests how external functions see this object + * + * @test + */ + public function external() + { + $root = vfsStream::setup('root'); + $root->addChild(vfsStream::newBlock('foo')); + $this->assertEquals('block', filetype(vfsStream::url('root/foo'))); + } + + /** + * tests adding a complex structure + * + * @test + */ + public function addStructure() + { + $structure = array( + 'topLevel' => array( + 'thisIsAFile' => 'file contents', + '[blockDevice]' => 'block contents' + ) + ); + + $root = vfsStream::create($structure); + + $this->assertSame('block', filetype(vfsStream::url('root/topLevel/blockDevice'))); + } + + /** + * tests that a blank name for a block device throws an exception + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + */ + public function createWithEmptyName() + { + $structure = array( + 'topLevel' => array( + 'thisIsAFile' => 'file contents', + '[]' => 'block contents' + ) + ); + + $root = vfsStream::create($structure); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php new file mode 100644 index 000000000..934e014db --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamContainerIteratorTestCase.php @@ -0,0 +1,111 @@ +dir = new vfsStreamDirectory('foo'); + $this->mockChild1 = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $this->mockChild1->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + $this->dir->addChild($this->mockChild1); + $this->mockChild2 = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $this->mockChild2->expects($this->any()) + ->method('getName') + ->will($this->returnValue('baz')); + $this->dir->addChild($this->mockChild2); + } + + /** + * clean up test environment + */ + public function tearDown() + { + vfsStream::enableDotfiles(); + } + + /** + * @return array + */ + public function provideSwitchWithExpectations() + { + return array(array(function() { vfsStream::disableDotfiles(); }, + array() + ), + array(function() { vfsStream::enableDotfiles(); }, + array('.', '..') + ) + ); + } + + private function getDirName($dir) + { + if (is_string($dir)) { + return $dir; + } + + + return $dir->getName(); + } + + /** + * @param \Closure $dotFilesSwitch + * @param array $dirNames + * @test + * @dataProvider provideSwitchWithExpectations + */ + public function iteration(\Closure $dotFilesSwitch, array $dirs) + { + $dirs[] = $this->mockChild1; + $dirs[] = $this->mockChild2; + $dotFilesSwitch(); + $dirIterator = $this->dir->getIterator(); + foreach ($dirs as $dir) { + $this->assertEquals($this->getDirName($dir), $dirIterator->key()); + $this->assertTrue($dirIterator->valid()); + if (!is_string($dir)) { + $this->assertSame($dir, $dirIterator->current()); + } + + $dirIterator->next(); + } + + $this->assertFalse($dirIterator->valid()); + $this->assertNull($dirIterator->key()); + $this->assertNull($dirIterator->current()); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue134TestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue134TestCase.php new file mode 100644 index 000000000..c1c0dda8f --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue134TestCase.php @@ -0,0 +1,64 @@ +rootDirectory = vfsStream::newDirectory('/'); + $this->rootDirectory->addChild(vfsStream::newDirectory('var/log/app')); + + } + + /** + * Test: should save directory name as string internal + * + * @small + */ + public function testShouldSaveDirectoryNameAsStringInternal() + { + $dir = $this->rootDirectory->getChild('var/log/app'); + + $dir->addChild(vfsStream::newDirectory(80)); + + static::assertNotNull($this->rootDirectory->getChild('var/log/app/80')); + } + + + + /** + * Test: should rename directory name as string internal + * + * @small + */ + public function testShouldRenameDirectoryNameAsStringInternal() + { + $dir = $this->rootDirectory->getChild('var/log/app'); + + $dir->addChild(vfsStream::newDirectory(80)); + + $child = $this->rootDirectory->getChild('var/log/app/80'); + $child->rename(90); + + static::assertNotNull($this->rootDirectory->getChild('var/log/app/90')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php new file mode 100644 index 000000000..fdf45b2cc --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryIssue18TestCase.php @@ -0,0 +1,80 @@ +rootDirectory = vfsStream::newDirectory('/'); + $this->rootDirectory->addChild(vfsStream::newDirectory('var/log/app')); + $dir = $this->rootDirectory->getChild('var/log/app'); + $dir->addChild(vfsStream::newDirectory('app1')); + $dir->addChild(vfsStream::newDirectory('app2')); + $dir->addChild(vfsStream::newDirectory('foo')); + } + + /** + * @test + */ + public function shouldContainThreeSubdirectories() + { + $this->assertEquals(3, + count($this->rootDirectory->getChild('var/log/app')->getChildren()) + ); + } + + /** + * @test + */ + public function shouldContainSubdirectoryFoo() + { + $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('foo')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $this->rootDirectory->getChild('var/log/app')->getChild('foo') + ); + } + + /** + * @test + */ + public function shouldContainSubdirectoryApp1() + { + $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app1')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $this->rootDirectory->getChild('var/log/app')->getChild('app1') + ); + } + + /** + * @test + */ + public function shouldContainSubdirectoryApp2() + { + $this->assertTrue($this->rootDirectory->getChild('var/log/app')->hasChild('app2')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $this->rootDirectory->getChild('var/log/app')->getChild('app2') + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php new file mode 100644 index 000000000..19ed51b81 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php @@ -0,0 +1,334 @@ +dir = new vfsStreamDirectory('foo'); + } + + /** + * assure that a directory seperator inside the name throws an exception + * + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + */ + public function invalidCharacterInName() + { + $dir = new vfsStreamDirectory('foo/bar'); + } + + /** + * test default values and methods + * + * @test + */ + public function defaultValues() + { + $this->assertEquals(vfsStreamContent::TYPE_DIR, $this->dir->getType()); + $this->assertEquals('foo', $this->dir->getName()); + $this->assertTrue($this->dir->appliesTo('foo')); + $this->assertTrue($this->dir->appliesTo('foo/bar')); + $this->assertFalse($this->dir->appliesTo('bar')); + $this->assertEquals(array(), $this->dir->getChildren()); + } + + /** + * test renaming the directory + * + * @test + */ + public function rename() + { + $this->dir->rename('bar'); + $this->assertEquals('bar', $this->dir->getName()); + $this->assertFalse($this->dir->appliesTo('foo')); + $this->assertFalse($this->dir->appliesTo('foo/bar')); + $this->assertTrue($this->dir->appliesTo('bar')); + } + + /** + * renaming the directory to an invalid name throws a vfsStreamException + * + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + */ + public function renameToInvalidNameThrowsvfsStreamException() + { + $this->dir->rename('foo/baz'); + } + + /** + * @test + * @since 0.10.0 + */ + public function hasNoChildrenByDefault() + { + $this->assertFalse($this->dir->hasChildren()); + } + + /** + * @test + * @since 0.10.0 + */ + public function hasChildrenReturnsTrueIfAtLeastOneChildPresent() + { + $mockChild = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild->expects($this->any()) + ->method('appliesTo') + ->will($this->returnValue(false)); + $mockChild->expects($this->any()) + ->method('getName') + ->will($this->returnValue('baz')); + $this->dir->addChild($mockChild); + $this->assertTrue($this->dir->hasChildren()); + } + + /** + * @test + */ + public function hasChildReturnsFalseForNonExistingChild() + { + $this->assertFalse($this->dir->hasChild('bar')); + } + + /** + * @test + */ + public function getChildReturnsNullForNonExistingChild() + { + $this->assertNull($this->dir->getChild('bar')); + } + + /** + * @test + */ + public function removeChildReturnsFalseForNonExistingChild() + { + $this->assertFalse($this->dir->removeChild('bar')); + } + + /** + * @test + */ + public function nonExistingChild() + { + $mockChild = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild->expects($this->any()) + ->method('appliesTo') + ->will($this->returnValue(false)); + $mockChild->expects($this->any()) + ->method('getName') + ->will($this->returnValue('baz')); + $this->dir->addChild($mockChild); + $this->assertFalse($this->dir->removeChild('bar')); + } + + /** + * test that adding, handling and removing of a child works as expected + * + * @test + */ + public function childHandling() + { + $mockChild = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild->expects($this->any()) + ->method('getType') + ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); + $mockChild->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + $mockChild->expects($this->any()) + ->method('appliesTo') + ->with($this->equalTo('bar')) + ->will($this->returnValue(true)); + $mockChild->expects($this->once()) + ->method('size') + ->will($this->returnValue(5)); + $this->dir->addChild($mockChild); + $this->assertTrue($this->dir->hasChild('bar')); + $bar = $this->dir->getChild('bar'); + $this->assertSame($mockChild, $bar); + $this->assertEquals(array($mockChild), $this->dir->getChildren()); + $this->assertEquals(0, $this->dir->size()); + $this->assertEquals(5, $this->dir->sizeSummarized()); + $this->assertTrue($this->dir->removeChild('bar')); + $this->assertEquals(array(), $this->dir->getChildren()); + $this->assertEquals(0, $this->dir->size()); + $this->assertEquals(0, $this->dir->sizeSummarized()); + } + + /** + * test that adding, handling and removing of a child works as expected + * + * @test + */ + public function childHandlingWithSubdirectory() + { + $mockChild = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild->expects($this->any()) + ->method('getType') + ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); + $mockChild->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + $mockChild->expects($this->once()) + ->method('size') + ->will($this->returnValue(5)); + $subdir = new vfsStreamDirectory('subdir'); + $subdir->addChild($mockChild); + $this->dir->addChild($subdir); + $this->assertTrue($this->dir->hasChild('subdir')); + $this->assertSame($subdir, $this->dir->getChild('subdir')); + $this->assertEquals(array($subdir), $this->dir->getChildren()); + $this->assertEquals(0, $this->dir->size()); + $this->assertEquals(5, $this->dir->sizeSummarized()); + $this->assertTrue($this->dir->removeChild('subdir')); + $this->assertEquals(array(), $this->dir->getChildren()); + $this->assertEquals(0, $this->dir->size()); + $this->assertEquals(0, $this->dir->sizeSummarized()); + } + + /** + * dd + * + * @test + * @group regression + * @group bug_5 + */ + public function addChildReplacesChildWithSameName_Bug_5() + { + $mockChild1 = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild1->expects($this->any()) + ->method('getType') + ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); + $mockChild1->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + $mockChild2 = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild2->expects($this->any()) + ->method('getType') + ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); + $mockChild2->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + $this->dir->addChild($mockChild1); + $this->assertTrue($this->dir->hasChild('bar')); + $this->assertSame($mockChild1, $this->dir->getChild('bar')); + $this->dir->addChild($mockChild2); + $this->assertTrue($this->dir->hasChild('bar')); + $this->assertSame($mockChild2, $this->dir->getChild('bar')); + } + + /** + * When testing for a nested path, verify that directory separators are respected properly + * so that subdir1/subdir2 is not considered equal to subdir1Xsubdir2. + * + * @test + * @group bug_24 + * @group regression + */ + public function explicitTestForSeparatorWithNestedPaths_Bug_24() + { + $mockChild = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockChild->expects($this->any()) + ->method('getType') + ->will($this->returnValue(vfsStreamContent::TYPE_FILE)); + $mockChild->expects($this->any()) + ->method('getName') + ->will($this->returnValue('bar')); + + $subdir1 = new vfsStreamDirectory('subdir1'); + $this->dir->addChild($subdir1); + + $subdir2 = new vfsStreamDirectory('subdir2'); + $subdir1->addChild($subdir2); + + $subdir2->addChild($mockChild); + + $this->assertTrue($this->dir->hasChild('subdir1'), "Level 1 path with separator exists"); + $this->assertTrue($this->dir->hasChild('subdir1/subdir2'), "Level 2 path with separator exists"); + $this->assertTrue($this->dir->hasChild('subdir1/subdir2/bar'), "Level 3 path with separator exists"); + $this->assertFalse($this->dir->hasChild('subdir1.subdir2'), "Path with period does not exist"); + $this->assertFalse($this->dir->hasChild('subdir1.subdir2/bar'), "Nested path with period does not exist"); + } + + + /** + * setting and retrieving permissions for a directory + * + * @test + * @group permissions + */ + public function permissions() + { + $this->assertEquals(0777, $this->dir->getPermissions()); + $this->assertSame($this->dir, $this->dir->chmod(0755)); + $this->assertEquals(0755, $this->dir->getPermissions()); + } + + /** + * setting and retrieving permissions for a directory + * + * @test + * @group permissions + */ + public function permissionsSet() + { + $this->dir = new vfsStreamDirectory('foo', 0755); + $this->assertEquals(0755, $this->dir->getPermissions()); + $this->assertSame($this->dir, $this->dir->chmod(0700)); + $this->assertEquals(0700, $this->dir->getPermissions()); + } + + /** + * setting and retrieving owner of a file + * + * @test + * @group permissions + */ + public function owner() + { + $this->assertEquals(vfsStream::getCurrentUser(), $this->dir->getUser()); + $this->assertTrue($this->dir->isOwnedByUser(vfsStream::getCurrentUser())); + $this->assertSame($this->dir, $this->dir->chown(vfsStream::OWNER_USER_1)); + $this->assertEquals(vfsStream::OWNER_USER_1, $this->dir->getUser()); + $this->assertTrue($this->dir->isOwnedByUser(vfsStream::OWNER_USER_1)); + } + + /** + * setting and retrieving owner group of a file + * + * @test + * @group permissions + */ + public function group() + { + $this->assertEquals(vfsStream::getCurrentGroup(), $this->dir->getGroup()); + $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::getCurrentGroup())); + $this->assertSame($this->dir, $this->dir->chgrp(vfsStream::GROUP_USER_1)); + $this->assertEquals(vfsStream::GROUP_USER_1, $this->dir->getGroup()); + $this->assertTrue($this->dir->isOwnedByGroup(vfsStream::GROUP_USER_1)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php new file mode 100644 index 000000000..66ad14d6f --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamExLockTestCase.php @@ -0,0 +1,55 @@ +at($root); + + } + + /** + * This test verifies the current behaviour where vfsStream URLs do not work + * with file_put_contents() and LOCK_EX. The test is intended to break once + * PHP changes this so we get notified about the change. + * + * @test + */ + public function filePutContentsLockShouldReportError() + { + @file_put_contents(vfsStream::url('root/testfile'), "some string\n", LOCK_EX); + $php_error = error_get_last(); + $this->assertEquals("file_put_contents(): Exclusive locks may only be set for regular files", $php_error['message']); + } + + /** + * @test + */ + public function flockSouldPass() + { + $fp = fopen(vfsStream::url('root/testfile'), 'w'); + flock($fp, LOCK_EX); + fwrite($fp, "another string\n"); + flock($fp, LOCK_UN); + fclose($fp); + $this->assertEquals("another string\n", file_get_contents(vfsStream::url('root/testfile'))); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php new file mode 100644 index 000000000..5b7ade6c3 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php @@ -0,0 +1,337 @@ +file = new vfsStreamFile('foo'); + } + + /** + * test default values and methods + * + * @test + */ + public function defaultValues() + { + $this->assertEquals(vfsStreamContent::TYPE_FILE, $this->file->getType()); + $this->assertEquals('foo', $this->file->getName()); + $this->assertTrue($this->file->appliesTo('foo')); + $this->assertFalse($this->file->appliesTo('foo/bar')); + $this->assertFalse($this->file->appliesTo('bar')); + } + + /** + * test setting and getting the content of a file + * + * @test + */ + public function content() + { + $this->assertEquals('', $this->file->getContent()); + $this->assertSame($this->file, $this->file->setContent('bar')); + $this->assertEquals('bar', $this->file->getContent()); + $this->assertSame($this->file, $this->file->withContent('baz')); + $this->assertEquals('baz', $this->file->getContent()); + } + + /** + * test renaming the directory + * + * @test + */ + public function rename() + { + $this->file->rename('bar'); + $this->assertEquals('bar', $this->file->getName()); + $this->assertFalse($this->file->appliesTo('foo')); + $this->assertFalse($this->file->appliesTo('foo/bar')); + $this->assertTrue($this->file->appliesTo('bar')); + } + + /** + * test reading contents from the file + * + * @test + */ + public function readEmptyFile() + { + $this->assertTrue($this->file->eof()); + $this->assertEquals(0, $this->file->size()); + $this->assertEquals('', $this->file->read(5)); + $this->assertEquals(5, $this->file->getBytesRead()); + $this->assertTrue($this->file->eof()); + } + + /** + * test reading contents from the file + * + * @test + */ + public function read() + { + $this->file->setContent('foobarbaz'); + $this->assertFalse($this->file->eof()); + $this->assertEquals(9, $this->file->size()); + $this->assertEquals('foo', $this->file->read(3)); + $this->assertEquals(3, $this->file->getBytesRead()); + $this->assertFalse($this->file->eof()); + $this->assertEquals(9, $this->file->size()); + $this->assertEquals('bar', $this->file->read(3)); + $this->assertEquals(6, $this->file->getBytesRead()); + $this->assertFalse($this->file->eof()); + $this->assertEquals(9, $this->file->size()); + $this->assertEquals('baz', $this->file->read(3)); + $this->assertEquals(9, $this->file->getBytesRead()); + $this->assertEquals(9, $this->file->size()); + $this->assertTrue($this->file->eof()); + $this->assertEquals('', $this->file->read(3)); + } + + /** + * test seeking to offset + * + * @test + */ + public function seekEmptyFile() + { + $this->assertFalse($this->file->seek(0, 55)); + $this->assertTrue($this->file->seek(0, SEEK_SET)); + $this->assertEquals(0, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(5, SEEK_SET)); + $this->assertEquals(5, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(0, SEEK_CUR)); + $this->assertEquals(5, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(2, SEEK_CUR)); + $this->assertEquals(7, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(0, SEEK_END)); + $this->assertEquals(0, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(2, SEEK_END)); + $this->assertEquals(2, $this->file->getBytesRead()); + } + + /** + * @test + * @since 1.6.5 + */ + public function seekEmptyFileBeforeBeginningDoesNotChangeOffset() + { + $this->assertFalse($this->file->seek(-5, SEEK_SET), 'Seek before beginning of file'); + $this->assertEquals(0, $this->file->getBytesRead()); + } + + /** + * test seeking to offset + * + * @test + */ + public function seekRead() + { + $this->file->setContent('foobarbaz'); + $this->assertFalse($this->file->seek(0, 55)); + $this->assertTrue($this->file->seek(0, SEEK_SET)); + $this->assertEquals('foobarbaz', $this->file->readUntilEnd()); + $this->assertEquals(0, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(5, SEEK_SET)); + $this->assertEquals('rbaz', $this->file->readUntilEnd()); + $this->assertEquals(5, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(0, SEEK_CUR)); + $this->assertEquals('rbaz', $this->file->readUntilEnd()); + $this->assertEquals(5, $this->file->getBytesRead(), 5); + $this->assertTrue($this->file->seek(2, SEEK_CUR)); + $this->assertEquals('az', $this->file->readUntilEnd()); + $this->assertEquals(7, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(0, SEEK_END)); + $this->assertEquals('', $this->file->readUntilEnd()); + $this->assertEquals(9, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(2, SEEK_END)); + $this->assertEquals('', $this->file->readUntilEnd()); + $this->assertEquals(11, $this->file->getBytesRead()); + } + + /** + * @test + * @since 1.6.5 + */ + public function seekFileBeforeBeginningDoesNotChangeOffset() + { + $this->file->setContent('foobarbaz'); + $this->assertFalse($this->file->seek(-5, SEEK_SET), 'Seek before beginning of file'); + $this->assertEquals(0, $this->file->getBytesRead()); + $this->assertTrue($this->file->seek(2, SEEK_CUR)); + $this->assertFalse($this->file->seek(-5, SEEK_SET), 'Seek before beginning of file'); + $this->assertEquals(2, $this->file->getBytesRead()); + $this->assertEquals('obarbaz', $this->file->readUntilEnd()); + $this->assertFalse($this->file->seek(-5, SEEK_CUR), 'Seek before beginning of file'); + $this->assertEquals(2, $this->file->getBytesRead()); + $this->assertEquals('obarbaz', $this->file->readUntilEnd()); + $this->assertFalse($this->file->seek(-20, SEEK_END), 'Seek before beginning of file'); + $this->assertEquals(2, $this->file->getBytesRead()); + $this->assertEquals('obarbaz', $this->file->readUntilEnd()); + } + + /** + * test writing data into the file + * + * @test + */ + public function writeEmptyFile() + { + $this->assertEquals(3, $this->file->write('foo')); + $this->assertEquals('foo', $this->file->getContent()); + $this->assertEquals(3, $this->file->size()); + $this->assertEquals(3, $this->file->write('bar')); + $this->assertEquals('foobar', $this->file->getContent()); + $this->assertEquals(6, $this->file->size()); + } + + /** + * test writing data into the file + * + * @test + */ + public function write() + { + $this->file->setContent('foobarbaz'); + $this->assertTrue($this->file->seek(3, SEEK_SET)); + $this->assertEquals(3, $this->file->write('foo')); + $this->assertEquals('foofoobaz', $this->file->getContent()); + $this->assertEquals(9, $this->file->size()); + $this->assertEquals(3, $this->file->write('bar')); + $this->assertEquals('foofoobar', $this->file->getContent()); + $this->assertEquals(9, $this->file->size()); + } + + /** + * setting and retrieving permissions for a file + * + * @test + * @group permissions + */ + public function permissions() + { + $this->assertEquals(0666, $this->file->getPermissions()); + $this->assertSame($this->file, $this->file->chmod(0644)); + $this->assertEquals(0644, $this->file->getPermissions()); + } + + /** + * setting and retrieving permissions for a file + * + * @test + * @group permissions + */ + public function permissionsSet() + { + $this->file = new vfsStreamFile('foo', 0644); + $this->assertEquals(0644, $this->file->getPermissions()); + $this->assertSame($this->file, $this->file->chmod(0600)); + $this->assertEquals(0600, $this->file->getPermissions()); + } + + /** + * setting and retrieving owner of a file + * + * @test + * @group permissions + */ + public function owner() + { + $this->assertEquals(vfsStream::getCurrentUser(), $this->file->getUser()); + $this->assertTrue($this->file->isOwnedByUser(vfsStream::getCurrentUser())); + $this->assertSame($this->file, $this->file->chown(vfsStream::OWNER_USER_1)); + $this->assertEquals(vfsStream::OWNER_USER_1, $this->file->getUser()); + $this->assertTrue($this->file->isOwnedByUser(vfsStream::OWNER_USER_1)); + } + + /** + * setting and retrieving owner group of a file + * + * @test + * @group permissions + */ + public function group() + { + $this->assertEquals(vfsStream::getCurrentGroup(), $this->file->getGroup()); + $this->assertTrue($this->file->isOwnedByGroup(vfsStream::getCurrentGroup())); + $this->assertSame($this->file, $this->file->chgrp(vfsStream::GROUP_USER_1)); + $this->assertEquals(vfsStream::GROUP_USER_1, $this->file->getGroup()); + $this->assertTrue($this->file->isOwnedByGroup(vfsStream::GROUP_USER_1)); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateRemovesSuperflouosContent() + { + $this->assertEquals(11, $this->file->write("lorem ipsum")); + $this->assertTrue($this->file->truncate(5)); + $this->assertEquals(5, $this->file->size()); + $this->assertEquals('lorem', $this->file->getContent()); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + */ + public function truncateToGreaterSizeAddsZeroBytes() + { + $this->assertEquals(11, $this->file->write("lorem ipsum")); + $this->assertTrue($this->file->truncate(25)); + $this->assertEquals(25, $this->file->size()); + $this->assertEquals("lorem ipsum\0\0\0\0\0\0\0\0\0\0\0\0\0\0", $this->file->getContent()); + } + + /** + * @test + * @group issue_79 + * @since 1.3.0 + */ + public function withContentAcceptsAnyFileContentInstance() + { + $mockFileContent = $this->bc_getMock('org\bovigo\vfs\content\FileContent'); + $mockFileContent->expects($this->once()) + ->method('content') + ->will($this->returnValue('foobarbaz')); + $this->assertEquals( + 'foobarbaz', + $this->file->withContent($mockFileContent) + ->getContent() + ); + } + + /** + * @test + * @group issue_79 + * @expectedException \InvalidArgumentException + * @since 1.3.0 + */ + public function withContentThrowsInvalidArgumentExceptionWhenContentIsNoStringAndNoFileContent() + { + $this->file->withContent(313); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php new file mode 100644 index 000000000..2dec5638e --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamGlobTestCase.php @@ -0,0 +1,28 @@ +assertEmpty(glob(vfsStream::url('example'), GLOB_MARK)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php new file mode 100644 index 000000000..74fb773b0 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamResolveIncludePathTestCase.php @@ -0,0 +1,61 @@ +backupIncludePath = get_include_path(); + vfsStream::setup(); + mkdir('vfs://root/a/path', 0777, true); + set_include_path('vfs://root/a' . PATH_SEPARATOR . $this->backupIncludePath); + } + + /** + * clean up test environment + */ + public function tearDown() + { + set_include_path($this->backupIncludePath); + } + + /** + * @test + */ + public function knownFileCanBeResolved() + { + file_put_contents('vfs://root/a/path/knownFile.php', ''); + $this->assertEquals('vfs://root/a/path/knownFile.php', stream_resolve_include_path('path/knownFile.php')); + } + + /** + * @test + */ + public function unknownFileCanNotBeResolvedYieldsFalse() + { + $this->assertFalse(@stream_resolve_include_path('path/unknownFile.php')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php new file mode 100644 index 000000000..cc2bad7a9 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php @@ -0,0 +1,780 @@ +assertEquals('vfs://foo', vfsStream::url('foo')); + $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo/bar.baz')); + $this->assertEquals('vfs://foo/bar.baz', vfsStream::url('foo\bar.baz')); + } + + /** + * assure that url2path conversion works correct + * + * @test + */ + public function path() + { + $this->assertEquals('foo', vfsStream::path('vfs://foo')); + $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo/bar.baz')); + $this->assertEquals('foo/bar.baz', vfsStream::path('vfs://foo\bar.baz')); + } + + /** + * windows directory separators are converted into default separator + * + * @author Gabriel Birke + * @test + */ + public function pathConvertsWindowsDirectorySeparators() + { + $this->assertEquals('foo/bar', vfsStream::path('vfs://foo\\bar')); + } + + /** + * trailing whitespace should be removed + * + * @author Gabriel Birke + * @test + */ + public function pathRemovesTrailingWhitespace() + { + $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar ')); + } + + /** + * trailing slashes are removed + * + * @author Gabriel Birke + * @test + */ + public function pathRemovesTrailingSlash() + { + $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/')); + } + + /** + * trailing slash and whitespace should be removed + * + * @author Gabriel Birke + * @test + */ + public function pathRemovesTrailingSlashAndWhitespace() + { + $this->assertEquals('foo/bar', vfsStream::path('vfs://foo/bar/ ')); + } + + /** + * double slashes should be replaced by single slash + * + * @author Gabriel Birke + * @test + */ + public function pathRemovesDoubleSlashes() + { + // Regular path + $this->assertEquals('my/path', vfsStream::path('vfs://my/path')); + // Path with double slashes + $this->assertEquals('my/path', vfsStream::path('vfs://my//path')); + } + + /** + * test to create a new file + * + * @test + */ + public function newFile() + { + $file = vfsStream::newFile('filename.txt'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file); + $this->assertEquals('filename.txt', $file->getName()); + $this->assertEquals(0666, $file->getPermissions()); + } + + /** + * test to create a new file with non-default permissions + * + * @test + * @group permissions + */ + public function newFileWithDifferentPermissions() + { + $file = vfsStream::newFile('filename.txt', 0644); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file); + $this->assertEquals('filename.txt', $file->getName()); + $this->assertEquals(0644, $file->getPermissions()); + } + + /** + * test to create a new directory structure + * + * @test + */ + public function newSingleDirectory() + { + $foo = vfsStream::newDirectory('foo'); + $this->assertEquals('foo', $foo->getName()); + $this->assertEquals(0, count($foo->getChildren())); + $this->assertEquals(0777, $foo->getPermissions()); + } + + /** + * test to create a new directory structure with non-default permissions + * + * @test + * @group permissions + */ + public function newSingleDirectoryWithDifferentPermissions() + { + $foo = vfsStream::newDirectory('foo', 0755); + $this->assertEquals('foo', $foo->getName()); + $this->assertEquals(0, count($foo->getChildren())); + $this->assertEquals(0755, $foo->getPermissions()); + } + + /** + * test to create a new directory structure + * + * @test + */ + public function newDirectoryStructure() + { + $foo = vfsStream::newDirectory('foo/bar/baz'); + $this->assertEquals('foo', $foo->getName()); + $this->assertEquals(0777, $foo->getPermissions()); + $this->assertTrue($foo->hasChild('bar')); + $this->assertTrue($foo->hasChild('bar/baz')); + $this->assertFalse($foo->hasChild('baz')); + $bar = $foo->getChild('bar'); + $this->assertEquals('bar', $bar->getName()); + $this->assertEquals(0777, $bar->getPermissions()); + $this->assertTrue($bar->hasChild('baz')); + $baz1 = $bar->getChild('baz'); + $this->assertEquals('baz', $baz1->getName()); + $this->assertEquals(0777, $baz1->getPermissions()); + $baz2 = $foo->getChild('bar/baz'); + $this->assertSame($baz1, $baz2); + } + + /** + * test that correct directory structure is created + * + * @test + */ + public function newDirectoryWithSlashAtStart() + { + $foo = vfsStream::newDirectory('/foo/bar/baz', 0755); + $this->assertEquals('foo', $foo->getName()); + $this->assertEquals(0755, $foo->getPermissions()); + $this->assertTrue($foo->hasChild('bar')); + $this->assertTrue($foo->hasChild('bar/baz')); + $this->assertFalse($foo->hasChild('baz')); + $bar = $foo->getChild('bar'); + $this->assertEquals('bar', $bar->getName()); + $this->assertEquals(0755, $bar->getPermissions()); + $this->assertTrue($bar->hasChild('baz')); + $baz1 = $bar->getChild('baz'); + $this->assertEquals('baz', $baz1->getName()); + $this->assertEquals(0755, $baz1->getPermissions()); + $baz2 = $foo->getChild('bar/baz'); + $this->assertSame($baz1, $baz2); + } + + /** + * @test + * @group setup + * @since 0.7.0 + */ + public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithDefaultNameAndPermissions() + { + $root = vfsStream::setup(); + $this->assertSame($root, vfsStreamWrapper::getRoot()); + $this->assertEquals('root', $root->getName()); + $this->assertEquals(0777, $root->getPermissions()); + } + + /** + * @test + * @group setup + * @since 0.7.0 + */ + public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndDefaultPermissions() + { + $root = vfsStream::setup('foo'); + $this->assertSame($root, vfsStreamWrapper::getRoot()); + $this->assertEquals('foo', $root->getName()); + $this->assertEquals(0777, $root->getPermissions()); + } + + /** + * @test + * @group setup + * @since 0.7.0 + */ + public function setupRegistersStreamWrapperAndCreatesRootDirectoryWithGivenNameAndPermissions() + { + $root = vfsStream::setup('foo', 0444); + $this->assertSame($root, vfsStreamWrapper::getRoot()); + $this->assertEquals('foo', $root->getName()); + $this->assertEquals(0444, $root->getPermissions()); + } + + /** + * @test + * @group issue_14 + * @group issue_20 + * @since 0.10.0 + */ + public function setupWithEmptyArrayIsEqualToSetup() + { + $root = vfsStream::setup('example', + 0755, + array() + ); + $this->assertEquals('example', $root->getName()); + $this->assertEquals(0755, $root->getPermissions()); + $this->assertFalse($root->hasChildren()); + } + + /** + * @test + * @group issue_14 + * @group issue_20 + * @since 0.10.0 + */ + public function setupArraysAreTurnedIntoSubdirectories() + { + $root = vfsStream::setup('root', + null, + array('test' => array()) + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $root->getChild('test') + ); + $this->assertFalse($root->getChild('test')->hasChildren()); + } + + /** + * @test + * @group issue_14 + * @group issue_20 + * @since 0.10.0 + */ + public function setupStringsAreTurnedIntoFilesWithContent() + { + $root = vfsStream::setup('root', + null, + array('test.txt' => 'some content') + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test.txt')); + $this->assertVfsFile($root->getChild('test.txt'), 'some content'); + } + + /** + * @test + * @group issue_14 + * @group issue_20 + * @since 0.10.0 + */ + public function setupWorksRecursively() + { + $root = vfsStream::setup('root', + null, + array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ) + ) + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test')); + $test = $root->getChild('test'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); + $this->assertTrue($test->hasChildren()); + $this->assertTrue($test->hasChild('baz.txt')); + $this->assertVfsFile($test->getChild('baz.txt'), 'world'); + + $this->assertTrue($test->hasChild('foo')); + $foo = $test->getChild('foo'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); + $this->assertTrue($foo->hasChildren()); + $this->assertTrue($foo->hasChild('test.txt')); + $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); + } + + /** + * @test + * @group issue_17 + * @group issue_20 + */ + public function setupCastsNumericDirectoriesToStrings() + { + $root = vfsStream::setup('root', + null, + array(2011 => array ('test.txt' => 'some content')) + ); + $this->assertTrue($root->hasChild('2011')); + + $directory = $root->getChild('2011'); + $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); + + $this->assertTrue(file_exists('vfs://root/2011/test.txt')); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createArraysAreTurnedIntoSubdirectories() + { + $baseDir = vfsStream::create(array('test' => array()), new vfsStreamDirectory('baseDir')); + $this->assertTrue($baseDir->hasChildren()); + $this->assertTrue($baseDir->hasChild('test')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $baseDir->getChild('test') + ); + $this->assertFalse($baseDir->getChild('test')->hasChildren()); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createArraysAreTurnedIntoSubdirectoriesOfRoot() + { + $root = vfsStream::setup(); + $this->assertSame($root, vfsStream::create(array('test' => array()))); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test')); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', + $root->getChild('test') + ); + $this->assertFalse($root->getChild('test')->hasChildren()); + } + + /** + * @test + * @group issue_20 + * @expectedException \InvalidArgumentException + * @since 0.11.0 + */ + public function createThrowsExceptionIfNoBaseDirGivenAndNoRootSet() + { + vfsStream::create(array('test' => array())); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createWorksRecursively() + { + $baseDir = vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ) + ), + new vfsStreamDirectory('baseDir') + ); + $this->assertTrue($baseDir->hasChildren()); + $this->assertTrue($baseDir->hasChild('test')); + $test = $baseDir->getChild('test'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); + $this->assertTrue($test->hasChildren()); + $this->assertTrue($test->hasChild('baz.txt')); + $this->assertVfsFile($test->getChild('baz.txt'), 'world'); + + $this->assertTrue($test->hasChild('foo')); + $foo = $test->getChild('foo'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); + $this->assertTrue($foo->hasChildren()); + $this->assertTrue($foo->hasChild('test.txt')); + $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createWorksRecursivelyWithRoot() + { + $root = vfsStream::setup(); + $this->assertSame($root, + vfsStream::create(array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ) + ) + ) + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test')); + $test = $root->getChild('test'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $test); + $this->assertTrue($test->hasChildren()); + $this->assertTrue($test->hasChild('baz.txt')); + $this->assertVfsFile($test->getChild('baz.txt'), 'world'); + + $this->assertTrue($test->hasChild('foo')); + $foo = $test->getChild('foo'); + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamDirectory', $foo); + $this->assertTrue($foo->hasChildren()); + $this->assertTrue($foo->hasChild('test.txt')); + $this->assertVfsFile($foo->getChild('test.txt'), 'hello'); + } + + /** + * @test + * @group issue_20 + * @since 0.10.0 + */ + public function createStringsAreTurnedIntoFilesWithContent() + { + $baseDir = vfsStream::create(array('test.txt' => 'some content'), new vfsStreamDirectory('baseDir')); + $this->assertTrue($baseDir->hasChildren()); + $this->assertTrue($baseDir->hasChild('test.txt')); + $this->assertVfsFile($baseDir->getChild('test.txt'), 'some content'); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createStringsAreTurnedIntoFilesWithContentWithRoot() + { + $root = vfsStream::setup(); + $this->assertSame($root, + vfsStream::create(array('test.txt' => 'some content')) + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('test.txt')); + $this->assertVfsFile($root->getChild('test.txt'), 'some content'); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createCastsNumericDirectoriesToStrings() + { + $baseDir = vfsStream::create(array(2011 => array ('test.txt' => 'some content')), new vfsStreamDirectory('baseDir')); + $this->assertTrue($baseDir->hasChild('2011')); + + $directory = $baseDir->getChild('2011'); + $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); + } + + /** + * @test + * @group issue_20 + * @since 0.11.0 + */ + public function createCastsNumericDirectoriesToStringsWithRoot() + { + $root = vfsStream::setup(); + $this->assertSame($root, + vfsStream::create(array(2011 => array ('test.txt' => 'some content'))) + ); + $this->assertTrue($root->hasChild('2011')); + + $directory = $root->getChild('2011'); + $this->assertVfsFile($directory->getChild('test.txt'), 'some content'); + } + + /** + * helper function for assertions on vfsStreamFile + * + * @param vfsStreamFile $file + * @param string $content + */ + protected function assertVfsFile(vfsStreamFile $file, $content) + { + $this->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', + $file + ); + $this->assertEquals($content, + $file->getContent() + ); + } + + /** + * @test + * @group issue_10 + * @since 0.10.0 + */ + public function inspectWithContentGivesContentToVisitor() + { + $mockContent = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockVisitor = $this->bc_getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); + $mockVisitor->expects($this->once()) + ->method('visit') + ->with($this->equalTo($mockContent)) + ->will($this->returnValue($mockVisitor)); + $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor, $mockContent)); + } + + /** + * @test + * @group issue_10 + * @since 0.10.0 + */ + public function inspectWithoutContentGivesRootToVisitor() + { + $root = vfsStream::setup(); + $mockVisitor = $this->bc_getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); + $mockVisitor->expects($this->once()) + ->method('visitDirectory') + ->with($this->equalTo($root)) + ->will($this->returnValue($mockVisitor)); + $this->assertSame($mockVisitor, vfsStream::inspect($mockVisitor)); + } + + /** + * @test + * @group issue_10 + * @expectedException \InvalidArgumentException + * @since 0.10.0 + */ + public function inspectWithoutContentAndWithoutRootThrowsInvalidArgumentException() + { + $mockVisitor = $this->bc_getMock('org\\bovigo\\vfs\\visitor\\vfsStreamVisitor'); + $mockVisitor->expects($this->never()) + ->method('visit'); + $mockVisitor->expects($this->never()) + ->method('visitDirectory'); + vfsStream::inspect($mockVisitor); + } + + /** + * returns path to file system copy resource directory + * + * @return string + */ + protected function getFileSystemCopyDir() + { + return realpath(dirname(__FILE__) . '/../../../../resources/filesystemcopy'); + } + + /** + * @test + * @group issue_4 + * @expectedException \InvalidArgumentException + * @since 0.11.0 + */ + public function copyFromFileSystemThrowsExceptionIfNoBaseDirGivenAndNoRootSet() + { + vfsStream::copyFromFileSystem($this->getFileSystemCopyDir()); + } + + /** + * @test + * @group issue_4 + * @since 0.11.0 + */ + public function copyFromEmptyFolder() + { + $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder', + vfsStream::newDirectory('test') + ); + $baseDir->removeChild('.gitignore'); + $this->assertFalse($baseDir->hasChildren()); + } + + /** + * @test + * @group issue_4 + * @since 0.11.0 + */ + public function copyFromEmptyFolderWithRoot() + { + $root = vfsStream::setup(); + $this->assertEquals($root, + vfsStream::copyFromFileSystem($this->getFileSystemCopyDir() . '/emptyFolder') + ); + $root->removeChild('.gitignore'); + $this->assertFalse($root->hasChildren()); + } + + /** + * @test + * @group issue_4 + * @since 0.11.0 + */ + public function copyFromWithSubFolders() + { + $baseDir = vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(), + vfsStream::newDirectory('test'), + 3 + ); + $this->assertTrue($baseDir->hasChildren()); + $this->assertTrue($baseDir->hasChild('emptyFolder')); + $this->assertTrue($baseDir->hasChild('withSubfolders')); + $subfolderDir = $baseDir->getChild('withSubfolders'); + $this->assertTrue($subfolderDir->hasChild('subfolder1')); + $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt')); + $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ' '); + $this->assertTrue($subfolderDir->hasChild('subfolder2')); + $this->assertTrue($subfolderDir->hasChild('aFile.txt')); + $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo'); + } + + /** + * @test + * @group issue_4 + * @since 0.11.0 + */ + public function copyFromWithSubFoldersWithRoot() + { + $root = vfsStream::setup(); + $this->assertEquals($root, + vfsStream::copyFromFileSystem($this->getFileSystemCopyDir(), + null, + 3 + ) + ); + $this->assertTrue($root->hasChildren()); + $this->assertTrue($root->hasChild('emptyFolder')); + $this->assertTrue($root->hasChild('withSubfolders')); + $subfolderDir = $root->getChild('withSubfolders'); + $this->assertTrue($subfolderDir->hasChild('subfolder1')); + $this->assertTrue($subfolderDir->getChild('subfolder1')->hasChild('file1.txt')); + $this->assertVfsFile($subfolderDir->getChild('subfolder1/file1.txt'), ' '); + $this->assertTrue($subfolderDir->hasChild('subfolder2')); + $this->assertTrue($subfolderDir->hasChild('aFile.txt')); + $this->assertVfsFile($subfolderDir->getChild('aFile.txt'), 'foo'); + } + + /** + * @test + * @group issue_4 + * @group issue_29 + * @since 0.11.2 + */ + public function copyFromPreservesFilePermissions() + { + if (DIRECTORY_SEPARATOR !== '/') { + $this->markTestSkipped('Only applicable on Linux style systems.'); + } + + $copyDir = $this->getFileSystemCopyDir(); + $root = vfsStream::setup(); + $this->assertEquals($root, + vfsStream::copyFromFileSystem($copyDir, + null + ) + ); + $this->assertEquals(fileperms($copyDir . '/withSubfolders') - vfsStreamContent::TYPE_DIR, + $root->getChild('withSubfolders') + ->getPermissions() + ); + $this->assertEquals(fileperms($copyDir . '/withSubfolders/aFile.txt') - vfsStreamContent::TYPE_FILE, + $root->getChild('withSubfolders/aFile.txt') + ->getPermissions() + ); + } + + /** + * To test this the max file size is reduced to something reproduceable. + * + * @test + * @group issue_91 + * @since 1.5.0 + */ + public function copyFromFileSystemMocksLargeFiles() + { + if (DIRECTORY_SEPARATOR !== '/') { + $this->markTestSkipped('Only applicable on Linux style systems.'); + } + + $copyDir = $this->getFileSystemCopyDir(); + $root = vfsStream::setup(); + vfsStream::copyFromFileSystem($copyDir, $root, 3); + $this->assertEquals( + ' ', + $root->getChild('withSubfolders/subfolder1/file1.txt')->getContent() + ); + } + + /** + * @test + * @group issue_121 + * @since 1.6.1 + */ + public function createDirectoryWithTrailingSlashShouldNotCreateSubdirectoryWithEmptyName() + { + $directory = vfsStream::newDirectory('foo/'); + $this->assertFalse($directory->hasChildren()); + } + + /** + * @test + * @group issue_149 + */ + public function addStructureHandlesVfsStreamFileObjects() + { + $structure = array( + 'topLevel' => array( + 'thisIsAFile' => 'file contents', + vfsStream::newFile('anotherFile'), + ), + ); + + vfsStream::setup(); + $root = vfsStream::create($structure); + + $this->assertTrue($root->hasChild('topLevel/anotherFile')); + } + + /** + * @test + * @group issue_149 + */ + public function createHandlesLargeFileContentObjects() + { + $structure = array( + 'topLevel' => array( + 'thisIsAFile' => 'file contents', + 'anotherFile' => LargeFileContent::withMegabytes(2), + ), + ); + + vfsStream::setup(); + $root = vfsStream::create($structure); + + $this->assertTrue($root->hasChild('topLevel/anotherFile')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php new file mode 100644 index 000000000..62fc2e123 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php @@ -0,0 +1,194 @@ +assertEquals(vfsStream::umask(), + vfsStream::umask() + ); + $this->assertEquals(0000, + vfsStream::umask() + ); + } + + /** + * @test + */ + public function changingUmaskSettingReturnsOldUmaskSetting() + { + $this->assertEquals(0000, + vfsStream::umask(0022) + ); + $this->assertEquals(0022, + vfsStream::umask() + ); + } + + /** + * @test + */ + public function createFileWithDefaultUmaskSetting() + { + $file = new vfsStreamFile('foo'); + $this->assertEquals(0666, $file->getPermissions()); + } + + /** + * @test + */ + public function createFileWithDifferentUmaskSetting() + { + vfsStream::umask(0022); + $file = new vfsStreamFile('foo'); + $this->assertEquals(0644, $file->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryWithDefaultUmaskSetting() + { + $directory = new vfsStreamDirectory('foo'); + $this->assertEquals(0777, $directory->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryWithDifferentUmaskSetting() + { + vfsStream::umask(0022); + $directory = new vfsStreamDirectory('foo'); + $this->assertEquals(0755, $directory->getPermissions()); + } + + /** + * @test + */ + public function createFileUsingStreamWithDefaultUmaskSetting() + { + $root = vfsStream::setup(); + file_put_contents(vfsStream::url('root/newfile.txt'), 'file content'); + $this->assertEquals(0666, $root->getChild('newfile.txt')->getPermissions()); + } + + /** + * @test + */ + public function createFileUsingStreamWithDifferentUmaskSetting() + { + $root = vfsStream::setup(); + vfsStream::umask(0022); + file_put_contents(vfsStream::url('root/newfile.txt'), 'file content'); + $this->assertEquals(0644, $root->getChild('newfile.txt')->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryUsingStreamWithDefaultUmaskSetting() + { + $root = vfsStream::setup(); + mkdir(vfsStream::url('root/newdir')); + $this->assertEquals(0777, $root->getChild('newdir')->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryUsingStreamWithDifferentUmaskSetting() + { + $root = vfsStream::setup(); + vfsStream::umask(0022); + mkdir(vfsStream::url('root/newdir')); + $this->assertEquals(0755, $root->getChild('newdir')->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryUsingStreamWithExplicit0() + { + $root = vfsStream::setup(); + vfsStream::umask(0022); + mkdir(vfsStream::url('root/newdir'), 0000); + $this->assertEquals(0000, $root->getChild('newdir')->getPermissions()); + } + + /** + * @test + * + */ + public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicit0777() + { + $root = vfsStream::setup(); + vfsStream::umask(0022); + mkdir(vfsStream::url('root/newdir'), 0777); + $this->assertEquals(0755, $root->getChild('newdir')->getPermissions()); + } + + /** + * @test + */ + public function createDirectoryUsingStreamWithDifferentUmaskSettingButExplicitModeRequestedByCall() + { + $root = vfsStream::setup(); + vfsStream::umask(0022); + mkdir(vfsStream::url('root/newdir'), 0700); + $this->assertEquals(0700, $root->getChild('newdir')->getPermissions()); + } + + /** + * @test + */ + public function defaultUmaskSettingDoesNotInfluenceSetup() + { + $root = vfsStream::setup(); + $this->assertEquals(0777, $root->getPermissions()); + } + + /** + * @test + */ + public function umaskSettingShouldBeRespectedBySetup() + { + vfsStream::umask(0022); + $root = vfsStream::setup(); + $this->assertEquals(0755, $root->getPermissions()); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php new file mode 100644 index 000000000..279a2cee1 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php @@ -0,0 +1,62 @@ +bc_getMock('org\\bovigo\\vfs\\vfsStreamWrapper'); + stream_wrapper_register(vfsStream::SCHEME, get_class($mock)); + } + + /** + * clean up test environment + */ + public function tearDown() + { + TestvfsStreamWrapper::unregister(); + } + + /** + * registering the stream wrapper when another stream wrapper is already + * registered for the vfs scheme should throw an exception + * + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + */ + public function registerOverAnotherStreamWrapper() + { + vfsStreamWrapper::register(); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php new file mode 100644 index 000000000..4c12a45e0 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperBaseTestCase.php @@ -0,0 +1,98 @@ +fooURL = vfsStream::url('foo'); + $this->barURL = vfsStream::url('foo/bar'); + $this->baz1URL = vfsStream::url('foo/bar/baz1'); + $this->baz2URL = vfsStream::url('foo/baz2'); + $this->foo = new vfsStreamDirectory('foo'); + $this->bar = new vfsStreamDirectory('bar'); + $this->baz1 = vfsStream::newFile('baz1') + ->lastModified(300) + ->lastAccessed(300) + ->lastAttributeModified(300) + ->withContent('baz 1'); + $this->baz2 = vfsStream::newFile('baz2') + ->withContent('baz2') + ->lastModified(400) + ->lastAccessed(400) + ->lastAttributeModified(400); + $this->bar->addChild($this->baz1); + $this->foo->addChild($this->bar); + $this->foo->addChild($this->baz2); + $this->foo->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + $this->bar->lastModified(200) + ->lastAccessed(100) + ->lastAttributeModified(100); + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot($this->foo); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php new file mode 100644 index 000000000..35fc0ce2e --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirSeparatorTestCase.php @@ -0,0 +1,72 @@ +root = vfsStream::setup(); + } + + /** + * @test + */ + public function fileCanBeAccessedUsingWinDirSeparator() + { + vfsStream::newFile('foo/bar/baz.txt') + ->at($this->root) + ->withContent('test'); + $this->assertEquals('test', file_get_contents('vfs://root/foo\bar\baz.txt')); + } + + + /** + * @test + */ + public function directoryCanBeCreatedUsingWinDirSeparator() + { + mkdir('vfs://root/dir\bar\foo', true, 0777); + $this->assertTrue($this->root->hasChild('dir')); + $this->assertTrue($this->root->getChild('dir')->hasChild('bar')); + $this->assertTrue($this->root->getChild('dir/bar')->hasChild('foo')); + } + + /** + * @test + */ + public function directoryExitsTestUsingTrailingWinDirSeparator() + { + $structure = array( + 'dir' => array( + 'bar' => array( + ) + ) + ); + vfsStream::create($structure, $this->root); + + $this->assertTrue(file_exists(vfsStream::url('root/').'dir\\')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php new file mode 100644 index 000000000..5f840c47a --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php @@ -0,0 +1,500 @@ +assertFalse(mkdir(vfsStream::url('another'))); + $this->assertEquals(2, count($this->foo->getChildren())); + $this->assertSame($this->foo, vfsStreamWrapper::getRoot()); + } + + /** + * mkdir() should not overwrite existing root + * + * @test + */ + public function mkdirNoNewRootRecursively() + { + $this->assertFalse(mkdir(vfsStream::url('another/more'), 0777, true)); + $this->assertEquals(2, count($this->foo->getChildren())); + $this->assertSame($this->foo, vfsStreamWrapper::getRoot()); + } + + /** + * assert that mkdir() creates the correct directory structure + * + * @test + * @group permissions + */ + public function mkdirNonRecursively() + { + $this->assertFalse(mkdir($this->barURL . '/another/more')); + $this->assertEquals(2, count($this->foo->getChildren())); + $this->assertTrue(mkdir($this->fooURL . '/another')); + $this->assertEquals(3, count($this->foo->getChildren())); + $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); + } + + /** + * assert that mkdir() creates the correct directory structure + * + * @test + * @group permissions + */ + public function mkdirRecursively() + { + $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true)); + $this->assertEquals(3, count($this->foo->getChildren())); + $another = $this->foo->getChild('another'); + $this->assertTrue($another->hasChild('more')); + $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); + $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions()); + } + + /** + * @test + * @group issue_9 + * @since 0.9.0 + */ + public function mkdirWithDots() + { + $this->assertTrue(mkdir($this->fooURL . '/another/../more/.', 0777, true)); + $this->assertEquals(3, count($this->foo->getChildren())); + $this->assertTrue($this->foo->hasChild('more')); + } + + /** + * no root > new directory becomes root + * + * @test + * @group permissions + */ + public function mkdirWithoutRootCreatesNewRoot() + { + vfsStreamWrapper::register(); + $this->assertTrue(@mkdir(vfsStream::url('foo'))); + $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); + $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); + $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions()); + } + + /** + * trying to create a subdirectory of a file should not work + * + * @test + */ + public function mkdirOnFileReturnsFalse() + { + $this->assertFalse(mkdir($this->baz1URL . '/another/more', 0777, true)); + } + + /** + * assert that mkdir() creates the correct directory structure + * + * @test + * @group permissions + */ + public function mkdirNonRecursivelyDifferentPermissions() + { + $this->assertTrue(mkdir($this->fooURL . '/another', 0755)); + $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions()); + } + + /** + * assert that mkdir() creates the correct directory structure + * + * @test + * @group permissions + */ + public function mkdirRecursivelyDifferentPermissions() + { + $this->assertTrue(mkdir($this->fooURL . '/another/more', 0755, true)); + $this->assertEquals(3, count($this->foo->getChildren())); + $another = $this->foo->getChild('another'); + $this->assertTrue($another->hasChild('more')); + $this->assertEquals(0755, $this->foo->getChild('another')->getPermissions()); + $this->assertEquals(0755, $this->foo->getChild('another')->getChild('more')->getPermissions()); + } + + /** + * assert that mkdir() creates the correct directory structure + * + * @test + * @group permissions + */ + public function mkdirRecursivelyUsesDefaultPermissions() + { + $this->foo->chmod(0700); + $this->assertTrue(mkdir($this->fooURL . '/another/more', 0777, true)); + $this->assertEquals(3, count($this->foo->getChildren())); + $another = $this->foo->getChild('another'); + $this->assertTrue($another->hasChild('more')); + $this->assertEquals(0777, $this->foo->getChild('another')->getPermissions()); + $this->assertEquals(0777, $this->foo->getChild('another')->getChild('more')->getPermissions()); + } + + /** + * no root > new directory becomes root + * + * @test + * @group permissions + */ + public function mkdirWithoutRootCreatesNewRootDifferentPermissions() + { + vfsStreamWrapper::register(); + $this->assertTrue(@mkdir(vfsStream::url('foo'), 0755)); + $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); + $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); + $this->assertEquals(0755, vfsStreamWrapper::getRoot()->getPermissions()); + } + + /** + * no root > new directory becomes root + * + * @test + * @group permissions + */ + public function mkdirWithoutRootCreatesNewRootWithDefaultPermissions() + { + vfsStreamWrapper::register(); + $this->assertTrue(@mkdir(vfsStream::url('foo'))); + $this->assertEquals(vfsStreamContent::TYPE_DIR, vfsStreamWrapper::getRoot()->getType()); + $this->assertEquals('foo', vfsStreamWrapper::getRoot()->getName()); + $this->assertEquals(0777, vfsStreamWrapper::getRoot()->getPermissions()); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function mkdirDirCanNotCreateNewDirInNonWritingDirectory() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); + vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('restrictedFolder', 0000)); + $this->assertFalse(is_writable(vfsStream::url('root/restrictedFolder/'))); + $this->assertFalse(mkdir(vfsStream::url('root/restrictedFolder/newFolder'))); + $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('restrictedFolder/newFolder')); + } + + /** + * @test + * @group issue_28 + */ + public function mkDirShouldNotOverwriteExistingDirectories() + { + vfsStream::setup('root'); + $dir = vfsStream::url('root/dir'); + $this->assertTrue(mkdir($dir)); + $this->assertFalse(@mkdir($dir)); + } + + /** + * @test + * @group issue_28 + * @expectedException PHPUnit_Framework_Error + * @expectedExceptionMessage mkdir(): Path vfs://root/dir exists + */ + public function mkDirShouldNotOverwriteExistingDirectoriesAndTriggerE_USER_WARNING() + { + vfsStream::setup('root'); + $dir = vfsStream::url('root/dir'); + $this->assertTrue(mkdir($dir)); + $this->assertFalse(mkdir($dir)); + } + + /** + * @test + * @group issue_28 + */ + public function mkDirShouldNotOverwriteExistingFiles() + { + $root = vfsStream::setup('root'); + vfsStream::newFile('test.txt')->at($root); + $this->assertFalse(@mkdir(vfsStream::url('root/test.txt'))); + } + + /** + * @test + * @group issue_28 + * @expectedException PHPUnit_Framework_Error + * @expectedExceptionMessage mkdir(): Path vfs://root/test.txt exists + */ + public function mkDirShouldNotOverwriteExistingFilesAndTriggerE_USER_WARNING() + { + $root = vfsStream::setup('root'); + vfsStream::newFile('test.txt')->at($root); + $this->assertFalse(mkdir(vfsStream::url('root/test.txt'))); + } + + /** + * @test + * @group issue_131 + * @since 1.6.3 + */ + public function allowsRecursiveMkDirWithDirectoryName0() + { + vfsStream::setup('root'); + $subdir = vfsStream::url('root/a/0'); + mkdir($subdir, 0777, true); + $this->assertFileExists($subdir); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function canNotIterateOverNonReadableDirectory() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); + $this->assertFalse(@opendir(vfsStream::url('root'))); + $this->assertFalse(@dir(vfsStream::url('root'))); + } + + /** + * assert is_dir() returns correct result + * + * @test + */ + public function is_dir() + { + $this->assertTrue(is_dir($this->fooURL)); + $this->assertTrue(is_dir($this->fooURL . '/.')); + $this->assertTrue(is_dir($this->barURL)); + $this->assertTrue(is_dir($this->barURL . '/.')); + $this->assertFalse(is_dir($this->baz1URL)); + $this->assertFalse(is_dir($this->baz2URL)); + $this->assertFalse(is_dir($this->fooURL . '/another')); + $this->assertFalse(is_dir(vfsStream::url('another'))); + } + + /** + * can not unlink without root + * + * @test + */ + public function canNotUnlinkDirectoryWithoutRoot() + { + vfsStreamWrapper::register(); + $this->assertFalse(@rmdir(vfsStream::url('foo'))); + } + + /** + * rmdir() can not remove files + * + * @test + */ + public function rmdirCanNotRemoveFiles() + { + $this->assertFalse(rmdir($this->baz1URL)); + $this->assertFalse(rmdir($this->baz2URL)); + } + + /** + * rmdir() can not remove a non-existing directory + * + * @test + */ + public function rmdirCanNotRemoveNonExistingDirectory() + { + $this->assertFalse(rmdir($this->fooURL . '/another')); + } + + /** + * rmdir() can not remove non-empty directories + * + * @test + */ + public function rmdirCanNotRemoveNonEmptyDirectory() + { + $this->assertFalse(rmdir($this->fooURL)); + $this->assertFalse(rmdir($this->barURL)); + } + + /** + * @test + */ + public function rmdirCanRemoveEmptyDirectory() + { + vfsStream::newDirectory('empty')->at($this->foo); + $this->assertTrue($this->foo->hasChild('empty')); + $this->assertTrue(rmdir($this->fooURL . '/empty')); + $this->assertFalse($this->foo->hasChild('empty')); + } + + /** + * @test + */ + public function rmdirCanRemoveEmptyDirectoryWithDot() + { + vfsStream::newDirectory('empty')->at($this->foo); + $this->assertTrue($this->foo->hasChild('empty')); + $this->assertTrue(rmdir($this->fooURL . '/empty/.')); + $this->assertFalse($this->foo->hasChild('empty')); + } + + /** + * rmdir() can remove empty directories + * + * @test + */ + public function rmdirCanRemoveEmptyRoot() + { + $this->foo->removeChild('bar'); + $this->foo->removeChild('baz2'); + $this->assertTrue(rmdir($this->fooURL)); + $this->assertFalse(file_exists($this->fooURL)); // make sure statcache was cleared + $this->assertNull(vfsStreamWrapper::getRoot()); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function rmdirDirCanNotRemoveDirFromNonWritingDirectory() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); + vfsStreamWrapper::getRoot()->addChild(new vfsStreamDirectory('nonRemovableFolder')); + $this->assertFalse(is_writable(vfsStream::url('root'))); + $this->assertFalse(rmdir(vfsStream::url('root/nonRemovableFolder'))); + $this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('nonRemovableFolder')); + } + + /** + * @test + * @group permissions + * @group bug_17 + */ + public function issue17() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0770)); + vfsStreamWrapper::getRoot()->chgrp(vfsStream::GROUP_USER_1) + ->chown(vfsStream::OWNER_USER_1); + $this->assertFalse(mkdir(vfsStream::url('root/doesNotWork'))); + $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('doesNotWork')); + } + + /** + * @test + * @group bug_19 + */ + public function accessWithDoubleDotReturnsCorrectContent() + { + $this->assertEquals('baz2', + file_get_contents(vfsStream::url('foo/bar/../baz2')) + ); + } + + /** + * @test + * @group bug_115 + */ + public function accessWithExcessDoubleDotsReturnsCorrectContent() + { + $this->assertEquals('baz2', + file_get_contents(vfsStream::url('foo/../../../../bar/../baz2')) + ); + } + + /** + * @test + * @group bug_115 + */ + public function alwaysResolvesRootDirectoryAsOwnParentWithDoubleDot() + { + vfsStreamWrapper::getRoot()->chown(vfsStream::OWNER_USER_1); + + $this->assertTrue(is_dir(vfsStream::url('foo/..'))); + $stat = stat(vfsStream::url('foo/..')); + $this->assertEquals( + vfsStream::OWNER_USER_1, + $stat['uid'] + ); + } + + + /** + * @test + * @since 0.11.0 + * @group issue_23 + */ + public function unlinkCanNotRemoveNonEmptyDirectory() + { + try { + $this->assertFalse(unlink($this->barURL)); + } catch (\PHPUnit_Framework_Error $fe) { + $this->assertEquals('unlink(vfs://foo/bar): Operation not permitted', $fe->getMessage()); + } + + $this->assertTrue($this->foo->hasChild('bar')); + $this->assertFileExists($this->barURL); + } + + /** + * @test + * @since 0.11.0 + * @group issue_23 + */ + public function unlinkCanNotRemoveEmptyDirectory() + { + vfsStream::newDirectory('empty')->at($this->foo); + try { + $this->assertTrue(unlink($this->fooURL . '/empty')); + } catch (\PHPUnit_Framework_Error $fe) { + $this->assertEquals('unlink(vfs://foo/empty): Operation not permitted', $fe->getMessage()); + } + + $this->assertTrue($this->foo->hasChild('empty')); + $this->assertFileExists($this->fooURL . '/empty'); + } + + /** + * @test + * @group issue_32 + */ + public function canCreateFolderOfSameNameAsParentFolder() + { + $root = vfsStream::setup('testFolder'); + mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true); + $this->assertTrue(file_exists(vfsStream::url('testFolder/testFolder/subTestFolder/.'))); + } + + /** + * @test + * @group issue_32 + */ + public function canRetrieveFolderOfSameNameAsParentFolder() + { + $root = vfsStream::setup('testFolder'); + mkdir(vfsStream::url('testFolder') . '/testFolder/subTestFolder', 0777, true); + $this->assertTrue($root->hasChild('testFolder')); + $this->assertNotNull($root->getChild('testFolder')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php new file mode 100644 index 000000000..3ac9fb8e4 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php @@ -0,0 +1,457 @@ +assertEquals('baz2', file_get_contents($this->baz2URL)); + $this->assertEquals('baz 1', file_get_contents($this->baz1URL)); + $this->assertFalse(@file_get_contents($this->barURL)); + $this->assertFalse(@file_get_contents($this->fooURL)); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function file_get_contentsNonReadableFile() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); + vfsStream::newFile('new.txt', 0000)->at(vfsStreamWrapper::getRoot())->withContent('content'); + $this->assertEquals('', @file_get_contents(vfsStream::url('root/new.txt'))); + } + + /** + * assert that file_put_contents() delivers correct file contents + * + * @test + */ + public function file_put_contentsExistingFile() + { + $this->assertEquals(14, file_put_contents($this->baz2URL, 'baz is not bar')); + $this->assertEquals('baz is not bar', $this->baz2->getContent()); + $this->assertEquals(6, file_put_contents($this->baz1URL, 'foobar')); + $this->assertEquals('foobar', $this->baz1->getContent()); + $this->assertFalse(@file_put_contents($this->barURL, 'This does not work.')); + $this->assertFalse(@file_put_contents($this->fooURL, 'This does not work, too.')); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function file_put_contentsExistingFileNonWritableDirectory() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); + vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot())->withContent('content'); + $this->assertEquals(15, @file_put_contents(vfsStream::url('root/new.txt'), 'This does work.')); + $this->assertEquals('This does work.', file_get_contents(vfsStream::url('root/new.txt'))); + + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function file_put_contentsExistingNonWritableFile() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root')); + vfsStream::newFile('new.txt', 0400)->at(vfsStreamWrapper::getRoot())->withContent('content'); + $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.')); + $this->assertEquals('content', file_get_contents(vfsStream::url('root/new.txt'))); + } + + /** + * assert that file_put_contents() delivers correct file contents + * + * @test + */ + public function file_put_contentsNonExistingFile() + { + $this->assertEquals(14, file_put_contents($this->fooURL . '/baznot.bar', 'baz is not bar')); + $this->assertEquals(3, count($this->foo->getChildren())); + $this->assertEquals(14, file_put_contents($this->barURL . '/baznot.bar', 'baz is not bar')); + $this->assertEquals(2, count($this->bar->getChildren())); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function file_put_contentsNonExistingFileNonWritableDirectory() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); + $this->assertFalse(@file_put_contents(vfsStream::url('root/new.txt'), 'This does not work.')); + $this->assertFalse(file_exists(vfsStream::url('root/new.txt'))); + + } + + /** + * using a file pointer should work without any problems + * + * @test + */ + public function usingFilePointer() + { + $fp = fopen($this->baz1URL, 'r'); + $this->assertEquals(0, ftell($fp)); + $this->assertFalse(feof($fp)); + $this->assertEquals(0, fseek($fp, 2)); + $this->assertEquals(2, ftell($fp)); + $this->assertEquals(0, fseek($fp, 1, SEEK_CUR)); + $this->assertEquals(3, ftell($fp)); + $this->assertEquals(0, fseek($fp, 1, SEEK_END)); + $this->assertEquals(6, ftell($fp)); + $this->assertTrue(feof($fp)); + $this->assertEquals(0, fseek($fp, 2)); + $this->assertFalse(feof($fp)); + $this->assertEquals(2, ftell($fp)); + $this->assertEquals('z', fread($fp, 1)); + $this->assertEquals(3, ftell($fp)); + $this->assertEquals(' 1', fread($fp, 8092)); + $this->assertEquals(5, ftell($fp)); + $this->assertTrue(fclose($fp)); + } + + /** + * assert is_file() returns correct result + * + * @test + */ + public function is_file() + { + $this->assertFalse(is_file($this->fooURL)); + $this->assertFalse(is_file($this->barURL)); + $this->assertTrue(is_file($this->baz1URL)); + $this->assertTrue(is_file($this->baz2URL)); + $this->assertFalse(is_file($this->fooURL . '/another')); + $this->assertFalse(is_file(vfsStream::url('another'))); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function issue13CanNotOverwriteFiles() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + file_put_contents($vfsFile, 'd'); + $this->assertEquals('d', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function appendContentIfOpenedWithModeA() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'ab'); + fwrite($fp, 'd'); + fclose($fp); + $this->assertEquals('testd', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canOverwriteNonExistingFileWithModeX() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + $fp = fopen($vfsFile, 'xb'); + fwrite($fp, 'test'); + fclose($fp); + $this->assertEquals('test', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotOverwriteExistingFileWithModeX() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $this->assertFalse(@fopen($vfsFile, 'xb')); + $this->assertEquals('test', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotOpenNonExistingFileReadonly() + { + $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb')); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotOpenNonExistingFileReadAndWrite() + { + $this->assertFalse(@fopen(vfsStream::url('foo/doesNotExist.txt'), 'rb+')); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotOpenWithIllegalMode() + { + $this->assertFalse(@fopen($this->baz2URL, 'invalid')); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotWriteToReadOnlyFile() + { + $fp = fopen($this->baz2URL, 'rb'); + $this->assertEquals('baz2', fread($fp, 4096)); + $this->assertEquals(0, fwrite($fp, 'foo')); + fclose($fp); + $this->assertEquals('baz2', file_get_contents($this->baz2URL)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotReadFromWriteOnlyFileWithModeW() + { + $fp = fopen($this->baz2URL, 'wb'); + $this->assertEquals('', fread($fp, 4096)); + $this->assertEquals(3, fwrite($fp, 'foo')); + fseek($fp, 0); + $this->assertEquals('', fread($fp, 4096)); + fclose($fp); + $this->assertEquals('foo', file_get_contents($this->baz2URL)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotReadFromWriteOnlyFileWithModeA() + { + $fp = fopen($this->baz2URL, 'ab'); + $this->assertEquals('', fread($fp, 4096)); + $this->assertEquals(3, fwrite($fp, 'foo')); + fseek($fp, 0); + $this->assertEquals('', fread($fp, 4096)); + fclose($fp); + $this->assertEquals('baz2foo', file_get_contents($this->baz2URL)); + } + + /** + * @test + * @group issue7 + * @group issue13 + */ + public function canNotReadFromWriteOnlyFileWithModeX() + { + $vfsFile = vfsStream::url('foo/modeXtest.txt'); + $fp = fopen($vfsFile, 'xb'); + $this->assertEquals('', fread($fp, 4096)); + $this->assertEquals(3, fwrite($fp, 'foo')); + fseek($fp, 0); + $this->assertEquals('', fread($fp, 4096)); + fclose($fp); + $this->assertEquals('foo', file_get_contents($vfsFile)); + } + + /** + * @test + * @group permissions + * @group bug_15 + */ + public function canNotRemoveFileFromDirectoryWithoutWritePermissions() + { + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000)); + vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot()); + $this->assertFalse(unlink(vfsStream::url('root/new.txt'))); + $this->assertTrue(file_exists(vfsStream::url('root/new.txt'))); + } + + /** + * @test + * @group issue_30 + */ + public function truncatesFileWhenOpenedWithModeW() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'wb'); + $this->assertEquals('', file_get_contents($vfsFile)); + fclose($fp); + } + + /** + * @test + * @group issue_30 + */ + public function createsNonExistingFileWhenOpenedWithModeC() + { + $vfsFile = vfsStream::url('foo/tobecreated.txt'); + $fp = fopen($vfsFile, 'cb'); + fwrite($fp, 'some content'); + $this->assertTrue($this->foo->hasChild('tobecreated.txt')); + fclose($fp); + $this->assertEquals('some content', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue_30 + */ + public function createsNonExistingFileWhenOpenedWithModeCplus() + { + $vfsFile = vfsStream::url('foo/tobecreated.txt'); + $fp = fopen($vfsFile, 'cb+'); + fwrite($fp, 'some content'); + $this->assertTrue($this->foo->hasChild('tobecreated.txt')); + fclose($fp); + $this->assertEquals('some content', file_get_contents($vfsFile)); + } + + /** + * @test + * @group issue_30 + */ + public function doesNotTruncateFileWhenOpenedWithModeC() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'cb'); + $this->assertEquals('test', file_get_contents($vfsFile)); + fclose($fp); + } + + /** + * @test + * @group issue_30 + */ + public function setsPointerToStartWhenOpenedWithModeC() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'cb'); + $this->assertEquals(0, ftell($fp)); + fclose($fp); + } + + /** + * @test + * @group issue_30 + */ + public function doesNotTruncateFileWhenOpenedWithModeCplus() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'cb+'); + $this->assertEquals('test', file_get_contents($vfsFile)); + fclose($fp); + } + + /** + * @test + * @group issue_30 + */ + public function setsPointerToStartWhenOpenedWithModeCplus() + { + $vfsFile = vfsStream::url('foo/overwrite.txt'); + file_put_contents($vfsFile, 'test'); + $fp = fopen($vfsFile, 'cb+'); + $this->assertEquals(0, ftell($fp)); + fclose($fp); + } + + /** + * @test + */ + public function cannotOpenExistingNonwritableFileWithModeA() + { + $this->baz1->chmod(0400); + $this->assertFalse(@fopen($this->baz1URL, 'a')); + } + + /** + * @test + */ + public function cannotOpenExistingNonwritableFileWithModeW() + { + $this->baz1->chmod(0400); + $this->assertFalse(@fopen($this->baz1URL, 'w')); + } + + /** + * @test + */ + public function cannotOpenNonReadableFileWithModeR() + { + $this->baz1->chmod(0); + $this->assertFalse(@fopen($this->baz1URL, 'r')); + } + + /** + * @test + */ + public function cannotRenameToNonWritableDir() + { + $this->bar->chmod(0); + $this->assertFalse(@rename($this->baz2URL, vfsStream::url('foo/bar/baz3'))); + } + + /** + * @test + * @group issue_38 + */ + public function cannotReadFileFromNonReadableDir() + { + $this->markTestSkipped("Issue #38."); + $this->bar->chmod(0); + $this->assertFalse(@file_get_contents($this->baz1URL)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php new file mode 100644 index 000000000..cd3ea22c9 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php @@ -0,0 +1,314 @@ +lastModified(50) + ->lastAccessed(50) + ->lastAttributeModified(50); + $this->fooUrl = vfsStream::url('root/foo.txt'); + $this->barUrl = vfsStream::url('root/bar'); + $this->bazUrl = vfsStream::url('root/bar/baz.txt'); + } + + /** + * helper assertion for the tests + * + * @param string $url url to check + * @param vfsStreamContent $content content to compare + */ + protected function assertFileTimesEqualStreamTimes($url, vfsStreamContent $content) + { + $this->assertEquals(filemtime($url), $content->filemtime()); + $this->assertEquals(fileatime($url), $content->fileatime()); + $this->assertEquals(filectime($url), $content->filectime()); + } + + /** + * @test + * @group issue_7 + * @group issue_26 + */ + public function openFileChangesAttributeTimeOnly() + { + $file = vfsStream::newFile('foo.txt') + ->withContent('test') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + fclose(fopen($this->fooUrl, 'rb')); + $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); + $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); + $this->assertLessThanOrEqual(100, filemtime($this->fooUrl)); + $this->assertEquals(100, filectime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); + } + + /** + * @test + * @group issue_7 + * @group issue_26 + */ + public function fileGetContentsChangesAttributeTimeOnly() + { + $file = vfsStream::newFile('foo.txt') + ->withContent('test') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + file_get_contents($this->fooUrl); + $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); + $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); + $this->assertLessThanOrEqual(100, filemtime($this->fooUrl)); + $this->assertEquals(100, filectime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); + } + + /** + * @test + * @group issue_7 + * @group issue_26 + */ + public function openFileWithTruncateChangesAttributeAndModificationTime() + { + $file = vfsStream::newFile('foo.txt') + ->withContent('test') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + fclose(fopen($this->fooUrl, 'wb')); + $this->assertGreaterThan(time() - 2, filemtime($this->fooUrl)); + $this->assertGreaterThan(time() - 2, fileatime($this->fooUrl)); + $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl)); + $this->assertLessThanOrEqual(time(), fileatime($this->fooUrl)); + $this->assertEquals(100, filectime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); + } + + /** + * @test + * @group issue_7 + */ + public function readFileChangesAccessTime() + { + $file = vfsStream::newFile('foo.txt') + ->withContent('test') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + $fp = fopen($this->fooUrl, 'rb'); + $openTime = time(); + sleep(2); + fread($fp, 1024); + fclose($fp); + $this->assertLessThanOrEqual($openTime, filemtime($this->fooUrl)); + $this->assertLessThanOrEqual($openTime + 3, fileatime($this->fooUrl)); + $this->assertEquals(100, filectime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); + } + + /** + * @test + * @group issue_7 + */ + public function writeFileChangesModificationTime() + { + $file = vfsStream::newFile('foo.txt') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + $fp = fopen($this->fooUrl, 'wb'); + $openTime = time(); + sleep(2); + fwrite($fp, 'test'); + fclose($fp); + $this->assertLessThanOrEqual($openTime + 3, filemtime($this->fooUrl)); + $this->assertLessThanOrEqual($openTime, fileatime($this->fooUrl)); + $this->assertEquals(100, filectime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file); + + } + + /** + * @test + * @group issue_7 + */ + public function createNewFileSetsAllTimesToCurrentTime() + { + file_put_contents($this->fooUrl, 'test'); + $this->assertLessThanOrEqual(time(), filemtime($this->fooUrl)); + $this->assertEquals(fileatime($this->fooUrl), filectime($this->fooUrl)); + $this->assertEquals(fileatime($this->fooUrl), filemtime($this->fooUrl)); + $this->assertFileTimesEqualStreamTimes($this->fooUrl, vfsStreamWrapper::getRoot()->getChild('foo.txt')); + } + + /** + * @test + * @group issue_7 + */ + public function createNewFileChangesAttributeAndModificationTimeOfContainingDirectory() + { + $dir = vfsStream::newDirectory('bar') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + file_put_contents($this->bazUrl, 'test'); + $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); + $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); + $this->assertEquals(100, fileatime($this->barUrl)); + $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir); + } + + /** + * @test + * @group issue_7 + */ + public function addNewFileNameWithLinkFunctionChangesAttributeTimeOfOriginalFile() + { + $this->markTestSkipped('Links are currently not supported by vfsStream.'); + } + + /** + * @test + * @group issue_7 + */ + public function addNewFileNameWithLinkFunctionChangesAttributeAndModificationTimeOfDirectoryContainingLink() + { + $this->markTestSkipped('Links are currently not supported by vfsStream.'); + } + + /** + * @test + * @group issue_7 + */ + public function removeFileChangesAttributeAndModificationTimeOfContainingDirectory() + { + $dir = vfsStream::newDirectory('bar') + ->at(vfsStreamWrapper::getRoot()); + $file = vfsStream::newFile('baz.txt') + ->at($dir) + ->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + $dir->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + unlink($this->bazUrl); + $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); + $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); + $this->assertEquals(100, fileatime($this->barUrl)); + $this->assertFileTimesEqualStreamTimes($this->barUrl, $dir); + } + + /** + * @test + * @group issue_7 + */ + public function renameFileChangesAttributeAndModificationTimeOfAffectedDirectories() + { + $target = vfsStream::newDirectory('target') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(200) + ->lastAccessed(200) + ->lastAttributeModified(200); + $source = vfsStream::newDirectory('bar') + ->at(vfsStreamWrapper::getRoot()); + $file = vfsStream::newFile('baz.txt') + ->at($source) + ->lastModified(300) + ->lastAccessed(300) + ->lastAttributeModified(300); + $source->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + rename($this->bazUrl, vfsStream::url('root/target/baz.txt')); + $this->assertLessThanOrEqual(time(), filemtime($this->barUrl)); + $this->assertLessThanOrEqual(time(), filectime($this->barUrl)); + $this->assertEquals(100, fileatime($this->barUrl)); + $this->assertFileTimesEqualStreamTimes($this->barUrl, $source); + $this->assertLessThanOrEqual(time(), filemtime(vfsStream::url('root/target'))); + $this->assertLessThanOrEqual(time(), filectime(vfsStream::url('root/target'))); + $this->assertEquals(200, fileatime(vfsStream::url('root/target'))); + $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target'), $target); + } + + /** + * @test + * @group issue_7 + */ + public function renameFileDoesNotChangeFileTimesOfFileItself() + { + $target = vfsStream::newDirectory('target') + ->at(vfsStreamWrapper::getRoot()) + ->lastModified(200) + ->lastAccessed(200) + ->lastAttributeModified(200); + $source = vfsStream::newDirectory('bar') + ->at(vfsStreamWrapper::getRoot()); + $file = vfsStream::newFile('baz.txt') + ->at($source) + ->lastModified(300) + ->lastAccessed(300) + ->lastAttributeModified(300); + $source->lastModified(100) + ->lastAccessed(100) + ->lastAttributeModified(100); + rename($this->bazUrl, vfsStream::url('root/target/baz.txt')); + $this->assertEquals(300, filemtime(vfsStream::url('root/target/baz.txt'))); + $this->assertEquals(300, filectime(vfsStream::url('root/target/baz.txt'))); + $this->assertEquals(300, fileatime(vfsStream::url('root/target/baz.txt'))); + $this->assertFileTimesEqualStreamTimes(vfsStream::url('root/target/baz.txt'), $file); + } + + /** + * @test + * @group issue_7 + */ + public function changeFileAttributesChangesAttributeTimeOfFileItself() + { + $this->markTestSkipped('Changing file attributes via stream wrapper for self-defined streams is not supported by PHP.'); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php new file mode 100644 index 000000000..3fb137f7c --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFlockTestCase.php @@ -0,0 +1,439 @@ +root = vfsStream::setup(); + } + + /** + * @test + */ + public function fileIsNotLockedByDefault() + { + $this->assertFalse(vfsStream::newFile('foo.txt')->isLocked()); + } + + /** + * @test + */ + public function streamIsNotLockedByDefault() + { + file_put_contents(vfsStream::url('root/foo.txt'), 'content'); + $this->assertFalse($this->root->getChild('foo.txt')->isLocked()); + } + + /** + * @test + */ + public function canAquireSharedLock() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertTrue(flock($fp, LOCK_SH)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + + } + + /** + * @test + */ + public function canAquireSharedLockWithNonBlockingFlockCall() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertTrue(flock($fp, LOCK_SH | LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + + } + + /** + * @test + */ + public function canAquireEclusiveLock() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertTrue(flock($fp, LOCK_EX)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @test + */ + public function canAquireEclusiveLockWithNonBlockingFlockCall() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertTrue(flock($fp, LOCK_EX | LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @test + */ + public function canRemoveLock() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_EX); + $this->assertTrue(flock($fp, LOCK_UN)); + $this->assertFalse($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canRemoveLockWhenNotLocked() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertTrue(flock($fp, LOCK_UN)); + $this->assertFalse($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertFalse($file->hasSharedLock($fp)); + $this->assertFalse($file->hasExclusiveLock()); + $this->assertFalse($file->hasExclusiveLock($fp)); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canRemoveSharedLockWithoutRemovingSharedLockOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_SH); + $file->lock($fp2, LOCK_SH); + $this->assertTrue(flock($fp1, LOCK_UN)); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasSharedLock($fp1)); + $this->assertTrue($file->hasSharedLock($fp2)); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canNotRemoveSharedLockAcquiredOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_SH); + $this->assertTrue(flock($fp2, LOCK_UN)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canNotRemoveExlusiveLockAcquiredOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_EX); + $this->assertTrue(flock($fp2, LOCK_UN)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp1); + fclose($fp2); + } + + /** + * @test + */ + public function canRemoveLockWithNonBlockingFlockCall() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_EX); + $this->assertTrue(flock($fp, LOCK_UN | LOCK_NB)); + $this->assertFalse($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canNotAquireExclusiveLockIfAlreadyExclusivelyLockedOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_EX); + $this->assertFalse(flock($fp2, LOCK_EX + LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + $this->assertTrue($file->hasExclusiveLock($fp1)); + $this->assertFalse($file->hasExclusiveLock($fp2)); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canAquireExclusiveLockIfAlreadySelfExclusivelyLocked() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_EX); + $this->assertTrue(flock($fp, LOCK_EX + LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canNotAquireExclusiveLockIfAlreadySharedLockedOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_SH); + $this->assertFalse(flock($fp2, LOCK_EX)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canAquireExclusiveLockIfAlreadySelfSharedLocked() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_SH); + $this->assertTrue(flock($fp, LOCK_EX)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canNotAquireSharedLockIfAlreadyExclusivelyLockedOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_EX); + $this->assertFalse(flock($fp2, LOCK_SH + LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canAquireSharedLockIfAlreadySelfExclusivelyLocked() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_EX); + $this->assertTrue(flock($fp, LOCK_SH + LOCK_NB)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canAquireSharedLockIfAlreadySelfSharedLocked() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_SH); + $this->assertTrue(flock($fp, LOCK_SH)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function canAquireSharedLockIfAlreadySharedLockedOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp1, LOCK_SH); + $this->assertTrue(flock($fp2, LOCK_SH)); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertTrue($file->hasSharedLock($fp1)); + $this->assertTrue($file->hasSharedLock($fp2)); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp1); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/31 + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_31 + * @group issue_40 + */ + public function removesExclusiveLockOnStreamClose() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_EX); + fclose($fp); + $this->assertFalse($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/31 + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_31 + * @group issue_40 + */ + public function removesSharedLockOnStreamClose() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp, LOCK_SH); + fclose($fp); + $this->assertFalse($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertFalse($file->hasExclusiveLock()); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function notRemovesExclusiveLockOnStreamCloseIfExclusiveLockAcquiredOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp2, LOCK_EX); + fclose($fp1); + $this->assertTrue($file->isLocked()); + $this->assertFalse($file->hasSharedLock()); + $this->assertTrue($file->hasExclusiveLock()); + $this->assertTrue($file->hasExclusiveLock($fp2)); + fclose($fp2); + } + + /** + * @see https://github.com/mikey179/vfsStream/issues/40 + * @test + * @group issue_40 + */ + public function notRemovesSharedLockOnStreamCloseIfSharedLockAcquiredOnOtherFileHandler() + { + $file = vfsStream::newFile('foo.txt')->at($this->root); + $fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $file->lock($fp2, LOCK_SH); + fclose($fp1); + $this->assertTrue($file->isLocked()); + $this->assertTrue($file->hasSharedLock()); + $this->assertTrue($file->hasSharedLock($fp2)); + $this->assertFalse($file->hasExclusiveLock()); + fclose($fp2); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php new file mode 100644 index 000000000..fb5d9fd05 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperLargeFileTestCase.php @@ -0,0 +1,81 @@ +largeFile = vfsStream::newFile('large.txt') + ->withContent(LargeFileContent::withGigabytes(100)) + ->at($root); + } + + /** + * @test + */ + public function hasLargeFileSize() + { + if (PHP_INT_MAX == 2147483647) { + $this->markTestSkipped('Requires 64-bit version of PHP'); + } + + $this->assertEquals( + 100 * 1024 * 1024 * 1024, + filesize($this->largeFile->url()) + ); + } + + /** + * @test + */ + public function canReadFromLargeFile() + { + $fp = fopen($this->largeFile->url(), 'rb'); + $data = fread($fp, 15); + fclose($fp); + $this->assertEquals(str_repeat(' ', 15), $data); + } + + /** + * @test + */ + public function canWriteIntoLargeFile() + { + $fp = fopen($this->largeFile->url(), 'rb+'); + fseek($fp, 100 * 1024 * 1024, SEEK_SET); + fwrite($fp, 'foobarbaz'); + fclose($fp); + $this->largeFile->seek((100 * 1024 * 1024) - 3, SEEK_SET); + $this->assertEquals( + ' foobarbaz ', + $this->largeFile->read(15) + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php new file mode 100644 index 000000000..95031909e --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperQuotaTestCase.php @@ -0,0 +1,223 @@ +root = vfsStream::setup(); + vfsStream::setQuota(10); + } + + /** + * @test + */ + public function writeLessThanQuotaWritesEverything() + { + $this->assertEquals(9, file_put_contents(vfsStream::url('root/file.txt'), '123456789')); + $this->assertEquals('123456789', $this->root->getChild('file.txt')->getContent()); + } + + /** + * @test + */ + public function writeUpToQotaWritesEverything() + { + $this->assertEquals(10, file_put_contents(vfsStream::url('root/file.txt'), '1234567890')); + $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent()); + } + + /** + * @test + */ + public function writeMoreThanQotaWritesOnlyUpToQuota() + { + try { + file_put_contents(vfsStream::url('root/file.txt'), '12345678901'); + } catch (\PHPUnit_Framework_Error $e) { + $this->assertEquals('file_put_contents(): Only 10 of 11 bytes written, possibly out of free disk space', + $e->getMessage() + ); + } + + $this->assertEquals('1234567890', $this->root->getChild('file.txt')->getContent()); + } + + /** + * @test + */ + public function considersAllFilesForQuota() + { + vfsStream::newFile('foo.txt') + ->withContent('foo') + ->at(vfsStream::newDirectory('bar') + ->at($this->root) + ); + try { + file_put_contents(vfsStream::url('root/file.txt'), '12345678901'); + } catch (\PHPUnit_Framework_Error $e) { + $this->assertEquals('file_put_contents(): Only 7 of 11 bytes written, possibly out of free disk space', + $e->getMessage() + ); + } + + $this->assertEquals('1234567', $this->root->getChild('file.txt')->getContent()); + } + + /** + * @test + * @group issue_33 + */ + public function truncateToLessThanQuotaWritesEverything() + { + if (version_compare(PHP_VERSION, '5.4.0', '<')) { + $this->markTestSkipped('Requires PHP 5.4'); + } + + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); + $this->assertTrue(ftruncate($fp, 9)); + fclose($fp); + $this->assertEquals(9, + $this->root->getChild('file.txt')->size() + ); + $this->assertEquals("\0\0\0\0\0\0\0\0\0", + $this->root->getChild('file.txt')->getContent() + ); + } + + /** + * @test + * @group issue_33 + */ + public function truncateUpToQotaWritesEverything() + { + if (version_compare(PHP_VERSION, '5.4.0', '<')) { + $this->markTestSkipped('Requires PHP 5.4'); + } + + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); + $this->assertTrue(ftruncate($fp, 10)); + fclose($fp); + $this->assertEquals(10, + $this->root->getChild('file.txt')->size() + ); + $this->assertEquals("\0\0\0\0\0\0\0\0\0\0", + $this->root->getChild('file.txt')->getContent() + ); + } + + /** + * @test + * @group issue_33 + */ + public function truncateToMoreThanQotaWritesOnlyUpToQuota() + { + if (version_compare(PHP_VERSION, '5.4.0', '<')) { + $this->markTestSkipped('Requires PHP 5.4'); + } + + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); + $this->assertTrue(ftruncate($fp, 11)); + fclose($fp); + $this->assertEquals(10, + $this->root->getChild('file.txt')->size() + ); + $this->assertEquals("\0\0\0\0\0\0\0\0\0\0", + $this->root->getChild('file.txt')->getContent() + ); + } + + /** + * @test + * @group issue_33 + */ + public function truncateConsidersAllFilesForQuota() + { + if (version_compare(PHP_VERSION, '5.4.0', '<')) { + $this->markTestSkipped('Requires PHP 5.4'); + } + + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + vfsStream::newFile('bar.txt') + ->withContent('bar') + ->at(vfsStream::newDirectory('bar') + ->at($this->root) + ); + $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); + $this->assertTrue(ftruncate($fp, 11)); + fclose($fp); + $this->assertEquals(7, + $this->root->getChild('file.txt')->size() + ); + $this->assertEquals("\0\0\0\0\0\0\0", + $this->root->getChild('file.txt')->getContent() + ); + } + + /** + * @test + * @group issue_33 + */ + public function canNotTruncateToGreaterLengthWhenDiscQuotaReached() + { + if (version_compare(PHP_VERSION, '5.4.0', '<')) { + $this->markTestSkipped('Requires PHP 5.4'); + } + + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + vfsStream::newFile('bar.txt') + ->withContent('1234567890') + ->at(vfsStream::newDirectory('bar') + ->at($this->root) + ); + $fp = fopen(vfsStream::url('root/file.txt'), 'w+'); + $this->assertFalse(ftruncate($fp, 11)); + fclose($fp); + $this->assertEquals(0, + $this->root->getChild('file.txt')->size() + ); + $this->assertEquals('', + $this->root->getChild('file.txt')->getContent() + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php new file mode 100644 index 000000000..ff2ab14f7 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperSetOptionTestCase.php @@ -0,0 +1,75 @@ +root = vfsStream::setup(); + vfsStream::newFile('foo.txt')->at($this->root); + } + + /** + * @test + */ + public function setBlockingDoesNotWork() + { + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertFalse(stream_set_blocking($fp, 1)); + fclose($fp); + } + + /** + * @test + */ + public function removeBlockingDoesNotWork() + { + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertFalse(stream_set_blocking($fp, 0)); + fclose($fp); + } + + /** + * @test + */ + public function setTimeoutDoesNotWork() + { + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertFalse(stream_set_timeout($fp, 1)); + fclose($fp); + } + + /** + * @test + */ + public function setWriteBufferDoesNotWork() + { + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $this->assertEquals(-1, stream_set_write_buffer($fp, 512)); + fclose($fp); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php new file mode 100644 index 000000000..fd1c26c6e --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperStreamSelectTestCase.php @@ -0,0 +1,42 @@ += 80000) + { + $this->bc_expectException('\ValueError'); + } + else + { + $this->bc_expectException('\PHPUnit_Framework_Error'); + } + + $root = vfsStream::setup(); + $file = vfsStream::newFile('foo.txt')->at($root)->withContent('testContent'); + + $fp = fopen(vfsStream::url('root/foo.txt'), 'rb'); + $readarray = array($fp); + $writearray = array(); + $exceptarray = array(); + stream_select($readarray, $writearray, $exceptarray, 1); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php new file mode 100644 index 000000000..f2b3234dc --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php @@ -0,0 +1,789 @@ +assertSame($this->foo, vfsStreamWrapper::getRoot()); + vfsStreamWrapper::register(); + $this->assertNull(vfsStreamWrapper::getRoot()); + } + + /** + * @test + * @since 0.11.0 + */ + public function setRootReturnsRoot() + { + vfsStreamWrapper::register(); + $root = vfsStream::newDirectory('root'); + $this->assertSame($root, vfsStreamWrapper::setRoot($root)); + } + + /** + * assure that filesize is returned correct + * + * @test + */ + public function filesize() + { + $this->assertEquals(0, filesize($this->fooURL)); + $this->assertEquals(0, filesize($this->fooURL . '/.')); + $this->assertEquals(0, filesize($this->barURL)); + $this->assertEquals(0, filesize($this->barURL . '/.')); + $this->assertEquals(4, filesize($this->baz2URL)); + $this->assertEquals(5, filesize($this->baz1URL)); + } + + /** + * assert that file_exists() delivers correct result + * + * @test + */ + public function file_exists() + { + $this->assertTrue(file_exists($this->fooURL)); + $this->assertTrue(file_exists($this->fooURL . '/.')); + $this->assertTrue(file_exists($this->barURL)); + $this->assertTrue(file_exists($this->barURL . '/.')); + $this->assertTrue(file_exists($this->baz1URL)); + $this->assertTrue(file_exists($this->baz2URL)); + $this->assertFalse(file_exists($this->fooURL . '/another')); + $this->assertFalse(file_exists(vfsStream::url('another'))); + } + + /** + * assert that filemtime() delivers correct result + * + * @test + */ + public function filemtime() + { + $this->assertEquals(100, filemtime($this->fooURL)); + $this->assertEquals(100, filemtime($this->fooURL . '/.')); + $this->assertEquals(200, filemtime($this->barURL)); + $this->assertEquals(200, filemtime($this->barURL . '/.')); + $this->assertEquals(300, filemtime($this->baz1URL)); + $this->assertEquals(400, filemtime($this->baz2URL)); + } + + /** + * @test + * @group issue_23 + */ + public function unlinkRemovesFilesOnly() + { + $this->assertTrue(unlink($this->baz2URL)); + $this->assertFalse(file_exists($this->baz2URL)); // make sure statcache was cleared + $this->assertEquals(array($this->bar), $this->foo->getChildren()); + $this->assertFalse(@unlink($this->fooURL . '/another')); + $this->assertFalse(@unlink(vfsStream::url('another'))); + $this->assertEquals(array($this->bar), $this->foo->getChildren()); + } + + /** + * @test + * @group issue_49 + */ + public function unlinkReturnsFalseWhenFileDoesNotExist() + { + vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb')); + $this->assertFalse(@unlink(vfsStream::url('foo.blubb2'))); + } + + /** + * @test + * @group issue_49 + */ + public function unlinkReturnsFalseWhenFileDoesNotExistAndFileWithSameNameExistsInRoot() + { + vfsStream::setup()->addChild(vfsStream::newFile('foo.blubb')); + $this->assertFalse(@unlink(vfsStream::url('foo.blubb'))); + } + + /** + * assert dirname() returns correct directory name + * + * @test + */ + public function dirname() + { + $this->assertEquals($this->fooURL, dirname($this->barURL)); + $this->assertEquals($this->barURL, dirname($this->baz1URL)); + # returns "vfs:" instead of "." + # however this seems not to be fixable because dirname() does not + # call the stream wrapper + #$this->assertEquals(dirname(vfsStream::url('doesNotExist')), '.'); + } + + /** + * assert basename() returns correct file name + * + * @test + */ + public function basename() + { + $this->assertEquals('bar', basename($this->barURL)); + $this->assertEquals('baz1', basename($this->baz1URL)); + $this->assertEquals('doesNotExist', basename(vfsStream::url('doesNotExist'))); + } + + /** + * assert is_readable() works correct + * + * @test + */ + public function is_readable() + { + $this->assertTrue(is_readable($this->fooURL)); + $this->assertTrue(is_readable($this->fooURL . '/.')); + $this->assertTrue(is_readable($this->barURL)); + $this->assertTrue(is_readable($this->barURL . '/.')); + $this->assertTrue(is_readable($this->baz1URL)); + $this->assertTrue(is_readable($this->baz2URL)); + $this->assertFalse(is_readable($this->fooURL . '/another')); + $this->assertFalse(is_readable(vfsStream::url('another'))); + + $this->foo->chmod(0222); + $this->assertFalse(is_readable($this->fooURL)); + + $this->baz1->chmod(0222); + $this->assertFalse(is_readable($this->baz1URL)); + } + + /** + * assert is_writable() works correct + * + * @test + */ + public function is_writable() + { + $this->assertTrue(is_writable($this->fooURL)); + $this->assertTrue(is_writable($this->fooURL . '/.')); + $this->assertTrue(is_writable($this->barURL)); + $this->assertTrue(is_writable($this->barURL . '/.')); + $this->assertTrue(is_writable($this->baz1URL)); + $this->assertTrue(is_writable($this->baz2URL)); + $this->assertFalse(is_writable($this->fooURL . '/another')); + $this->assertFalse(is_writable(vfsStream::url('another'))); + + $this->foo->chmod(0444); + $this->assertFalse(is_writable($this->fooURL)); + + $this->baz1->chmod(0444); + $this->assertFalse(is_writable($this->baz1URL)); + } + + /** + * assert is_executable() works correct + * + * @test + */ + public function is_executable() + { + $this->assertFalse(is_executable($this->baz1URL)); + $this->baz1->chmod(0766); + $this->assertTrue(is_executable($this->baz1URL)); + $this->assertFalse(is_executable($this->baz2URL)); + } + + /** + * assert is_executable() works correct + * + * @test + */ + public function directoriesAndNonExistingFilesAreSometimesExecutable() + { + // Inconsistent behavior has been fixed in 7.3 + // see https://github.com/php/php-src/commit/94b4abdbc4d + if (PHP_VERSION_ID >= 70300) { + $this->assertTrue(is_executable($this->fooURL)); + $this->assertTrue(is_executable($this->fooURL . '/.')); + $this->assertTrue(is_executable($this->barURL)); + $this->assertTrue(is_executable($this->barURL . '/.')); + } else { + $this->assertFalse(is_executable($this->fooURL)); + $this->assertFalse(is_executable($this->fooURL . '/.')); + $this->assertFalse(is_executable($this->barURL)); + $this->assertFalse(is_executable($this->barURL . '/.')); + } + + $this->assertFalse(is_executable($this->fooURL . '/another')); + $this->assertFalse(is_executable(vfsStream::url('another'))); + } + + /** + * file permissions + * + * @test + * @group permissions + */ + public function chmod() + { + $this->assertEquals(40777, decoct(fileperms($this->fooURL))); + $this->assertEquals(40777, decoct(fileperms($this->fooURL . '/.'))); + $this->assertEquals(40777, decoct(fileperms($this->barURL))); + $this->assertEquals(40777, decoct(fileperms($this->barURL . '/.'))); + $this->assertEquals(100666, decoct(fileperms($this->baz1URL))); + $this->assertEquals(100666, decoct(fileperms($this->baz2URL))); + + $this->foo->chmod(0755); + $this->bar->chmod(0700); + $this->baz1->chmod(0644); + $this->baz2->chmod(0600); + $this->assertEquals(40755, decoct(fileperms($this->fooURL))); + $this->assertEquals(40755, decoct(fileperms($this->fooURL . '/.'))); + $this->assertEquals(40700, decoct(fileperms($this->barURL))); + $this->assertEquals(40700, decoct(fileperms($this->barURL . '/.'))); + $this->assertEquals(100644, decoct(fileperms($this->baz1URL))); + $this->assertEquals(100600, decoct(fileperms($this->baz2URL))); + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function chmodModifiesPermissions() + { + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->assertFalse(@chmod($this->fooURL, 0755)); + $this->assertFalse(@chmod($this->barURL, 0711)); + $this->assertFalse(@chmod($this->baz1URL, 0644)); + $this->assertFalse(@chmod($this->baz2URL, 0664)); + $this->assertEquals(40777, decoct(fileperms($this->fooURL))); + $this->assertEquals(40777, decoct(fileperms($this->barURL))); + $this->assertEquals(100666, decoct(fileperms($this->baz1URL))); + $this->assertEquals(100666, decoct(fileperms($this->baz2URL))); + } else { + $this->assertTrue(chmod($this->fooURL, 0755)); + $this->assertTrue(chmod($this->barURL, 0711)); + $this->assertTrue(chmod($this->baz1URL, 0644)); + $this->assertTrue(chmod($this->baz2URL, 0664)); + $this->assertEquals(40755, decoct(fileperms($this->fooURL))); + $this->assertEquals(40711, decoct(fileperms($this->barURL))); + $this->assertEquals(100644, decoct(fileperms($this->baz1URL))); + $this->assertEquals(100664, decoct(fileperms($this->baz2URL))); + } + } + + /** + * @test + * @group permissions + */ + public function fileownerIsCurrentUserByDefault() + { + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL)); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL . '/.')); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL)); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->barURL . '/.')); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz1URL)); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->baz2URL)); + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function chownChangesUser() + { + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->foo->chown(vfsStream::OWNER_USER_1); + $this->bar->chown(vfsStream::OWNER_USER_1); + $this->baz1->chown(vfsStream::OWNER_USER_2); + $this->baz2->chown(vfsStream::OWNER_USER_2); + } else { + chown($this->fooURL, vfsStream::OWNER_USER_1); + chown($this->barURL, vfsStream::OWNER_USER_1); + chown($this->baz1URL, vfsStream::OWNER_USER_2); + chown($this->baz2URL, vfsStream::OWNER_USER_2); + } + + $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL)); + $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->fooURL . '/.')); + $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL)); + $this->assertEquals(vfsStream::OWNER_USER_1, fileowner($this->barURL . '/.')); + $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz1URL)); + $this->assertEquals(vfsStream::OWNER_USER_2, fileowner($this->baz2URL)); + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function chownDoesNotWorkOnVfsStreamUrls() + { + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->assertFalse(@chown($this->fooURL, vfsStream::OWNER_USER_2)); + $this->assertEquals(vfsStream::getCurrentUser(), fileowner($this->fooURL)); + } + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function groupIsCurrentGroupByDefault() + { + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL)); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL . '/.')); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL)); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->barURL . '/.')); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz1URL)); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->baz2URL)); + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function chgrp() + { + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->foo->chgrp(vfsStream::GROUP_USER_1); + $this->bar->chgrp(vfsStream::GROUP_USER_1); + $this->baz1->chgrp(vfsStream::GROUP_USER_2); + $this->baz2->chgrp(vfsStream::GROUP_USER_2); + } else { + chgrp($this->fooURL, vfsStream::GROUP_USER_1); + chgrp($this->barURL, vfsStream::GROUP_USER_1); + chgrp($this->baz1URL, vfsStream::GROUP_USER_2); + chgrp($this->baz2URL, vfsStream::GROUP_USER_2); + } + + $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL)); + $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->fooURL . '/.')); + $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL)); + $this->assertEquals(vfsStream::GROUP_USER_1, filegroup($this->barURL . '/.')); + $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz1URL)); + $this->assertEquals(vfsStream::GROUP_USER_2, filegroup($this->baz2URL)); + } + + /** + * @test + * @group issue_11 + * @group permissions + */ + public function chgrpDoesNotWorkOnVfsStreamUrls() + { + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->assertFalse(@chgrp($this->fooURL, vfsStream::GROUP_USER_2)); + $this->assertEquals(vfsStream::getCurrentGroup(), filegroup($this->fooURL)); + } + } + + /** + * @test + * @author Benoit Aubuchon + */ + public function renameDirectory() + { + // move foo/bar to foo/baz3 + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(rename($this->barURL, $baz3URL)); + $this->assertFileExists($baz3URL); + $this->assertFileNotExists($this->barURL); + } + + /** + * @test + */ + public function renameDirectoryWithDots() + { + // move foo/bar to foo/baz3 + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(rename($this->barURL . '/.', $baz3URL)); + $this->assertFileExists($baz3URL); + $this->assertFileNotExists($this->barURL); + } + + /** + * @test + * @group issue_9 + * @since 0.9.0 + */ + public function renameDirectoryWithDotsInTarget() + { + // move foo/bar to foo/baz3 + $baz3URL = vfsStream::url('foo/../baz3/.'); + $this->assertTrue(rename($this->barURL . '/.', $baz3URL)); + $this->assertFileExists($baz3URL); + $this->assertFileNotExists($this->barURL); + } + + /** + * @test + * @author Benoit Aubuchon + */ + public function renameDirectoryOverwritingExistingFile() + { + // move foo/bar to foo/baz2 + $this->assertTrue(rename($this->barURL, $this->baz2URL)); + $this->assertFileExists(vfsStream::url('foo/baz2/baz1')); + $this->assertFileNotExists($this->barURL); + } + + /** + * @test + * @expectedException PHPUnit_Framework_Error + */ + public function renameFileIntoFile() + { + // foo/baz2 is a file, so it can not be turned into a directory + $baz3URL = vfsStream::url('foo/baz2/baz3'); + $this->assertTrue(rename($this->baz1URL, $baz3URL)); + $this->assertFileExists($baz3URL); + $this->assertFileNotExists($this->baz1URL); + } + + /** + * @test + * @author Benoit Aubuchon + */ + public function renameFileToDirectory() + { + // move foo/bar/baz1 to foo/baz3 + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(rename($this->baz1URL, $baz3URL)); + $this->assertFileExists($this->barURL); + $this->assertFileExists($baz3URL); + $this->assertFileNotExists($this->baz1URL); + } + + /** + * assert that trying to rename from a non existing file trigger a warning + * + * @expectedException PHPUnit_Framework_Error + * @test + */ + public function renameOnSourceFileNotFound() + { + rename(vfsStream::url('notfound'), $this->baz1URL); + } + /** + * assert that trying to rename to a directory that is not found trigger a warning + + * @expectedException PHPUnit_Framework_Error + * @test + */ + public function renameOnDestinationDirectoryFileNotFound() + { + rename($this->baz1URL, vfsStream::url('foo/notfound/file2')); + } + /** + * stat() and fstat() should return the same result + * + * @test + */ + public function statAndFstatReturnSameResult() + { + $fp = fopen($this->baz2URL, 'r'); + $this->assertEquals(stat($this->baz2URL), + fstat($fp) + ); + fclose($fp); + } + + /** + * stat() returns full data + * + * @test + */ + public function statReturnsFullDataForFiles() + { + $this->assertEquals(array(0 => 0, + 1 => 0, + 2 => 0100666, + 3 => 0, + 4 => vfsStream::getCurrentUser(), + 5 => vfsStream::getCurrentGroup(), + 6 => 0, + 7 => 4, + 8 => 400, + 9 => 400, + 10 => 400, + 11 => -1, + 12 => -1, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0100666, + 'nlink' => 0, + 'uid' => vfsStream::getCurrentUser(), + 'gid' => vfsStream::getCurrentGroup(), + 'rdev' => 0, + 'size' => 4, + 'atime' => 400, + 'mtime' => 400, + 'ctime' => 400, + 'blksize' => -1, + 'blocks' => -1 + ), + stat($this->baz2URL) + ); + } + + /** + * @test + */ + public function statReturnsFullDataForDirectories() + { + $this->assertEquals(array(0 => 0, + 1 => 0, + 2 => 0040777, + 3 => 0, + 4 => vfsStream::getCurrentUser(), + 5 => vfsStream::getCurrentGroup(), + 6 => 0, + 7 => 0, + 8 => 100, + 9 => 100, + 10 => 100, + 11 => -1, + 12 => -1, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0040777, + 'nlink' => 0, + 'uid' => vfsStream::getCurrentUser(), + 'gid' => vfsStream::getCurrentGroup(), + 'rdev' => 0, + 'size' => 0, + 'atime' => 100, + 'mtime' => 100, + 'ctime' => 100, + 'blksize' => -1, + 'blocks' => -1 + ), + stat($this->fooURL) + ); + } + + /** + * @test + */ + public function statReturnsFullDataForDirectoriesWithDot() + { + $this->assertEquals(array(0 => 0, + 1 => 0, + 2 => 0040777, + 3 => 0, + 4 => vfsStream::getCurrentUser(), + 5 => vfsStream::getCurrentGroup(), + 6 => 0, + 7 => 0, + 8 => 100, + 9 => 100, + 10 => 100, + 11 => -1, + 12 => -1, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0040777, + 'nlink' => 0, + 'uid' => vfsStream::getCurrentUser(), + 'gid' => vfsStream::getCurrentGroup(), + 'rdev' => 0, + 'size' => 0, + 'atime' => 100, + 'mtime' => 100, + 'ctime' => 100, + 'blksize' => -1, + 'blocks' => -1 + ), + stat($this->fooURL . '/.') + ); + } + + /** + * @test + * @expectedException PHPUnit_Framework_Error + */ + public function openFileWithoutDirectory() + { + vfsStreamWrapper::register(); + $this->assertFalse(file_get_contents(vfsStream::url('file.txt'))); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + * @requires PHP 5.4.0 + */ + public function truncateRemovesSuperflouosContent() + { + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + $handle = fopen($this->baz1URL, "r+"); + $this->assertTrue(ftruncate($handle, 0)); + $this->assertEquals(0, filesize($this->baz1URL)); + $this->assertEquals('', file_get_contents($this->baz1URL)); + fclose($handle); + } + + /** + * @test + * @group issue_33 + * @since 1.1.0 + * @requires PHP 5.4.0 + */ + public function truncateToGreaterSizeAddsZeroBytes() + { + if (strstr(PHP_VERSION, 'hiphop') !== false) { + $this->markTestSkipped('Not supported on hhvm'); + } + + $handle = fopen($this->baz1URL, "r+"); + $this->assertTrue(ftruncate($handle, 25)); + $this->assertEquals(25, filesize($this->baz1URL)); + $this->assertEquals("baz 1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + file_get_contents($this->baz1URL)); + fclose($handle); + } + + /** + * @test + * @group issue_11 + * @requires PHP 5.4.0 + */ + public function touchCreatesNonExistingFile() + { + $this->assertTrue(touch($this->fooURL . '/new.txt')); + $this->assertTrue($this->foo->hasChild('new.txt')); + } + + /** + * @test + * @group issue_11 + * @requires PHP 5.4.0 + */ + public function touchChangesAccessAndModificationTimeForFile() + { + $this->assertTrue(touch($this->baz1URL, 303, 313)); + $this->assertEquals(303, $this->baz1->filemtime()); + $this->assertEquals(313, $this->baz1->fileatime()); + } + + /** + * @test + * @group issue_11 + * @group issue_80 + * @requires PHP 5.4.0 + */ + public function touchChangesTimesToCurrentTimestampWhenNoTimesGiven() + { + $this->assertTrue(touch($this->baz1URL)); + $this->assertEquals(time(), $this->baz1->filemtime(), '', 1); + $this->assertEquals(time(), $this->baz1->fileatime(), '', 1); + } + + /** + * @test + * @group issue_11 + * @requires PHP 5.4.0 + */ + public function touchWithModifiedTimeChangesAccessAndModifiedTime() + { + $this->assertTrue(touch($this->baz1URL, 303)); + $this->assertEquals(303, $this->baz1->filemtime()); + $this->assertEquals(303, $this->baz1->fileatime()); + } + + /** + * @test + * @group issue_11 + * @requires PHP 5.4.0 + */ + public function touchChangesAccessAndModificationTimeForDirectory() + { + $this->assertTrue(touch($this->fooURL, 303, 313)); + $this->assertEquals(303, $this->foo->filemtime()); + $this->assertEquals(313, $this->foo->fileatime()); + } + + /** + * @test + * @group issue_34 + * @since 1.2.0 + */ + public function pathesAreCorrectlySet() + { + $this->assertEquals(vfsStream::path($this->fooURL), $this->foo->path()); + $this->assertEquals(vfsStream::path($this->barURL), $this->bar->path()); + $this->assertEquals(vfsStream::path($this->baz1URL), $this->baz1->path()); + $this->assertEquals(vfsStream::path($this->baz2URL), $this->baz2->path()); + } + + /** + * @test + * @group issue_34 + * @since 1.2.0 + */ + public function urlsAreCorrectlySet() + { + $this->assertEquals($this->fooURL, $this->foo->url()); + $this->assertEquals($this->barURL, $this->bar->url()); + $this->assertEquals($this->baz1URL, $this->baz1->url()); + $this->assertEquals($this->baz2URL, $this->baz2->url()); + } + + /** + * @test + * @group issue_34 + * @since 1.2.0 + */ + public function pathIsUpdatedAfterMove() + { + // move foo/bar/baz1 to foo/baz3 + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(rename($this->baz1URL, $baz3URL)); + $this->assertEquals(vfsStream::path($baz3URL), $this->baz1->path()); + } + + /** + * @test + * @group issue_34 + * @since 1.2.0 + */ + public function urlIsUpdatedAfterMove() + { + // move foo/bar/baz1 to foo/baz3 + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(rename($this->baz1URL, $baz3URL)); + $this->assertEquals($baz3URL, $this->baz1->url()); + } + + /** + * @test + */ + public function fileCopy() + { + $baz3URL = vfsStream::url('foo/baz3'); + $this->assertTrue(copy($this->baz1URL, $baz3URL)); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php new file mode 100644 index 000000000..4e27685aa --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperUnregisterTestCase.php @@ -0,0 +1,75 @@ +assertNotContains(vfsStream::SCHEME, stream_get_wrappers()); + } + + /** + * Unregistering a third party wrapper for vfs:// fails. + * + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + * @runInSeparateProcess + */ + public function unregisterThirdPartyVfsScheme() + { + // Unregister possible registered URL wrapper. + vfsStreamWrapper::unregister(); + + $mock = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamWrapper'); + stream_wrapper_register(vfsStream::SCHEME, get_class($mock)); + + vfsStreamWrapper::unregister(); + } + + /** + * Unregistering when not in registered state will fail. + * + * @test + * @expectedException org\bovigo\vfs\vfsStreamException + * @runInSeparateProcess + */ + public function unregisterWhenNotInRegisteredState() + { + vfsStreamWrapper::register(); + stream_wrapper_unregister(vfsStream::SCHEME); + vfsStreamWrapper::unregister(); + } + + /** + * Unregistering while not registers won't fail. + * + * @test + */ + public function unregisterWhenNotRegistered() + { + // Unregister possible registered URL wrapper. + vfsStreamWrapper::unregister(); + + $this->assertNotContains(vfsStream::SCHEME, stream_get_wrappers()); + vfsStreamWrapper::unregister(); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php new file mode 100644 index 000000000..8267a327c --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php @@ -0,0 +1,63 @@ + no directory to open + * + * @test + */ + public function canNotOpenDirectory() + { + $this->assertFalse(@dir(vfsStream::url('foo'))); + } + + /** + * can not unlink without root + * + * @test + */ + public function canNotUnlink() + { + $this->assertFalse(@unlink(vfsStream::url('foo'))); + } + + /** + * can not open a file without root + * + * @test + */ + public function canNotOpen() + { + $this->assertFalse(@fopen(vfsStream::url('foo'), 'r')); + } + + /** + * can not rename a file without root + * + * @test + */ + public function canNotRename() + { + $this->assertFalse(@rename(vfsStream::url('foo'), vfsStream::url('bar'))); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php new file mode 100644 index 000000000..210642c21 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/vfsStreamZipTestCase.php @@ -0,0 +1,52 @@ +markTestSkipped('No ext/zip installed, skipping test.'); + } + + $this->markTestSkipped('Zip extension can not work with vfsStream urls.'); + + vfsStreamWrapper::register(); + vfsStreamWrapper::setRoot(vfsStream::newDirectory('root')); + + } + + /** + * @test + */ + public function createZipArchive() + { + $zip = new ZipArchive(); + $this->assertTrue($zip->open(vfsStream::url('root/test.zip'), ZipArchive::CREATE)); + $this->assertTrue($zip->addFromString("testfile1.txt", "#1 This is a test string added as testfile1.txt.\n")); + $this->assertTrue($zip->addFromString("testfile2.txt", "#2 This is a test string added as testfile2.txt.\n")); + $zip->setArchiveComment('a test'); + var_dump($zip); + $this->assertTrue($zip->close()); + var_dump($zip->getStatusString()); + var_dump($zip->close()); + var_dump($zip->getStatusString()); + var_dump($zip); + var_dump(file_exists(vfsStream::url('root/test.zip'))); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php new file mode 100644 index 000000000..dfb3ed5ab --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitorTestCase.php @@ -0,0 +1,98 @@ +abstractVisitor = $this->bc_getMock('org\\bovigo\\vfs\\visitor\\vfsStreamAbstractVisitor', + array('visitFile', 'visitDirectory') + ); + } + + /** + * @test + * @expectedException \InvalidArgumentException + */ + public function visitThrowsInvalidArgumentExceptionOnUnknownContentType() + { + $mockContent = $this->bc_getMock('org\\bovigo\\vfs\\vfsStreamContent'); + $mockContent->expects($this->any()) + ->method('getType') + ->will($this->returnValue('invalid')); + $this->assertSame($this->abstractVisitor, + $this->abstractVisitor->visit($mockContent) + ); + } + + /** + * @test + */ + public function visitWithFileCallsVisitFile() + { + $file = new vfsStreamFile('foo.txt'); + $this->abstractVisitor->expects($this->once()) + ->method('visitFile') + ->with($this->equalTo($file)); + $this->assertSame($this->abstractVisitor, + $this->abstractVisitor->visit($file) + ); + } + + /** + * tests that a block device eventually calls out to visit file + * + * @test + */ + public function visitWithBlockCallsVisitFile() + { + $block = new vfsStreamBlock('foo'); + $this->abstractVisitor->expects($this->once()) + ->method('visitFile') + ->with($this->equalTo($block)); + $this->assertSame($this->abstractVisitor, + $this->abstractVisitor->visit($block) + ); + } + + /** + * @test + */ + public function visitWithDirectoryCallsVisitDirectory() + { + $dir = new vfsStreamDirectory('bar'); + $this->abstractVisitor->expects($this->once()) + ->method('visitDirectory') + ->with($this->equalTo($dir)); + $this->assertSame($this->abstractVisitor, + $this->abstractVisitor->visit($dir) + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php new file mode 100644 index 000000000..294bd77d2 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php @@ -0,0 +1,102 @@ +at(vfsStream::setup()); + $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); + $this->assertSame($printVisitor, + $printVisitor->visitFile(vfsStream::newFile('bar.txt')) + ); + $this->assertEquals("- bar.txt\n", $output->getContent()); + } + + /** + * @test + */ + public function visitFileWritesBlockDeviceToStream() + { + $output = vfsStream::newFile('foo.txt') + ->at(vfsStream::setup()); + $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); + $this->assertSame($printVisitor, + $printVisitor->visitBlockDevice(vfsStream::newBlock('bar')) + ); + $this->assertEquals("- [bar]\n", $output->getContent()); + } + + /** + * @test + */ + public function visitDirectoryWritesDirectoryNameToStream() + { + $output = vfsStream::newFile('foo.txt') + ->at(vfsStream::setup()); + $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); + $this->assertSame($printVisitor, + $printVisitor->visitDirectory(vfsStream::newDirectory('baz')) + ); + $this->assertEquals("- baz\n", $output->getContent()); + } + + /** + * @test + */ + public function visitRecursiveDirectoryStructure() + { + $root = vfsStream::setup('root', + null, + array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ), + 'foo.txt' => '' + ) + ); + $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb')); + $this->assertSame($printVisitor, + $printVisitor->visitDirectory($root) + ); + $this->assertEquals("- root\n - test\n - foo\n - test.txt\n - baz.txt\n - foo.txt\n", file_get_contents('vfs://root/foo.txt')); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php new file mode 100644 index 000000000..c9df23406 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php @@ -0,0 +1,85 @@ +assertEquals(array('foo.txt' => 'test'), + $structureVisitor->visitFile(vfsStream::newFile('foo.txt') + ->withContent('test') + ) + ->getStructure() + ); + } + + /** + * @test + */ + public function visitFileCreatesStructureForBlock() + { + $structureVisitor = new vfsStreamStructureVisitor(); + $this->assertEquals(array('[foo]' => 'test'), + $structureVisitor->visitBlockDevice(vfsStream::newBlock('foo') + ->withContent('test') + ) + ->getStructure() + ); + } + + /** + * @test + */ + public function visitDirectoryCreatesStructureForDirectory() + { + $structureVisitor = new vfsStreamStructureVisitor(); + $this->assertEquals(array('baz' => array()), + $structureVisitor->visitDirectory(vfsStream::newDirectory('baz')) + ->getStructure() + ); + } + + /** + * @test + */ + public function visitRecursiveDirectoryStructure() + { + $root = vfsStream::setup('root', + null, + array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ), + 'foo.txt' => '' + ) + ); + $structureVisitor = new vfsStreamStructureVisitor(); + $this->assertEquals(array('root' => array('test' => array('foo' => array('test.txt' => 'hello'), + 'baz.txt' => 'world' + ), + 'foo.txt' => '' + ), + ), + $structureVisitor->visitDirectory($root) + ->getStructure() + ); + } +} diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/phpt/bug71287.phpt b/openml_OS/vendor/mikey179/vfsstream/src/test/phpt/bug71287.phpt new file mode 100644 index 000000000..75b9b3764 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/phpt/bug71287.phpt @@ -0,0 +1,29 @@ +--TEST-- +Reproduce octal output from stream wrapper invocation + +See https://bugs.php.net/bug.php?id=71287 +See https://github.com/mikey179/vfsStream/issues/120 +--FILE-- + +--EXPECTF-- +Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in %s on line %d \ No newline at end of file diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/emptyFolder/.gitignore b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/emptyFolder/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt new file mode 100644 index 000000000..191028156 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/aFile.txt @@ -0,0 +1 @@ +foo \ No newline at end of file diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt new file mode 100644 index 000000000..f6ea04951 --- /dev/null +++ b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt @@ -0,0 +1 @@ +foobar \ No newline at end of file diff --git a/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/subfolder2/.gitignore b/openml_OS/vendor/mikey179/vfsstream/src/test/resources/filesystemcopy/withSubfolders/subfolder2/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/openml_OS/vendor/psr/log/.gitignore b/openml_OS/vendor/psr/log/.gitignore deleted file mode 100644 index 22d0d82f8..000000000 --- a/openml_OS/vendor/psr/log/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/openml_OS/vendor/psr/log/Psr/Log/AbstractLogger.php b/openml_OS/vendor/psr/log/Psr/Log/AbstractLogger.php index 90e721af2..e02f9daf3 100644 --- a/openml_OS/vendor/psr/log/Psr/Log/AbstractLogger.php +++ b/openml_OS/vendor/psr/log/Psr/Log/AbstractLogger.php @@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -30,8 +30,8 @@ public function emergency($message, array $context = array()) * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -45,8 +45,8 @@ public function alert($message, array $context = array()) * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -59,8 +59,8 @@ public function critical($message, array $context = array()) * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -75,8 +75,8 @@ public function error($message, array $context = array()) * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -88,8 +88,8 @@ public function warning($message, array $context = array()) /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ public function notice($message, array $context = array()) * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -116,8 +116,8 @@ public function info($message, array $context = array()) /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ diff --git a/openml_OS/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/openml_OS/vendor/psr/log/Psr/Log/LoggerAwareTrait.php index 639f79bda..82bf45c89 100644 --- a/openml_OS/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +++ b/openml_OS/vendor/psr/log/Psr/Log/LoggerAwareTrait.php @@ -10,7 +10,7 @@ trait LoggerAwareTrait /** * The logger instance. * - * @var LoggerInterface + * @var LoggerInterface|null */ protected $logger; diff --git a/openml_OS/vendor/psr/log/Psr/Log/LoggerInterface.php b/openml_OS/vendor/psr/log/Psr/Log/LoggerInterface.php index 5ea72438b..2206cfde4 100644 --- a/openml_OS/vendor/psr/log/Psr/Log/LoggerInterface.php +++ b/openml_OS/vendor/psr/log/Psr/Log/LoggerInterface.php @@ -22,8 +22,8 @@ interface LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -35,8 +35,8 @@ public function emergency($message, array $context = array()); * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -47,8 +47,8 @@ public function alert($message, array $context = array()); * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -58,8 +58,8 @@ public function critical($message, array $context = array()); * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -71,8 +71,8 @@ public function error($message, array $context = array()); * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -81,8 +81,8 @@ public function warning($message, array $context = array()); /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -93,8 +93,8 @@ public function notice($message, array $context = array()); * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ public function info($message, array $context = array()); /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -113,11 +113,13 @@ public function debug($message, array $context = array()); /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string $message - * @param array $context + * @param mixed $level + * @param string $message + * @param mixed[] $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()); } diff --git a/openml_OS/vendor/psr/log/Psr/Log/LoggerTrait.php b/openml_OS/vendor/psr/log/Psr/Log/LoggerTrait.php index 867225df1..e392fef0a 100644 --- a/openml_OS/vendor/psr/log/Psr/Log/LoggerTrait.php +++ b/openml_OS/vendor/psr/log/Psr/Log/LoggerTrait.php @@ -135,6 +135,8 @@ public function debug($message, array $context = array()) * @param array $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ abstract public function log($level, $message, array $context = array()); } diff --git a/openml_OS/vendor/psr/log/Psr/Log/NullLogger.php b/openml_OS/vendor/psr/log/Psr/Log/NullLogger.php index d8cd682c8..c8f7293b1 100644 --- a/openml_OS/vendor/psr/log/Psr/Log/NullLogger.php +++ b/openml_OS/vendor/psr/log/Psr/Log/NullLogger.php @@ -20,6 +20,8 @@ class NullLogger extends AbstractLogger * @param array $context * * @return void + * + * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()) { diff --git a/openml_OS/vendor/psr/log/Psr/Log/Test/DummyTest.php b/openml_OS/vendor/psr/log/Psr/Log/Test/DummyTest.php new file mode 100644 index 000000000..9638c1101 --- /dev/null +++ b/openml_OS/vendor/psr/log/Psr/Log/Test/DummyTest.php @@ -0,0 +1,18 @@ + true, 'null' => null, @@ -110,6 +114,7 @@ public function testContextCanContainAnything() 'nested' => array('with object' => new DummyTest), 'object' => new \DateTime, 'resource' => fopen('php://memory', 'r'), + 'closed' => $closed, ); $this->getLogger()->warning('Crazy context data', $context); @@ -131,10 +136,3 @@ public function testContextExceptionKeyCanBeExceptionOrOtherValues() $this->assertEquals($expected, $this->getLogs()); } } - -class DummyTest -{ - public function __toString() - { - } -} diff --git a/openml_OS/vendor/psr/log/Psr/Log/Test/TestLogger.php b/openml_OS/vendor/psr/log/Psr/Log/Test/TestLogger.php new file mode 100644 index 000000000..1be323049 --- /dev/null +++ b/openml_OS/vendor/psr/log/Psr/Log/Test/TestLogger.php @@ -0,0 +1,147 @@ + $level, + 'message' => $message, + 'context' => $context, + ]; + + $this->recordsByLevel[$record['level']][] = $record; + $this->records[] = $record; + } + + public function hasRecords($level) + { + return isset($this->recordsByLevel[$level]); + } + + public function hasRecord($record, $level) + { + if (is_string($record)) { + $record = ['message' => $record]; + } + return $this->hasRecordThatPasses(function ($rec) use ($record) { + if ($rec['message'] !== $record['message']) { + return false; + } + if (isset($record['context']) && $rec['context'] !== $record['context']) { + return false; + } + return true; + }, $level); + } + + public function hasRecordThatContains($message, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($message) { + return strpos($rec['message'], $message) !== false; + }, $level); + } + + public function hasRecordThatMatches($regex, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($regex) { + return preg_match($regex, $rec['message']) > 0; + }, $level); + } + + public function hasRecordThatPasses(callable $predicate, $level) + { + if (!isset($this->recordsByLevel[$level])) { + return false; + } + foreach ($this->recordsByLevel[$level] as $i => $rec) { + if (call_user_func($predicate, $rec, $i)) { + return true; + } + } + return false; + } + + public function __call($method, $args) + { + if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { + $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; + $level = strtolower($matches[2]); + if (method_exists($this, $genericMethod)) { + $args[] = $level; + return call_user_func_array([$this, $genericMethod], $args); + } + } + throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); + } + + public function reset() + { + $this->records = []; + $this->recordsByLevel = []; + } +} diff --git a/openml_OS/vendor/psr/log/README.md b/openml_OS/vendor/psr/log/README.md index 574bc1cb2..a9f20c437 100644 --- a/openml_OS/vendor/psr/log/README.md +++ b/openml_OS/vendor/psr/log/README.md @@ -7,6 +7,13 @@ This repository holds all interfaces/classes/traits related to Note that this is not a logger of its own. It is merely an interface that describes a logger. See the specification for more details. +Installation +------------ + +```bash +composer require psr/log +``` + Usage ----- @@ -31,6 +38,12 @@ class Foo if ($this->logger) { $this->logger->info('Doing work'); } + + try { + $this->doSomethingElse(); + } catch (Exception $exception) { + $this->logger->error('Oh no!', array('exception' => $exception)); + } // do something useful } diff --git a/openml_OS/vendor/psr/log/composer.json b/openml_OS/vendor/psr/log/composer.json index 87934d707..ca0569537 100644 --- a/openml_OS/vendor/psr/log/composer.json +++ b/openml_OS/vendor/psr/log/composer.json @@ -7,7 +7,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "require": { @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } } } diff --git a/openml_OS/vendor/react/promise/.gitignore b/openml_OS/vendor/react/promise/.gitignore deleted file mode 100644 index 5241c60ab..000000000 --- a/openml_OS/vendor/react/promise/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -composer.lock -composer.phar -phpunit.xml -build/ -vendor/ diff --git a/openml_OS/vendor/react/promise/.travis.yml b/openml_OS/vendor/react/promise/.travis.yml deleted file mode 100644 index bcbe642ff..000000000 --- a/openml_OS/vendor/react/promise/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - nightly # ignore errors, see below - - hhvm # ignore errors, see below - -# lock distro so new future defaults will not break the build -dist: trusty - -matrix: - allow_failures: - - php: hhvm - - php: nightly - -install: - - composer install - -script: - - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml - -after_script: - - if [ -f ./build/logs/clover.xml ]; then travis_retry composer require satooshi/php-coveralls --no-interaction --update-with-dependencies; fi - - if [ -f ./build/logs/clover.xml ]; then php vendor/bin/coveralls -v; fi diff --git a/openml_OS/vendor/react/promise/CHANGELOG.md b/openml_OS/vendor/react/promise/CHANGELOG.md index 97033b04b..fa6e8645d 100644 --- a/openml_OS/vendor/react/promise/CHANGELOG.md +++ b/openml_OS/vendor/react/promise/CHANGELOG.md @@ -1,6 +1,87 @@ CHANGELOG for 2.x ================= +## 2.11.0 (2023-11-16) + +This is a compatibility release to ensure a smooth upgrade path for those not yet +on Promise v3. We encourage upgrading to the latest version when possible, as +Promise v3 will be the way forward for this project. + +* Feature: Full PHP 8.3 compatibility. + (#256 by @clue) + +## 2.10.0 (2023-05-02) + +* Feature: Support Disjunctive Normal Form Types (DNF types) for PHP 8.2+. + (#237 by @nhedger) + + Feature: Add full support for PHP 8.2. + (#233 by @WyriHaximus and #241 by @clue) + +* Improve examples in documentation. + (#226 by @nhedger) + +* Improve test suite and project setup and report failed assertions. + (#215 and #217 by @SimonFrings and #241 by @clue) + +* 2.9.0 (2022-02-11) + + * Feature: Support union types and address deprecation of `ReflectionType::getClass()` (PHP 8+). + (#198 by @cdosoftei and @SimonFrings) + + ```php + $promise->otherwise(function (OverflowException|UnderflowException $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; + }); + ``` + + * Feature: Support intersection types (PHP 8.1+). + (#195 by @bzikarsky) + + ```php + $promise->otherwise(function (OverflowException&CacheException $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; + }); + ``` + + * Improve test suite, use GitHub actions for continuous integration (CI), + update to PHPUnit 9, and add full core team to the license. + (#174, #183, #186, and #201 by @SimonFrings and #211 by @clue) + +* 2.8.0 (2020-05-12) + + * Mark `FulfilledPromise`, `RejectedPromise` and `LazyPromise` as deprecated for Promise v2 (and remove for Promise v3). + (#143 and #165 by @clue) + + ```php + // deprecated + $fulfilled = new React\Promise\FulfilledPromise($value); + $rejected = new React\Promise\RejectedPromise($reason); + + // recommended alternatives + $fulfilled = React\Promise\resolve($value); + $rejected = React\Promise\reject($reason); + ``` + + * Fix: Fix checking whether cancellable promise is an object and avoid possible warning. + (#168 by @smscr and @jsor) + + * Improve documentation and add docblocks to functions and interfaces. + (#135 by @CharlotteDunois) + + * Add `.gitattributes` to exclude dev files from exports. + (#154 by @reedy) + + * Improve test suite, run tests on PHP 7.4 and update PHPUnit test setup. + (#163 by @clue) + +* 2.7.1 (2018-01-07) + + * Fix: file_exists warning when resolving with long strings. + (#130 by @sbesselsen) + * Improve performance by prefixing all global functions calls with \ to skip the look up and resolve process and go straight to the global function. + (#133 by @WyriHaximus) + * 2.7.0 (2018-06-13) * Feature: Improve memory consumption for pending promises by using static internal callbacks without binding to self. diff --git a/openml_OS/vendor/react/promise/LICENSE b/openml_OS/vendor/react/promise/LICENSE index 5919d20ff..21c1357b7 100644 --- a/openml_OS/vendor/react/promise/LICENSE +++ b/openml_OS/vendor/react/promise/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2012-2016 Jan Sorgalla +The MIT License (MIT) + +Copyright (c) 2012 Jan Sorgalla, Christian Lück, Cees-Jan Kiewiet, Chris Boden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/openml_OS/vendor/react/promise/README.md b/openml_OS/vendor/react/promise/README.md index 368556612..fd233c47d 100644 --- a/openml_OS/vendor/react/promise/README.md +++ b/openml_OS/vendor/react/promise/README.md @@ -4,8 +4,8 @@ Promise A lightweight implementation of [CommonJS Promises/A](http://wiki.commonjs.org/wiki/Promises/A) for PHP. -[![Build Status](https://travis-ci.org/reactphp/promise.svg?branch=master)](http://travis-ci.org/reactphp/promise) -[![Coverage Status](https://coveralls.io/repos/github/reactphp/promise/badge.svg?branch=master)](https://coveralls.io/github/reactphp/promise?branch=master) +[![CI status](https://github.com/reactphp/promise/actions/workflows/ci.yml/badge.svg?branch=2.x)](https://github.com/reactphp/promise/actions) +[![installs on Packagist](https://img.shields.io/packagist/dt/react/promise?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/react/promise) Table of Contents ----------------- @@ -173,9 +173,9 @@ Neither its state nor its result (or error) can be modified. #### Implementations * [Promise](#promise-2) -* [FulfilledPromise](#fulfilledpromise) -* [RejectedPromise](#rejectedpromise) -* [LazyPromise](#lazypromise) +* [FulfilledPromise](#fulfilledpromise) (deprecated) +* [RejectedPromise](#rejectedpromise) (deprecated) +* [LazyPromise](#lazypromise) (deprecated) #### PromiseInterface::then() @@ -225,9 +225,9 @@ and utility methods which are not part of the Promises/A specification. #### Implementations * [Promise](#promise-1) -* [FulfilledPromise](#fulfilledpromise) -* [RejectedPromise](#rejectedpromise) -* [LazyPromise](#lazypromise) +* [FulfilledPromise](#fulfilledpromise) (deprecated) +* [RejectedPromise](#rejectedpromise) (deprecated) +* [LazyPromise](#lazypromise) (deprecated) #### ExtendedPromiseInterface::done() @@ -357,9 +357,9 @@ a promise has no effect. #### Implementations * [Promise](#promise-1) -* [FulfilledPromise](#fulfilledpromise) -* [RejectedPromise](#rejectedpromise) -* [LazyPromise](#lazypromise) +* [FulfilledPromise](#fulfilledpromise) (deprecated) +* [RejectedPromise](#rejectedpromise) (deprecated) +* [LazyPromise](#lazypromise) (deprecated) ### Promise @@ -409,6 +409,8 @@ once all consumers called the `cancel()` method of the promise. ### FulfilledPromise +> Deprecated in v2.8.0: External usage of `FulfilledPromise` is deprecated, use `resolve()` instead. + Creates a already fulfilled promise. ```php @@ -420,6 +422,8 @@ Note, that `$value` **cannot** be a promise. It's recommended to use ### RejectedPromise +> Deprecated in v2.8.0: External usage of `RejectedPromise` is deprecated, use `reject()` instead. + Creates a already rejected promise. ```php @@ -431,6 +435,8 @@ Note, that `$reason` **cannot** be a promise. It's recommended to use ### LazyPromise +> Deprecated in v2.8.0: LazyPromise is deprecated and should not be used anymore. + Creates a promise which will be lazily initialized by `$factory` once a consumer calls the `then()` method. @@ -844,15 +850,14 @@ This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require react/promise:^2.7 +composer require react/promise:^2.11 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP -extensions and supports running on legacy PHP 5.4 through current PHP 7+ and HHVM. -It's *highly recommended to use PHP 7+* for this project due to its vast -performance improvements. +extensions and supports running on legacy PHP 5.4 through current PHP 8+ and HHVM. +It's *highly recommended to use the latest supported PHP version* for this project. Credits ------- diff --git a/openml_OS/vendor/react/promise/composer.json b/openml_OS/vendor/react/promise/composer.json index 2fc480919..a18bbf62b 100644 --- a/openml_OS/vendor/react/promise/composer.json +++ b/openml_OS/vendor/react/promise/composer.json @@ -3,23 +3,47 @@ "description": "A lightweight implementation of CommonJS Promises/A for PHP", "license": "MIT", "authors": [ - {"name": "Jan Sorgalla", "email": "jsorgalla@gmail.com"} + { + "name": "Jan Sorgalla", + "homepage": "https://sorgalla.com/", + "email": "jsorgalla@gmail.com" + }, + { + "name": "Christian Lück", + "homepage": "https://clue.engineering/", + "email": "christian@clue.engineering" + }, + { + "name": "Cees-Jan Kiewiet", + "homepage": "https://wyrihaximus.net/", + "email": "reactphp@ceesjankiewiet.nl" + }, + { + "name": "Chris Boden", + "homepage": "https://cboden.dev/", + "email": "cboden@gmail.com" + } ], "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "autoload": { "psr-4": { "React\\Promise\\": "src/" }, - "files": ["src/functions_include.php"] + "files": [ + "src/functions_include.php" + ] }, "autoload-dev": { "psr-4": { - "React\\Promise\\": "tests/fixtures" + "React\\Promise\\": [ + "tests/", + "tests/fixtures/" + ] } }, "keywords": [ diff --git a/openml_OS/vendor/react/promise/phpunit.xml.dist b/openml_OS/vendor/react/promise/phpunit.xml.dist deleted file mode 100644 index b9a689d74..000000000 --- a/openml_OS/vendor/react/promise/phpunit.xml.dist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - ./tests/ - - - - - - ./src/ - - ./src/functions_include.php - - - - diff --git a/openml_OS/vendor/react/promise/src/CancellablePromiseInterface.php b/openml_OS/vendor/react/promise/src/CancellablePromiseInterface.php index 896db2d37..6b3a8c65d 100644 --- a/openml_OS/vendor/react/promise/src/CancellablePromiseInterface.php +++ b/openml_OS/vendor/react/promise/src/CancellablePromiseInterface.php @@ -5,6 +5,12 @@ interface CancellablePromiseInterface extends PromiseInterface { /** + * The `cancel()` method notifies the creator of the promise that there is no + * further interest in the results of the operation. + * + * Once a promise is settled (either fulfilled or rejected), calling `cancel()` on + * a promise has no effect. + * * @return void */ public function cancel(); diff --git a/openml_OS/vendor/react/promise/src/CancellationQueue.php b/openml_OS/vendor/react/promise/src/CancellationQueue.php index a366994d9..a381e9780 100644 --- a/openml_OS/vendor/react/promise/src/CancellationQueue.php +++ b/openml_OS/vendor/react/promise/src/CancellationQueue.php @@ -19,11 +19,11 @@ public function __invoke() public function enqueue($cancellable) { - if (!method_exists($cancellable, 'then') || !method_exists($cancellable, 'cancel')) { + if (!\is_object($cancellable) || !\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) { return; } - $length = array_push($this->queue, $cancellable); + $length = \array_push($this->queue, $cancellable); if ($this->started && 1 === $length) { $this->drain(); diff --git a/openml_OS/vendor/react/promise/src/Deferred.php b/openml_OS/vendor/react/promise/src/Deferred.php index 6534bc86d..3ca034b85 100644 --- a/openml_OS/vendor/react/promise/src/Deferred.php +++ b/openml_OS/vendor/react/promise/src/Deferred.php @@ -33,14 +33,14 @@ public function resolve($value = null) { $this->promise(); - call_user_func($this->resolveCallback, $value); + \call_user_func($this->resolveCallback, $value); } public function reject($reason = null) { $this->promise(); - call_user_func($this->rejectCallback, $reason); + \call_user_func($this->rejectCallback, $reason); } /** @@ -51,7 +51,7 @@ public function notify($update = null) { $this->promise(); - call_user_func($this->notifyCallback, $update); + \call_user_func($this->notifyCallback, $update); } /** diff --git a/openml_OS/vendor/react/promise/src/ExtendedPromiseInterface.php b/openml_OS/vendor/react/promise/src/ExtendedPromiseInterface.php index 3654177c5..13b636917 100644 --- a/openml_OS/vendor/react/promise/src/ExtendedPromiseInterface.php +++ b/openml_OS/vendor/react/promise/src/ExtendedPromiseInterface.php @@ -5,24 +5,92 @@ interface ExtendedPromiseInterface extends PromiseInterface { /** + * Consumes the promise's ultimate value if the promise fulfills, or handles the + * ultimate error. * - * The `$onProgress` argument is deprecated and should not be used anymore. + * It will cause a fatal error if either `$onFulfilled` or + * `$onRejected` throw or return a rejected promise. * + * Since the purpose of `done()` is consumption rather than transformation, + * `done()` always returns `null`. + * + * @param callable|null $onFulfilled + * @param callable|null $onRejected + * @param callable|null $onProgress This argument is deprecated and should not be used anymore. * @return void */ public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null); /** + * Registers a rejection handler for promise. It is a shortcut for: + * + * ```php + * $promise->then(null, $onRejected); + * ``` + * + * Additionally, you can type hint the `$reason` argument of `$onRejected` to catch + * only specific errors. + * + * @param callable $onRejected * @return ExtendedPromiseInterface */ public function otherwise(callable $onRejected); /** + * Allows you to execute "cleanup" type tasks in a promise chain. + * + * It arranges for `$onFulfilledOrRejected` to be called, with no arguments, + * when the promise is either fulfilled or rejected. + * + * * If `$promise` fulfills, and `$onFulfilledOrRejected` returns successfully, + * `$newPromise` will fulfill with the same value as `$promise`. + * * If `$promise` fulfills, and `$onFulfilledOrRejected` throws or returns a + * rejected promise, `$newPromise` will reject with the thrown exception or + * rejected promise's reason. + * * If `$promise` rejects, and `$onFulfilledOrRejected` returns successfully, + * `$newPromise` will reject with the same reason as `$promise`. + * * If `$promise` rejects, and `$onFulfilledOrRejected` throws or returns a + * rejected promise, `$newPromise` will reject with the thrown exception or + * rejected promise's reason. + * + * `always()` behaves similarly to the synchronous finally statement. When combined + * with `otherwise()`, `always()` allows you to write code that is similar to the familiar + * synchronous catch/finally pair. + * + * Consider the following synchronous code: + * + * ```php + * try { + * return doSomething(); + * } catch(\Exception $e) { + * return handleError($e); + * } finally { + * cleanup(); + * } + * ``` + * + * Similar asynchronous code (with `doSomething()` that returns a promise) can be + * written: + * + * ```php + * return doSomething() + * ->otherwise('handleError') + * ->always('cleanup'); + * ``` + * + * @param callable $onFulfilledOrRejected * @return ExtendedPromiseInterface */ public function always(callable $onFulfilledOrRejected); /** + * Registers a handler for progress updates from promise. It is a shortcut for: + * + * ```php + * $promise->then(null, null, $onProgress); + * ``` + * + * @param callable $onProgress * @return ExtendedPromiseInterface * @deprecated 2.6.0 Progress support is deprecated and should not be used anymore. */ diff --git a/openml_OS/vendor/react/promise/src/FulfilledPromise.php b/openml_OS/vendor/react/promise/src/FulfilledPromise.php index 914bb5c15..147275277 100644 --- a/openml_OS/vendor/react/promise/src/FulfilledPromise.php +++ b/openml_OS/vendor/react/promise/src/FulfilledPromise.php @@ -2,6 +2,9 @@ namespace React\Promise; +/** + * @deprecated 2.8.0 External usage of FulfilledPromise is deprecated, use `resolve()` instead. + */ class FulfilledPromise implements ExtendedPromiseInterface, CancellablePromiseInterface { private $value; diff --git a/openml_OS/vendor/react/promise/src/LazyPromise.php b/openml_OS/vendor/react/promise/src/LazyPromise.php index 7e3a3d3dd..bbe9293e1 100644 --- a/openml_OS/vendor/react/promise/src/LazyPromise.php +++ b/openml_OS/vendor/react/promise/src/LazyPromise.php @@ -2,6 +2,9 @@ namespace React\Promise; +/** + * @deprecated 2.8.0 LazyPromise is deprecated and should not be used anymore. + */ class LazyPromise implements ExtendedPromiseInterface, CancellablePromiseInterface { private $factory; @@ -50,7 +53,7 @@ public function promise() { if (null === $this->promise) { try { - $this->promise = resolve(call_user_func($this->factory)); + $this->promise = resolve(\call_user_func($this->factory)); } catch (\Throwable $exception) { $this->promise = new RejectedPromise($exception); } catch (\Exception $exception) { diff --git a/openml_OS/vendor/react/promise/src/Promise.php b/openml_OS/vendor/react/promise/src/Promise.php index 77819ac48..33759e6fe 100644 --- a/openml_OS/vendor/react/promise/src/Promise.php +++ b/openml_OS/vendor/react/promise/src/Promise.php @@ -201,9 +201,9 @@ private function call(callable $cb) // function arguments is actually faster than blindly passing them. // Also, this helps avoiding unnecessary function arguments in the call stack // if the callback creates an Exception (creating garbage cycles). - if (is_array($callback)) { + if (\is_array($callback)) { $ref = new \ReflectionMethod($callback[0], $callback[1]); - } elseif (is_object($callback) && !$callback instanceof \Closure) { + } elseif (\is_object($callback) && !$callback instanceof \Closure) { $ref = new \ReflectionMethod($callback, '__invoke'); } else { $ref = new \ReflectionFunction($callback); diff --git a/openml_OS/vendor/react/promise/src/PromiseInterface.php b/openml_OS/vendor/react/promise/src/PromiseInterface.php index fcd763d3f..edcb00770 100644 --- a/openml_OS/vendor/react/promise/src/PromiseInterface.php +++ b/openml_OS/vendor/react/promise/src/PromiseInterface.php @@ -5,9 +5,36 @@ interface PromiseInterface { /** + * Transforms a promise's value by applying a function to the promise's fulfillment + * or rejection value. Returns a new promise for the transformed result. * - * The `$onProgress` argument is deprecated and should not be used anymore. + * The `then()` method registers new fulfilled and rejection handlers with a promise + * (all parameters are optional): * + * * `$onFulfilled` will be invoked once the promise is fulfilled and passed + * the result as the first argument. + * * `$onRejected` will be invoked once the promise is rejected and passed the + * reason as the first argument. + * * `$onProgress` (deprecated) will be invoked whenever the producer of the promise + * triggers progress notifications and passed a single argument (whatever it + * wants) to indicate progress. + * + * It returns a new promise that will fulfill with the return value of either + * `$onFulfilled` or `$onRejected`, whichever is called, or will reject with + * the thrown exception if either throws. + * + * A promise makes the following guarantees about handlers registered in + * the same call to `then()`: + * + * 1. Only one of `$onFulfilled` or `$onRejected` will be called, + * never both. + * 2. `$onFulfilled` and `$onRejected` will never be called more + * than once. + * 3. `$onProgress` (deprecated) may be called multiple times. + * + * @param callable|null $onFulfilled + * @param callable|null $onRejected + * @param callable|null $onProgress This argument is deprecated and should not be used anymore. * @return PromiseInterface */ public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null); diff --git a/openml_OS/vendor/react/promise/src/PromisorInterface.php b/openml_OS/vendor/react/promise/src/PromisorInterface.php index 9341a4fa8..bd6440086 100644 --- a/openml_OS/vendor/react/promise/src/PromisorInterface.php +++ b/openml_OS/vendor/react/promise/src/PromisorInterface.php @@ -5,6 +5,8 @@ interface PromisorInterface { /** + * Returns the promise of the deferred. + * * @return PromiseInterface */ public function promise(); diff --git a/openml_OS/vendor/react/promise/src/RejectedPromise.php b/openml_OS/vendor/react/promise/src/RejectedPromise.php index 479a746b3..09cd4ab2f 100644 --- a/openml_OS/vendor/react/promise/src/RejectedPromise.php +++ b/openml_OS/vendor/react/promise/src/RejectedPromise.php @@ -2,6 +2,9 @@ namespace React\Promise; +/** + * @deprecated 2.8.0 External usage of RejectedPromise is deprecated, use `reject()` instead. + */ class RejectedPromise implements ExtendedPromiseInterface, CancellablePromiseInterface { private $reason; diff --git a/openml_OS/vendor/react/promise/src/UnhandledRejectionException.php b/openml_OS/vendor/react/promise/src/UnhandledRejectionException.php index a44b7a1bf..e7fe2f7a8 100644 --- a/openml_OS/vendor/react/promise/src/UnhandledRejectionException.php +++ b/openml_OS/vendor/react/promise/src/UnhandledRejectionException.php @@ -19,7 +19,7 @@ public function __construct($reason) { $this->reason = $reason; - $message = sprintf('Unhandled Rejection: %s', json_encode($reason)); + $message = \sprintf('Unhandled Rejection: %s', \json_encode($reason)); parent::__construct($message, 0); } diff --git a/openml_OS/vendor/react/promise/src/functions.php b/openml_OS/vendor/react/promise/src/functions.php index 70c0eb72f..2177dc235 100644 --- a/openml_OS/vendor/react/promise/src/functions.php +++ b/openml_OS/vendor/react/promise/src/functions.php @@ -2,16 +2,32 @@ namespace React\Promise; +/** + * Creates a promise for the supplied `$promiseOrValue`. + * + * If `$promiseOrValue` is a value, it will be the resolution value of the + * returned promise. + * + * If `$promiseOrValue` is a thenable (any object that provides a `then()` method), + * a trusted promise that follows the state of the thenable is returned. + * + * If `$promiseOrValue` is a promise, it will be returned as is. + * + * @param mixed $promiseOrValue + * @return PromiseInterface + */ function resolve($promiseOrValue = null) { if ($promiseOrValue instanceof ExtendedPromiseInterface) { return $promiseOrValue; } - if (method_exists($promiseOrValue, 'then')) { + // Check is_object() first to avoid method_exists() triggering + // class autoloaders if $promiseOrValue is a string. + if (\is_object($promiseOrValue) && \method_exists($promiseOrValue, 'then')) { $canceller = null; - if (method_exists($promiseOrValue, 'cancel')) { + if (\method_exists($promiseOrValue, 'cancel')) { $canceller = [$promiseOrValue, 'cancel']; } @@ -23,6 +39,22 @@ function resolve($promiseOrValue = null) return new FulfilledPromise($promiseOrValue); } +/** + * Creates a rejected promise for the supplied `$promiseOrValue`. + * + * If `$promiseOrValue` is a value, it will be the rejection value of the + * returned promise. + * + * If `$promiseOrValue` is a promise, its completion value will be the rejected + * value of the returned promise. + * + * This can be useful in situations where you need to reject a promise without + * throwing an exception. For example, it allows you to propagate a rejection with + * the value of another promise. + * + * @param mixed $promiseOrValue + * @return PromiseInterface + */ function reject($promiseOrValue = null) { if ($promiseOrValue instanceof PromiseInterface) { @@ -34,6 +66,15 @@ function reject($promiseOrValue = null) return new RejectedPromise($promiseOrValue); } +/** + * Returns a promise that will resolve only once all the items in + * `$promisesOrValues` have resolved. The resolution value of the returned promise + * will be an array containing the resolution values of each of the items in + * `$promisesOrValues`. + * + * @param array $promisesOrValues + * @return PromiseInterface + */ function all($promisesOrValues) { return map($promisesOrValues, function ($val) { @@ -41,6 +82,16 @@ function all($promisesOrValues) }); } +/** + * Initiates a competitive race that allows one winner. Returns a promise which is + * resolved in the same way the first settled promise resolves. + * + * The returned promise will become **infinitely pending** if `$promisesOrValues` + * contains 0 items. + * + * @param array $promisesOrValues + * @return PromiseInterface + */ function race($promisesOrValues) { $cancellationQueue = new CancellationQueue(); @@ -64,14 +115,46 @@ function race($promisesOrValues) }, $cancellationQueue); } +/** + * Returns a promise that will resolve when any one of the items in + * `$promisesOrValues` resolves. The resolution value of the returned promise + * will be the resolution value of the triggering item. + * + * The returned promise will only reject if *all* items in `$promisesOrValues` are + * rejected. The rejection value will be an array of all rejection reasons. + * + * The returned promise will also reject with a `React\Promise\Exception\LengthException` + * if `$promisesOrValues` contains 0 items. + * + * @param array $promisesOrValues + * @return PromiseInterface + */ function any($promisesOrValues) { return some($promisesOrValues, 1) ->then(function ($val) { - return array_shift($val); + return \array_shift($val); }); } +/** + * Returns a promise that will resolve when `$howMany` of the supplied items in + * `$promisesOrValues` resolve. The resolution value of the returned promise + * will be an array of length `$howMany` containing the resolution values of the + * triggering items. + * + * The returned promise will reject if it becomes impossible for `$howMany` items + * to resolve (that is, when `(count($promisesOrValues) - $howMany) + 1` items + * reject). The rejection value will be an array of + * `(count($promisesOrValues) - $howMany) + 1` rejection reasons. + * + * The returned promise will also reject with a `React\Promise\Exception\LengthException` + * if `$promisesOrValues` contains less items than `$howMany`. + * + * @param array $promisesOrValues + * @param int $howMany + * @return PromiseInterface + */ function some($promisesOrValues, $howMany) { $cancellationQueue = new CancellationQueue(); @@ -80,16 +163,16 @@ function some($promisesOrValues, $howMany) return new Promise(function ($resolve, $reject, $notify) use ($promisesOrValues, $howMany, $cancellationQueue) { resolve($promisesOrValues) ->done(function ($array) use ($howMany, $cancellationQueue, $resolve, $reject, $notify) { - if (!is_array($array) || $howMany < 1) { + if (!\is_array($array) || $howMany < 1) { $resolve([]); return; } - $len = count($array); + $len = \count($array); if ($len < $howMany) { throw new Exception\LengthException( - sprintf( + \sprintf( 'Input array must contain at least %d item%s but contains only %s item%s.', $howMany, 1 === $howMany ? '' : 's', @@ -138,6 +221,17 @@ function some($promisesOrValues, $howMany) }, $cancellationQueue); } +/** + * Traditional map function, similar to `array_map()`, but allows input to contain + * promises and/or values, and `$mapFunc` may return either a value or a promise. + * + * The map function receives each item as argument, where item is a fully resolved + * value of a promise or value in `$promisesOrValues`. + * + * @param array $promisesOrValues + * @param callable $mapFunc + * @return PromiseInterface + */ function map($promisesOrValues, callable $mapFunc) { $cancellationQueue = new CancellationQueue(); @@ -146,12 +240,12 @@ function map($promisesOrValues, callable $mapFunc) return new Promise(function ($resolve, $reject, $notify) use ($promisesOrValues, $mapFunc, $cancellationQueue) { resolve($promisesOrValues) ->done(function ($array) use ($mapFunc, $cancellationQueue, $resolve, $reject, $notify) { - if (!is_array($array) || !$array) { + if (!\is_array($array) || !$array) { $resolve([]); return; } - $toResolve = count($array); + $toResolve = \count($array); $values = []; foreach ($array as $i => $promiseOrValue) { @@ -176,6 +270,17 @@ function ($mapped) use ($i, &$values, &$toResolve, $resolve) { }, $cancellationQueue); } +/** + * Traditional reduce function, similar to `array_reduce()`, but input may contain + * promises and/or values, and `$reduceFunc` may return either a value or a + * promise, *and* `$initialValue` may be a promise or a value for the starting + * value. + * + * @param array $promisesOrValues + * @param callable $reduceFunc + * @param mixed $initialValue + * @return PromiseInterface + */ function reduce($promisesOrValues, callable $reduceFunc, $initialValue = null) { $cancellationQueue = new CancellationQueue(); @@ -184,11 +289,11 @@ function reduce($promisesOrValues, callable $reduceFunc, $initialValue = null) return new Promise(function ($resolve, $reject, $notify) use ($promisesOrValues, $reduceFunc, $initialValue, $cancellationQueue) { resolve($promisesOrValues) ->done(function ($array) use ($reduceFunc, $initialValue, $cancellationQueue, $resolve, $reject, $notify) { - if (!is_array($array)) { + if (!\is_array($array)) { $array = []; } - $total = count($array); + $total = \count($array); $i = 0; // Wrap the supplied $reduceFunc with one that handles promises and then @@ -207,22 +312,24 @@ function reduce($promisesOrValues, callable $reduceFunc, $initialValue = null) $cancellationQueue->enqueue($initialValue); - array_reduce($array, $wrappedReduceFunc, resolve($initialValue)) + \array_reduce($array, $wrappedReduceFunc, resolve($initialValue)) ->done($resolve, $reject, $notify); }, $reject, $notify); }, $cancellationQueue); } -// Internal functions +/** + * @internal + */ function _checkTypehint(callable $callback, $object) { - if (!is_object($object)) { + if (!\is_object($object)) { return true; } - if (is_array($callback)) { + if (\is_array($callback)) { $callbackReflection = new \ReflectionMethod($callback[0], $callback[1]); - } elseif (is_object($callback) && !$callback instanceof \Closure) { + } elseif (\is_object($callback) && !$callback instanceof \Closure) { $callbackReflection = new \ReflectionMethod($callback, '__invoke'); } else { $callbackReflection = new \ReflectionFunction($callback); @@ -236,9 +343,69 @@ function _checkTypehint(callable $callback, $object) $expectedException = $parameters[0]; - if (!$expectedException->getClass()) { + // PHP before v8 used an easy API: + if (\PHP_VERSION_ID < 70100 || \defined('HHVM_VERSION')) { + if (!$expectedException->getClass()) { + return true; + } + + return $expectedException->getClass()->isInstance($object); + } + + // Extract the type of the argument and handle different possibilities + $type = $expectedException->getType(); + + $isTypeUnion = true; + $types = []; + + switch (true) { + case $type === null: + break; + case $type instanceof \ReflectionNamedType: + $types = [$type]; + break; + case $type instanceof \ReflectionIntersectionType: + $isTypeUnion = false; + case $type instanceof \ReflectionUnionType; + $types = $type->getTypes(); + break; + default: + throw new \LogicException('Unexpected return value of ReflectionParameter::getType'); + } + + // If there is no type restriction, it matches + if (empty($types)) { return true; } - return $expectedException->getClass()->isInstance($object); + foreach ($types as $type) { + + if ($type instanceof \ReflectionIntersectionType) { + foreach ($type->getTypes() as $typeToMatch) { + if (!($matches = ($typeToMatch->isBuiltin() && \gettype($object) === $typeToMatch->getName()) + || (new \ReflectionClass($typeToMatch->getName()))->isInstance($object))) { + break; + } + } + } else { + $matches = ($type->isBuiltin() && \gettype($object) === $type->getName()) + || (new \ReflectionClass($type->getName()))->isInstance($object); + } + + // If we look for a single match (union), we can return early on match + // If we look for a full match (intersection), we can return early on mismatch + if ($matches) { + if ($isTypeUnion) { + return true; + } + } else { + if (!$isTypeUnion) { + return false; + } + } + } + + // If we look for a single match (union) and did not return early, we matched no type and are false + // If we look for a full match (intersection) and did not return early, we matched all types and are true + return $isTypeUnion ? false : true; } diff --git a/openml_OS/vendor/react/promise/src/functions_include.php b/openml_OS/vendor/react/promise/src/functions_include.php index c71decbf9..bd0c54fd5 100644 --- a/openml_OS/vendor/react/promise/src/functions_include.php +++ b/openml_OS/vendor/react/promise/src/functions_include.php @@ -1,5 +1,5 @@ enqueue($p); - - $cancellationQueue(); - - $this->assertTrue($p->cancelCalled); - } - - /** @test */ - public function ignoresSimpleCancellable() - { - $p = new SimpleTestCancellable(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($p); - - $cancellationQueue(); - - $this->assertFalse($p->cancelCalled); - } - - /** @test */ - public function callsCancelOnPromisesEnqueuedBeforeStart() - { - $d1 = $this->getCancellableDeferred(); - $d2 = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($d1->promise()); - $cancellationQueue->enqueue($d2->promise()); - - $cancellationQueue(); - } - - /** @test */ - public function callsCancelOnPromisesEnqueuedAfterStart() - { - $d1 = $this->getCancellableDeferred(); - $d2 = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - - $cancellationQueue(); - - $cancellationQueue->enqueue($d2->promise()); - $cancellationQueue->enqueue($d1->promise()); - } - - /** @test */ - public function doesNotCallCancelTwiceWhenStartedTwice() - { - $d = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($d->promise()); - - $cancellationQueue(); - $cancellationQueue(); - } - - /** @test */ - public function rethrowsExceptionsThrownFromCancel() - { - $this->setExpectedException('\Exception', 'test'); - - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel') - ->will($this->throwException(new \Exception('test'))); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($mock); - - $cancellationQueue(); - } - - private function getCancellableDeferred() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke'); - - return new Deferred($mock); - } -} diff --git a/openml_OS/vendor/react/promise/tests/DeferredTest.php b/openml_OS/vendor/react/promise/tests/DeferredTest.php deleted file mode 100644 index 8ee40b8a8..000000000 --- a/openml_OS/vendor/react/promise/tests/DeferredTest.php +++ /dev/null @@ -1,112 +0,0 @@ - [$d, 'promise'], - 'resolve' => [$d, 'resolve'], - 'reject' => [$d, 'reject'], - 'notify' => [$d, 'progress'], - 'settle' => [$d, 'resolve'], - ]); - } - - /** @test */ - public function progressIsAnAliasForNotify() - { - $deferred = new Deferred(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $deferred->promise() - ->then($this->expectCallableNever(), $this->expectCallableNever(), $mock); - - $deferred->progress($sentinel); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException() - { - gc_collect_cycles(); - $deferred = new Deferred(function ($resolve, $reject) { - $reject(new \Exception('foo')); - }); - $deferred->promise()->cancel(); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException() - { - gc_collect_cycles(); - $deferred = new Deferred(function ($resolve, $reject) { - $reject(new \Exception('foo')); - }); - $deferred->promise()->then()->cancel(); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException() - { - gc_collect_cycles(); - $deferred = new Deferred(function () use (&$deferred) { }); - $deferred->reject(new \Exception('foo')); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingDeferred() - { - gc_collect_cycles(); - $deferred = new Deferred(); - $deferred->promise(); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingDeferredWithUnusedCanceller() - { - gc_collect_cycles(); - $deferred = new Deferred(function () { }); - $deferred->promise(); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingDeferredWithNoopCanceller() - { - gc_collect_cycles(); - $deferred = new Deferred(function () { }); - $deferred->promise()->cancel(); - unset($deferred); - - $this->assertSame(0, gc_collect_cycles()); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FulfilledPromiseTest.php b/openml_OS/vendor/react/promise/tests/FulfilledPromiseTest.php deleted file mode 100644 index f5a2da803..000000000 --- a/openml_OS/vendor/react/promise/tests/FulfilledPromiseTest.php +++ /dev/null @@ -1,76 +0,0 @@ - function () use (&$promise) { - if (!$promise) { - throw new \LogicException('FulfilledPromise must be resolved before obtaining the promise'); - } - - return $promise; - }, - 'resolve' => function ($value = null) use (&$promise) { - if (!$promise) { - $promise = new FulfilledPromise($value); - } - }, - 'reject' => function () { - throw new \LogicException('You cannot call reject() for React\Promise\FulfilledPromise'); - }, - 'notify' => function () { - // no-op - }, - 'settle' => function ($value = null) use (&$promise) { - if (!$promise) { - $promise = new FulfilledPromise($value); - } - }, - ]); - } - - /** @test */ - public function shouldThrowExceptionIfConstructedWithAPromise() - { - $this->setExpectedException('\InvalidArgumentException'); - - return new FulfilledPromise(new FulfilledPromise()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToFulfilledPromiseWithAlwaysFollowers() - { - gc_collect_cycles(); - $promise = new FulfilledPromise(1); - $promise->always(function () { - throw new \RuntimeException(); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToFulfilledPromiseWithThenFollowers() - { - gc_collect_cycles(); - $promise = new FulfilledPromise(1); - $promise = $promise->then(function () { - throw new \RuntimeException(); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionAllTest.php b/openml_OS/vendor/react/promise/tests/FunctionAllTest.php deleted file mode 100644 index 74c1d7c31..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionAllTest.php +++ /dev/null @@ -1,114 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - all([]) - ->then($mock); - } - - /** @test */ - public function shouldResolveValuesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2, 3])); - - all([1, 2, 3]) - ->then($mock); - } - - /** @test */ - public function shouldResolvePromisesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2, 3])); - - all([resolve(1), resolve(2), resolve(3)]) - ->then($mock); - } - - /** @test */ - public function shouldResolveSparseArrayInput() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([null, 1, null, 1, 1])); - - all([null, 1, null, 1, 1]) - ->then($mock); - } - - /** @test */ - public function shouldRejectIfAnyInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - all([resolve(1), reject(2), resolve(3)]) - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2, 3])); - - all(resolve([1, 2, 3])) - ->then($mock); - } - - /** @test */ - public function shouldResolveToEmptyArrayWhenInputPromiseDoesNotResolveToArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - all(resolve(1)) - ->then($mock); - } - - /** @test */ - public function shouldPreserveTheOrderOfArrayWhenResolvingAsyncPromises() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2, 3])); - - $deferred = new Deferred(); - - all([resolve(1), $deferred->promise(), resolve(3)]) - ->then($mock); - - $deferred->resolve(2); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionAnyTest.php b/openml_OS/vendor/react/promise/tests/FunctionAnyTest.php deleted file mode 100644 index 140b55122..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionAnyTest.php +++ /dev/null @@ -1,204 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with( - $this->callback(function($exception){ - return $exception instanceof LengthException && - 'Input array must contain at least 1 item but contains only 0 items.' === $exception->getMessage(); - }) - ); - - any([]) - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldResolveToNullWithNonArrayInput() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - any(null) - ->then($mock); - } - - /** @test */ - public function shouldResolveWithAnInputValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - any([1, 2, 3]) - ->then($mock); - } - - /** @test */ - public function shouldResolveWithAPromisedInputValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - any([resolve(1), resolve(2), resolve(3)]) - ->then($mock); - } - - /** @test */ - public function shouldRejectWithAllRejectedInputValuesIfAllInputsAreRejected() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([0 => 1, 1 => 2, 2 => 3])); - - any([reject(1), reject(2), reject(3)]) - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldResolveWhenFirstInputPromiseResolves() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - any([resolve(1), reject(2), reject(3)]) - ->then($mock); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - any(resolve([1, 2, 3])) - ->then($mock); - } - - /** @test */ - public function shouldResolveToNullArrayWhenInputPromiseDoesNotResolveToArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - any(resolve(1)) - ->then($mock); - } - - /** @test */ - public function shouldNotRelyOnArryIndexesWhenUnwrappingToASingleResolutionValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $d1 = new Deferred(); - $d2 = new Deferred(); - - any(['abc' => $d1->promise(), 1 => $d2->promise()]) - ->then($mock); - - $d2->resolve(2); - $d1->resolve(1); - } - - /** @test */ - public function shouldRejectWhenInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - any(reject()) - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldCancelInputPromise() - { - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel'); - - any($mock)->cancel(); - } - - /** @test */ - public function shouldCancelInputArrayPromises() - { - $mock1 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock1 - ->expects($this->once()) - ->method('cancel'); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->once()) - ->method('cancel'); - - any([$mock1, $mock2])->cancel(); - } - - /** @test */ - public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - - $deferred = New Deferred($mock); - $deferred->resolve(); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->never()) - ->method('cancel'); - - some([$deferred->promise(), $mock2], 1)->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionCheckTypehintTest.php b/openml_OS/vendor/react/promise/tests/FunctionCheckTypehintTest.php deleted file mode 100644 index 8449bc1f7..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionCheckTypehintTest.php +++ /dev/null @@ -1,118 +0,0 @@ -assertTrue(_checkTypehint(function (\InvalidArgumentException $e) { - }, new \InvalidArgumentException())); - $this->assertfalse(_checkTypehint(function (\InvalidArgumentException $e) { - }, new \Exception())); - } - - /** @test */ - public function shouldAcceptFunctionStringCallbackWithTypehint() - { - $this->assertTrue(_checkTypehint('React\Promise\testCallbackWithTypehint', new \InvalidArgumentException())); - $this->assertfalse(_checkTypehint('React\Promise\testCallbackWithTypehint', new \Exception())); - } - - /** @test */ - public function shouldAcceptInvokableObjectCallbackWithTypehint() - { - $this->assertTrue(_checkTypehint(new TestCallbackWithTypehintClass(), new \InvalidArgumentException())); - $this->assertfalse(_checkTypehint(new TestCallbackWithTypehintClass(), new \Exception())); - } - - /** @test */ - public function shouldAcceptObjectMethodCallbackWithTypehint() - { - $this->assertTrue(_checkTypehint([new TestCallbackWithTypehintClass(), 'testCallback'], new \InvalidArgumentException())); - $this->assertfalse(_checkTypehint([new TestCallbackWithTypehintClass(), 'testCallback'], new \Exception())); - } - - /** @test */ - public function shouldAcceptStaticClassCallbackWithTypehint() - { - $this->assertTrue(_checkTypehint(['React\Promise\TestCallbackWithTypehintClass', 'testCallbackStatic'], new \InvalidArgumentException())); - $this->assertfalse(_checkTypehint(['React\Promise\TestCallbackWithTypehintClass', 'testCallbackStatic'], new \Exception())); - } - - /** @test */ - public function shouldAcceptClosureCallbackWithoutTypehint() - { - $this->assertTrue(_checkTypehint(function (\InvalidArgumentException $e) { - }, new \InvalidArgumentException())); - } - - /** @test */ - public function shouldAcceptFunctionStringCallbackWithoutTypehint() - { - $this->assertTrue(_checkTypehint('React\Promise\testCallbackWithoutTypehint', new \InvalidArgumentException())); - } - - /** @test */ - public function shouldAcceptInvokableObjectCallbackWithoutTypehint() - { - $this->assertTrue(_checkTypehint(new TestCallbackWithoutTypehintClass(), new \InvalidArgumentException())); - } - - /** @test */ - public function shouldAcceptObjectMethodCallbackWithoutTypehint() - { - $this->assertTrue(_checkTypehint([new TestCallbackWithoutTypehintClass(), 'testCallback'], new \InvalidArgumentException())); - } - - /** @test */ - public function shouldAcceptStaticClassCallbackWithoutTypehint() - { - $this->assertTrue(_checkTypehint(['React\Promise\TestCallbackWithoutTypehintClass', 'testCallbackStatic'], new \InvalidArgumentException())); - } -} - -function testCallbackWithTypehint(\InvalidArgumentException $e) -{ -} - -function testCallbackWithoutTypehint() -{ -} - -class TestCallbackWithTypehintClass -{ - public function __invoke(\InvalidArgumentException $e) - { - - } - - public function testCallback(\InvalidArgumentException $e) - { - - } - - public static function testCallbackStatic(\InvalidArgumentException $e) - { - - } -} - -class TestCallbackWithoutTypehintClass -{ - public function __invoke() - { - - } - - public function testCallback() - { - - } - - public static function testCallbackStatic() - { - - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionMapTest.php b/openml_OS/vendor/react/promise/tests/FunctionMapTest.php deleted file mode 100644 index 1ea560a1f..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionMapTest.php +++ /dev/null @@ -1,198 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - map( - [1, 2, 3], - $this->mapper() - )->then($mock); - } - - /** @test */ - public function shouldMapInputPromisesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - map( - [resolve(1), resolve(2), resolve(3)], - $this->mapper() - )->then($mock); - } - - /** @test */ - public function shouldMapMixedInputArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - map( - [1, resolve(2), 3], - $this->mapper() - )->then($mock); - } - - /** @test */ - public function shouldMapInputWhenMapperReturnsAPromise() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - map( - [1, 2, 3], - $this->promiseMapper() - )->then($mock); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - map( - resolve([1, resolve(2), 3]), - $this->mapper() - )->then($mock); - } - - /** @test */ - public function shouldResolveToEmptyArrayWhenInputPromiseDoesNotResolveToArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - map( - resolve(1), - $this->mapper() - )->then($mock); - } - - /** @test */ - public function shouldPreserveTheOrderOfArrayWhenResolvingAsyncPromises() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([2, 4, 6])); - - $deferred = new Deferred(); - - map( - [resolve(1), $deferred->promise(), resolve(3)], - $this->mapper() - )->then($mock); - - $deferred->resolve(2); - } - - /** @test */ - public function shouldRejectWhenInputContainsRejection() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - map( - [resolve(1), reject(2), resolve(3)], - $this->mapper() - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldRejectWhenInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - map( - reject(), - $this->mapper() - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldCancelInputPromise() - { - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel'); - - map( - $mock, - $this->mapper() - )->cancel(); - } - - /** @test */ - public function shouldCancelInputArrayPromises() - { - $mock1 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock1 - ->expects($this->once()) - ->method('cancel'); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->once()) - ->method('cancel'); - - map( - [$mock1, $mock2], - $this->mapper() - )->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionRaceTest.php b/openml_OS/vendor/react/promise/tests/FunctionRaceTest.php deleted file mode 100644 index 83770ec20..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionRaceTest.php +++ /dev/null @@ -1,211 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - race( - [] - )->then($mock); - } - - /** @test */ - public function shouldResolveValuesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - race( - [1, 2, 3] - )->then($mock); - } - - /** @test */ - public function shouldResolvePromisesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $d1 = new Deferred(); - $d2 = new Deferred(); - $d3 = new Deferred(); - - race( - [$d1->promise(), $d2->promise(), $d3->promise()] - )->then($mock); - - $d2->resolve(2); - - $d1->resolve(1); - $d3->resolve(3); - } - - /** @test */ - public function shouldResolveSparseArrayInput() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - race( - [null, 1, null, 2, 3] - )->then($mock); - } - - /** @test */ - public function shouldRejectIfFirstSettledPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $d1 = new Deferred(); - $d2 = new Deferred(); - $d3 = new Deferred(); - - race( - [$d1->promise(), $d2->promise(), $d3->promise()] - )->then($this->expectCallableNever(), $mock); - - $d2->reject(2); - - $d1->resolve(1); - $d3->resolve(3); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - race( - resolve([1, 2, 3]) - )->then($mock); - } - - /** @test */ - public function shouldResolveToNullWhenInputPromiseDoesNotResolveToArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - race( - resolve(1) - )->then($mock); - } - - /** @test */ - public function shouldRejectWhenInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - race( - reject() - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldCancelInputPromise() - { - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel'); - - race($mock)->cancel(); - } - - /** @test */ - public function shouldCancelInputArrayPromises() - { - $mock1 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock1 - ->expects($this->once()) - ->method('cancel'); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->once()) - ->method('cancel'); - - race([$mock1, $mock2])->cancel(); - } - - /** @test */ - public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - $deferred = New Deferred($mock); - $deferred->resolve(); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->never()) - ->method('cancel'); - - race([$deferred->promise(), $mock2])->cancel(); - } - - /** @test */ - public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - $deferred = New Deferred($mock); - $deferred->reject(); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->never()) - ->method('cancel'); - - race([$deferred->promise(), $mock2])->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionReduceTest.php b/openml_OS/vendor/react/promise/tests/FunctionReduceTest.php deleted file mode 100644 index 8b43a8787..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionReduceTest.php +++ /dev/null @@ -1,347 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(6)); - - reduce( - [1, 2, 3], - $this->plus() - )->then($mock); - } - - /** @test */ - public function shouldReduceValuesWithInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(7)); - - reduce( - [1, 2, 3], - $this->plus(), - 1 - )->then($mock); - } - - /** @test */ - public function shouldReduceValuesWithInitialPromise() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(7)); - - reduce( - [1, 2, 3], - $this->plus(), - resolve(1) - )->then($mock); - } - - /** @test */ - public function shouldReducePromisedValuesWithoutInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(6)); - - reduce( - [resolve(1), resolve(2), resolve(3)], - $this->plus() - )->then($mock); - } - - /** @test */ - public function shouldReducePromisedValuesWithInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(7)); - - reduce( - [resolve(1), resolve(2), resolve(3)], - $this->plus(), - 1 - )->then($mock); - } - - /** @test */ - public function shouldReducePromisedValuesWithInitialPromise() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(7)); - - reduce( - [resolve(1), resolve(2), resolve(3)], - $this->plus(), - resolve(1) - )->then($mock); - } - - /** @test */ - public function shouldReduceEmptyInputWithInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - reduce( - [], - $this->plus(), - 1 - )->then($mock); - } - - /** @test */ - public function shouldReduceEmptyInputWithInitialPromise() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - reduce( - [], - $this->plus(), - resolve(1) - )->then($mock); - } - - /** @test */ - public function shouldRejectWhenInputContainsRejection() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - reduce( - [resolve(1), reject(2), resolve(3)], - $this->plus(), - resolve(1) - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldResolveWithNullWhenInputIsEmptyAndNoInitialValueOrPromiseProvided() - { - // Note: this is different from when.js's behavior! - // In when.reduce(), this rejects with a TypeError exception (following - // JavaScript's [].reduce behavior. - // We're following PHP's array_reduce behavior and resolve with NULL. - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - reduce( - [], - $this->plus() - )->then($mock); - } - - /** @test */ - public function shouldAllowSparseArrayInputWithoutInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(3)); - - reduce( - [null, null, 1, null, 1, 1], - $this->plus() - )->then($mock); - } - - /** @test */ - public function shouldAllowSparseArrayInputWithInitialValue() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(4)); - - reduce( - [null, null, 1, null, 1, 1], - $this->plus(), - 1 - )->then($mock); - } - - /** @test */ - public function shouldReduceInInputOrder() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo('123')); - - reduce( - [1, 2, 3], - $this->append(), - '' - )->then($mock); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo('123')); - - reduce( - resolve([1, 2, 3]), - $this->append(), - '' - )->then($mock); - } - - /** @test */ - public function shouldResolveToInitialValueWhenInputPromiseDoesNotResolveToAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - reduce( - resolve(1), - $this->plus(), - 1 - )->then($mock); - } - - /** @test */ - public function shouldProvideCorrectBasisValue() - { - $insertIntoArray = function ($arr, $val, $i) { - $arr[$i] = $val; - - return $arr; - }; - - $d1 = new Deferred(); - $d2 = new Deferred(); - $d3 = new Deferred(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2, 3])); - - reduce( - [$d1->promise(), $d2->promise(), $d3->promise()], - $insertIntoArray, - [] - )->then($mock); - - $d3->resolve(3); - $d1->resolve(1); - $d2->resolve(2); - } - - /** @test */ - public function shouldRejectWhenInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - reduce( - reject(), - $this->plus(), - 1 - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldCancelInputPromise() - { - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel'); - - reduce( - $mock, - $this->plus(), - 1 - )->cancel(); - } - - /** @test */ - public function shouldCancelInputArrayPromises() - { - $mock1 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock1 - ->expects($this->once()) - ->method('cancel'); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->once()) - ->method('cancel'); - - reduce( - [$mock1, $mock2], - $this->plus(), - 1 - )->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionRejectTest.php b/openml_OS/vendor/react/promise/tests/FunctionRejectTest.php deleted file mode 100644 index 84b8ec6a0..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionRejectTest.php +++ /dev/null @@ -1,64 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - reject($expected) - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function shouldRejectAFulfilledPromise() - { - $expected = 123; - - $resolved = new FulfilledPromise($expected); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - reject($resolved) - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function shouldRejectARejectedPromise() - { - $expected = 123; - - $resolved = new RejectedPromise($expected); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - reject($resolved) - ->then( - $this->expectCallableNever(), - $mock - ); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionResolveTest.php b/openml_OS/vendor/react/promise/tests/FunctionResolveTest.php deleted file mode 100644 index 53126bc02..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionResolveTest.php +++ /dev/null @@ -1,171 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - resolve($expected) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldResolveAFulfilledPromise() - { - $expected = 123; - - $resolved = new FulfilledPromise($expected); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - resolve($resolved) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldResolveAThenable() - { - $thenable = new SimpleFulfilledTestThenable(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo('foo')); - - resolve($thenable) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldResolveACancellableThenable() - { - $thenable = new SimpleTestCancellableThenable(); - - $promise = resolve($thenable); - $promise->cancel(); - - $this->assertTrue($thenable->cancelCalled); - } - - /** @test */ - public function shouldRejectARejectedPromise() - { - $expected = 123; - - $resolved = new RejectedPromise($expected); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($expected)); - - resolve($resolved) - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function shouldSupportDeepNestingInPromiseChains() - { - $d = new Deferred(); - $d->resolve(false); - - $result = resolve(resolve($d->promise()->then(function ($val) { - $d = new Deferred(); - $d->resolve($val); - - $identity = function ($val) { - return $val; - }; - - return resolve($d->promise()->then($identity))->then( - function ($val) { - return !$val; - } - ); - }))); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(true)); - - $result->then($mock); - } - - /** @test */ - public function shouldSupportVeryDeepNestedPromises() - { - $deferreds = []; - - // @TODO Increase count once global-queue is merged - for ($i = 0; $i < 10; $i++) { - $deferreds[] = $d = new Deferred(); - $p = $d->promise(); - - $last = $p; - for ($j = 0; $j < 10; $j++) { - $last = $last->then(function($result) { - return $result; - }); - } - } - - $p = null; - foreach ($deferreds as $d) { - if ($p) { - $d->resolve($p); - } - - $p = $d->promise(); - } - - $deferreds[0]->resolve(true); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(true)); - - $deferreds[0]->promise()->then($mock); - } - - /** @test */ - public function returnsExtendePromiseForSimplePromise() - { - $promise = $this - ->getMockBuilder('React\Promise\PromiseInterface') - ->getMock(); - - $this->assertInstanceOf('React\Promise\ExtendedPromiseInterface', resolve($promise)); - } -} diff --git a/openml_OS/vendor/react/promise/tests/FunctionSomeTest.php b/openml_OS/vendor/react/promise/tests/FunctionSomeTest.php deleted file mode 100644 index 276b54bb2..000000000 --- a/openml_OS/vendor/react/promise/tests/FunctionSomeTest.php +++ /dev/null @@ -1,258 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with( - $this->callback(function($exception){ - return $exception instanceof LengthException && - 'Input array must contain at least 1 item but contains only 0 items.' === $exception->getMessage(); - }) - ); - - some( - [], - 1 - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldRejectWithLengthExceptionWithInputArrayContainingNotEnoughItems() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with( - $this->callback(function($exception){ - return $exception instanceof LengthException && - 'Input array must contain at least 4 items but contains only 3 items.' === $exception->getMessage(); - }) - ); - - some( - [1, 2, 3], - 4 - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldResolveToEmptyArrayWithNonArrayInput() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - some( - null, - 1 - )->then($mock); - } - - /** @test */ - public function shouldResolveValuesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2])); - - some( - [1, 2, 3], - 2 - )->then($mock); - } - - /** @test */ - public function shouldResolvePromisesArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2])); - - some( - [resolve(1), resolve(2), resolve(3)], - 2 - )->then($mock); - } - - /** @test */ - public function shouldResolveSparseArrayInput() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([null, 1])); - - some( - [null, 1, null, 2, 3], - 2 - )->then($mock); - } - - /** @test */ - public function shouldRejectIfAnyInputPromiseRejectsBeforeDesiredNumberOfInputsAreResolved() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1 => 2, 2 => 3])); - - some( - [resolve(1), reject(2), reject(3)], - 2 - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldAcceptAPromiseForAnArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([1, 2])); - - some( - resolve([1, 2, 3]), - 2 - )->then($mock); - } - - /** @test */ - public function shouldResolveWithEmptyArrayIfHowManyIsLessThanOne() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - some( - [1], - 0 - )->then($mock); - } - - /** @test */ - public function shouldResolveToEmptyArrayWhenInputPromiseDoesNotResolveToArray() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo([])); - - some( - resolve(1), - 1 - )->then($mock); - } - - /** @test */ - public function shouldRejectWhenInputPromiseRejects() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(null)); - - some( - reject(), - 1 - )->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldCancelInputPromise() - { - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel'); - - some($mock, 1)->cancel(); - } - - /** @test */ - public function shouldCancelInputArrayPromises() - { - $mock1 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock1 - ->expects($this->once()) - ->method('cancel'); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->once()) - ->method('cancel'); - - some([$mock1, $mock2], 1)->cancel(); - } - - /** @test */ - public function shouldNotCancelOtherPendingInputArrayPromisesIfEnoughPromisesFulfill() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - $deferred = New Deferred($mock); - $deferred->resolve(); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->never()) - ->method('cancel'); - - some([$deferred->promise(), $mock2], 1); - } - - /** @test */ - public function shouldNotCancelOtherPendingInputArrayPromisesIfEnoughPromisesReject() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - $deferred = New Deferred($mock); - $deferred->reject(); - - $mock2 = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock2 - ->expects($this->never()) - ->method('cancel'); - - some([$deferred->promise(), $mock2], 2); - } -} diff --git a/openml_OS/vendor/react/promise/tests/LazyPromiseTest.php b/openml_OS/vendor/react/promise/tests/LazyPromiseTest.php deleted file mode 100644 index b6308818a..000000000 --- a/openml_OS/vendor/react/promise/tests/LazyPromiseTest.php +++ /dev/null @@ -1,107 +0,0 @@ -promise(); - }; - - return new CallbackPromiseAdapter([ - 'promise' => function () use ($factory) { - return new LazyPromise($factory); - }, - 'resolve' => [$d, 'resolve'], - 'reject' => [$d, 'reject'], - 'notify' => [$d, 'progress'], - 'settle' => [$d, 'resolve'], - ]); - } - - /** @test */ - public function shouldNotCallFactoryIfThenIsNotInvoked() - { - $factory = $this->createCallableMock(); - $factory - ->expects($this->never()) - ->method('__invoke'); - - new LazyPromise($factory); - } - - /** @test */ - public function shouldCallFactoryIfThenIsInvoked() - { - $factory = $this->createCallableMock(); - $factory - ->expects($this->once()) - ->method('__invoke'); - - $p = new LazyPromise($factory); - $p->then(); - } - - /** @test */ - public function shouldReturnPromiseFromFactory() - { - $factory = $this->createCallableMock(); - $factory - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnValue(new FulfilledPromise(1))); - - $onFulfilled = $this->createCallableMock(); - $onFulfilled - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $p = new LazyPromise($factory); - - $p->then($onFulfilled); - } - - /** @test */ - public function shouldReturnPromiseIfFactoryReturnsNull() - { - $factory = $this->createCallableMock(); - $factory - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnValue(null)); - - $p = new LazyPromise($factory); - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $p->then()); - } - - /** @test */ - public function shouldReturnRejectedPromiseIfFactoryThrowsException() - { - $exception = new \Exception(); - - $factory = $this->createCallableMock(); - $factory - ->expects($this->once()) - ->method('__invoke') - ->will($this->throwException($exception)); - - $onRejected = $this->createCallableMock(); - $onRejected - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $p = new LazyPromise($factory); - - $p->then($this->expectCallableNever(), $onRejected); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php b/openml_OS/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php deleted file mode 100644 index bdedf4658..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseAdapter/CallbackPromiseAdapter.php +++ /dev/null @@ -1,40 +0,0 @@ -callbacks = $callbacks; - } - - public function promise() - { - return call_user_func_array($this->callbacks['promise'], func_get_args()); - } - - public function resolve() - { - return call_user_func_array($this->callbacks['resolve'], func_get_args()); - } - - public function reject() - { - return call_user_func_array($this->callbacks['reject'], func_get_args()); - } - - public function notify() - { - return call_user_func_array($this->callbacks['notify'], func_get_args()); - } - - public function settle() - { - return call_user_func_array($this->callbacks['settle'], func_get_args()); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseAdapter/PromiseAdapterInterface.php b/openml_OS/vendor/react/promise/tests/PromiseAdapter/PromiseAdapterInterface.php deleted file mode 100644 index 9157cd4ea..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseAdapter/PromiseAdapterInterface.php +++ /dev/null @@ -1,14 +0,0 @@ - function () use ($promise) { - return $promise; - }, - 'resolve' => $resolveCallback, - 'reject' => $rejectCallback, - 'notify' => $progressCallback, - 'settle' => $resolveCallback, - ]); - } - - /** @test */ - public function shouldRejectIfResolverThrowsException() - { - $exception = new \Exception('foo'); - - $promise = new Promise(function () use ($exception) { - throw $exception; - }); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $promise - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldResolveWithoutCreatingGarbageCyclesIfResolverResolvesWithException() - { - gc_collect_cycles(); - $promise = new Promise(function ($resolve) { - $resolve(new \Exception('foo')); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfResolverThrowsExceptionWithoutResolver() - { - gc_collect_cycles(); - $promise = new Promise(function () { - throw new \Exception('foo'); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfResolverRejectsWithException() - { - gc_collect_cycles(); - $promise = new Promise(function ($resolve, $reject) { - $reject(new \Exception('foo')); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException() - { - gc_collect_cycles(); - $promise = new Promise(function ($resolve, $reject) { }, function ($resolve, $reject) { - $reject(new \Exception('foo')); - }); - $promise->cancel(); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException() - { - gc_collect_cycles(); - $promise = new Promise(function ($resolve, $reject) { }, function ($resolve, $reject) { - $reject(new \Exception('foo')); - }); - $promise->then()->then()->then()->cancel(); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldRejectWithoutCreatingGarbageCyclesIfResolverThrowsException() - { - gc_collect_cycles(); - $promise = new Promise(function ($resolve, $reject) { - throw new \Exception('foo'); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** - * Test that checks number of garbage cycles after throwing from a canceller - * that explicitly uses a reference to the promise. This is rather synthetic, - * actual use cases often have implicit (hidden) references which ought not - * to be stored in the stack trace. - * - * Reassigned arguments only show up in the stack trace in PHP 7, so we can't - * avoid this on legacy PHP. As an alternative, consider explicitly unsetting - * any references before throwing. - * - * @test - * @requires PHP 7 - */ - public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException() - { - gc_collect_cycles(); - $promise = new Promise(function () {}, function () use (&$promise) { - throw new \Exception('foo'); - }); - $promise->cancel(); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** - * @test - * @requires PHP 7 - * @see self::shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException - */ - public function shouldRejectWithoutCreatingGarbageCyclesIfResolverWithReferenceThrowsException() - { - gc_collect_cycles(); - $promise = new Promise(function () use (&$promise) { - throw new \Exception('foo'); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** - * @test - * @requires PHP 7 - * @see self::shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException - */ - public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndResolverThrowsException() - { - gc_collect_cycles(); - $promise = new Promise(function () { - throw new \Exception('foo'); - }, function () use (&$promise) { }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldIgnoreNotifyAfterReject() - { - $promise = new Promise(function () { }, function ($resolve, $reject, $notify) { - $reject(new \Exception('foo')); - $notify(42); - }); - - $promise->then(null, null, $this->expectCallableNever()); - $promise->cancel(); - } - - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromise() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithThenFollowers() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - $promise->then()->then()->then(); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithDoneFollowers() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - $promise->done(); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithOtherwiseFollowers() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - $promise->otherwise(function () { }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithAlwaysFollowers() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - $promise->always(function () { }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithProgressFollowers() - { - gc_collect_cycles(); - $promise = new Promise(function () { }); - $promise->then(null, null, function () { }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldFulfillIfFullfilledWithSimplePromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo('foo')); - - $adapter->promise() - ->then($mock); - - $adapter->resolve(new SimpleFulfilledTestPromise()); - } - - /** @test */ - public function shouldRejectIfRejectedWithSimplePromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo('foo')); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->resolve(new SimpleRejectedTestPromise()); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/CancelTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/CancelTestTrait.php deleted file mode 100644 index 2baab0240..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/CancelTestTrait.php +++ /dev/null @@ -1,246 +0,0 @@ -getPromiseTestAdapter(function ($resolve, $reject, $notify) use (&$args) { - $args = func_get_args(); - }); - - $adapter->promise()->cancel(); - - $this->assertCount(3, $args); - $this->assertTrue(is_callable($args[0])); - $this->assertTrue(is_callable($args[1])); - $this->assertTrue(is_callable($args[2])); - } - - /** @test */ - public function cancelShouldCallCancellerWithoutArgumentsIfNotAccessed() - { - $args = null; - $adapter = $this->getPromiseTestAdapter(function () use (&$args) { - $args = func_num_args(); - }); - - $adapter->promise()->cancel(); - - $this->assertSame(0, $args); - } - - /** @test */ - public function cancelShouldFulfillPromiseIfCancellerFulfills() - { - $adapter = $this->getPromiseTestAdapter(function ($resolve) { - $resolve(1); - }); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($mock, $this->expectCallableNever()); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldRejectPromiseIfCancellerRejects() - { - $adapter = $this->getPromiseTestAdapter(function ($resolve, $reject) { - $reject(1); - }); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldRejectPromiseWithExceptionIfCancellerThrows() - { - $e = new \Exception(); - - $adapter = $this->getPromiseTestAdapter(function () use ($e) { - throw $e; - }); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($e)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldProgressPromiseIfCancellerNotifies() - { - $adapter = $this->getPromiseTestAdapter(function ($resolve, $reject, $progress) { - $progress(1); - }); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $this->expectCallableNever(), $mock); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldCallCancellerOnlyOnceIfCancellerResolves() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnCallback(function ($resolve) { - $resolve(); - })); - - $adapter = $this->getPromiseTestAdapter($mock); - - $adapter->promise()->cancel(); - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldHaveNoEffectIfCancellerDoesNothing() - { - $adapter = $this->getPromiseTestAdapter(function () {}); - - $adapter->promise() - ->then($this->expectCallableNever(), $this->expectCallableNever()); - - $adapter->promise()->cancel(); - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldCallCancellerFromDeepNestedPromiseChain() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke'); - - $adapter = $this->getPromiseTestAdapter($mock); - - $promise = $adapter->promise() - ->then(function () { - return new Promise\Promise(function () {}); - }) - ->then(function () { - $d = new Promise\Deferred(); - - return $d->promise(); - }) - ->then(function () { - return new Promise\Promise(function () {}); - }); - - $promise->cancel(); - } - - /** @test */ - public function cancelCalledOnChildrenSouldOnlyCancelWhenAllChildrenCancelled() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableNever()); - - $child1 = $adapter->promise() - ->then() - ->then(); - - $adapter->promise() - ->then(); - - $child1->cancel(); - } - - /** @test */ - public function cancelShouldTriggerCancellerWhenAllChildrenCancel() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce()); - - $child1 = $adapter->promise() - ->then() - ->then(); - - $child2 = $adapter->promise() - ->then(); - - $child1->cancel(); - $child2->cancel(); - } - - /** @test */ - public function cancelShouldNotTriggerCancellerWhenCancellingOneChildrenMultipleTimes() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableNever()); - - $child1 = $adapter->promise() - ->then() - ->then(); - - $child2 = $adapter->promise() - ->then(); - - $child1->cancel(); - $child1->cancel(); - } - - /** @test */ - public function cancelShouldTriggerCancellerOnlyOnceWhenCancellingMultipleTimes() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce()); - - $adapter->promise()->cancel(); - $adapter->promise()->cancel(); - } - - /** @test */ - public function cancelShouldAlwaysTriggerCancellerWhenCalledOnRootPromise() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce()); - - $adapter->promise() - ->then() - ->then(); - - $adapter->promise() - ->then(); - - $adapter->promise()->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/FullTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/FullTestTrait.php deleted file mode 100644 index 3ce45d61f..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/FullTestTrait.php +++ /dev/null @@ -1,15 +0,0 @@ -getPromiseTestAdapter(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $adapter->promise() - ->then($this->expectCallableNever(), $this->expectCallableNever(), $mock); - - $adapter->notify($sentinel); - } - - /** @test */ - public function notifyShouldPropagateProgressToDownstreamPromises() - { - $adapter = $this->getPromiseTestAdapter(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnArgument(0)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock2 - ); - - $adapter->notify($sentinel); - } - - /** @test */ - public function notifyShouldPropagateTransformedProgressToDownstreamPromises() - { - $adapter = $this->getPromiseTestAdapter(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnValue($sentinel)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock2 - ); - - $adapter->notify(1); - } - - /** @test */ - public function notifyShouldPropagateCaughtExceptionValueAsProgress() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->throwException($exception)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock2 - ); - - $adapter->notify(1); - } - - /** @test */ - public function notifyShouldForwardProgressEventsWhenIntermediaryCallbackTiedToAResolvedPromiseReturnsAPromise() - { - $adapter = $this->getPromiseTestAdapter(); - $adapter2 = $this->getPromiseTestAdapter(); - - $promise2 = $adapter2->promise(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - // resolve BEFORE attaching progress handler - $adapter->resolve(); - - $adapter->promise() - ->then(function () use ($promise2) { - return $promise2; - }) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ); - - $adapter2->notify($sentinel); - } - - /** @test */ - public function notifyShouldForwardProgressEventsWhenIntermediaryCallbackTiedToAnUnresolvedPromiseReturnsAPromise() - { - $adapter = $this->getPromiseTestAdapter(); - $adapter2 = $this->getPromiseTestAdapter(); - - $promise2 = $adapter2->promise(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $adapter->promise() - ->then(function () use ($promise2) { - return $promise2; - }) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ); - - // resolve AFTER attaching progress handler - $adapter->resolve(); - $adapter2->notify($sentinel); - } - - /** @test */ - public function notifyShouldForwardProgressWhenResolvedWithAnotherPromise() - { - $adapter = $this->getPromiseTestAdapter(); - $adapter2 = $this->getPromiseTestAdapter(); - - $sentinel = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->returnValue($sentinel)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($sentinel); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock - ) - ->then( - $this->expectCallableNever(), - $this->expectCallableNever(), - $mock2 - ); - - $adapter->resolve($adapter2->promise()); - $adapter2->notify($sentinel); - } - - /** @test */ - public function notifyShouldAllowResolveAfterProgress() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->at(0)) - ->method('__invoke') - ->with($this->identicalTo(1)); - $mock - ->expects($this->at(1)) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->promise() - ->then( - $mock, - $this->expectCallableNever(), - $mock - ); - - $adapter->notify(1); - $adapter->resolve(2); - } - - /** @test */ - public function notifyShouldAllowRejectAfterProgress() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->at(0)) - ->method('__invoke') - ->with($this->identicalTo(1)); - $mock - ->expects($this->at(1)) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $mock, - $mock - ); - - $adapter->notify(1); - $adapter->reject(2); - } - - /** @test */ - public function notifyShouldReturnSilentlyOnProgressWhenAlreadyRejected() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->reject(1); - - $this->assertNull($adapter->notify()); - } - - /** @test */ - public function notifyShouldInvokeProgressHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise()->progress($mock); - $adapter->notify(1); - } - - /** @test */ - public function notifyShouldInvokeProgressHandlerFromDone() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $this->assertNull($adapter->promise()->done(null, null, $mock)); - $adapter->notify(1); - } - - /** @test */ - public function notifyShouldThrowExceptionThrownProgressHandlerFromDone() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(null, null, function () { - throw new \Exception('UnhandledRejectionException'); - })); - $adapter->notify(1); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseFulfilledTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseFulfilledTestTrait.php deleted file mode 100644 index 428230b97..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseFulfilledTestTrait.php +++ /dev/null @@ -1,351 +0,0 @@ -getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->resolve(1); - $adapter->resolve(2); - - $adapter->promise() - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function fulfilledPromiseShouldInvokeNewlyAddedCallback() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->resolve(1); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($mock, $this->expectCallableNever()); - } - - /** @test */ - public function thenShouldForwardResultWhenCallbackIsNull() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->resolve(1); - $adapter->promise() - ->then( - null, - $this->expectCallableNever() - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function thenShouldForwardCallbackResultToNextCallback() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->resolve(1); - $adapter->promise() - ->then( - function ($val) { - return $val + 1; - }, - $this->expectCallableNever() - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function thenShouldForwardPromisedCallbackResultValueToNextCallback() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->resolve(1); - $adapter->promise() - ->then( - function ($val) { - return \React\Promise\resolve($val + 1); - }, - $this->expectCallableNever() - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function thenShouldSwitchFromCallbacksToErrbacksWhenCallbackReturnsARejection() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->resolve(1); - $adapter->promise() - ->then( - function ($val) { - return \React\Promise\reject($val + 1); - }, - $this->expectCallableNever() - ) - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function thenShouldSwitchFromCallbacksToErrbacksWhenCallbackThrows() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->throwException($exception)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->resolve(1); - $adapter->promise() - ->then( - $mock, - $this->expectCallableNever() - ) - ->then( - $this->expectCallableNever(), - $mock2 - ); - } - - /** @test */ - public function cancelShouldReturnNullForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->resolve(); - - $this->assertNull($adapter->promise()->cancel()); - } - - /** @test */ - public function cancelShouldHaveNoEffectForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableNever()); - - $adapter->resolve(); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function doneShouldInvokeFulfillmentHandlerForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->resolve(1); - $this->assertNull($adapter->promise()->done($mock)); - } - - /** @test */ - public function doneShouldThrowExceptionThrownFulfillmentHandlerForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $adapter->resolve(1); - $this->assertNull($adapter->promise()->done(function () { - throw new \Exception('UnhandledRejectionException'); - })); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenFulfillmentHandlerRejectsForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $adapter->resolve(1); - $this->assertNull($adapter->promise()->done(function () { - return \React\Promise\reject(); - })); - } - - /** @test */ - public function otherwiseShouldNotInvokeRejectionHandlerForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->resolve(1); - $adapter->promise()->otherwise($this->expectCallableNever()); - } - - /** @test */ - public function alwaysShouldNotSuppressValueForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->resolve($value); - $adapter->promise() - ->always(function () {}) - ->then($mock); - } - - /** @test */ - public function alwaysShouldNotSuppressValueWhenHandlerReturnsANonPromiseForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->resolve($value); - $adapter->promise() - ->always(function () { - return 1; - }) - ->then($mock); - } - - /** @test */ - public function alwaysShouldNotSuppressValueWhenHandlerReturnsAPromiseForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->resolve($value); - $adapter->promise() - ->always(function () { - return \React\Promise\resolve(1); - }) - ->then($mock); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerThrowsForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->resolve(1); - $adapter->promise() - ->always(function () use ($exception) { - throw $exception; - }) - ->then(null, $mock); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerRejectsForFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->resolve(1); - $adapter->promise() - ->always(function () use ($exception) { - return \React\Promise\reject($exception); - }) - ->then(null, $mock); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/PromisePendingTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/PromisePendingTestTrait.php deleted file mode 100644 index a4f48ee25..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/PromisePendingTestTrait.php +++ /dev/null @@ -1,68 +0,0 @@ -getPromiseTestAdapter(); - - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->then()); - } - - /** @test */ - public function thenShouldReturnAllowNullForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->then(null, null, null)); - } - - /** @test */ - public function cancelShouldReturnNullForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertNull($adapter->promise()->cancel()); - } - - /** @test */ - public function doneShouldReturnNullForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertNull($adapter->promise()->done()); - } - - /** @test */ - public function doneShouldReturnAllowNullForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertNull($adapter->promise()->done(null, null, null)); - } - - /** @test */ - public function otherwiseShouldNotInvokeRejectionHandlerForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $adapter->promise()->otherwise($this->expectCallableNever()); - } - - /** @test */ - public function alwaysShouldReturnAPromiseForPendingPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->always(function () {})); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseRejectedTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseRejectedTestTrait.php deleted file mode 100644 index 98d1dcf93..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseRejectedTestTrait.php +++ /dev/null @@ -1,512 +0,0 @@ -getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->reject(1); - $adapter->reject(2); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function rejectedPromiseShouldInvokeNewlyAddedCallback() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->reject(1); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - } - - /** @test */ - public function shouldForwardUndefinedRejectionValue() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with(null); - - $adapter->reject(1); - $adapter->promise() - ->then( - $this->expectCallableNever(), - function () { - // Presence of rejection handler is enough to switch back - // to resolve mode, even though it returns undefined. - // The ONLY way to propagate a rejection is to re-throw or - // return a rejected promise; - } - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldSwitchFromErrbacksToCallbacksWhenErrbackDoesNotExplicitlyPropagate() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->reject(1); - $adapter->promise() - ->then( - $this->expectCallableNever(), - function ($val) { - return $val + 1; - } - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldSwitchFromErrbacksToCallbacksWhenErrbackReturnsAResolution() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->reject(1); - $adapter->promise() - ->then( - $this->expectCallableNever(), - function ($val) { - return \React\Promise\resolve($val + 1); - } - ) - ->then( - $mock, - $this->expectCallableNever() - ); - } - - /** @test */ - public function shouldPropagateRejectionsWhenErrbackThrows() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->will($this->throwException($exception)); - - $mock2 = $this->createCallableMock(); - $mock2 - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject(1); - $adapter->promise() - ->then( - $this->expectCallableNever(), - $mock - ) - ->then( - $this->expectCallableNever(), - $mock2 - ); - } - - /** @test */ - public function shouldPropagateRejectionsWhenErrbackReturnsARejection() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(2)); - - $adapter->reject(1); - $adapter->promise() - ->then( - $this->expectCallableNever(), - function ($val) { - return \React\Promise\reject($val + 1); - } - ) - ->then( - $this->expectCallableNever(), - $mock - ); - } - - /** @test */ - public function doneShouldInvokeRejectionHandlerForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->reject(1); - $this->assertNull($adapter->promise()->done(null, $mock)); - } - - /** @test */ - public function doneShouldThrowExceptionThrownByRejectionHandlerForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $adapter->reject(1); - $this->assertNull($adapter->promise()->done(null, function () { - throw new \Exception('UnhandledRejectionException'); - })); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenRejectedWithNonExceptionForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $adapter->reject(1); - $this->assertNull($adapter->promise()->done()); - } - - /** @test */ - public function unhandledRejectionExceptionThrownByDoneHoldsRejectionValue() - { - $adapter = $this->getPromiseTestAdapter(); - - $expected = new \stdClass(); - - $adapter->reject($expected); - - try { - $adapter->promise()->done(); - } catch (UnhandledRejectionException $e) { - $this->assertSame($expected, $e->getReason()); - return; - } - - $this->fail(); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenRejectionHandlerRejectsForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $adapter->reject(1); - $this->assertNull($adapter->promise()->done(null, function () { - return \React\Promise\reject(); - })); - } - - /** @test */ - public function doneShouldThrowRejectionExceptionWhenRejectionHandlerRejectsWithExceptionForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $adapter->reject(1); - $this->assertNull($adapter->promise()->done(null, function () { - return \React\Promise\reject(new \Exception('UnhandledRejectionException')); - })); - } - - /** @test */ - public function doneShouldThrowExceptionProvidedAsRejectionValueForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $adapter->reject(new \Exception('UnhandledRejectionException')); - $this->assertNull($adapter->promise()->done()); - } - - /** @test */ - public function doneShouldThrowWithDeepNestingPromiseChainsForRejectedPromise() - { - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $exception = new \Exception('UnhandledRejectionException'); - - $d = new Deferred(); - $d->resolve(); - - $result = \React\Promise\resolve(\React\Promise\resolve($d->promise()->then(function () use ($exception) { - $d = new Deferred(); - $d->resolve(); - - return \React\Promise\resolve($d->promise()->then(function () {}))->then( - function () use ($exception) { - throw $exception; - } - ); - }))); - - $result->done(); - } - - /** @test */ - public function doneShouldRecoverWhenRejectionHandlerCatchesExceptionForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->reject(new \Exception('UnhandledRejectionException')); - $this->assertNull($adapter->promise()->done(null, function (\Exception $e) { - - })); - } - - /** @test */ - public function otherwiseShouldInvokeRejectionHandlerForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->reject(1); - $adapter->promise()->otherwise($mock); - } - - /** @test */ - public function otherwiseShouldInvokeNonTypeHintedRejectionHandlerIfReasonIsAnExceptionForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject($exception); - $adapter->promise() - ->otherwise(function ($reason) use ($mock) { - $mock($reason); - }); - } - - /** @test */ - public function otherwiseShouldInvokeRejectionHandlerIfReasonMatchesTypehintForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \InvalidArgumentException(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject($exception); - $adapter->promise() - ->otherwise(function (\InvalidArgumentException $reason) use ($mock) { - $mock($reason); - }); - } - - /** @test */ - public function otherwiseShouldNotInvokeRejectionHandlerIfReaonsDoesNotMatchTypehintForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->expectCallableNever(); - - $adapter->reject($exception); - $adapter->promise() - ->otherwise(function (\InvalidArgumentException $reason) use ($mock) { - $mock($reason); - }); - } - - /** @test */ - public function alwaysShouldNotSuppressRejectionForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject($exception); - $adapter->promise() - ->always(function () {}) - ->then(null, $mock); - } - - /** @test */ - public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsANonPromiseForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject($exception); - $adapter->promise() - ->always(function () { - return 1; - }) - ->then(null, $mock); - } - - /** @test */ - public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsAPromiseForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->reject($exception); - $adapter->promise() - ->always(function () { - return \React\Promise\resolve(1); - }) - ->then(null, $mock); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerThrowsForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception1 = new \Exception(); - $exception2 = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception2)); - - $adapter->reject($exception1); - $adapter->promise() - ->always(function () use ($exception2) { - throw $exception2; - }) - ->then(null, $mock); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerRejectsForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception1 = new \Exception(); - $exception2 = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception2)); - - $adapter->reject($exception1); - $adapter->promise() - ->always(function () use ($exception2) { - return \React\Promise\reject($exception2); - }) - ->then(null, $mock); - } - - /** @test */ - public function cancelShouldReturnNullForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->reject(); - - $this->assertNull($adapter->promise()->cancel()); - } - - /** @test */ - public function cancelShouldHaveNoEffectForRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableNever()); - - $adapter->reject(); - - $adapter->promise()->cancel(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseSettledTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseSettledTestTrait.php deleted file mode 100644 index e363b6d91..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/PromiseSettledTestTrait.php +++ /dev/null @@ -1,86 +0,0 @@ -getPromiseTestAdapter(); - - $adapter->settle(); - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->then()); - } - - /** @test */ - public function thenShouldReturnAllowNullForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->then(null, null, null)); - } - - /** @test */ - public function cancelShouldReturnNullForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - - $this->assertNull($adapter->promise()->cancel()); - } - - /** @test */ - public function cancelShouldHaveNoEffectForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter($this->expectCallableNever()); - - $adapter->settle(); - - $adapter->promise()->cancel(); - } - - /** @test */ - public function doneShouldReturnNullForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $this->assertNull($adapter->promise()->done(null, function () {})); - } - - /** @test */ - public function doneShouldReturnAllowNullForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $this->assertNull($adapter->promise()->done(null, function () {}, null)); - } - - /** @test */ - public function progressShouldNotInvokeProgressHandlerForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $adapter->promise()->progress($this->expectCallableNever()); - $adapter->notify(); - } - - /** @test */ - public function alwaysShouldReturnAPromiseForSettledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $adapter->settle(); - $this->assertInstanceOf('React\\Promise\\PromiseInterface', $adapter->promise()->always(function () {})); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/RejectTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/RejectTestTrait.php deleted file mode 100644 index 063f178ad..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/RejectTestTrait.php +++ /dev/null @@ -1,368 +0,0 @@ -getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->reject(1); - } - - /** @test */ - public function rejectShouldRejectWithFulfilledPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->reject(Promise\resolve(1)); - } - - /** @test */ - public function rejectShouldRejectWithRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->reject(Promise\reject(1)); - } - - /** @test */ - public function rejectShouldForwardReasonWhenCallbackIsNull() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then( - $this->expectCallableNever() - ) - ->then( - $this->expectCallableNever(), - $mock - ); - - $adapter->reject(1); - } - - /** @test */ - public function rejectShouldMakePromiseImmutable() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then(null, function ($value) use ($adapter) { - $adapter->reject(3); - - return Promise\reject($value); - }) - ->then( - $this->expectCallableNever(), - $mock - ); - - $adapter->reject(1); - $adapter->reject(2); - } - - /** @test */ - public function notifyShouldInvokeOtherwiseHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->otherwise($mock); - - $adapter->reject(1); - } - - /** @test */ - public function doneShouldInvokeRejectionHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $this->assertNull($adapter->promise()->done(null, $mock)); - $adapter->reject(1); - } - - /** @test */ - public function doneShouldThrowExceptionThrownByRejectionHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(null, function () { - throw new \Exception('UnhandledRejectionException'); - })); - $adapter->reject(1); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenRejectedWithNonException() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done()); - $adapter->reject(1); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenRejectionHandlerRejects() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(null, function () { - return \React\Promise\reject(); - })); - $adapter->reject(1); - } - - /** @test */ - public function doneShouldThrowRejectionExceptionWhenRejectionHandlerRejectsWithException() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(null, function () { - return \React\Promise\reject(new \Exception('UnhandledRejectionException')); - })); - $adapter->reject(1); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenRejectionHandlerRetunsPendingPromiseWhichRejectsLater() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $d = new Deferred(); - $promise = $d->promise(); - - $this->assertNull($adapter->promise()->done(null, function () use ($promise) { - return $promise; - })); - $adapter->reject(1); - $d->reject(1); - } - - /** @test */ - public function doneShouldThrowExceptionProvidedAsRejectionValue() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done()); - $adapter->reject(new \Exception('UnhandledRejectionException')); - } - - /** @test */ - public function doneShouldThrowWithDeepNestingPromiseChains() - { - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $exception = new \Exception('UnhandledRejectionException'); - - $d = new Deferred(); - - $result = \React\Promise\resolve(\React\Promise\resolve($d->promise()->then(function () use ($exception) { - $d = new Deferred(); - $d->resolve(); - - return \React\Promise\resolve($d->promise()->then(function () {}))->then( - function () use ($exception) { - throw $exception; - } - ); - }))); - - $result->done(); - - $d->resolve(); - } - - /** @test */ - public function doneShouldRecoverWhenRejectionHandlerCatchesException() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->assertNull($adapter->promise()->done(null, function (\Exception $e) { - - })); - $adapter->reject(new \Exception('UnhandledRejectionException')); - } - - /** @test */ - public function alwaysShouldNotSuppressRejection() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () {}) - ->then(null, $mock); - - $adapter->reject($exception); - } - - /** @test */ - public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsANonPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () { - return 1; - }) - ->then(null, $mock); - - $adapter->reject($exception); - } - - /** @test */ - public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsAPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () { - return \React\Promise\resolve(1); - }) - ->then(null, $mock); - - $adapter->reject($exception); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerThrowsForRejection() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () use ($exception) { - throw $exception; - }) - ->then(null, $mock); - - $adapter->reject($exception); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerRejectsForRejection() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () use ($exception) { - return \React\Promise\reject($exception); - }) - ->then(null, $mock); - - $adapter->reject($exception); - } -} diff --git a/openml_OS/vendor/react/promise/tests/PromiseTest/ResolveTestTrait.php b/openml_OS/vendor/react/promise/tests/PromiseTest/ResolveTestTrait.php deleted file mode 100644 index 0736d35a0..000000000 --- a/openml_OS/vendor/react/promise/tests/PromiseTest/ResolveTestTrait.php +++ /dev/null @@ -1,312 +0,0 @@ -getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($mock); - - $adapter->resolve(1); - } - - /** @test */ - public function resolveShouldResolveWithPromisedValue() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($mock); - - $adapter->resolve(Promise\resolve(1)); - } - - /** @test */ - public function resolveShouldRejectWhenResolvedWithRejectedPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then($this->expectCallableNever(), $mock); - - $adapter->resolve(Promise\reject(1)); - } - - /** @test */ - public function resolveShouldForwardValueWhenCallbackIsNull() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then( - null, - $this->expectCallableNever() - ) - ->then( - $mock, - $this->expectCallableNever() - ); - - $adapter->resolve(1); - } - - /** @test */ - public function resolveShouldMakePromiseImmutable() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $adapter->promise() - ->then(function ($value) use ($adapter) { - $adapter->resolve(3); - - return $value; - }) - ->then( - $mock, - $this->expectCallableNever() - ); - - $adapter->resolve(1); - $adapter->resolve(2); - } - - /** - * @test - */ - public function resolveShouldRejectWhenResolvedWithItself() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with(new \LogicException('Cannot resolve a promise with itself.')); - - $adapter->promise() - ->then( - $this->expectCallableNever(), - $mock - ); - - $adapter->resolve($adapter->promise()); - } - - /** - * @test - */ - public function resolveShouldRejectWhenResolvedWithAPromiseWhichFollowsItself() - { - $adapter1 = $this->getPromiseTestAdapter(); - $adapter2 = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with(new \LogicException('Cannot resolve a promise with itself.')); - - $promise1 = $adapter1->promise(); - - $promise2 = $adapter2->promise(); - - $promise2->then( - $this->expectCallableNever(), - $mock - ); - - $adapter1->resolve($promise2); - $adapter2->resolve($promise1); - } - - /** @test */ - public function doneShouldInvokeFulfillmentHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo(1)); - - $this->assertNull($adapter->promise()->done($mock)); - $adapter->resolve(1); - } - - /** @test */ - public function doneShouldThrowExceptionThrownFulfillmentHandler() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('\Exception', 'UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(function () { - throw new \Exception('UnhandledRejectionException'); - })); - $adapter->resolve(1); - } - - /** @test */ - public function doneShouldThrowUnhandledRejectionExceptionWhenFulfillmentHandlerRejects() - { - $adapter = $this->getPromiseTestAdapter(); - - $this->setExpectedException('React\\Promise\\UnhandledRejectionException'); - - $this->assertNull($adapter->promise()->done(function () { - return \React\Promise\reject(); - })); - $adapter->resolve(1); - } - - /** @test */ - public function alwaysShouldNotSuppressValue() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->promise() - ->always(function () {}) - ->then($mock); - - $adapter->resolve($value); - } - - /** @test */ - public function alwaysShouldNotSuppressValueWhenHandlerReturnsANonPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->promise() - ->always(function () { - return 1; - }) - ->then($mock); - - $adapter->resolve($value); - } - - /** @test */ - public function alwaysShouldNotSuppressValueWhenHandlerReturnsAPromise() - { - $adapter = $this->getPromiseTestAdapter(); - - $value = new \stdClass(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($value)); - - $adapter->promise() - ->always(function () { - return \React\Promise\resolve(1); - }) - ->then($mock); - - $adapter->resolve($value); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerThrowsForFulfillment() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () use ($exception) { - throw $exception; - }) - ->then(null, $mock); - - $adapter->resolve(1); - } - - /** @test */ - public function alwaysShouldRejectWhenHandlerRejectsForFulfillment() - { - $adapter = $this->getPromiseTestAdapter(); - - $exception = new \Exception(); - - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke') - ->with($this->identicalTo($exception)); - - $adapter->promise() - ->always(function () use ($exception) { - return \React\Promise\reject($exception); - }) - ->then(null, $mock); - - $adapter->resolve(1); - } -} diff --git a/openml_OS/vendor/react/promise/tests/RejectedPromiseTest.php b/openml_OS/vendor/react/promise/tests/RejectedPromiseTest.php deleted file mode 100644 index 825f56cd6..000000000 --- a/openml_OS/vendor/react/promise/tests/RejectedPromiseTest.php +++ /dev/null @@ -1,76 +0,0 @@ - function () use (&$promise) { - if (!$promise) { - throw new \LogicException('RejectedPromise must be rejected before obtaining the promise'); - } - - return $promise; - }, - 'resolve' => function () { - throw new \LogicException('You cannot call resolve() for React\Promise\RejectedPromise'); - }, - 'reject' => function ($reason = null) use (&$promise) { - if (!$promise) { - $promise = new RejectedPromise($reason); - } - }, - 'notify' => function () { - // no-op - }, - 'settle' => function ($reason = null) use (&$promise) { - if (!$promise) { - $promise = new RejectedPromise($reason); - } - }, - ]); - } - - /** @test */ - public function shouldThrowExceptionIfConstructedWithAPromise() - { - $this->setExpectedException('\InvalidArgumentException'); - - return new RejectedPromise(new RejectedPromise()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToRejectedPromiseWithAlwaysFollowers() - { - gc_collect_cycles(); - $promise = new RejectedPromise(1); - $promise->always(function () { - throw new \RuntimeException(); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } - - /** @test */ - public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToRejectedPromiseWithThenFollowers() - { - gc_collect_cycles(); - $promise = new RejectedPromise(1); - $promise = $promise->then(null, function () { - throw new \RuntimeException(); - }); - unset($promise); - - $this->assertSame(0, gc_collect_cycles()); - } -} diff --git a/openml_OS/vendor/react/promise/tests/Stub/CallableStub.php b/openml_OS/vendor/react/promise/tests/Stub/CallableStub.php deleted file mode 100644 index 012089335..000000000 --- a/openml_OS/vendor/react/promise/tests/Stub/CallableStub.php +++ /dev/null @@ -1,10 +0,0 @@ -createCallableMock(); - $mock - ->expects($this->exactly($amount)) - ->method('__invoke'); - - return $mock; - } - - public function expectCallableOnce() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke'); - - return $mock; - } - - public function expectCallableNever() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->never()) - ->method('__invoke'); - - return $mock; - } - - public function createCallableMock() - { - return $this - ->getMockBuilder('React\\Promise\Stub\CallableStub') - ->getMock(); - } -} diff --git a/openml_OS/vendor/react/promise/tests/bootstrap.php b/openml_OS/vendor/react/promise/tests/bootstrap.php deleted file mode 100644 index 9b7f872a5..000000000 --- a/openml_OS/vendor/react/promise/tests/bootstrap.php +++ /dev/null @@ -1,7 +0,0 @@ -addPsr4('React\\Promise\\', __DIR__); diff --git a/openml_OS/vendor/react/promise/tests/fixtures/SimpleFulfilledTestPromise.php b/openml_OS/vendor/react/promise/tests/fixtures/SimpleFulfilledTestPromise.php deleted file mode 100644 index ef4d5301c..000000000 --- a/openml_OS/vendor/react/promise/tests/fixtures/SimpleFulfilledTestPromise.php +++ /dev/null @@ -1,21 +0,0 @@ -cancelCalled = true; - } -} diff --git a/openml_OS/vendor/react/promise/tests/fixtures/SimpleTestCancellableThenable.php b/openml_OS/vendor/react/promise/tests/fixtures/SimpleTestCancellableThenable.php deleted file mode 100644 index c0f15933a..000000000 --- a/openml_OS/vendor/react/promise/tests/fixtures/SimpleTestCancellableThenable.php +++ /dev/null @@ -1,18 +0,0 @@ -cancelCalled = true; - } -} diff --git a/openml_OS/views/pages/api_new/v1/arff_example/predictions.arff b/openml_OS/views/pages/api_new/v1/arff_example/predictions.arff new file mode 100644 index 000000000..5f6d5cd00 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/arff_example/predictions.arff @@ -0,0 +1,978 @@ +% Python_3.5.3. +% Sklearn_0.18.1. +% NumPy_1.12.1. +% SciPy_0.19.0. +% Tue May 2 17:34:08 2017 +% Created by run_task() +@RELATION openml_task_49_predictions + +@ATTRIBUTE repeat NUMERIC +@ATTRIBUTE fold NUMERIC +@ATTRIBUTE row_id NUMERIC +@ATTRIBUTE confidence.negative NUMERIC +@ATTRIBUTE confidence.positive NUMERIC +@ATTRIBUTE prediction {negative, positive} +@ATTRIBUTE correct {negative, positive} + +@DATA +0,0,396,0.0,1.0,positive,positive +0,0,574,0.2,0.8,positive,positive +0,0,517,0.25,0.75,positive,positive +0,0,65,0.0666666666667,0.933333333333,positive,positive +0,0,480,0.0666666666667,0.933333333333,positive,positive +0,0,539,0.0,1.0,positive,positive +0,0,369,0.0,1.0,positive,positive +0,0,184,0.0,1.0,positive,positive +0,0,239,0.0,1.0,positive,positive +0,0,568,0.0666666666667,0.933333333333,positive,positive +0,0,400,0.0,1.0,positive,positive +0,0,200,0.141666666667,0.858333333333,positive,positive +0,0,295,0.05,0.95,positive,positive +0,0,54,0.1,0.9,positive,positive +0,0,280,0.108333333333,0.891666666667,positive,positive +0,0,492,0.175,0.825,positive,positive +0,0,421,0.0,1.0,positive,positive +0,0,164,0.1,0.9,positive,positive +0,0,506,0.0666666666667,0.933333333333,positive,positive +0,0,434,0.0,1.0,positive,positive +0,0,359,0.0,1.0,positive,positive +0,0,304,0.0,1.0,positive,positive +0,0,68,0.0,1.0,positive,positive +0,0,8,0.0833333333333,0.916666666667,positive,positive +0,0,256,0.0666666666667,0.933333333333,positive,positive +0,0,411,0.2,0.8,positive,positive +0,0,390,0.516666666667,0.483333333333,negative,positive +0,0,445,0.025,0.975,positive,positive +0,0,6,0.0333333333333,0.966666666667,positive,positive +0,0,138,0.0,1.0,positive,positive +0,0,32,0.15,0.85,positive,positive +0,0,98,0.0,1.0,positive,positive +0,0,472,0.0,1.0,positive,positive +0,0,269,0.0,1.0,positive,positive +0,0,132,0.4,0.6,positive,positive +0,0,213,0.0,1.0,positive,positive +0,0,521,0.1,0.9,positive,positive +0,0,425,0.0,1.0,positive,positive +0,0,114,0.1,0.9,positive,positive +0,0,131,0.0,1.0,positive,positive +0,0,487,0.0,1.0,positive,positive +0,0,130,0.0333333333333,0.966666666667,positive,positive +0,0,591,0.1,0.9,positive,positive +0,0,111,0.391666666667,0.608333333333,positive,positive +0,0,79,0.4,0.6,positive,positive +0,0,364,0.191666666667,0.808333333333,positive,positive +0,0,413,0.166666666667,0.833333333333,positive,positive +0,0,36,0.133333333333,0.866666666667,positive,positive +0,0,542,0.0,1.0,positive,positive +0,0,31,0.183333333333,0.816666666667,positive,positive +0,0,605,0.0,1.0,positive,positive +0,0,350,0.0,1.0,positive,positive +0,0,410,0.116666666667,0.883333333333,positive,positive +0,0,245,0.158333333333,0.841666666667,positive,positive +0,0,512,0.0,1.0,positive,positive +0,0,530,0.0,1.0,positive,positive +0,0,407,0.0,1.0,positive,positive +0,0,478,0.0333333333333,0.966666666667,positive,positive +0,0,602,0.0,1.0,positive,positive +0,0,262,0.0,1.0,positive,positive +0,0,488,0.15,0.85,positive,positive +0,0,308,0.225,0.775,positive,positive +0,0,519,0.116666666667,0.883333333333,positive,positive +0,0,644,0.8,0.2,negative,negative +0,0,883,0.933333333333,0.0666666666667,negative,negative +0,0,657,0.9,0.1,negative,negative +0,0,710,0.8,0.2,negative,negative +0,0,715,0.55,0.45,negative,negative +0,0,822,0.85,0.15,negative,negative +0,0,921,0.8,0.2,negative,negative +0,0,686,0.75,0.25,negative,negative +0,0,659,1.0,0.0,negative,negative +0,0,798,0.725,0.275,negative,negative +0,0,759,0.9,0.1,negative,negative +0,0,943,0.8,0.2,negative,negative +0,0,676,0.8,0.2,negative,negative +0,0,750,0.783333333333,0.216666666667,negative,negative +0,0,789,0.883333333333,0.116666666667,negative,negative +0,0,882,0.683333333333,0.316666666667,negative,negative +0,0,810,0.9,0.1,negative,negative +0,0,951,0.4,0.6,positive,negative +0,0,834,0.8,0.2,negative,negative +0,0,870,0.733333333333,0.266666666667,negative,negative +0,0,924,1.0,0.0,negative,negative +0,0,957,0.6,0.4,negative,negative +0,0,721,0.8,0.2,negative,negative +0,0,661,1.0,0.0,negative,negative +0,0,725,0.9,0.1,negative,negative +0,0,752,0.616666666667,0.383333333333,negative,negative +0,0,833,0.9,0.1,negative,negative +0,0,952,0.716666666667,0.283333333333,negative,negative +0,0,783,0.925,0.075,negative,negative +0,0,705,0.85,0.15,negative,negative +0,0,925,1.0,0.0,negative,negative +0,0,700,1.0,0.0,negative,negative +0,0,670,0.625,0.375,negative,negative +0,1,82,0.263886113886,0.736113886114,positive,positive +0,1,139,0.00909090909091,0.990909090909,positive,positive +0,1,457,0.0982142857143,0.901785714286,positive,positive +0,1,347,0.344505494505,0.655494505495,positive,positive +0,1,433,0.255140692641,0.744859307359,positive,positive +0,1,99,0.356871184371,0.643128815629,positive,positive +0,1,242,0.322349039849,0.677650960151,positive,positive +0,1,537,0.139166666667,0.860833333333,positive,positive +0,1,282,0.163597513598,0.836402486402,positive,positive +0,1,241,0.120009157509,0.879990842491,positive,positive +0,1,185,0.333928571429,0.666071428571,positive,positive +0,1,346,0.447792207792,0.552207792208,positive,positive +0,1,392,0.243506493506,0.756493506494,positive,positive +0,1,560,0.04,0.96,positive,positive +0,1,148,0.173855311355,0.826144688645,positive,positive +0,1,375,0.192857142857,0.807142857143,positive,positive +0,1,134,0.0636363636364,0.936363636364,positive,positive +0,1,450,0.0583333333333,0.941666666667,positive,positive +0,1,502,0.210076590077,0.789923409923,positive,positive +0,1,182,0.163846153846,0.836153846154,positive,positive +0,1,12,0.0,1.0,positive,positive +0,1,161,0.386513486513,0.613486513487,positive,positive +0,1,309,0.00833333333333,0.991666666667,positive,positive +0,1,333,0.202086802087,0.797913197913,positive,positive +0,1,59,0.334848484848,0.665151515152,positive,positive +0,1,344,0.254292929293,0.745707070707,positive,positive +0,1,118,0.043956043956,0.956043956044,positive,positive +0,1,409,0.0,1.0,positive,positive +0,1,531,0.176948051948,0.823051948052,positive,positive +0,1,23,0.03,0.97,positive,positive +0,1,477,0.0668831168831,0.933116883117,positive,positive +0,1,377,0.241471306471,0.758528693529,positive,positive +0,1,535,0.105,0.895,positive,positive +0,1,48,0.0452380952381,0.954761904762,positive,positive +0,1,585,0.0283333333333,0.971666666667,positive,positive +0,1,279,0.230569430569,0.769430569431,positive,positive +0,1,147,0.0846153846154,0.915384615385,positive,positive +0,1,334,0.551798201798,0.448201798202,negative,positive +0,1,508,0.319426406926,0.680573593074,positive,positive +0,1,57,0.151875901876,0.848124098124,positive,positive +0,1,420,0.305021645022,0.694978354978,positive,positive +0,1,451,0.05,0.95,positive,positive +0,1,109,0.235514485514,0.764485514486,positive,positive +0,1,406,0.132857142857,0.867142857143,positive,positive +0,1,576,0.0333333333333,0.966666666667,positive,positive +0,1,135,0.151136363636,0.848863636364,positive,positive +0,1,125,0.0348484848485,0.965151515152,positive,positive +0,1,616,0.105244755245,0.894755244755,positive,positive +0,1,323,0.26316017316,0.73683982684,positive,positive +0,1,214,0.237495837496,0.762504162504,positive,positive +0,1,163,0.389583194583,0.610416805417,positive,positive +0,1,379,0.303643023643,0.696356976357,positive,positive +0,1,202,0.272066822067,0.727933177933,positive,positive +0,1,342,0.1125,0.8875,positive,positive +0,1,365,0.1,0.9,positive,positive +0,1,307,0.113131313131,0.886868686869,positive,positive +0,1,225,0.378333333333,0.621666666667,positive,positive +0,1,549,0.0571428571429,0.942857142857,positive,positive +0,1,278,0.330813630814,0.669186369186,positive,positive +0,1,456,0.14237012987,0.85762987013,positive,positive +0,1,248,0.313828671329,0.686171328671,positive,positive +0,1,55,0.325283050283,0.674716949717,positive,positive +0,1,345,0.33,0.67,positive,positive +0,1,809,0.552755577756,0.447244422244,negative,negative +0,1,910,0.82974025974,0.17025974026,negative,negative +0,1,668,0.729565434565,0.270434565435,negative,negative +0,1,688,0.39880952381,0.60119047619,positive,negative +0,1,682,0.781565656566,0.218434343434,negative,negative +0,1,905,0.755238095238,0.244761904762,negative,negative +0,1,632,0.886363636364,0.113636363636,negative,negative +0,1,851,0.922710622711,0.0772893772894,negative,negative +0,1,920,0.584038461538,0.415961538462,negative,negative +0,1,774,0.644365079365,0.355634920635,negative,negative +0,1,701,0.626510989011,0.373489010989,negative,negative +0,1,814,0.485495615496,0.514504384504,positive,negative +0,1,652,0.897738095238,0.102261904762,negative,negative +0,1,871,0.640844155844,0.359155844156,negative,negative +0,1,848,0.649444444444,0.350555555556,negative,negative +0,1,902,0.734090909091,0.265909090909,negative,negative +0,1,941,0.669090909091,0.330909090909,negative,negative +0,1,674,0.782405094905,0.217594905095,negative,negative +0,1,796,0.975,0.025,negative,negative +0,1,737,0.486013986014,0.513986013986,positive,negative +0,1,692,0.768376068376,0.231623931624,negative,negative +0,1,847,0.765555555556,0.234444444444,negative,negative +0,1,671,0.741854256854,0.258145743146,negative,negative +0,1,685,0.787121212121,0.212878787879,negative,negative +0,1,869,0.854545454545,0.145454545455,negative,negative +0,1,900,0.703896103896,0.296103896104,negative,negative +0,1,844,0.8,0.2,negative,negative +0,1,879,0.372286324786,0.627713675214,positive,negative +0,1,874,0.474066489066,0.525933510934,positive,negative +0,1,928,0.49253968254,0.50746031746,positive,negative +0,1,800,0.913205128205,0.0867948717949,negative,negative +0,1,648,0.55789044289,0.44210955711,negative,negative +0,1,835,0.55702020202,0.44297979798,negative,negative +0,2,172,0.0767857142857,0.923214285714,positive,positive +0,2,485,0.0277777777778,0.972222222222,positive,positive +0,2,150,0.0821428571429,0.917857142857,positive,positive +0,2,211,0.110101010101,0.889898989899,positive,positive +0,2,110,0.0956565656566,0.904343434343,positive,positive +0,2,526,0.0794871794872,0.920512820513,positive,positive +0,2,527,0.219487179487,0.780512820513,positive,positive +0,2,418,0.321368631369,0.678631368631,positive,positive +0,2,529,0.103571428571,0.896428571429,positive,positive +0,2,372,0.283508403361,0.716491596639,positive,positive +0,2,449,0.0571428571429,0.942857142857,positive,positive +0,2,153,0.188167388167,0.811832611833,positive,positive +0,2,94,0.219168609169,0.780831390831,positive,positive +0,2,253,0.168831168831,0.831168831169,positive,positive +0,2,329,0.537065295815,0.462934704185,negative,positive +0,2,157,0.236111111111,0.763888888889,positive,positive +0,2,405,0.191222374117,0.808777625883,positive,positive +0,2,178,0.170119047619,0.829880952381,positive,positive +0,2,384,0.258888888889,0.741111111111,positive,positive +0,2,326,0.304265873016,0.695734126984,positive,positive +0,2,460,0.100793650794,0.899206349206,positive,positive +0,2,588,0.181753246753,0.818246753247,positive,positive +0,2,335,0.30630952381,0.69369047619,positive,positive +0,2,233,0.182164502165,0.817835497835,positive,positive +0,2,606,0.0321428571429,0.967857142857,positive,positive +0,2,17,0.0571428571429,0.942857142857,positive,positive +0,2,371,0.148214285714,0.851785714286,positive,positive +0,2,183,0.06,0.94,positive,positive +0,2,235,0.123015873016,0.876984126984,positive,positive +0,2,499,0.254861111111,0.745138888889,positive,positive +0,2,624,0.0333333333333,0.966666666667,positive,positive +0,2,189,0.139419404125,0.860580595875,positive,positive +0,2,126,0.05,0.95,positive,positive +0,2,525,0.152510822511,0.847489177489,positive,positive +0,2,93,0.0,1.0,positive,positive +0,2,53,0.33971028971,0.66028971029,positive,positive +0,2,266,0.331438422688,0.668561577312,positive,positive +0,2,399,0.0910633484163,0.908936651584,positive,positive +0,2,453,0.214285714286,0.785714285714,positive,positive +0,2,466,0.379880952381,0.620119047619,positive,positive +0,2,299,0.0133333333333,0.986666666667,positive,positive +0,2,63,0.219573759574,0.780426240426,positive,positive +0,2,43,0.0307692307692,0.969230769231,positive,positive +0,2,467,0.355819425672,0.644180574328,positive,positive +0,2,569,0.171184371184,0.828815628816,positive,positive +0,2,96,0.267032967033,0.732967032967,positive,positive +0,2,24,0.282387057387,0.717612942613,positive,positive +0,2,584,0.24652014652,0.75347985348,positive,positive +0,2,277,0.405818625819,0.594181374181,positive,positive +0,2,428,0.171666666667,0.828333333333,positive,positive +0,2,622,0.0628787878788,0.937121212121,positive,positive +0,2,353,0.220024420024,0.779975579976,positive,positive +0,2,598,0.22,0.78,positive,positive +0,2,14,0.00833333333333,0.991666666667,positive,positive +0,2,128,0.0166666666667,0.983333333333,positive,positive +0,2,426,0.139285714286,0.860714285714,positive,positive +0,2,465,0.237851037851,0.762148962149,positive,positive +0,2,18,0.161868686869,0.838131313131,positive,positive +0,2,440,0.252142857143,0.747857142857,positive,positive +0,2,447,0.0375,0.9625,positive,positive +0,2,437,0.106722689076,0.893277310924,positive,positive +0,2,337,0.38732017982,0.61267982018,positive,positive +0,2,417,0.164222689076,0.835777310924,positive,positive +0,2,829,0.641071428571,0.358928571429,negative,negative +0,2,786,0.984615384615,0.0153846153846,negative,negative +0,2,937,0.966666666667,0.0333333333333,negative,negative +0,2,846,0.620681818182,0.379318181818,negative,negative +0,2,636,0.527397602398,0.472602397602,negative,negative +0,2,930,1.0,0.0,negative,negative +0,2,934,0.559305555556,0.440694444444,negative,negative +0,2,743,0.973504273504,0.0264957264957,negative,negative +0,2,788,1.0,0.0,negative,negative +0,2,884,0.818181818182,0.181818181818,negative,negative +0,2,708,0.606262626263,0.393737373737,negative,negative +0,2,697,0.855952380952,0.144047619048,negative,negative +0,2,694,0.847916666667,0.152083333333,negative,negative +0,2,828,0.810833333333,0.189166666667,negative,negative +0,2,907,0.709010989011,0.290989010989,negative,negative +0,2,631,0.751578282828,0.248421717172,negative,negative +0,2,820,0.946153846154,0.0538461538462,negative,negative +0,2,653,0.712257187257,0.287742812743,negative,negative +0,2,649,0.692929292929,0.307070707071,negative,negative +0,2,912,0.85,0.15,negative,negative +0,2,886,0.842727272727,0.157272727273,negative,negative +0,2,812,0.654570674424,0.345429325576,negative,negative +0,2,765,0.561072261072,0.438927738928,negative,negative +0,2,675,0.606118881119,0.393881118881,negative,negative +0,2,642,0.937012987013,0.062987012987,negative,negative +0,2,897,0.833333333333,0.166666666667,negative,negative +0,2,865,0.914285714286,0.0857142857143,negative,negative +0,2,908,0.432483766234,0.567516233766,positive,negative +0,2,628,0.508852258852,0.491147741148,negative,negative +0,2,877,0.636753246753,0.363246753247,negative,negative +0,2,826,0.722738095238,0.277261904762,negative,negative +0,2,901,0.895865800866,0.104134199134,negative,negative +0,2,818,0.34871031746,0.65128968254,positive,negative +0,3,272,0.0,1.0,positive,positive +0,3,203,0.108333333333,0.891666666667,positive,positive +0,3,265,0.0833333333333,0.916666666667,positive,positive +0,3,221,0.0,1.0,positive,positive +0,3,533,0.3,0.7,positive,positive +0,3,484,0.0,1.0,positive,positive +0,3,120,0.233333333333,0.766666666667,positive,positive +0,3,167,0.075,0.925,positive,positive +0,3,11,0.1,0.9,positive,positive +0,3,231,0.0,1.0,positive,positive +0,3,100,0.0,1.0,positive,positive +0,3,476,0.0,1.0,positive,positive +0,3,50,0.1,0.9,positive,positive +0,3,532,0.4,0.6,positive,positive +0,3,586,0.0,1.0,positive,positive +0,3,124,0.0,1.0,positive,positive +0,3,589,0.4,0.6,positive,positive +0,3,19,0.15,0.85,positive,positive +0,3,137,0.0,1.0,positive,positive +0,3,442,0.0833333333333,0.916666666667,positive,positive +0,3,301,0.0,1.0,positive,positive +0,3,199,0.1,0.9,positive,positive +0,3,382,0.05,0.95,positive,positive +0,3,374,0.2,0.8,positive,positive +0,3,162,0.366666666667,0.633333333333,positive,positive +0,3,181,0.158333333333,0.841666666667,positive,positive +0,3,86,0.3,0.7,positive,positive +0,3,22,0.1,0.9,positive,positive +0,3,52,0.0333333333333,0.966666666667,positive,positive +0,3,66,0.025,0.975,positive,positive +0,3,518,0.0,1.0,positive,positive +0,3,20,0.133333333333,0.866666666667,positive,positive +0,3,566,0.1,0.9,positive,positive +0,3,259,0.0,1.0,positive,positive +0,3,550,0.0,1.0,positive,positive +0,3,83,0.0333333333333,0.966666666667,positive,positive +0,3,322,0.133333333333,0.866666666667,positive,positive +0,3,136,0.0,1.0,positive,positive +0,3,62,0.05,0.95,positive,positive +0,3,312,0.0,1.0,positive,positive +0,3,311,0.208333333333,0.791666666667,positive,positive +0,3,489,0.383333333333,0.616666666667,positive,positive +0,3,198,0.433333333333,0.566666666667,positive,positive +0,3,74,0.0,1.0,positive,positive +0,3,587,0.0,1.0,positive,positive +0,3,546,0.0666666666667,0.933333333333,positive,positive +0,3,255,0.0666666666667,0.933333333333,positive,positive +0,3,511,0.025,0.975,positive,positive +0,3,608,0.116666666667,0.883333333333,positive,positive +0,3,9,0.1,0.9,positive,positive +0,3,234,0.358333333333,0.641666666667,positive,positive +0,3,620,0.0666666666667,0.933333333333,positive,positive +0,3,378,0.5,0.5,negative,positive +0,3,177,0.0,1.0,positive,positive +0,3,64,0.05,0.95,positive,positive +0,3,496,0.166666666667,0.833333333333,positive,positive +0,3,565,0.0,1.0,positive,positive +0,3,169,0.0,1.0,positive,positive +0,3,67,0.05,0.95,positive,positive +0,3,267,0.0333333333333,0.966666666667,positive,positive +0,3,13,0.466666666667,0.533333333333,positive,positive +0,3,461,0.183333333333,0.816666666667,positive,positive +0,3,431,0.0,1.0,positive,positive +0,3,918,0.7,0.3,negative,negative +0,3,654,0.8,0.2,negative,negative +0,3,797,1.0,0.0,negative,negative +0,3,903,0.575,0.425,negative,negative +0,3,885,0.9,0.1,negative,negative +0,3,935,0.483333333333,0.516666666667,positive,negative +0,3,931,0.533333333333,0.466666666667,negative,negative +0,3,840,0.475,0.525,positive,negative +0,3,780,0.916666666667,0.0833333333333,negative,negative +0,3,683,0.525,0.475,negative,negative +0,3,666,0.558333333333,0.441666666667,negative,negative +0,3,904,1.0,0.0,negative,negative +0,3,862,0.933333333333,0.0666666666667,negative,negative +0,3,889,0.566666666667,0.433333333333,negative,negative +0,3,684,0.833333333333,0.166666666667,negative,negative +0,3,922,0.9,0.1,negative,negative +0,3,729,0.516666666667,0.483333333333,negative,negative +0,3,950,0.75,0.25,negative,negative +0,3,749,0.433333333333,0.566666666667,positive,negative +0,3,894,1.0,0.0,negative,negative +0,3,873,0.925,0.075,negative,negative +0,3,753,0.608333333333,0.391666666667,negative,negative +0,3,713,0.775,0.225,negative,negative +0,3,699,0.95,0.05,negative,negative +0,3,954,0.6,0.4,negative,negative +0,3,716,0.5,0.5,negative,negative +0,3,888,0.5,0.5,negative,negative +0,3,703,0.933333333333,0.0666666666667,negative,negative +0,3,867,0.666666666667,0.333333333333,negative,negative +0,3,914,0.9,0.1,negative,negative +0,3,724,1.0,0.0,negative,negative +0,3,831,1.0,0.0,negative,negative +0,3,680,0.708333333333,0.291666666667,negative,negative +0,4,238,0.358693977591,0.641306022409,positive,positive +0,4,573,0.160344516595,0.839655483405,positive,positive +0,4,146,0.0757875457875,0.924212454212,positive,positive +0,4,391,0.02,0.98,positive,positive +0,4,522,0.0573295985061,0.942670401494,positive,positive +0,4,507,0.0561660561661,0.943833943834,positive,positive +0,4,246,0.242136752137,0.757863247863,positive,positive +0,4,254,0.3725,0.6275,positive,positive +0,4,102,0.422686202686,0.577313797314,positive,positive +0,4,106,0.215359477124,0.784640522876,positive,positive +0,4,1,0.693178104575,0.306821895425,negative,positive +0,4,462,0.399656593407,0.600343406593,positive,positive +0,4,623,0.126047237077,0.873952762923,positive,positive +0,4,414,0.0964285714286,0.903571428571,positive,positive +0,4,219,0.0166666666667,0.983333333333,positive,positive +0,4,607,0.213018354195,0.786981645805,positive,positive +0,4,247,0.424955110249,0.575044889751,positive,positive +0,4,263,0.0913524384113,0.908647561589,positive,positive +0,4,592,0.291924448101,0.708075551899,positive,positive +0,4,179,0.0650793650794,0.934920634921,positive,positive +0,4,121,0.237678571429,0.762321428571,positive,positive +0,4,201,0.428033559578,0.571966440422,positive,positive +0,4,285,0.0664869281046,0.933513071895,positive,positive +0,4,58,0.342251131222,0.657748868778,positive,positive +0,4,232,0.216414565826,0.783585434174,positive,positive +0,4,340,0.216388888889,0.783611111111,positive,positive +0,4,174,0.217757936508,0.782242063492,positive,positive +0,4,500,0.478287398876,0.521712601124,positive,positive +0,4,306,0.502211538462,0.497788461538,negative,positive +0,4,142,0.26762254902,0.73237745098,positive,positive +0,4,366,0.427794297206,0.572205702794,positive,positive +0,4,398,0.234523809524,0.765476190476,positive,positive +0,4,133,0.225955882353,0.774044117647,positive,positive +0,4,75,0.147066822067,0.852933177933,positive,positive +0,4,567,0.239620673444,0.760379326556,positive,positive +0,4,34,0.207285353535,0.792714646465,positive,positive +0,4,493,0.357065556992,0.642934443008,positive,positive +0,4,321,0.371503496503,0.628496503497,positive,positive +0,4,78,0.319344119932,0.680655880068,positive,positive +0,4,352,0.237391562686,0.762608437314,positive,positive +0,4,268,0.0792063492063,0.920793650794,positive,positive +0,4,236,0.251314641241,0.748685358759,positive,positive +0,4,291,0.0772756410256,0.922724358974,positive,positive +0,4,217,0.0340909090909,0.965909090909,positive,positive +0,4,561,0.171197258624,0.828802741376,positive,positive +0,4,580,0.0579982517483,0.942001748252,positive,positive +0,4,77,0.128093434343,0.871906565657,positive,positive +0,4,310,0.341050779286,0.658949220714,positive,positive +0,4,108,0.0976923076923,0.902307692308,positive,positive +0,4,85,0.302362082362,0.697637917638,positive,positive +0,4,551,0.177520477888,0.822479522112,positive,positive +0,4,209,0.13547008547,0.86452991453,positive,positive +0,4,475,0.231600768513,0.768399231487,positive,positive +0,4,383,0.289444444444,0.710555555556,positive,positive +0,4,595,0.0515151515152,0.948484848485,positive,positive +0,4,226,0.163547367665,0.836452632335,positive,positive +0,4,524,0.157131185808,0.842868814192,positive,positive +0,4,21,0.365544871795,0.634455128205,positive,positive +0,4,4,0.322669683258,0.677330316742,positive,positive +0,4,552,0.281036447213,0.718963552787,positive,positive +0,4,443,0.135695970696,0.864304029304,positive,positive +0,4,208,0.0214285714286,0.978571428571,positive,positive +0,4,197,0.250396825397,0.749603174603,positive,positive +0,4,757,0.84875,0.15125,negative,negative +0,4,734,0.379090909091,0.620909090909,positive,negative +0,4,768,0.775252525253,0.224747474747,negative,negative +0,4,756,0.537454481793,0.462545518207,negative,negative +0,4,837,0.418449687567,0.581550312433,positive,negative +0,4,775,0.815695415695,0.184304584305,negative,negative +0,4,747,0.532230122818,0.467769877182,negative,negative +0,4,638,0.725734437131,0.274265562869,negative,negative +0,4,727,0.781111111111,0.218888888889,negative,negative +0,4,790,0.618090120664,0.381909879336,negative,negative +0,4,868,0.717467948718,0.282532051282,negative,negative +0,4,807,0.57443627451,0.42556372549,negative,negative +0,4,736,0.329590964591,0.670409035409,positive,negative +0,4,933,0.228416942535,0.771583057465,positive,negative +0,4,651,0.697954822955,0.302045177045,negative,negative +0,4,906,0.538825757576,0.461174242424,negative,negative +0,4,740,0.387891128479,0.612108871521,positive,negative +0,4,681,0.472681623932,0.527318376068,positive,negative +0,4,813,0.533030858031,0.466969141969,negative,negative +0,4,801,0.932083333333,0.0679166666667,negative,negative +0,4,923,0.643727106227,0.356272893773,negative,negative +0,4,942,0.413974089636,0.586025910364,positive,negative +0,4,637,0.710258695553,0.289741304447,negative,negative +0,4,719,0.787628833585,0.212371166415,negative,negative +0,4,650,0.279232026144,0.720767973856,positive,negative +0,4,626,0.530960281549,0.469039718451,negative,negative +0,4,733,0.355636112254,0.644363887746,positive,negative +0,4,863,0.400793650794,0.599206349206,positive,negative +0,4,726,0.493160622058,0.506839377942,positive,negative +0,4,938,0.685023881347,0.314976118653,negative,negative +0,4,787,0.806881313131,0.193118686869,negative,negative +0,4,678,0.627907754011,0.372092245989,negative,negative +0,4,687,0.439154040404,0.560845959596,positive,negative +0,5,332,0.258333333333,0.741666666667,positive,positive +0,5,469,0.34,0.66,positive,positive +0,5,325,0.16,0.84,positive,positive +0,5,298,0.175,0.825,positive,positive +0,5,540,0.02,0.98,positive,positive +0,5,330,0.161666666667,0.838333333333,positive,positive +0,5,260,0.0333333333333,0.966666666667,positive,positive +0,5,534,0.0166666666667,0.983333333333,positive,positive +0,5,389,0.0,1.0,positive,positive +0,5,351,0.116666666667,0.883333333333,positive,positive +0,5,2,0.48,0.52,positive,positive +0,5,196,0.275,0.725,positive,positive +0,5,39,0.296666666667,0.703333333333,positive,positive +0,5,327,0.316666666667,0.683333333333,positive,positive +0,5,331,0.16,0.84,positive,positive +0,5,56,0.25,0.75,positive,positive +0,5,609,0.155,0.845,positive,positive +0,5,458,0.2,0.8,positive,positive +0,5,47,0.0,1.0,positive,positive +0,5,324,0.286666666667,0.713333333333,positive,positive +0,5,464,0.05,0.95,positive,positive +0,5,160,0.0,1.0,positive,positive +0,5,122,0.06,0.94,positive,positive +0,5,575,0.13,0.87,positive,positive +0,5,604,0.13,0.87,positive,positive +0,5,28,0.235,0.765,positive,positive +0,5,117,0.266666666667,0.733333333333,positive,positive +0,5,356,0.251666666667,0.748333333333,positive,positive +0,5,10,0.24,0.76,positive,positive +0,5,165,0.372142857143,0.627857142857,positive,positive +0,5,216,0.123333333333,0.876666666667,positive,positive +0,5,362,0.141666666667,0.858333333333,positive,positive +0,5,509,0.39,0.61,positive,positive +0,5,503,0.293333333333,0.706666666667,positive,positive +0,5,215,0.0,1.0,positive,positive +0,5,427,0.11,0.89,positive,positive +0,5,583,0.125,0.875,positive,positive +0,5,593,0.0,1.0,positive,positive +0,5,3,0.04,0.96,positive,positive +0,5,297,0.755,0.245,negative,positive +0,5,571,0.195,0.805,positive,positive +0,5,498,0.195,0.805,positive,positive +0,5,572,0.123333333333,0.876666666667,positive,positive +0,5,123,0.39,0.61,positive,positive +0,5,193,0.05,0.95,positive,positive +0,5,289,0.025,0.975,positive,positive +0,5,72,0.065,0.935,positive,positive +0,5,505,0.316666666667,0.683333333333,positive,positive +0,5,224,0.12,0.88,positive,positive +0,5,536,0.0666666666667,0.933333333333,positive,positive +0,5,70,0.183333333333,0.816666666667,positive,positive +0,5,220,0.0,1.0,positive,positive +0,5,305,0.1,0.9,positive,positive +0,5,190,0.108333333333,0.891666666667,positive,positive +0,5,290,0.025,0.975,positive,positive +0,5,88,0.373333333333,0.626666666667,positive,positive +0,5,144,0.163333333333,0.836666666667,positive,positive +0,5,403,0.2,0.8,positive,positive +0,5,625,0.0866666666667,0.913333333333,positive,positive +0,5,395,0.183333333333,0.816666666667,positive,positive +0,5,227,0.0,1.0,positive,positive +0,5,192,0.0,1.0,positive,positive +0,5,424,0.06,0.94,positive,positive +0,5,745,0.866666666667,0.133333333333,negative,negative +0,5,771,0.766666666667,0.233333333333,negative,negative +0,5,946,0.706666666667,0.293333333333,negative,negative +0,5,766,0.583333333333,0.416666666667,negative,negative +0,5,927,0.675,0.325,negative,negative +0,5,899,1.0,0.0,negative,negative +0,5,891,0.76,0.24,negative,negative +0,5,898,0.9,0.1,negative,negative +0,5,839,0.708333333333,0.291666666667,negative,negative +0,5,662,0.66,0.34,negative,negative +0,5,709,0.691666666667,0.308333333333,negative,negative +0,5,647,0.448333333333,0.551666666667,positive,negative +0,5,695,0.626666666667,0.373333333333,negative,negative +0,5,926,0.766666666667,0.233333333333,negative,negative +0,5,633,0.95,0.05,negative,negative +0,5,864,0.691666666667,0.308333333333,negative,negative +0,5,881,0.798333333333,0.201666666667,negative,negative +0,5,663,0.741666666667,0.258333333333,negative,negative +0,5,953,0.843333333333,0.156666666667,negative,negative +0,5,857,0.148333333333,0.851666666667,positive,negative +0,5,667,0.95,0.05,negative,negative +0,5,639,0.64,0.36,negative,negative +0,5,770,0.353333333333,0.646666666667,positive,negative +0,5,702,0.746666666667,0.253333333333,negative,negative +0,5,744,0.773333333333,0.226666666667,negative,negative +0,5,804,0.875,0.125,negative,negative +0,5,825,1.0,0.0,negative,negative +0,5,836,0.543333333333,0.456666666667,negative,negative +0,5,655,0.773333333333,0.226666666667,negative,negative +0,5,856,0.635,0.365,negative,negative +0,5,630,0.773333333333,0.226666666667,negative,negative +0,5,634,0.89,0.11,negative,negative +0,5,735,0.587619047619,0.412380952381,negative,negative +0,6,430,0.276621417798,0.723378582202,positive,positive +0,6,471,0.170476190476,0.829523809524,positive,positive +0,6,73,0.0625,0.9375,positive,positive +0,6,368,0.2525,0.7475,positive,positive +0,6,46,0.125,0.875,positive,positive +0,6,252,0.133637196137,0.866362803863,positive,positive +0,6,355,0.0906593406593,0.909340659341,positive,positive +0,6,250,0.142078754579,0.857921245421,positive,positive +0,6,610,0.0314285714286,0.968571428571,positive,positive +0,6,397,0.115294117647,0.884705882353,positive,positive +0,6,412,0.01875,0.98125,positive,positive +0,6,166,0.217268148518,0.782731851482,positive,positive +0,6,76,0.188119731146,0.811880268854,positive,positive +0,6,435,0.14256684492,0.85743315508,positive,positive +0,6,5,0.19456043956,0.80543956044,positive,positive +0,6,448,0.110769230769,0.889230769231,positive,positive +0,6,195,0.266017316017,0.733982683983,positive,positive +0,6,155,0.315254647313,0.684745352687,positive,positive +0,6,38,0.0427192982456,0.957280701754,positive,positive +0,6,97,0.257180205415,0.742819794585,positive,positive +0,6,373,0.181666666667,0.818333333333,positive,positive +0,6,101,0.24873015873,0.75126984127,positive,positive +0,6,187,0.0642045454545,0.935795454545,positive,positive +0,6,614,0.299805194805,0.700194805195,positive,positive +0,6,555,0.0903636363636,0.909636363636,positive,positive +0,6,158,0.353771008403,0.646228991597,positive,positive +0,6,204,0.0683272283272,0.931672771673,positive,positive +0,6,385,0.100541958042,0.899458041958,positive,positive +0,6,339,0.315783047362,0.684216952638,positive,positive +0,6,436,0.0691025641026,0.930897435897,positive,positive +0,6,296,0.505714285714,0.494285714286,negative,positive +0,6,275,0.20253968254,0.79746031746,positive,positive +0,6,313,0.152132867133,0.847867132867,positive,positive +0,6,258,0.135887445887,0.864112554113,positive,positive +0,6,228,0.21822954823,0.78177045177,positive,positive +0,6,271,0.222222222222,0.777777777778,positive,positive +0,6,491,0.213289634342,0.786710365658,positive,positive +0,6,594,0.0207832167832,0.979216783217,positive,positive +0,6,45,0.333522661549,0.666477338451,positive,positive +0,6,367,0.258712121212,0.741287878788,positive,positive +0,6,563,0.1025,0.8975,positive,positive +0,6,173,0.0989898989899,0.90101010101,positive,positive +0,6,381,0.283290598291,0.716709401709,positive,positive +0,6,317,0.193452380952,0.806547619048,positive,positive +0,6,419,0.0425,0.9575,positive,positive +0,6,0,0.170238095238,0.829761904762,positive,positive +0,6,7,0.19456043956,0.80543956044,positive,positive +0,6,175,0.0166666666667,0.983333333333,positive,positive +0,6,388,0.153968253968,0.846031746032,positive,positive +0,6,541,0.0480559440559,0.951944055944,positive,positive +0,6,222,0.420381701632,0.579618298368,positive,positive +0,6,354,0.01,0.99,positive,positive +0,6,104,0.461904761905,0.538095238095,positive,positive +0,6,557,0.204395604396,0.795604395604,positive,positive +0,6,283,0.0677777777778,0.932222222222,positive,positive +0,6,454,0.124102564103,0.875897435897,positive,positive +0,6,60,0.266825396825,0.733174603175,positive,positive +0,6,127,0.0,1.0,positive,positive +0,6,229,0.198522727273,0.801477272727,positive,positive +0,6,617,0.08,0.92,positive,positive +0,6,544,0.150549450549,0.849450549451,positive,positive +0,6,103,0.305905205905,0.694094794095,positive,positive +0,6,861,0.748626373626,0.251373626374,negative,negative +0,6,945,0.416747835498,0.583252164502,positive,negative +0,6,805,0.765247252747,0.234752747253,negative,negative +0,6,665,0.84875,0.15125,negative,negative +0,6,763,0.50548245614,0.49451754386,negative,negative +0,6,714,0.555649350649,0.444350649351,negative,negative +0,6,712,0.673452380952,0.326547619048,negative,negative +0,6,741,0.749444444444,0.250555555556,negative,negative +0,6,793,0.523909592823,0.476090407177,negative,negative +0,6,669,0.857792207792,0.142207792208,negative,negative +0,6,853,0.621774891775,0.378225108225,negative,negative +0,6,767,0.491971916972,0.508028083028,positive,negative +0,6,777,0.918269230769,0.0817307692308,negative,negative +0,6,845,0.612373737374,0.387626262626,negative,negative +0,6,916,0.646240132417,0.353759867583,negative,negative +0,6,802,0.656825396825,0.343174603175,negative,negative +0,6,842,0.251176470588,0.748823529412,positive,negative +0,6,677,0.545273892774,0.454726107226,negative,negative +0,6,758,0.662256778309,0.337743221691,negative,negative +0,6,939,0.611948051948,0.388051948052,negative,negative +0,6,878,0.701388888889,0.298611111111,negative,negative +0,6,803,0.778055555556,0.221944444444,negative,negative +0,6,872,0.78803030303,0.21196969697,negative,negative +0,6,949,0.701819210202,0.298180789798,negative,negative +0,6,815,0.47823083779,0.52176916221,positive,negative +0,6,915,0.767752525253,0.232247474747,negative,negative +0,6,764,0.359841269841,0.640158730159,positive,negative +0,6,738,0.670021645022,0.329978354978,negative,negative +0,6,691,0.825833333333,0.174166666667,negative,negative +0,6,746,0.838235294118,0.161764705882,negative,negative +0,6,876,0.294123931624,0.705876068376,positive,negative +0,6,811,0.455894660895,0.544105339105,positive,negative +0,6,913,0.391101953602,0.608898046398,positive,negative +0,6,718,0.372261904762,0.627738095238,positive,negative +0,7,402,0.075,0.925,positive,positive +0,7,191,0.141666666667,0.858333333333,positive,positive +0,7,154,0.136071428571,0.863928571429,positive,positive +0,7,194,0.140238095238,0.859761904762,positive,positive +0,7,318,0.2,0.8,positive,positive +0,7,404,0.0694444444444,0.930555555556,positive,positive +0,7,113,0.0428571428571,0.957142857143,positive,positive +0,7,140,0.0968253968254,0.903174603175,positive,positive +0,7,590,0.0,1.0,positive,positive +0,7,545,0.39119047619,0.60880952381,positive,positive +0,7,71,0.196666666667,0.803333333333,positive,positive +0,7,438,0.075,0.925,positive,positive +0,7,486,0.09,0.91,positive,positive +0,7,92,0.0,1.0,positive,positive +0,7,429,0.145238095238,0.854761904762,positive,positive +0,7,61,0.357777777778,0.642222222222,positive,positive +0,7,141,0.0492929292929,0.950707070707,positive,positive +0,7,481,0.025,0.975,positive,positive +0,7,358,0.263333333333,0.736666666667,positive,positive +0,7,44,0.0533333333333,0.946666666667,positive,positive +0,7,288,0.0,1.0,positive,positive +0,7,455,0.297619047619,0.702380952381,positive,positive +0,7,33,0.095,0.905,positive,positive +0,7,314,0.200952380952,0.799047619048,positive,positive +0,7,513,0.0559523809524,0.944047619048,positive,positive +0,7,249,0.199242424242,0.800757575758,positive,positive +0,7,251,0.199242424242,0.800757575758,positive,positive +0,7,328,0.47,0.53,positive,positive +0,7,25,0.08,0.92,positive,positive +0,7,363,0.0642857142857,0.935714285714,positive,positive +0,7,387,0.0583333333333,0.941666666667,positive,positive +0,7,579,0.0592857142857,0.940714285714,positive,positive +0,7,483,0.0111111111111,0.988888888889,positive,positive +0,7,514,0.255952380952,0.744047619048,positive,positive +0,7,270,0.0,1.0,positive,positive +0,7,300,0.025,0.975,positive,positive +0,7,612,0.065,0.935,positive,positive +0,7,89,0.0,1.0,positive,positive +0,7,618,0.127857142857,0.872142857143,positive,positive +0,7,159,0.290555555556,0.709444444444,positive,positive +0,7,303,0.025,0.975,positive,positive +0,7,603,0.04,0.96,positive,positive +0,7,547,0.0253968253968,0.974603174603,positive,positive +0,7,452,0.18,0.82,positive,positive +0,7,205,0.0,1.0,positive,positive +0,7,386,0.075,0.925,positive,positive +0,7,577,0.0650793650794,0.934920634921,positive,positive +0,7,361,0.0125,0.9875,positive,positive +0,7,105,0.116666666667,0.883333333333,positive,positive +0,7,145,0.305952380952,0.694047619048,positive,positive +0,7,69,0.342857142857,0.657142857143,positive,positive +0,7,95,0.0,1.0,positive,positive +0,7,156,0.0916666666667,0.908333333333,positive,positive +0,7,470,0.155,0.845,positive,positive +0,7,237,0.0,1.0,positive,positive +0,7,15,0.0708333333333,0.929166666667,positive,positive +0,7,562,0.104166666667,0.895833333333,positive,positive +0,7,149,0.199880952381,0.800119047619,positive,positive +0,7,543,0.156666666667,0.843333333333,positive,positive +0,7,320,0.188015873016,0.811984126984,positive,positive +0,7,495,0.0285714285714,0.971428571429,positive,positive +0,7,37,0.0533333333333,0.946666666667,positive,positive +0,7,858,0.2425,0.7575,positive,negative +0,7,859,0.587698412698,0.412301587302,negative,negative +0,7,778,1.0,0.0,negative,negative +0,7,887,0.95,0.05,negative,negative +0,7,730,0.928409090909,0.0715909090909,negative,negative +0,7,781,0.9075,0.0925,negative,negative +0,7,860,0.428214285714,0.571785714286,positive,negative +0,7,641,0.871428571429,0.128571428571,negative,negative +0,7,646,0.7,0.3,negative,negative +0,7,893,1.0,0.0,negative,negative +0,7,909,0.952777777778,0.0472222222222,negative,negative +0,7,679,0.868333333333,0.131666666667,negative,negative +0,7,722,1.0,0.0,negative,negative +0,7,944,0.864047619048,0.135952380952,negative,negative +0,7,917,1.0,0.0,negative,negative +0,7,854,0.851785714286,0.148214285714,negative,negative +0,7,919,1.0,0.0,negative,negative +0,7,772,0.786666666667,0.213333333333,negative,negative +0,7,706,0.607698412698,0.392301587302,negative,negative +0,7,792,0.287896825397,0.712103174603,positive,negative +0,7,720,0.9,0.1,negative,negative +0,7,776,1.0,0.0,negative,negative +0,7,751,0.455,0.545,positive,negative +0,7,794,0.414087301587,0.585912698413,positive,negative +0,7,956,0.583849206349,0.416150793651,negative,negative +0,7,698,1.0,0.0,negative,negative +0,7,817,0.729841269841,0.270158730159,negative,negative +0,7,773,0.611785714286,0.388214285714,negative,negative +0,7,672,0.480277777778,0.519722222222,positive,negative +0,7,785,0.970909090909,0.0290909090909,negative,negative +0,7,769,0.883333333333,0.116666666667,negative,negative +0,7,732,0.76,0.24,negative,negative +0,7,629,0.717857142857,0.282142857143,negative,negative +0,7,880,0.977777777778,0.0222222222222,negative,negative +0,8,84,0.544250959571,0.455749040429,negative,positive +0,8,81,0.639669939457,0.360330060543,negative,positive +0,8,581,0.0940187451437,0.905981254856,positive,positive +0,8,80,0.606021716335,0.393978283665,negative,positive +0,8,119,0.147954118141,0.852045881859,positive,positive +0,8,601,0.232096639464,0.767903360536,positive,positive +0,8,212,0.323226492814,0.676773507186,positive,positive +0,8,207,0.169759156074,0.830240843926,positive,positive +0,8,302,0.177314538472,0.822685461528,positive,positive +0,8,107,0.211329175454,0.788670824546,positive,positive +0,8,257,0.237958560932,0.762041439068,positive,positive +0,8,292,0.16095992408,0.83904007592,positive,positive +0,8,223,0.466297610184,0.533702389816,positive,positive +0,8,559,0.337075811208,0.662924188792,positive,positive +0,8,51,0.308175701123,0.691824298877,positive,positive +0,8,556,0.0733308334386,0.926669166561,positive,positive +0,8,143,0.213138469373,0.786861530627,positive,positive +0,8,599,0.407910213117,0.592089786883,positive,positive +0,8,230,0.192048702226,0.807951297774,positive,positive +0,8,171,0.345629447181,0.654370552819,positive,positive +0,8,615,0.155791096515,0.844208903485,positive,positive +0,8,40,0.150729260135,0.849270739865,positive,positive +0,8,370,0.0895879676876,0.910412032312,positive,positive +0,8,274,0.274614002777,0.725385997223,positive,positive +0,8,91,0.348827786581,0.651172213419,positive,positive +0,8,129,0.0762026862027,0.923797313797,positive,positive +0,8,176,0.341214968425,0.658785031575,positive,positive +0,8,523,0.0845246449457,0.915475355054,positive,positive +0,8,27,0.234371199453,0.765628800547,positive,positive +0,8,416,0.122820738038,0.877179261962,positive,positive +0,8,582,0.221173346367,0.778826653633,positive,positive +0,8,558,0.400866822502,0.599133177498,positive,positive +0,8,510,0.0818998001,0.9181001999,positive,positive +0,8,186,0.100609911827,0.899390088173,positive,positive +0,8,504,0.0735714285714,0.926428571429,positive,positive +0,8,336,0.139992199072,0.860007800928,positive,positive +0,8,479,0.217288968013,0.782711031987,positive,positive +0,8,444,0.133599262685,0.866400737315,positive,positive +0,8,206,0.226312332764,0.773687667236,positive,positive +0,8,349,0.0956004350766,0.904399564923,positive,positive +0,8,316,0.590441228502,0.409558771498,negative,positive +0,8,284,0.271622878032,0.728377121968,positive,positive +0,8,474,0.268121594026,0.731878405974,positive,positive +0,8,360,0.110441676603,0.889558323397,positive,positive +0,8,29,0.28218298668,0.71781701332,positive,positive +0,8,520,0.0941173222912,0.905882677709,positive,positive +0,8,170,0.242469053515,0.757530946485,positive,positive +0,8,490,0.583604308521,0.416395691479,negative,positive +0,8,528,0.16452231485,0.83547768515,positive,positive +0,8,600,0.211992780676,0.788007219324,positive,positive +0,8,463,0.154061370747,0.845938629253,positive,positive +0,8,597,0.477116540615,0.522883459385,positive,positive +0,8,16,0.152437138074,0.847562861926,positive,positive +0,8,243,0.1655059531,0.8344940469,positive,positive +0,8,90,0.148064327485,0.851935672515,positive,positive +0,8,35,0.21289186067,0.78710813933,positive,positive +0,8,87,0.395330597946,0.604669402054,positive,positive +0,8,286,0.246106697539,0.753893302461,positive,positive +0,8,473,0.48497998948,0.51502001052,positive,positive +0,8,515,0.510843600844,0.489156399156,negative,positive +0,8,338,0.145651295564,0.854348704436,positive,positive +0,8,343,0.466480963481,0.533519036519,positive,positive +0,8,748,0.499657049504,0.500342950496,positive,negative +0,8,841,0.316683605975,0.683316394025,positive,negative +0,8,791,0.805376303077,0.194623696923,negative,negative +0,8,896,0.722219072471,0.277780927529,negative,negative +0,8,816,0.206798756799,0.793201243201,positive,negative +0,8,875,0.266870810327,0.733129189673,positive,negative +0,8,690,0.441054553379,0.558945446621,positive,negative +0,8,635,0.662983836815,0.337016163185,negative,negative +0,8,689,0.437361962774,0.562638037226,positive,negative +0,8,640,0.404947107873,0.595052892127,positive,negative +0,8,707,0.347497962381,0.652502037619,positive,negative +0,8,850,0.553875799874,0.446124200126,negative,negative +0,8,762,0.524265199974,0.475734800026,negative,negative +0,8,799,0.717320304494,0.282679695506,negative,negative +0,8,948,0.431116169235,0.568883830765,positive,negative +0,8,929,0.299129032359,0.700870967641,positive,negative +0,8,830,0.171849523731,0.828150476269,positive,negative +0,8,755,0.70349005071,0.29650994929,negative,negative +0,8,760,0.740155276166,0.259844723834,negative,negative +0,8,866,0.462997181103,0.537002818897,positive,negative +0,8,823,0.441617923145,0.558382076855,positive,negative +0,8,832,0.303101509103,0.696898490897,positive,negative +0,8,838,0.301420103306,0.698579896694,positive,negative +0,8,824,0.345850735669,0.654149264331,positive,negative +0,8,784,0.763782150969,0.236217849031,negative,negative +0,8,895,0.894265232975,0.105734767025,negative,negative +0,8,843,0.277334343232,0.722665656768,positive,negative +0,8,819,0.134754332755,0.865245667245,positive,negative +0,8,754,0.704651350581,0.295348649419,negative,negative +0,8,664,0.657907003557,0.342092996443,negative,negative +0,8,627,0.402856538312,0.597143461688,positive,negative +0,8,955,0.606870408721,0.393129591279,negative,negative +0,8,731,0.597996743997,0.402003256003,negative,negative +0,9,151,0.255110144947,0.744889855053,positive,positive +0,9,115,0.281111829347,0.718888170653,positive,positive +0,9,287,0.0571872571873,0.942812742813,positive,positive +0,9,422,0.232669340463,0.767330659537,positive,positive +0,9,415,0.500281548517,0.499718451483,negative,positive +0,9,394,0.229494206774,0.770505793226,positive,positive +0,9,553,0.0616979099332,0.938302090067,positive,positive +0,9,446,0.299304812834,0.700695187166,positive,positive +0,9,49,0.141262626263,0.858737373737,positive,positive +0,9,210,0.0111111111111,0.988888888889,positive,positive +0,9,548,0.0418584656085,0.958141534392,positive,positive +0,9,116,0.318901686549,0.681098313451,positive,positive +0,9,613,0.115757575758,0.884242424242,positive,positive +0,9,468,0.341428586893,0.658571413107,positive,positive +0,9,619,0.145892587804,0.854107412196,positive,positive +0,9,261,0.0961538461538,0.903846153846,positive,positive +0,9,564,0.042474916388,0.957525083612,positive,positive +0,9,611,0.0432748538012,0.956725146199,positive,positive +0,9,439,0.193394660895,0.806605339105,positive,positive +0,9,319,0.100556418219,0.899443581781,positive,positive +0,9,482,0.305438874851,0.694561125149,positive,positive +0,9,348,0.193968253968,0.806031746032,positive,positive +0,9,281,0.094822954823,0.905177045177,positive,positive +0,9,538,0.0148351648352,0.985164835165,positive,positive +0,9,180,0.10675990676,0.89324009324,positive,positive +0,9,494,0.131871070106,0.868128929894,positive,positive +0,9,596,0.1,0.9,positive,positive +0,9,41,0.366767676768,0.633232323232,positive,positive +0,9,578,0.0583333333333,0.941666666667,positive,positive +0,9,432,0.163617142661,0.836382857339,positive,positive +0,9,423,0.303658701979,0.696341298021,positive,positive +0,9,516,0.282655677656,0.717344322344,positive,positive +0,9,497,0.114898785425,0.885101214575,positive,positive +0,9,218,0.0188034188034,0.981196581197,positive,positive +0,9,168,0.211689291101,0.788310708899,positive,positive +0,9,408,0.13,0.87,positive,positive +0,9,264,0.0501587301587,0.949841269841,positive,positive +0,9,188,0.115967161493,0.884032838507,positive,positive +0,9,441,0.308410894661,0.691589105339,positive,positive +0,9,276,0.103682645857,0.896317354143,positive,positive +0,9,112,0.0764423076923,0.923557692308,positive,positive +0,9,26,0.25977994228,0.74022005772,positive,positive +0,9,570,0.428030033692,0.571969966308,positive,positive +0,9,459,0.237329687856,0.762670312144,positive,positive +0,9,554,0.0171428571429,0.982857142857,positive,positive +0,9,273,0.0801587301587,0.919841269841,positive,positive +0,9,42,0.171026936027,0.828973063973,positive,positive +0,9,357,0.328413384861,0.671586615139,positive,positive +0,9,501,0.145833312378,0.854166687622,positive,positive +0,9,294,0.164273504274,0.835726495726,positive,positive +0,9,380,0.235938135938,0.764061864062,positive,positive +0,9,30,0.349035517716,0.650964482284,positive,positive +0,9,393,0.152178055433,0.847821944567,positive,positive +0,9,244,0.156938738423,0.843061261577,positive,positive +0,9,401,0.232446311858,0.767553688142,positive,positive +0,9,293,0.0444444444444,0.955555555556,positive,positive +0,9,621,0.129941520468,0.870058479532,positive,positive +0,9,315,0.129769119769,0.870230880231,positive,positive +0,9,240,0.219481190568,0.780518809432,positive,positive +0,9,376,0.400839438339,0.599160561661,positive,positive +0,9,152,0.236808868293,0.763191131707,positive,positive +0,9,341,0.290496031746,0.709503968254,positive,positive +0,9,911,0.439623171806,0.560376828194,positive,negative +0,9,779,0.815606060606,0.184393939394,negative,negative +0,9,827,0.827568542569,0.172431457431,negative,negative +0,9,717,0.499101436836,0.500898563164,positive,negative +0,9,761,0.675639499389,0.324360500611,negative,negative +0,9,656,0.525646951088,0.474353048912,negative,negative +0,9,940,0.342610608346,0.657389391654,positive,negative +0,9,936,0.871918767507,0.128081232493,negative,negative +0,9,782,0.597955182073,0.402044817927,negative,negative +0,9,821,0.740726381462,0.259273618538,negative,negative +0,9,849,0.403438070881,0.596561929119,positive,negative +0,9,660,0.224534016708,0.775465983292,positive,negative +0,9,742,0.834172771673,0.165827228327,negative,negative +0,9,693,0.9125,0.0875,negative,negative +0,9,892,0.465691946942,0.534308053058,positive,negative +0,9,728,0.485217805071,0.514782194929,positive,negative +0,9,947,0.565253627092,0.434746372908,negative,negative +0,9,890,0.671337719298,0.328662280702,negative,negative +0,9,808,0.402780231987,0.597219768013,positive,negative +0,9,932,0.532936507937,0.467063492063,negative,negative +0,9,673,0.626602564103,0.373397435897,negative,negative +0,9,645,0.779246309246,0.220753690754,negative,negative +0,9,806,0.799322344322,0.200677655678,negative,negative +0,9,704,0.441538281979,0.558461718021,positive,negative +0,9,739,0.383214446372,0.616785553628,positive,negative +0,9,855,0.810966386555,0.189033613445,negative,negative +0,9,711,0.482441531637,0.517558468363,positive,negative +0,9,696,0.475597319347,0.524402680653,positive,negative +0,9,723,0.691900452489,0.308099547511,negative,negative +0,9,658,0.484867354867,0.515132645133,positive,negative +0,9,852,0.77876984127,0.22123015873,negative,negative +0,9,643,0.612787460218,0.387212539782,negative,negative +0,9,795,0.933771929825,0.0662280701754,negative,negative +% +% +% \ No newline at end of file diff --git a/openml_OS/views/pages/api_new/v1/arff_example/trace.arff b/openml_OS/views/pages/api_new/v1/arff_example/trace.arff new file mode 100644 index 000000000..b63e180ac --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/arff_example/trace.arff @@ -0,0 +1,117 @@ +@RELATION openml_run2089254_trace + +@ATTRIBUTE repeat NUMERIC +@ATTRIBUTE fold NUMERIC +@ATTRIBUTE iteration NUMERIC +@ATTRIBUTE evaluation NUMERIC +@ATTRIBUTE selected {true, false} +@ATTRIBUTE parameter_bootstrap {True, False} +@ATTRIBUTE parameter_criterion {gini, entropy} +@ATTRIBUTE parameter_min_samples_leaf NUMERIC +@ATTRIBUTE parameter_max_features NUMERIC +@ATTRIBUTE parameter_min_samples_split NUMERIC + +@DATA +0,0,0,0.694895591647,false,False,gini,16,0.05,19 +0,0,1,0.764501160093,false,True,entropy,13,0.4,7 +0,0,2,0.799303944316,false,False,entropy,13,0.6,4 +0,0,3,0.815545243619,false,False,gini,14,0.75,10 +0,0,4,0.831786542923,false,False,entropy,10,0.65,20 +0,0,5,0.778422273782,false,False,gini,1,0.05,14 +0,0,6,0.726218097448,false,True,entropy,14,0.25,15 +0,0,7,0.931554524362,true,False,entropy,2,0.9,2 +0,0,8,0.777262180974,false,True,gini,16,0.7,14 +0,0,9,0.81090487239,false,False,entropy,7,0.4,8 +0,1,0,0.839907192575,false,True,entropy,5,0.6,11 +0,1,1,0.751740139211,false,True,entropy,16,0.45,8 +0,1,2,0.837587006961,false,True,entropy,9,1.0,12 +0,1,3,0.880510440835,false,True,gini,1,1.0,13 +0,1,4,0.759860788863,false,True,entropy,15,0.6,4 +0,1,5,0.676334106729,false,False,entropy,18,0.05,3 +0,1,6,0.865429234339,false,False,entropy,5,0.55,4 +0,1,7,0.766821345708,false,True,entropy,2,0.25,16 +0,1,8,0.823665893271,false,False,entropy,15,0.95,14 +0,1,9,0.893271461717,true,False,entropy,4,0.85,15 +0,2,0,0.661252900232,false,False,entropy,20,0.05,11 +0,2,1,0.80162412993,false,False,entropy,14,0.6,15 +0,2,2,0.708816705336,false,False,gini,9,0.15,3 +0,2,3,0.798143851508,false,False,gini,19,0.7,17 +0,2,4,0.713457076566,false,True,entropy,4,0.1,15 +0,2,5,0.700696055684,false,True,entropy,19,0.25,9 +0,2,6,0.835266821346,false,True,entropy,6,0.95,4 +0,2,7,0.89211136891,true,False,entropy,7,1.0,5 +0,2,8,0.748259860789,false,True,entropy,13,0.5,10 +0,2,9,0.813225058005,false,False,gini,13,0.45,4 +0,3,0,0.829466357309,false,False,gini,8,0.5,10 +0,3,1,0.948955916473,true,False,entropy,1,0.8,5 +0,3,2,0.815545243619,false,True,entropy,6,0.55,8 +0,3,3,0.697215777262,false,False,entropy,16,0.3,3 +0,3,4,0.750580046404,false,False,entropy,6,0.05,17 +0,3,5,0.834106728538,false,True,entropy,6,0.65,13 +0,3,6,0.80162412993,false,False,gini,20,0.9,3 +0,3,7,0.771461716937,false,False,entropy,10,0.25,8 +0,3,8,0.829466357309,false,False,gini,8,0.5,17 +0,3,9,0.845707656613,false,False,gini,11,0.85,4 +0,4,0,0.799303944316,false,True,gini,14,0.7,16 +0,4,1,0.839907192575,true,False,entropy,2,0.55,19 +0,4,2,0.777262180974,false,True,gini,14,0.85,13 +0,4,3,0.72505800464,false,False,gini,6,0.15,11 +0,4,4,0.696055684455,false,False,entropy,10,0.05,19 +0,4,5,0.732018561485,false,False,gini,9,0.15,3 +0,4,6,0.808584686775,false,True,entropy,10,0.95,12 +0,4,7,0.692575406032,false,False,entropy,11,0.05,9 +0,4,8,0.808584686775,false,False,entropy,14,0.65,4 +0,4,9,0.780742459397,false,True,gini,12,0.6,9 +0,5,0,0.807424593968,false,True,entropy,5,0.35,19 +0,5,1,0.906032482599,true,False,entropy,2,0.65,7 +0,5,2,0.816705336427,false,False,gini,1,0.05,9 +0,5,3,0.860788863109,false,False,gini,3,0.55,12 +0,5,4,0.796983758701,false,False,gini,20,1.0,19 +0,5,5,0.778422273782,false,True,gini,16,0.9,14 +0,5,6,0.708816705336,false,False,gini,13,0.05,5 +0,5,7,0.751740139211,false,True,entropy,12,0.35,17 +0,5,8,0.764501160093,false,True,gini,19,0.65,16 +0,5,9,0.741299303944,false,True,gini,19,0.5,12 +0,6,0,0.720417633411,false,True,gini,3,0.1,16 +0,6,1,0.859628770302,true,True,entropy,5,0.8,10 +0,6,2,0.762180974478,false,False,entropy,12,0.3,3 +0,6,3,0.852668213457,false,True,gini,5,0.8,13 +0,6,4,0.814385150812,false,False,gini,18,0.95,3 +0,6,5,0.856148491879,false,True,entropy,3,0.6,11 +0,6,6,0.685614849188,false,True,entropy,14,0.15,20 +0,6,7,0.757540603248,false,False,gini,20,0.55,8 +0,6,8,0.679814385151,false,True,entropy,14,0.1,12 +0,6,9,0.718097447796,false,True,entropy,18,0.4,13 +0,7,0,0.662412993039,false,True,entropy,20,0.1,11 +0,7,1,0.807424593968,false,False,entropy,15,0.75,12 +0,7,2,0.758700696056,false,True,gini,2,0.3,19 +0,7,3,0.901392111369,true,False,gini,4,0.9,5 +0,7,4,0.792343387471,false,True,gini,13,0.6,19 +0,7,5,0.849187935035,false,False,gini,5,0.45,13 +0,7,6,0.872389791183,false,False,gini,7,0.8,19 +0,7,7,0.763341067285,false,True,entropy,4,0.25,9 +0,7,8,0.901392111369,false,False,entropy,3,0.5,12 +0,7,9,0.827146171694,false,False,entropy,14,1.0,19 +0,8,0,0.741599073001,false,True,gini,12,0.3,11 +0,8,1,0.679026651217,false,True,entropy,12,0.05,8 +0,8,2,0.702201622248,false,False,gini,20,0.3,15 +0,8,3,0.806488991889,true,False,entropy,18,0.7,15 +0,8,4,0.769409038239,false,False,gini,12,0.3,5 +0,8,5,0.660486674392,false,True,entropy,13,0.1,6 +0,8,6,0.667439165701,false,True,entropy,15,0.15,9 +0,8,7,0.747392815759,false,False,gini,8,0.2,11 +0,8,8,0.801853997683,false,False,gini,13,0.5,16 +0,8,9,0.7775202781,false,False,gini,12,0.35,4 +0,9,0,0.855156431054,true,False,gini,9,0.75,3 +0,9,1,0.801853997683,false,False,gini,15,0.75,6 +0,9,2,0.809965237543,false,True,gini,14,1.0,4 +0,9,3,0.772885283893,false,True,entropy,18,0.85,20 +0,9,4,0.731170336037,false,True,entropy,6,0.1,10 +0,9,5,0.789107763615,false,True,gini,3,0.3,11 +0,9,6,0.771726535342,false,True,gini,19,0.8,15 +0,9,7,0.808806488992,false,False,entropy,12,0.6,13 +0,9,8,0.793742757822,false,False,entropy,16,0.45,3 +0,9,9,0.804171494786,false,True,entropy,8,0.7,9 +% +% +% \ No newline at end of file diff --git a/openml_OS/views/pages/api_new/v1/json/entity-tag-list.tpl.php b/openml_OS/views/pages/api_new/v1/json/entity-tag-list.tpl.php new file mode 100644 index 000000000..105911834 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/json/entity-tag-list.tpl.php @@ -0,0 +1,15 @@ +{ + "_tag_list": { "tag": [ + + ]} +} \ No newline at end of file diff --git a/openml_OS/views/pages/api_new/v1/xml/data-description-list.tpl.php b/openml_OS/views/pages/api_new/v1/xml/data-description-list.tpl.php new file mode 100644 index 000000000..5212ffbd9 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/xml/data-description-list.tpl.php @@ -0,0 +1,8 @@ + + + + version; ?> + description; ?> + + + diff --git a/openml_OS/views/pages/api_new/v1/xml/data-feature-description.tpl.php b/openml_OS/views/pages/api_new/v1/xml/data-feature-description.tpl.php new file mode 100644 index 000000000..d6ce3f588 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/xml/data-feature-description.tpl.php @@ -0,0 +1,6 @@ + xmlns:oml="http://openml.org/openml"> + + + >> + +> diff --git a/openml_OS/views/pages/api_new/v1/xml/data-features.tpl.php b/openml_OS/views/pages/api_new/v1/xml/data-features.tpl.php index 85baff26a..c23760acf 100644 --- a/openml_OS/views/pages/api_new/v1/xml/data-features.tpl.php +++ b/openml_OS/views/pages/api_new/v1/xml/data-features.tpl.php @@ -4,6 +4,10 @@ index; ?> name); ?> data_type; ?> + index, $index_ontologies)): foreach($index_ontologies[$feature->index] as $value): ?> + + index, $index_values)): foreach($index_values[$feature->index] as $value): ?> diff --git a/openml_OS/views/pages/api_new/v1/xml/data-get.tpl.php b/openml_OS/views/pages/api_new/v1/xml/data-get.tpl.php index 0595be7fe..dae1bbbb4 100644 --- a/openml_OS/views/pages/api_new/v1/xml/data-get.tpl.php +++ b/openml_OS/views/pages/api_new/v1/xml/data-get.tpl.php @@ -3,6 +3,7 @@ + @@ -11,6 +12,7 @@ + @@ -21,6 +23,7 @@ + diff --git a/openml_OS/views/pages/api_new/v1/xml/data-topic.tpl.php b/openml_OS/views/pages/api_new/v1/xml/data-topic.tpl.php new file mode 100644 index 000000000..2d90f82ae --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/xml/data-topic.tpl.php @@ -0,0 +1,3 @@ + + + diff --git a/openml_OS/views/pages/api_new/v1/xml/pre.php b/openml_OS/views/pages/api_new/v1/xml/pre.php index 1de54754c..75b4a8f8c 100644 --- a/openml_OS/views/pages/api_new/v1/xml/pre.php +++ b/openml_OS/views/pages/api_new/v1/xml/pre.php @@ -38,6 +38,7 @@ // for function: openml.tasks.search $this->apiErrors[151] = 'Unknown task'; $this->apiErrors[152] = 'Unknown task type'; +$this->apiErrors[153] = 'Deprecated task. This kind of task is no longer supported, please find or create a new task.'; // for function: openml.tasks.inputs $this->apiErrors[156] = 'Unknown task'; @@ -254,6 +255,8 @@ $this->apiErrors[474] = 'Database problem inserting tag. '; $this->apiErrors[475] = 'Tag not found.'; $this->apiErrors[476] = 'Tag is not owned by you'; +$this->apiErrors[477] = 'Tags are restricted to length 64 alphanumeric and _-. characters'; + // openml.task.list @@ -518,12 +521,33 @@ $this->apiErrors[1064] = 'Please provide atleast one field among description, creator, contributor, collection_date, language, citation, original_data_url, default_target_attribute, row_id_attribute, ignore_attribute or paper_url to edit. '; $this->apiErrors[1065] = 'Critical features default_target_attribute, row_id_attribute and ignore_attribute can be edited only by the owner. Fork the dataset if changes are required.'; $this->apiErrors[1066] = 'Critical features default_target_attribute, row_id_attribute and ignore_attribute can only be edited for datasets without any tasks.'; -$this->apiErrors[1067] = 'Dataset update failed'; - +$this->apiErrors[1067] = 'Data description insert failed'; +$this->apiErrors[1068] = 'Dataset update failed'; //openml.data.edit $this->apiErrors[1070] = 'Data ID is required'; $this->apiErrors[1071] = 'Unknown dataset'; $this->apiErrors[1072] = 'Failed to insert record in database'; +//openml.data.topic +$this->apiErrors[1080] = 'Please provide a dataset id and a topic.'; +$this->apiErrors[1081] = 'Unknown dataset.'; +$this->apiErrors[1082] = 'Topic can only be added/removed by admin.'; +$this->apiErrors[1083] = 'The topic you provided is already added for this dataset.'; +$this->apiErrors[1084] = 'Failed to insert record in database.'; + +$this->apiErrors[1085] = 'Failed to find record in database.'; + +//openml.list.data.description +$this->apiErrors[1090] = 'Failed to find description versions for this dataset/Unknown dataset'; + + +//openml.data.feature.description +$this->apiErrors[1100] = 'Please provide mandatory POST fields'; +$this->apiErrors[1101] = 'This description was already associated with this feature'; +$this->apiErrors[1102] = 'Failure to write to the database'; +$this->apiErrors[1103] = 'Could not find description in database'; +$this->apiErrors[1104] = 'Failure to write to the database'; +$this->apiErrors[1105] = 'Feature description too long'; +$this->apiErrors[1106] = 'Feature description meant as ontology, but is not a valid URL'; ?> diff --git a/openml_OS/views/pages/api_new/v1/xml/user-name.tpl.php b/openml_OS/views/pages/api_new/v1/xml/user-name.tpl.php index e4abfd777..26cc99425 100644 --- a/openml_OS/views/pages/api_new/v1/xml/user-name.tpl.php +++ b/openml_OS/views/pages/api_new/v1/xml/user-name.tpl.php @@ -1,8 +1,8 @@ - id ?> - username ?> + id; ?> + first_name, $u->last_name])); ?> diff --git a/openml_OS/views/pages/api_new/v1/xml_example/run.evaluate.xml b/openml_OS/views/pages/api_new/v1/xml_example/run.evaluate.xml new file mode 100644 index 000000000..de3e38774 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/xml_example/run.evaluate.xml @@ -0,0 +1,10 @@ + + 1 + 1 + + Name of client-side evaluation measure(s) + Value measured in this run + 0 + 0 + + \ No newline at end of file diff --git a/openml_OS/views/pages/api_new/v1/xml_example/run.trace.xml b/openml_OS/views/pages/api_new/v1/xml_example/run.trace.xml new file mode 100644 index 000000000..46d942d02 --- /dev/null +++ b/openml_OS/views/pages/api_new/v1/xml_example/run.trace.xml @@ -0,0 +1,27 @@ + + 10587706 + + 0 + 0 + 0 + {"parameter_poly__degree":"1","parameter_model__alpha":"0.0","parameter_feature_select__percentile":"20","parameter_model__max_iter":"200"} + -3.1176886333740415 + false + + + 0 + 0 + 1 + {"parameter_poly__degree":"2","parameter_model__alpha":"0.0","parameter_feature_select__percentile":"20","parameter_model__max_iter":"200"} + -3.1465890143092965 + false + + + 0 + 0 + 2 + {"parameter_poly__degree":"1","parameter_model__alpha":"0.0","parameter_feature_select__percentile":"20","parameter_model__max_iter":"500"} + -3.1176886333740415 + false + + \ No newline at end of file diff --git a/openml_OS/views/pages/api_new/v1/xsd/openml.data.features.xsd b/openml_OS/views/pages/api_new/v1/xsd/openml.data.features.xsd index b50663027..2c1abbe95 100644 --- a/openml_OS/views/pages/api_new/v1/xsd/openml.data.features.xsd +++ b/openml_OS/views/pages/api_new/v1/xsd/openml.data.features.xsd @@ -13,6 +13,7 @@ + @@ -31,6 +32,12 @@ + + + + + + diff --git a/openml_OS/views/pages/api_new/v1/xsd/openml.data.upload.xsd b/openml_OS/views/pages/api_new/v1/xsd/openml.data.upload.xsd index ba78f57e1..3493f2e05 100644 --- a/openml_OS/views/pages/api_new/v1/xsd/openml.data.upload.xsd +++ b/openml_OS/views/pages/api_new/v1/xsd/openml.data.upload.xsd @@ -15,6 +15,7 @@ + diff --git a/openml_OS/views/pages/frontend/cite/body.php b/openml_OS/views/pages/frontend/cite/body.php index 29b81c791..5d9972172 100644 --- a/openml_OS/views/pages/frontend/cite/body.php +++ b/openml_OS/views/pages/frontend/cite/body.php @@ -34,7 +34,7 @@
@article{OpenMLPython2019,
- author = {Matthias Feurer, Jan N. van Rijn, Arlind Kadra, Pieter Gijsbers, Neeratyoy Mallik, Sahithya Ravi, Andreas Mueller, Joaquin Vanschoren, Frank Hutter},
+ author = {Matthias Feurer and Jan N. van Rijn and Arlind Kadra and Pieter Gijsbers and Neeratyoy Mallik and Sahithya Ravi and Andreas Mueller and Joaquin Vanschoren and Frank Hutter},
title = {OpenML-Python: an extensible Python API for OpenML},
journal = {arXiv},
volume = {1911.02490},
diff --git a/openml_OS/views/pages/frontend/home/body.php b/openml_OS/views/pages/frontend/home/body.php index b87e73883..d4cfe2161 100644 --- a/openml_OS/views/pages/frontend/home/body.php +++ b/openml_OS/views/pages/frontend/home/body.php @@ -32,19 +32,21 @@
- icon + icon
-

Challenge on Metalearning released

-

Read the details and participate, and an associated workshop at AAAI with high-level keynote speakers

+

Ready for something new?

+

Check out the new OpenML website. Currently in beta.

+
+
icon
-

Python API 0.10 is released

+

Python API 0.12 is released

Get started now or read the paper first :)

@@ -57,7 +59,7 @@

HACKATHON

Bring your own data, bring your own algorithms, or build cool new features.

-

Next workshop: 26-30 October 2020, Virtual

+

More information coming soon.

diff --git a/scripts/install.sh b/scripts/install.sh old mode 100644 new mode 100755 index 41734bdbf..47a581b24 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,14 +1,18 @@ #!/bin/bash +# Get info +read -p 'MYSQL Username: ' uservar +read -sp 'MYSQL Password: ' passvar + # Variables OPENML_DIR=$PWD # Default is current directory OPENML_DATA="$PWD/data" # Set to data directory OPENML_LOG="$OPENML_DATA/log" -MYSQL_USER="youruser" # MySQL user name and password -MYSQL_PASS="yourpassword" +MYSQL_USER=$uservar # MySQL user name and password +MYSQL_PASS=$passvar echo "Creating directories... " -mkdir $OPENML_DATA +#mkdir $OPENML_DATA mkdir $OPENML_LOG sudo chown apache:apache $OPENML_LOG sudo chown apache:apache "$OPENML_LOG/*" @@ -18,123 +22,13 @@ cd $OPENML_DIR # reinitiate the database echo "Building databases... " -mysql -u $MYSQL_USER -p $MYSQL_PASS < downloads/openml_expdb.sql -mysql -u $MYSQL_USER -p $MYSQL_PASS < downloads/openml.sql +mysql -u $MYSQL_USER -p$MYSQL_PASS < downloads/openml.sql +mysql -u $MYSQL_USER -p$MYSQL_PASS openml < /home/jvanscho/users-secret.sql +mysql -u $MYSQL_USER -p$MYSQL_PASS < downloads/openml_expdb.sql # fill important columns sudo php index.php cron install_database # create ES search index echo "Building search indices... " -curl -XPUT 'localhost:9200/data' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/run' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/flow' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/task' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/user' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/measure' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/task_type' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/study' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/like' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/download' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' -curl -XPUT 'localhost:9200/downvote' -H 'Content-Type: application/json' -d' -{ - "settings" : { - "index" : { - "number_of_shards" : 1, - "number_of_replicas" : 0 - } - } -} -' - sudo php index.php cron build_es_indices diff --git a/scripts/reset.sh b/scripts/reset.sh index 997af521b..f4dc6be40 100755 --- a/scripts/reset.sh +++ b/scripts/reset.sh @@ -1,24 +1,28 @@ #!/bin/bash +# Get info +read -p 'MYSQL Username: ' uservar +read -sp 'MYSQL Password: ' passvar + # Variables OPENML_DIR=$PWD # Default is current directory OPENML_DATA="$PWD/data" # Set to data directory OPENML_LOG="$OPENML_DATA/log" -MYSQL_USER="youruser" # MySQL user name and password -MYSQL_PASS="yourpassword" +MYSQL_USER=$uservar # MySQL user name and password +MYSQL_PASS=$passvar # delete data from server echo "Deleting server data... " -sudo rm -rf $OPENML_DATA +sudo rm -rf $OPENML_LOG # delete database echo "Deleting databases... " -mysqladmin -u $MYSQL_USER -p $MYSQL_PASS DROP openml_expdb -mysqladmin -u $MYSQL_USER -p $MYSQL_PASS DROP openml +mysqladmin -u $MYSQL_USER -p$MYSQL_PASS DROP openml_expdb +mysqladmin -u $MYSQL_USER -p$MYSQL_PASS DROP openml # delete search indices echo "Deleting search indices... " curl -XDELETE http://localhost:9200/_all -chmod a+x ./install.sh -sh ./install.sh +chmod a+x ./scripts/install.sh +sh ./scripts/install.sh