Skip to content

Commit

Permalink
Merge pull request #172 from wblumberg/andover
Browse files Browse the repository at this point in the history
Changed install to include a note about binaries
  • Loading branch information
Greg Blumberg committed Sep 12, 2019
2 parents 22e3563 + dbcc7e9 commit c7b80c1
Show file tree
Hide file tree
Showing 45 changed files with 198 additions and 163 deletions.
13 changes: 4 additions & 9 deletions .appveyor.yml
@@ -1,9 +1,5 @@
environment:
matrix:
- PYTHON_VERSION: 2.7
MINICONDA: C:\Miniconda
ARCH: "64"
NUMPY_VERSION: "1.15.*"
- PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda3
ARCH: "64"
Expand All @@ -16,11 +12,10 @@ install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- "conda create -q -n test-environment python=%PYTHON_VERSION%"
- conda env create -f environment.yml

# Install dependencies
- activate test-environment
- "conda install -q -c conda-forge pyside pyinstaller pytest requests python-dateutil numpy=%NUMPY_VERSION%"
- activate devel

# Add to path the current folder
- "SET PYTHONPATH=%PYTHONPATH%;%CD%"
Expand Down Expand Up @@ -48,7 +43,7 @@ after_test:
# - "move dist\\SHARPpy.exe dist\\SHARPpy%ARCH%.exe"

artifacts:
- path: "dist\\SHARPpy64.exe"
- path: "runsharp\\dist\\SHARPpy64.exe"
name: binary

- path: "*.png"
Expand All @@ -62,7 +57,7 @@ deploy:
release: $(appveyor_repo_tag_name)
auth_token:
secure: DB6sQwYCM7Dhhy+mjPkMd6kclvw0Sc2wglTJxcTBQue63dtIQRNa1dz/aqJG7Ygc
artifact: "dist\\SHARPpy64.exe"
artifact: "runsharp\\dist\\SHARPpy64.exe"
draft: true
prerelease: true
on:
Expand Down
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -11,19 +11,15 @@ matrix:
- os: linux
language: generic
env:
- PYTHON_VERSION="3.6" BUILD_CONDA="YES" NUMPY_VERSION=1.15
- PYTHON_VERSION="3.6" BUILD_CONDA="YES" NUMPY_VERSION=1.15 DISPLAY_AVAIL="YES"
- os: osx
language: generic
env:
- PYTHON_VERSION="3.6" DISPLAY_AVAIL="NO" BUILD_BINARY="YES" NUMPY_VERSION=1.15
- os: linux
language: generic
env:
- PYTHON_VERSION="2.7" NUMPY_VERSION=1.15
- os: linux
language: generic
env:
- PYTHON_VERSION="3.6" BUILD_DOCS="YES" NUMPY_VERSION=1.15 COVERALLS="YES"
- PYTHON_VERSION="3.6" BUILD_DOCS="YES" NUMPY_VERSION=1.15 COVERALLS="YES" DISPLAY_AVAIL="YES"
before_install:
- source ci/install.sh
install:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Expand Up @@ -93,7 +93,7 @@ BUG FIXES
* Additional error handling for partial profiles.
* Various model forecast points relocated to their proper places.
* Error handling for opening the program without an Internet connection.
* Removed PySide dependency and unused imports for those using SHARPpy routines in scripts.
* Removed qtpy dependency and unused imports for those using SHARPpy routines in scripts.

SHARPpy v1.2.0 "El Reno" Release
--------------------------------
Expand Down
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -64,15 +64,17 @@ The Anaconda Python Distribution can be downloaded here: https://www.anaconda.co

__Required Python Packages/Libraries:__

Since SHARPpy requires the qtpy and Numpy packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. qtpy can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in Mac OS X/Linux and Command Prompt in Windows) and typing:

* NumPy
* qtpy
* NumPy v1.15
* PySide v1.2.4
* PySide2
* requests
* python-dateutil

Since SHARPpy requires these packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. PySide, requests, and python-dateutil can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in Mac OS X/Linux and Command Prompt in Windows) and typing:

conda install -c conda-forge pyside=1.2.4 requests python-dateutil

After installing all the required Python packages for SHARPpy, you now can install the SHARPpy package to your computer. You'll need to download it to your computer first and open up a command line prompt. You can download it as a ZIP file (link on the right) or clone the Git respository (you will need the git program) into a directory on your computer by typing this into your command line:

