-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from instructions-d-installation/test_overhaul
Test overhaul
- Loading branch information
Showing
8 changed files
with
128 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2024 Adam McKellar, Kanushka Gupta, Timo Ege | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
import pytest | ||
import os | ||
import yaml | ||
import json | ||
|
||
|
||
@pytest.fixture | ||
def test_data_flags_options(): | ||
file_path = os.path.join(os.path.dirname(__file__), 'data', 'flags_options_example.schema.yml') | ||
with open(file_path,"r") as file: | ||
return yaml.safe_load(file) | ||
|
||
@pytest.fixture | ||
def test_data_user_input(request): | ||
file_name = request.param | ||
file_path = os.path.join(os.path.dirname(__file__), 'data', file_name) | ||
with open(file_path,"r") as file: | ||
data = file.read() | ||
test_input = json.loads(data) | ||
return [file_name,test_input] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/instructions-d-installation/installation-instruction/examples/scikit-learn/scikit-learn-instruction.schema.yml | ||
title: Scikit-learn installation schema | ||
description: This is a Schema to construct installation instructions for the python package scikit-learn by Timo Ege. | ||
type: object | ||
properties: | ||
os: | ||
title: Operating System | ||
description: The operating system in which the package is installed. | ||
enum: | ||
- Windows | ||
- macOS | ||
- Linux | ||
default: Windows | ||
|
||
packager: | ||
title: Packager | ||
description: The package manager of your choosing. | ||
enum: | ||
- pip | ||
- conda | ||
default: pip | ||
|
||
virtualenv: | ||
title: Use pip virtualenv | ||
description: Choose if you want to use a virtual environment to install the package. | ||
type: boolean | ||
default: false | ||
|
||
compute_platform: | ||
title: Compute Platform | ||
description: Should your gpu or your cpu handle the task? | ||
anyOf: | ||
- title: CUDA 11.8 | ||
const: cu118 | ||
- title: CUDA 12.1 | ||
const: cu121 | ||
default: cu118 | ||
|
||
required: | ||
- os | ||
- packager | ||
|
||
additionalProperties: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"build": "preview", | ||
"os": "win", | ||
"package": "piiip", | ||
"compute_platform": "ro60" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"build": "preview", | ||
"os": "win", | ||
"package": "pip", | ||
"compute_platform": "ro60" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"os": "Kali", | ||
"packager": "pip", | ||
"virtualenv": False | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"os": "Windows", | ||
"packager": "pip", | ||
"virtualenv": False | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters