Skip to content

Commit 6472139

Browse files
authored
Merge pull request #580 from EducationalTestingService/release/2.0
Preparing for SKLL v2.0 Release
2 parents e617e71 + 6b1e5b5 commit 6472139

22 files changed

+276
-150
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ How to contribute
1919

2020
3. Create an isolated environment for SKLL development. We recommend using the [conda](https://conda.io/en/latest/) package manager. To create a `conda` environment, run the following command in the root of the working directory:
2121

22-
$ conda create -n sklldev -c conda-forge --file conda_requirements.txt
22+
$ conda create -n sklldev -c conda-forge nose --file conda_requirements.txt
2323

2424
4. Activate the conda environment
2525

DistributeTests.ps1

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<#
2+
.SYNOPSIS
3+
Distribute the tests in VSTS pipeline across multiple agents
4+
.DESCRIPTION
5+
This script divides test files across multiple agents for running on Azure DevOps.
6+
It is adapted from the script in this repository:
7+
https://github.com/PBoraMSFT/ParallelTestingSample-Python/blob/master/DistributeTests.ps1
8+
9+
The distribution is basically identical to the way we do it in .travis.yaml
10+
#>
11+
12+
$tests = Get-ChildItem .\tests\ -Filter "test*.py" # search for test files with specific pattern.
13+
$totalAgents = [int]$Env:SYSTEM_TOTALJOBSINPHASE # standard VSTS variables available using parallel execution; total number of parallel jobs running
14+
$agentNumber = [int]$Env:SYSTEM_JOBPOSITIONINPHASE # current job position
15+
$testCount = $tests.Count
16+
17+
# below conditions are used if parallel pipeline is not used. i.e. pipeline is running with single agent (no parallel configuration)
18+
if ($totalAgents -eq 0) {
19+
$totalAgents = 1
20+
}
21+
if (!$agentNumber -or $agentNumber -eq 0) {
22+
$agentNumber = 1
23+
}
24+
25+
Write-Host "Total agents: $totalAgents"
26+
Write-Host "Agent number: $agentNumber"
27+
Write-Host "Total tests: $testCount"
28+
29+
$testsToRun= @()
30+
31+
if ($agentNumber -eq 1) {
32+
$testsToRun = $testsToRun + "tests/test_featureset.py"
33+
$testsToRun = $testsToRun + "tests/test_utilities.py"
34+
}
35+
elseif ($agentNumber -eq 2) {
36+
$testsToRun = $testsToRun + "tests/test_output.py"
37+
}
38+
elseif ($agentNumber -eq 3) {
39+
$testsToRun = $testsToRun + "tests/test_regression.py"
40+
}
41+
elseif ($agentNumber -eq 4) {
42+
$testsToRun = $testsToRun + "tests/test_input.py"
43+
$testsToRun = $testsToRun + "tests/test_preprocessing.py"
44+
$testsToRun = $testsToRun + "tests/test_metrics.py"
45+
$testsToRun = $testsToRun + "tests/test_custom_learner.py"
46+
$testsToRun = $testsToRun + "tests/test_logutils.py"
47+
$testsToRun = $testsToRun + "tests/test_examples.py"
48+
}
49+
elseif ($agentNumber -eq 5) {
50+
$testsToRun = $testsToRun + "tests/test_classification.py"
51+
$testsToRun = $testsToRun + "tests/test_cv.py"
52+
$testsToRun = $testsToRun + "tests/test_ablation.py"
53+
}
54+
55+
# join all test files seperated by space. pytest runs multiple test files in following format pytest test1.py test2.py test3.py
56+
$testFiles = $testsToRun -Join " "
57+
Write-Host "Test files $testFiles"
58+
# write these files into variable so that we can run them using pytest in subsequent task.
59+
Write-Host "##vso[task.setvariable variable=pytestfiles;]$testFiles"

MANIFEST.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include LICENSE.txt
22
include *.rst
33
include requirements.txt
4-
include requirements_rtd.txt
5-
recursive-include doc *
6-
recursive-include examples *
7-
recursive-include tests *
4+
recursive-exclude doc *
5+
recursive-exclude tests *
6+
recursive-exclude examples *

README.rst

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ SciKit-Learn Laboratory
1515
.. image:: https://img.shields.io/pypi/l/skll.svg
1616
:alt: License
1717

18-
.. image:: https://img.shields.io/conda/v/desilinguist/skll.svg
19-
:target: https://anaconda.org/desilinguist/skll
18+
.. image:: https://img.shields.io/conda/v/ets/skll.svg
19+
:target: https://anaconda.org/ets/skll
2020
:alt: Conda package for SKLL
2121

2222
.. image:: https://img.shields.io/pypi/pyversions/skll.svg
@@ -37,6 +37,25 @@ our project is to make it so that you can run scikit-learn experiments without
3737
actually needing to write any code other than what you used to generate/extract
3838
the features.
3939

40+
Installation
41+
~~~~~~~~~~~~
42+
43+
You can install using either ``pip`` or ``conda``. See details `here <https://skll.readthedocs.io/en/latest/getting_started.html>`__.
44+
45+
Requirements
46+
~~~~~~~~~~~~
47+
48+
- Python 3.6+
49+
- `beautifulsoup4 <http://www.crummy.com/software/BeautifulSoup/>`__
50+
- `gridmap <https://pypi.org/project/gridmap/>`__ (only required if you plan
51+
to run things in parallel on a DRMAA-compatible cluster)
52+
- `joblib <https://pypi.org/project/joblib/>`__
53+
- `pandas <http://pandas.pydata.org>`__
54+
- `ruamel.yaml <http://yaml.readthedocs.io/en/latest/overview.html>`__
55+
- `scikit-learn <http://scikit-learn.org/stable/>`__
56+
- `seaborn <http://seaborn.pydata.org>`__
57+
- `tabulate <https://pypi.org/project/tabulate/>`__
58+
4059
Command-line Interface
4160
~~~~~~~~~~~~~~~~~~~~~~
4261

@@ -81,7 +100,6 @@ like:
81100
probability = true
82101
models = output
83102
84-
85103
For more information about getting started with ``run_experiment``, please check
86104
out `our tutorial <https://skll.readthedocs.org/en/latest/tutorial.html>`__, or
87105
`our config file specs <https://skll.readthedocs.org/en/latest/run_experiment.html>`__.
@@ -125,20 +143,6 @@ A Note on Pronunciation
125143
SciKit-Learn Laboratory (SKLL) is pronounced "skull": that's where the learning
126144
happens.
127145

128-
Requirements
129-
~~~~~~~~~~~~
130-
131-
- Python 3.6+
132-
- `beautifulsoup4 <http://www.crummy.com/software/BeautifulSoup/>`__
133-
- `gridmap <https://pypi.org/project/gridmap/>`__ (only required if you plan
134-
to run things in parallel on a DRMAA-compatible cluster)
135-
- `joblib <https://pypi.org/project/joblib/>`__
136-
- `pandas <http://pandas.pydata.org>`__
137-
- `ruamel.yaml <http://yaml.readthedocs.io/en/latest/overview.html>`__
138-
- `scikit-learn <http://scikit-learn.org/stable/>`__
139-
- `seaborn <http://seaborn.pydata.org>`__
140-
- `tabulate <https://pypi.org/project/tabulate/>`__
141-
142146
Talks
143147
~~~~~
144148

appveyor.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
variables:
7+
MPLBACKEND: Agg
8+
9+
trigger:
10+
branches:
11+
include:
12+
- '*' # must quote since "*" is a YAML reserved character; we want a string
13+
14+
jobs:
15+
16+
- job: 'SkllTests'
17+
pool:
18+
vmImage: 'windows-latest'
19+
strategy:
20+
parallel: 5
21+
22+
steps:
23+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
24+
displayName: Add conda to PATH
25+
26+
- script: |
27+
conda update --quiet --yes conda
28+
conda info -a
29+
displayName: "Update conda"
30+
31+
- script: |
32+
conda create --name sklldev --yes --quiet -c conda-forge -c defaults python=%PYTHON_VERSION% numpy=1.17 nose --file conda_requirements.txt
33+
conda init cmd.exe
34+
CALL activate sklldev
35+
pip install -e .
36+
displayName: 'Install dependencies & code'
37+
38+
- powershell: ./DistributeTests.ps1
39+
displayName: 'PowerShell Script to distribute tests'
40+
41+
- script: |
42+
CALL activate sklldev
43+
echo $(pytestfiles)
44+
nosetests --with-xunit $(pytestfiles)
45+
displayName: 'Run tests'
46+
continueOnError: true
47+
48+
- task: PublishTestResults@2
49+
displayName: 'Publish Test Results'
50+
inputs:
51+
testResultsFiles: 'nosetests.xml'
52+
testRunTitle: 'SKLL tests'
53+
condition: succeededOrFailed()

conda-recipe/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to create and test conda package.
22

33
1. To create the SKLL conda package run:
4-
`conda build -c defaults -c conda-forge --python=3.6 --numpy=1.14 skll`
5-
2. Upload the package to anaconda.org using `anaconda upload <path>`.
4+
`conda build -c defaults -c conda-forge --numpy=1.17 skll`
5+
2. Upload the package to anaconda.org using `anaconda upload --user ets <path>`.
66
3. Test the package:
7-
`conda create -n foobar -c defaults -c conda-forge -c desilinguist python=3.6 skll=1.5`
7+
`conda create -n foobar -c conda-forge -c ets skll=2.0`

conda-recipe/skll/meta.yaml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package:
22
name: skll
3-
version: 1.5.3
3+
version: 2.0
44

55
source:
66
path: ../../../skll
77

88
build:
99
number: 0
10+
noarch: python
1011
script:
1112
- cd $SRC_DIR
12-
- $PYTHON setup.py install
13+
- "{{ PYTHON }} -m pip install . --no-deps -vv"
1314
entry_points:
1415
- compute_eval_from_predictions = skll.utilities.compute_eval_from_predictions:main
1516
- filter_features = skll.utilities.filter_features:main
@@ -41,25 +42,29 @@ build:
4142

4243
requirements:
4344
build:
44-
- python
45-
- scikit-learn ==0.20.1
46-
- joblib >=0.8
47-
- setuptools
48-
- tabulate
4945
- beautifulsoup4
46+
- joblib >=0.8
5047
- numpy
51-
- scipy
48+
- pandas
49+
- python >=3.6
5250
- ruamel.yaml
51+
- scikit-learn ==0.21.3
52+
- scipy
53+
- seaborn
54+
- setuptools
55+
- tabulate
5356

5457
run:
55-
- python
56-
- scikit-learn ==0.20.1
57-
- joblib >=0.8
58-
- tabulate
5958
- beautifulsoup4
59+
- joblib >=0.8
6060
- numpy
61-
- scipy
61+
- pandas
62+
- python >=3.6
6263
- ruamel.yaml
64+
- scikit-learn ==0.21.3
65+
- seaborn
66+
- scipy
67+
- tabulate
6368

6469
test:
6570
# Python imports
@@ -79,4 +84,6 @@ test:
7984

8085
about:
8186
home: http://github.com/EducationalTestingService/skll
82-
license: BSD 3-clause
87+
license: BSD-3-Clause
88+
license_file: LICENSE.txt
89+
summary: SciKit-Learn Laboratory makes it easier to run machine learning experiments with scikit-learn.

conda_requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
scikit-learn==0.21.3
21
beautifulsoup4
3-
tabulate
2+
joblib>=0.8
43
numpy
5-
scipy
64
pandas
7-
seaborn
8-
joblib>=0.8
95
ruamel.yaml
6+
scikit-learn==0.21.3
7+
scipy
8+
seaborn
9+
tabulate

doc/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SKLL can be installed via ``pip``::
88

99
or via ``conda``::
1010

11-
conda install -c conda-forge -c desilinguist python=3.6 skll
11+
conda install -c conda-forge -c ets skll
1212

1313
It can also be downloaded directly from
1414
`GitHub <https://github.com/EducationalTestingService/skll>`_.

0 commit comments

Comments
 (0)