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 #325 from EducationalTestingService/master
Merge `master` into `stable`.
- Loading branch information
Showing
1,722 changed files
with
97,612 additions
and
31,257 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 |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
*test_outputs/ | ||
|
||
__pycache__ | ||
/rsmtool.sublime-workspace | ||
/rsmtool.sublime-project |
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,22 @@ | ||
# File : .pep8speaks.yml | ||
|
||
scanner: | ||
diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned. | ||
linter: flake8 # Other option is pycodestyle | ||
|
||
flake8: # Valid if scanner.linter is flake8 | ||
max-line-length: 100 | ||
|
||
no_blank_comment: False # If True, no comment is made on PR without any errors. | ||
descending_issues_order: False # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file | ||
|
||
message: # Customize the comment made by the bot | ||
opened: # Messages when a new PR is submitted | ||
header: "Hello @{name}! Thanks for opening this PR. " | ||
# The keyword {name} is converted into the author's username | ||
footer: "Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r)" | ||
# The messages can be written as they would over GitHub | ||
updated: # Messages when new commits are added to the PR | ||
header: "Hello @{name}! Thanks for updating this PR. " | ||
footer: "" # Why to comment the link to the style guide everytime? :) | ||
no_errors: "There are currently no PEP 8 issues detected in this Pull Request. Cheers! :tada: " |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<# | ||
.SYNOPSIS | ||
Distribute the tests in VSTS pipeline across multiple agents | ||
.DESCRIPTION | ||
This script divides test files across multiple agents for running on Azure DevOps. | ||
It is adapted from the script in this repository: | ||
https://github.com/PBoraMSFT/ParallelTestingSample-Python/blob/master/DistributeTests.ps1 | ||
The distribution is basically identical to the way we do it in .travis.yaml | ||
#> | ||
|
||
$tests = Get-ChildItem .\tests\ -Filter "test*.py" # search for test files with specific pattern. | ||
$totalAgents = [int]$Env:SYSTEM_TOTALJOBSINPHASE # standard VSTS variables available using parallel execution; total number of parallel jobs running | ||
$agentNumber = [int]$Env:SYSTEM_JOBPOSITIONINPHASE # current job position | ||
$testCount = $tests.Count | ||
|
||
# below conditions are used if parallel pipeline is not used. i.e. pipeline is running with single agent (no parallel configuration) | ||
if ($totalAgents -eq 0) { | ||
$totalAgents = 1 | ||
} | ||
if (!$agentNumber -or $agentNumber -eq 0) { | ||
$agentNumber = 1 | ||
} | ||
|
||
Write-Host "Total agents: $totalAgents" | ||
Write-Host "Agent number: $agentNumber" | ||
Write-Host "Total tests: $testCount" | ||
|
||
$testsToRun= @() | ||
|
||
if ($agentNumber -eq 1) { | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmtool_1.py" | ||
} | ||
elseif ($agentNumber -eq 2) { | ||
$testsToRun = $testsToRun + "tests/test_comparer.py" | ||
$testsToRun = $testsToRun + "tests/test_configuration_parser.py" | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmtool_2.py" | ||
$testsToRun = $testsToRun + "tests/test_container.py" | ||
} | ||
elseif ($agentNumber -eq 3) { | ||
$testsToRun = $testsToRun + "tests/test_analyzer.py" | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmeval.py" | ||
$testsToRun = $testsToRun + "tests/test_fairness_utils.py" | ||
$testsToRun = $testsToRun + "tests/test_prmse_utils.py" | ||
} | ||
elseif ($agentNumber -eq 4) { | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmcompare.py" | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmsummarize.py" | ||
$testsToRun = $testsToRun + "tests/test_modeler.py" | ||
$testsToRun = $testsToRun + "tests/test_preprocessor.py" | ||
$testsToRun = $testsToRun + "tests/test_writer.py" | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmtool_3.py" | ||
} | ||
elseif ($agentNumber -eq 5) { | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmpredict.py" | ||
$testsToRun = $testsToRun + "tests/test_reader.py" | ||
$testsToRun = $testsToRun + "tests/test_reporter.py" | ||
$testsToRun = $testsToRun + "tests/test_transformer.py" | ||
$testsToRun = $testsToRun + "tests/test_utils.py" | ||
$testsToRun = $testsToRun + "tests/test_experiment_rsmtool_4.py" | ||
} | ||
|
||
# join all test files seperated by space. pytest runs multiple test files in following format pytest test1.py test2.py test3.py | ||
$testFiles = $testsToRun -Join " " | ||
Write-Host "Test files $testFiles" | ||
# write these files into variable so that we can run them using pytest in subsequent task. | ||
Write-Host "##vso[task.setvariable variable=pytestfiles;]$testFiles" |
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
include LICENSE | ||
include *.rst | ||
include requirements.txt | ||
recursive-exclude doc * | ||
recursive-exclude tests * | ||
recursive-exclude examples * | ||
recursive-include rsmtool/notebooks * | ||
recursive-include doc * | ||
prune test_outputs | ||
prune rsmtool/rsmtool.egg-info | ||
prune rsmtool/notebooks/.ipynb_checkpoints | ||
prune rsmtool/notebooks/comparison/.ipynb_checkpoints |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Python package | ||
# Create and test a Python package on multiple Python versions. | ||
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/python | ||
|
||
variables: | ||
MPLBACKEND: Agg | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- '*' # must quote since "*" is a YAML reserved character; we want a string | ||
|
||
jobs: | ||
|
||
- job: 'RSMToolTests' | ||
pool: | ||
vmImage: 'windows-latest' | ||
strategy: | ||
parallel: 5 | ||
|
||
steps: | ||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" | ||
displayName: Add conda to PATH | ||
|
||
- script: | | ||
conda update --quiet --yes conda | ||
conda info -a | ||
displayName: "Update conda" | ||
- script: | | ||
conda create --name rsmdev --yes --quiet -c conda-forge -c defaults -c desilinguist python=%PYTHON_VERSION% --file requirements.txt | ||
conda init cmd.exe | ||
CALL activate rsmdev | ||
pip install -e . | ||
displayName: 'Install dependencies & code' | ||
- powershell: ./DistributeTests.ps1 | ||
displayName: 'PowerShell Script to distribute tests' | ||
|
||
- script: | | ||
CALL activate rsmdev | ||
echo $(pytestfiles) | ||
nosetests --with-xunit $(pytestfiles) | ||
displayName: 'Run tests' | ||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results' | ||
inputs: | ||
testResultsFiles: 'nosetests.xml' | ||
testRunTitle: 'RSMTool tests' | ||
condition: succeededOrFailed() |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.