Skip to content

Commit 280a488

Browse files
committed
Merge branch 'release-0.12.3'
2 parents 1c63c9a + f2bddb6 commit 280a488

File tree

8 files changed

+435
-4
lines changed

8 files changed

+435
-4
lines changed

CHANGELOG.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changes
22
=======
33

4-
NEXT
4+
0.12.3rc1, 05/11/2015
55

66
* Make show_topics return value consistent across models (Christopher Corley, #448)
77
- All models with the `show_topics` method should return a list of
@@ -14,6 +14,12 @@ NEXT
1414
- DocvecsArray's `index2doctag` list is renamed/reinterpreted as `offset2doctag`
1515
- `offset2doctag` entries map to `doctag_syn0` indexes *after* last plain-int doctag (if any)
1616
- (If using only string doctags, `offset2doctag` may be interpreted same as `index2doctag`.)
17+
* New Tutorials on Dynamic Topic Modelling and Classification via Word2Vec (@arttii #471, @mataddy #500)
18+
* Auto-learning for the eta parameter on the LdaModel (Christopher Corley, #479)
19+
* Python 3.5 support
20+
* Speed improvements to keyword and summarisation methods (@erbas #441)
21+
* OSX wheels (#504)
22+
* Win build (#492)
1723

1824
0.12.2, 19/09/2015
1925

appveyor.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# AppVeyor.com is a Continuous Integration service to build and run tests under
2+
# Windows
3+
# https://ci.appveyor.com/project/tmylk/gensim
4+
5+
environment:
6+
global:
7+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
8+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
9+
# See: http://stackoverflow.com/a/13751649/163740
10+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\continuous_integration\\appveyor\\run_with_env.cmd"
11+
# TODO: use gensim's username
12+
WHEELHOUSE_UPLOADER_USERNAME: sklearn-appveyor
13+
WHEELHOUSE_UPLOADER_SECRET:
14+
secure: BQm8KfEj6v2Y+dQxb2syQvTFxDnHXvaNktkLcYSq7jfbTOO6eH9n09tfQzFUVcWZ
15+
16+
matrix:
17+
- PYTHON: "C:\\Python27"
18+
PYTHON_VERSION: "2.7.8"
19+
PYTHON_ARCH: "32"
20+
21+
- PYTHON: "C:\\Python27-x64"
22+
PYTHON_VERSION: "2.7.8"
23+
PYTHON_ARCH: "64"
24+
25+
- PYTHON: "C:\\Python35"
26+
PYTHON_VERSION: "3.5.0"
27+
PYTHON_ARCH: "32"
28+
29+
- PYTHON: "C:\\Python35-x64"
30+
PYTHON_VERSION: "3.5.0"
31+
PYTHON_ARCH: "64"
32+
33+
34+
35+
install:
36+
# Install Python (from the official .msi of http://python.org) and pip when
37+
# not already installed.
38+
- "powershell ./continuous_integration/appveyor/install.ps1"
39+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
40+
41+
# Check that we have the expected version and architecture for Python
42+
- "python --version"
43+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
44+
45+
# Install the build and runtime dependencies of the project.
46+
# Install the build and runtime dependencies of the project.
47+
- "%CMD_IN_ENV% pip install --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com -r continuous_integration/appveyor/requirements.txt"
48+
- "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst "
49+
- ps: "ls dist"
50+
51+
# Install the genreated wheel package to test it
52+
- "pip install --pre --no-index --find-links dist/ gensim"
53+
54+
# Not a .NET project, we build scikit-learn in the install step instead
55+
build: false
56+
57+
test_script:
58+
# Change to a non-source folder to make sure we run the tests on the
59+
# installed library.
60+
- "mkdir empty_folder"
61+
- "cd empty_folder"
62+
63+
- "python -c \"import nose; nose.main()\" -s -v gensim"
64+
# Move back to the project folder
65+
- "cd .."
66+
67+
artifacts:
68+
# Archive the generated wheel package in the ci.appveyor.com build report.
69+
- path: dist\*
70+
# TODO: get a share
71+
#on_success:
72+
# # Upload the generated wheel package to Rackspace
73+
# # On Windows, Apache Libcloud cannot find a standard CA cert bundle so we
74+
# # disable the ssl checks.
75+
# - "python -m wheelhouse_uploader upload --no-ssl-check --local-folder=dist sklearn-windows-wheels"
76+
77+
#notifications:
78+
# - provider: Webhook
79+
# url: https://webhooks.gitter.im/e/0dc8e57cd38105aeb1b4
80+
# on_build_success: false
81+
# on_build_failure: True
82+
83+
cache:
84+
# Use the appveyor cache to avoid re-downloading large archives such
85+
# the MKL numpy and scipy wheels mirrored on a rackspace cloud
86+
# container, speed up the appveyor jobs and reduce bandwidth
87+
# usage on our rackspace account.
88+
- '%APPDATA%\pip\Cache'
89+
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
# Sample script to install Python and pip under Windows
2+
# Authors: Olivier Grisel, Jonathan Helmus, Kyle Kastner, and Alex Willmer
3+
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
4+
5+
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
6+
$BASE_URL = "https://www.python.org/ftp/python/"
7+
$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
8+
$GET_PIP_PATH = "C:\get-pip.py"
9+
10+
$PYTHON_PRERELEASE_REGEX = @"
11+
(?x)
12+
(?<major>\d+)
13+
\.
14+
(?<minor>\d+)
15+
\.
16+
(?<micro>\d+)
17+
(?<prerelease>[a-z]{1,2}\d+)
18+
"@
19+
20+
21+
function Download ($filename, $url) {
22+
$webclient = New-Object System.Net.WebClient
23+
24+
$basedir = $pwd.Path + "\"
25+
$filepath = $basedir + $filename
26+
if (Test-Path $filename) {
27+
Write-Host "Reusing" $filepath
28+
return $filepath
29+
}
30+
31+
# Download and retry up to 3 times in case of network transient errors.
32+
Write-Host "Downloading" $filename "from" $url
33+
$retry_attempts = 2
34+
for ($i = 0; $i -lt $retry_attempts; $i++) {
35+
try {
36+
$webclient.DownloadFile($url, $filepath)
37+
break
38+
}
39+
Catch [Exception]{
40+
Start-Sleep 1
41+
}
42+
}
43+
if (Test-Path $filepath) {
44+
Write-Host "File saved at" $filepath
45+
} else {
46+
# Retry once to get the error message if any at the last try
47+
$webclient.DownloadFile($url, $filepath)
48+
}
49+
return $filepath
50+
}
51+
52+
53+
function ParsePythonVersion ($python_version) {
54+
if ($python_version -match $PYTHON_PRERELEASE_REGEX) {
55+
return ([int]$matches.major, [int]$matches.minor, [int]$matches.micro,
56+
$matches.prerelease)
57+
}
58+
$version_obj = [version]$python_version
59+
return ($version_obj.major, $version_obj.minor, $version_obj.build, "")
60+
}
61+
62+
63+
function DownloadPython ($python_version, $platform_suffix) {
64+
$major, $minor, $micro, $prerelease = ParsePythonVersion $python_version
65+
66+
if (($major -le 2 -and $micro -eq 0) `
67+
-or ($major -eq 3 -and $minor -le 2 -and $micro -eq 0) `
68+
) {
69+
$dir = "$major.$minor"
70+
$python_version = "$major.$minor$prerelease"
71+
} else {
72+
$dir = "$major.$minor.$micro"
73+
}
74+
75+
if ($prerelease) {
76+
if (($major -le 2) `
77+
-or ($major -eq 3 -and $minor -eq 1) `
78+
-or ($major -eq 3 -and $minor -eq 2) `
79+
-or ($major -eq 3 -and $minor -eq 3) `
80+
) {
81+
$dir = "$dir/prev"
82+
}
83+
}
84+
85+
if (($major -le 2) -or ($major -le 3 -and $minor -le 4)) {
86+
$ext = "msi"
87+
if ($platform_suffix) {
88+
$platform_suffix = ".$platform_suffix"
89+
}
90+
} else {
91+
$ext = "exe"
92+
if ($platform_suffix) {
93+
$platform_suffix = "-$platform_suffix"
94+
}
95+
}
96+
97+
$filename = "python-$python_version$platform_suffix.$ext"
98+
$url = "$BASE_URL$dir/$filename"
99+
$filepath = Download $filename $url
100+
return $filepath
101+
}
102+
103+
104+
function InstallPython ($python_version, $architecture, $python_home) {
105+
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
106+
if (Test-Path $python_home) {
107+
Write-Host $python_home "already exists, skipping."
108+
return $false
109+
}
110+
if ($architecture -eq "32") {
111+
$platform_suffix = ""
112+
} else {
113+
$platform_suffix = "amd64"
114+
}
115+
$installer_path = DownloadPython $python_version $platform_suffix
116+
$installer_ext = [System.IO.Path]::GetExtension($installer_path)
117+
Write-Host "Installing $installer_path to $python_home"
118+
$install_log = $python_home + ".log"
119+
if ($installer_ext -eq '.msi') {
120+
InstallPythonMSI $installer_path $python_home $install_log
121+
} else {
122+
InstallPythonEXE $installer_path $python_home $install_log
123+
}
124+
if (Test-Path $python_home) {
125+
Write-Host "Python $python_version ($architecture) installation complete"
126+
} else {
127+
Write-Host "Failed to install Python in $python_home"
128+
Get-Content -Path $install_log
129+
Exit 1
130+
}
131+
}
132+
133+
134+
function InstallPythonEXE ($exepath, $python_home, $install_log) {
135+
$install_args = "/quiet InstallAllUsers=1 TargetDir=$python_home"
136+
RunCommand $exepath $install_args
137+
}
138+
139+
140+
function InstallPythonMSI ($msipath, $python_home, $install_log) {
141+
$install_args = "/qn /log $install_log /i $msipath TARGETDIR=$python_home"
142+
$uninstall_args = "/qn /x $msipath"
143+
RunCommand "msiexec.exe" $install_args
144+
if (-not(Test-Path $python_home)) {
145+
Write-Host "Python seems to be installed else-where, reinstalling."
146+
RunCommand "msiexec.exe" $uninstall_args
147+
RunCommand "msiexec.exe" $install_args
148+
}
149+
}
150+
151+
function RunCommand ($command, $command_args) {
152+
Write-Host $command $command_args
153+
Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru
154+
}
155+
156+
157+
function InstallPip ($python_home) {
158+
$pip_path = $python_home + "\Scripts\pip.exe"
159+
$python_path = $python_home + "\python.exe"
160+
if (-not(Test-Path $pip_path)) {
161+
Write-Host "Installing pip..."
162+
$webclient = New-Object System.Net.WebClient
163+
$webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
164+
Write-Host "Executing:" $python_path $GET_PIP_PATH
165+
& $python_path $GET_PIP_PATH
166+
} else {
167+
Write-Host "pip already installed."
168+
}
169+
}
170+
171+
172+
function DownloadMiniconda ($python_version, $platform_suffix) {
173+
if ($python_version -eq "3.4") {
174+
$filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe"
175+
} else {
176+
$filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe"
177+
}
178+
$url = $MINICONDA_URL + $filename
179+
$filepath = Download $filename $url
180+
return $filepath
181+
}
182+
183+
184+
function InstallMiniconda ($python_version, $architecture, $python_home) {
185+
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
186+
if (Test-Path $python_home) {
187+
Write-Host $python_home "already exists, skipping."
188+
return $false
189+
}
190+
if ($architecture -eq "32") {
191+
$platform_suffix = "x86"
192+
} else {
193+
$platform_suffix = "x86_64"
194+
}
195+
$filepath = DownloadMiniconda $python_version $platform_suffix
196+
Write-Host "Installing" $filepath "to" $python_home
197+
$install_log = $python_home + ".log"
198+
$args = "/S /D=$python_home"
199+
Write-Host $filepath $args
200+
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
201+
if (Test-Path $python_home) {
202+
Write-Host "Python $python_version ($architecture) installation complete"
203+
} else {
204+
Write-Host "Failed to install Python in $python_home"
205+
Get-Content -Path $install_log
206+
Exit 1
207+
}
208+
}
209+
210+
211+
function InstallMinicondaPip ($python_home) {
212+
$pip_path = $python_home + "\Scripts\pip.exe"
213+
$conda_path = $python_home + "\Scripts\conda.exe"
214+
if (-not(Test-Path $pip_path)) {
215+
Write-Host "Installing pip..."
216+
$args = "install --yes pip"
217+
Write-Host $conda_path $args
218+
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
219+
} else {
220+
Write-Host "pip already installed."
221+
}
222+
}
223+
224+
function main () {
225+
InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
226+
InstallPip $env:PYTHON
227+
}
228+
229+
main
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Fetch numpy and scipy wheels from the sklearn rackspace wheelhouse.
2+
# Those wheels were collected from http://www.lfd.uci.edu/~gohlke/pythonlibs/
3+
# This is a temporary solution. As soon as numpy and scipy provide official
4+
# wheel for windows we ca delete this --find-links line.
5+
--find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/
6+
7+
# fix the versions of numpy to force the use of numpy and scipy to use the whl
8+
# of the rackspace folder instead of trying to install from more recent
9+
# source tarball published on PyPI
10+
numpy==1.9.3
11+
scipy==0.16.0
12+
cython
13+
six >= 1.5.0
14+
smart_open >= 1.2.1
15+
nose
16+
wheel
17+
wheelhouse_uploader
18+

0 commit comments

Comments
 (0)