Skip to content

Commit

Permalink
Merge latest master into aainv
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Apr 30, 2020
2 parents 6df8c88 + b5f12be commit 886b5fc
Show file tree
Hide file tree
Showing 278 changed files with 29,514 additions and 15,399 deletions.
63 changes: 54 additions & 9 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
build: off

environment:
PYTHON_VERSION: 3.6
MINICONDA: C:\\Miniconda36-x64
PYTHON_VERSION: 3.8
MINICONDA: C:\\Miniconda37-x64

matrix:
- TEST_FILES: "tests\\ --ignore=tests\\test_actionAngleTorus.py --ignore=tests\\test_snapshotpotential.py --ignore=tests\\test_qdf.py --ignore=tests\\test_pv2qdf.py --ignore=tests\\test_diskdf.py --ignore=tests\\test_orbit.py --ignore=tests\\test_streamdf.py --ignore=tests\\test_streamgapdf.py --ignore=tests\\test_evolveddiskdf.py --ignore=tests\\test_quantity.py --ignore=tests\\test_nemo.py --ignore=tests\\test_coords.py"
ADDL_CONDA_PKGS:
- TEST_FILES: tests\test_orbit.py tests\test_orbits.py
ADDL_CONDA_PKGS: astropy astroquery
COMPILE_NOOPENMP:
BUILD_WHEELS: "true"

- TEST_FILES: tests\test_orbit.py
ADDL_CONDA_PKGS: astropy astroquery
COMPILE_NOOPENMP: "--no-openmp"
- TEST_FILES: "tests\\ --ignore=tests\\test_actionAngleTorus.py --ignore=tests\\test_snapshotpotential.py --ignore=tests\\test_qdf.py --ignore=tests\\test_pv2qdf.py --ignore=tests\\test_diskdf.py --ignore=tests\\test_orbit.py --ignore=tests\\test_orbits.py --ignore=tests\\test_streamdf.py --ignore=tests\\test_streamgapdf.py --ignore=tests\\test_evolveddiskdf.py --ignore=tests\\test_quantity.py --ignore=tests\\test_nemo.py --ignore=tests\\test_amuse.py --ignore=tests\\test_coords.py"
ADDL_CONDA_PKGS:
COMPILE_NOOPENMP:
BUILD_WHEELS: "false"

- TEST_FILES: tests\test_quantity.py tests\test_coords.py
ADDL_CONDA_PKGS: astropy
COMPILE_NOOPENMP: "--no-openmp"
BUILD_WHEELS: "false"

platform:
- x64
Expand All @@ -25,10 +28,9 @@ install:
- cmd: conda.exe update --yes --quiet conda
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda config --append channels astropy
- "conda create -n test-environment python=%PYTHON_VERSION% numpy scipy matplotlib setuptools pip cython>=0.20 pytest gsl %ADDL_CONDA_PKGS%"
- "conda create -n test-environment python=%PYTHON_VERSION% numpy scipy matplotlib numexpr setuptools pip cython>=0.20 pytest gsl %ADDL_CONDA_PKGS%"
- activate test-environment
- pip install coverage
- pip install pytest-cov
Expand All @@ -43,3 +45,46 @@ install:

test_script:
- pytest -v %TEST_FILES% --cov galpy --cov-config .coveragerc_travis --disable-pytest-warnings