git clone https://github.com/sharppy/SHARPpy.git
Expand Down
31 changes: 16 additions & 15 deletions azure-pipelines.yml
Expand Up @@ -8,19 +8,19 @@ strategy:

linux-1280x1024:
# Ubuntu 16.04
imageName: 'ubuntu-16.04'
imageName: 'ubuntu-latest'
screen_w: 1280
screen_h: 1024
screen_d: 16
mac-defaultres:
# macOS 10.13
imageName: 'macos-10.13'
imageName: 'macos-latest'
# screen_w: 1280
# screen_h: 1024
# screen_d: 16
windows-1280x1024:
# Windows Docker Container not Visual Studio 2017 on Windows Server 2016
imageName: 'vs2015-win2012r2' ##'vs2017-win2016'
imageName: 'windows-latest' #'vs2017-win2016' # 'vs2015-win2012r2'
screen_w: 1280
screen_h: 1024
screen_d: 16
Expand All @@ -35,7 +35,9 @@ steps:
displayName: Add conda to PATH
condition: eq( variables['Agent.OS'], 'Linux')

- bash: echo "##vso[task.prependpath]$CONDA/bin"
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to PATH
condition: eq( variables['Agent.OS'], 'Darwin')

Expand Down Expand Up @@ -68,8 +70,8 @@ steps:
sleep 3 # give xvfb some time to start
xdpyinfo | grep dimensions # Check display dimensions
python ci/screen.py # Check display dimensions as seen by PySide
#pytest -v --junitxml=junit/test-results.xml
#mv examples/data/14061619.png examples/data/14061619_linux.png
pytest -v --junitxml=junit/test-results.xml
mv examples/data/14061619.png examples/data/14061619_linux.png
displayName: "Installing code and running tests (Linux)"
condition: eq( variables['Agent.OS'], 'Linux')

Expand All @@ -86,13 +88,12 @@ steps:
system_profiler SPDisplaysDataType | grep Resolution # Check display dimensions using OS tools
python ci/screen.py # Check display dimensions as seen by PySide
pip install -e .
#sudo pytest -v --junitxml=junit/test-results.xml
#sudo mv examples/data/14061619.png examples/data/14061619_mac.png
cd runsharp
pyinstaller SHARPpy-osx.spec --noconsole --onefile --log-level DEBUG
sudo pytest -v --junitxml=junit/test-results.xml
sudo mv examples/data/14061619.png examples/data/14061619_mac.png
pyinstaller runsharp/SHARPpy-osx.spec --noconsole --onefile --log-level DEBUG
#sudo chmod 777 dist/SHARPpy.app
ls -lh dist
cd ..
#cd runsharp
#ls -lh dist
displayName: "Installing code and running tests (macOS)"
condition: eq( variables['Agent.OS'], 'Darwin')

Expand All @@ -109,8 +110,8 @@ steps:
python ci/screen.py
#SET PYTHONPATH=%PYTHONPATH%;%CD%
pip install -e .
#pytest -v --junitxml=junit/test-results.xml
#move examples\\data\\14061619.png examples\\data\\14061619_win.png
pytest -v --junitxml=junit/test-results.xml
move examples\\data\\14061619.png examples\\data\\14061619_win.png
cd runsharp
pyinstaller SHARPpy-win7-64.spec --log-level DEBUG
cd ..
Expand All @@ -136,7 +137,7 @@ steps:
# Zipping MacOS .app
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: runsharp/dist/SHARPpy.app
rootFolderOrFile: dist/SHARPpy.app
archiveType: zip
archiveFile: '$(Build.ArtifactStagingDirectory)/SHARPpy-osx-64.zip'
displayName: "Zipping macOS .app"
Expand Down
2 changes: 2 additions & 0 deletions ci/build_docs.sh
Expand Up @@ -8,6 +8,8 @@ cd "$TRAVIS_BUILD_DIR"
conda install -q -c anaconda sphinx sphinx_rtd_theme
conda install -q -c conda-forge sphinx-gallery
pip install sphinx-prompt
conda deactivate
conda activate devel

echo "Adding the SSH key ..."
cd ci/
Expand Down
7 changes: 3 additions & 4 deletions ci/install.sh
Expand Up @@ -23,11 +23,10 @@ conda update -q conda
conda install -n -q root _license
conda info -a
conda config --add channels conda-forge
conda create -q -n test-environment python=$PYTHON_VERSION pyside pyinstaller requests python-dateutil conda-build anaconda-client numpy=$NUMPY_VERSION
source activate test-environment
conda env create -f environment.yml
source activate devel
conda install -c conda-forge -q pytest-cov conda-build anaconda-client