after_test:
# Build wheels for different python versions of BUILD_WHEELS, otherwise done
- ps: |
if ($env:BUILD_WHEELS -eq "false") {
Exit-AppVeyorBuild
}
- conda deactivate
- conda remove --name test-environment --all
# Python 3.8
- conda create -n py38 python=3.8 numpy scipy matplotlib setuptools pip pytest gsl
- conda activate py38
- pip install wheel
- set INCLUDE=%CONDA_PREFIX%\Library\include;%INCLUDE%
- set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
- set LIBPATH=%CONDA_PREFIX%\Library\lib;%LIBPATH%
- python setup.py bdist_wheel
- conda deactivate
# Python 3.7
- conda create -n py37 python=3.7 numpy scipy matplotlib setuptools pip pytest gsl
- conda activate py37
- conda remove --name py38 --all
- pip install wheel
- set INCLUDE=%CONDA_PREFIX%\Library\include;%INCLUDE%
- set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
- set LIBPATH=%CONDA_PREFIX%\Library\lib;%LIBPATH%
- python setup.py bdist_wheel
- conda deactivate
# Python 3.6
- conda create -n py36 python=3.6 numpy scipy matplotlib setuptools pip pytest gsl
- conda activate py36
- conda remove --name py37 --all
- pip install wheel
- set INCLUDE=%CONDA_PREFIX%\Library\include;%INCLUDE%
- set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
- set LIBPATH=%CONDA_PREFIX%\Library\lib;%LIBPATH%
- python setup.py bdist_wheel
- conda deactivate
# Upload as artifacts
- ps: |
if ($env:BUILD_WHEELS -eq "true") {
Get-ChildItem dist\*.whl | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}
26 changes: 26 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[bumpversion]
current_version = 1.7.0.dev0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
serialize =
{major}.{minor}.{patch}.{release}{dev}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = gamma
values =
dev
gamma

[bumpversion:part:dev]

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:galpy/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

[bumpversion:file:doc/source/conf.py]
search = version = '{current_version}'
replace = version = '{new_version}'
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude_lines =

omit =
galpy/snapshot/*
galpy/potential/amuse.py
galpy/util/bovy_plot.py
galpy/util/bovy_ars.py
galpy/util/multi.py
Expand Down
1 change: 1 addition & 0 deletions .coveragerc_travis
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude_lines =

omit =
galpy/snapshot/*
galpy/potential/amuse.py
galpy/util/bovy_plot.py
galpy/util/bovy_ars.py
galpy/util/multi.py
Expand Down
11 changes: 11 additions & 0 deletions .github/conda-build-environment-macos-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: galpywheels
channels:
- conda-forge
dependencies:
- numpy
- scipy
- matplotlib
- setuptools
- conda-forge::gsl
- conda-forge::compilers
- conda-forge::llvm-openmp
10 changes: 10 additions & 0 deletions .github/conda-build-environment-windows-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: galpywheels
channels:
- conda-forge
dependencies:
- numpy
- scipy
- matplotlib
- setuptools
- conda-forge::gsl
- anaconda::intel-openmp
18 changes: 18 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. If the
issue has been resolved since the last activity, please close the issue.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
16 changes: 16 additions & 0 deletions .github/workflows/actions/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

yum -y install gsl-devel

PYTHON_VERSIONS=("cp35-cp35m" "cp36-cp36m" "cp37-cp37m" "cp38-cp38")

for PYTHON_VERSION in ${PYTHON_VERSIONS[@]}; do
/opt/python/${PYTHON_VERSION}/bin/pip install --upgrade pip
/opt/python/${PYTHON_VERSION}/bin/pip install -U wheel auditwheel
/opt/python/${PYTHON_VERSION}/bin/python setup.py bdist_wheel -d wheelhouse
done

for whl in /github/workspace/wheelhouse/*.whl; do
auditwheel repair $whl
rm $whl
done
7 changes: 7 additions & 0 deletions .github/workflows/actions/manylinux2014_x86_64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'build wheels with manylinux2014_x86_64'
description: 'build wheels with manylinux2014_x86_64'
runs:
using: 'docker'
image: docker://quay.io/pypa/manylinux2014_x86_64
args:
- .github/workflows/actions/entrypoint.sh
94 changes: 94 additions & 0 deletions .github/workflows/build_macosx_windows_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build Mac OS X & Windows wheels and upload to PyPI upon release

# Update on every push and PR to master, and upon release creation
on:
push:
branches:
- master
paths-ignore:
- 'doc/**'
pull_request:
branches:
- master
paths-ignore:
- 'doc/**'
release:
types: [created]

jobs:
build:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest,windows-latest]
python-version: [3.5,3.6,3.7, 3.8]
exclude:
- os: windows-latest
python-version: 3.5
steps:
# check-out this repository
- uses: actions/checkout@v2
# Install Miniconda, as specificed by this repository's environment.yml
- uses: goanpeca/setup-miniconda@v1
with:
activate-environment: galpywheels
environment-file: .github/conda-build-environment-${{ matrix.os }}.yml
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install wheel
- name: Set environment variables on Mac OS
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: |
echo ::set-env name=CFLAGS::-I$CONDA_PREFIX/include
echo ::set-env name=LDFLAGS::-I$CONDA_PREFIX/lib
echo ::set-env name=LD_LIBRARY_PATH::-I$CONDA_PREFIX/lib
- name: Set environment variables on Windows
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: |
echo ::set-env name=INCLUDE::$CONDA_PREFIX\\Library\\include
echo ::set-env name=LIB::$CONDA_PREFIX\\Library\\lib
echo ::set-env name=LIBPATH::$CONDA_PREFIX\\Library\\lib
- name: Build extension
shell: bash -l {0}
run: |
mkdir wheelhouse
python setup.py build_ext
- name: Build wheel
shell: bash -l {0}
run: python setup.py bdist_wheel -d wheelhouse
# Upload wheel as artifact
- uses: actions/upload-artifact@v2-preview
with:
name: galpy-wheel-python-${{ matrix.python-version }}-${{ matrix.os }}
path: wheelhouse/*.whl
# We need to run on Ubuntu for pypa/gh-action-pypi-publish action
# so might as well also combine
combine:
name: Combine wheels into single artifact and upload to PyPI upon release
needs: build
runs-on: ubuntu-latest
steps:
- run: |
mkdir tmp_wheelhouse
mkdir wheelhouse
- uses: actions/download-artifact@v2-preview
with:
path: tmp_wheelhouse/
- run: find tmp_wheelhouse/ -mindepth 2 -type f -exec mv -i '{}' wheelhouse/ ';'
- uses: actions/upload-artifact@v2-preview
with:
name: galpy-wheels-macos-windows-latest
path: wheelhouse/*.whl
# Upload to PyPI if this is a release
- name: Publish distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
packages_dir: wheelhouse/
36 changes: 36 additions & 0 deletions .github/workflows/build_manylinux_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build manylinux wheels, upload to PyPI upon release

# Update on every push or PR to master (except when only docs) and upon releases
on:
push:
branches:
- master
paths-ignore:
- 'doc/**'
pull_request:
branches:
- master
paths-ignore:
- 'doc/**'
release:
types: [created]

jobs:
build:
name: Build manylinux wheels, upload to PyPI upon release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build manylinux2014_x86_64 wheels
uses: ./.github/workflows/actions/manylinux2014_x86_64/
- uses: actions/upload-artifact@v2-preview
with:
name: galpy-wheels-manylinux
path: wheelhouse/*manylinux*.whl
# Upload to PyPI if this is a release
- name: Publish distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
packages_dir: wheelhouse/
30 changes: 30 additions & 0 deletions .github/workflows/build_sdist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build source directory for release

on:
release:
types: [created]

jobs:
build:
name: Build source directory for release
runs-on: ubuntu-latest
steps:
# check-out this repository
- uses: actions/checkout@v2
# Setup python
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
# Install the GSL (necessary to properly include the C files)
- name: Install GSL
shell: bash -l {0}
run: sudo apt-get install -y libgsl0-dev
- name: Build sdist
shell: bash -l {0}
run: python setup.py sdist
# Upload to PyPI if this is a release
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.o
*.so
*.pyc
*.pyd

# Packages #
############
Expand Down

0 comments on commit 886b5fc

Please sign in to comment.