pip install --upgrade pip
conda install -c conda-forge -q pytest-cov
if [[ "$COVERALLS" == "YES" ]]; then
echo "Installing coveralls ..."
conda install -c conda-forge -q coveralls
Expand Down
4 changes: 2 additions & 2 deletions ci/screen.py
@@ -1,10 +1,10 @@
from PySide import QtGui
from qtpy.QtWidgets import *
import sys

# A short utility to use PySide to detect the screen resolution
# (for use in testing the SHARPpy GUI)

app = QtGui.QApplication(sys.argv)
app = QApplication(sys.argv)
screen_rect = app.desktop().screenGeometry()
width, height = screen_rect.width(), screen_rect.height()
print("Screen Resolution:", str(width) + 'x' + str(height))
8 changes: 4 additions & 4 deletions conda-recipe/meta.yaml
Expand Up @@ -23,13 +23,13 @@ build:
requirements:
build:
- setuptools
- python >=3.4
- pyside
- python>=3.4
- pyside2=5.13.*
- pip
run:
- python >=3.4
- python>=3.4
- numpy={{ os.environ.get('NUMPY_VERSION', '1.15') }}
- pyside
- pyside2=5.13.*
- requests
- python-dateutil

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -52,7 +52,7 @@
'gallery_dirs': 'auto_examples',
}

#autodoc_mock_imports = ["numpy", "PySide"]
#autodoc_mock_imports = ["numpy", "qtpy"]

napoleon_google_docstring = False
napolean_numpy_docstring = True
Expand Down
15 changes: 13 additions & 2 deletions docs/source/install.rst
Expand Up @@ -24,6 +24,8 @@ https://github.com/sharppy/SHARPpy/releases/

Installing a pre-compiled binary *should* be as simple as downloading the .zip file and extracting it to the location of your choice. The zip files are named for the operating system and number of bits. Most recently-built computers (probably post-2010 or so) should have 64-bit operating systems installed. If your computer is older and you're unsure whether it has a 32- or 64-bit operating system, you can check on Windows 7 by clicking Start, right-clicking on Computer, and selecting Properties. All recent versions of OS X (10.6 and newer) should be 64-bit.

.. note:: The pre-compile binaries are sometimes difficult to keep up to date, so for more recent versions of SHARPpy, you may want to look into the next section, which is about installing the program via package managers.

Installing using package managers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -59,15 +61,24 @@ install the required packages manually. These instructions assume that you have
*Required Python Packages/Libraries:*

* NumPy
* PySide
* qtpy

Since SHARPpy requires the qtpy and Numpy packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. qtpy can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in macOS/Linux and Command Prompt in Windows) and typing:

.. prompt:: bash

conda install -c conda-forge pyside2

* PySide2
* requests
* python-dateutil

Since SHARPpy requires these packages, you will need to install them. If you choose to use the Anaconda distribution, Numpy comes installed by default. PySide, requests, and python-dateutil can be installed through the Anaconda package manager that comes with the Anaconda distribution by opening up your command line program (Terminal in macOS/Linux and Command Prompt in Windows) and typing:

.. prompt:: bash

conda install -c conda-forge pyside=1.2.4 requests python-dateutil
conda install -c conda-forge requests python-dateutil
>>>>>>> andover

After installing all the required Python packages for SHARPpy, you now can install the SHARPpy package to your computer. You'll need to download it to your computer first and open up a command line prompt. You can download it as a ZIP file (link on the right) or clone the Git respository (you will need the git program) into a directory on your computer by typing this into your command line:

Expand Down
10 changes: 6 additions & 4 deletions environment.yml
@@ -1,21 +1,23 @@
name: devel
channels:
- conda-forge/label/testing
- conda-forge
- conda-forge/label/testing
- anaconda
dependencies:
- python=3
- numpy=1.15.*
- pyside
- pyside2=5.13.*
- sphinx
- pytest
- sphinx-gallery
- qtpy
- sphinx_rtd_theme
#- sphinx-gallery
#Sphinx-Gallery removed because it requires matplotlib/pyqt and conflicts with pyside2's Qt version
- requests
- python-dateutil
- pyinstaller
- setuptools
- pip
- pip:
- sphinx-prompt
- pydocstyle

0 comments on commit c7b80c1

Please sign in to comment.