Verified Commit 1d8256f6 authored by Daniel Williams's avatar Daniel Williams
Browse files

Added some more small enhancements, SCM versioning, and pypi autodeploy from...

Added some more small enhancements, SCM versioning, and pypi autodeploy from master to test warehouse.
parent ffb72b3e
Loading
Loading
Loading
Loading
+20 −21
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ test:
  stage: test
  script:
    - export PYTHONPATH="/usr/local/lib64/python2.7/site-packages:/usr/local/lib/python2.7/site-packages"
    - pip install pandas numpy
    - echo "pandas" > requirements.txt
    - pip install -r requirements.txt
    - python setup.py install
    - python setup.py test
  # As a temporary measure
@@ -30,7 +31,7 @@ pages:


# Build receipe for standalone wheels on Linux
build:wheel:
wheel:
  stage: build
  script:
    - pip install wheel
@@ -40,23 +41,21 @@ build:wheel:
  artifacts:
    expire_in: 3h
    paths:
      - wheelhouse
      - dist



# deploy:wheel:
#    stage: deploy
#    image: containers.ligo.org/lscsoft/lalsuite-manylinux:master
#    script:
#     - /opt/python/cp36-cp36m/bin/pip install twine	
#     - /opt/python/cp36-cp36m/bin/twine upload wheelhouse/*

#   artifacts:
#     expire_in: 3h
#     paths:
#       - wheelhouse
deploy:wheel:
   stage: deploy
   script:
    - pip install twine
    - twine upload dist/*
  artifacts:
    expire_in: 3h
    paths:
      - dist
  only:
    - master
  #only:
#     - master@lscsoft/lalsuite
  #  - tags
  # except:
  #   - pushes
  #   - web
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -603,7 +603,7 @@ class Frame():
            # Loop through each interferometer
            for ifo in self.ifos:
                # Calculate the number of samples in the timeseries
                nsamp = (self.end-self.start)*rate
                nsamp = int((self.end-self.start)*rate)
                # Make the timeseries
                h_resp = lal.CreateREAL8TimeSeries("inj time series", epoch, 0, 1.0/rate, lal.StrainUnit, nsamp)
                # Loop over all of the injections corresponding to this frame
+0 −3
Original line number Diff line number Diff line
numpy
scipy
matplotlib
pandas
+19 −7
Original line number Diff line number Diff line
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools.command.build_ext import build_ext as _build_ext

try:
    from setuptools import setup
@@ -14,27 +15,37 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file:
    history = history_file.read()

requirements = [
# see https://stackoverflow.com/a/21621689/1862861 for why this is here
class build_ext(_build_ext):
    def finalize_options(self):
        _build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        self.include_dirs.append(numpy.get_include())

setup_requirements = [
    'numpy',
   'matplotlib',
   'pandas',
   'scipy',
    'setuptools_scm'
]

with open("requirements.txt") as requires_file:
    requirements = requires_file.read().split("\n")

test_requirements = [
    "py",
    "pytest",
    "coverage"
    # TODO: put package test requirements here
]

setup(
    name='minke',
    version='1.0.1',
    use_scm_version=True,
    description="Minke is a Python package to produce Mock Data Challenge data sets for LIGO interferometers.",
    long_description=readme + '\n\n' + history,
    author="Daniel Williams",
    author_email='d.williams.2@research.gla.ac.uk',
    author_email='daniel.williams@ligo.org',
    url='https://github.com/transientlunatic/minke',
    packages=[
        'minke',
@@ -42,6 +53,7 @@ setup(
    package_dir={'minke':
                 'minke'},
    include_package_data=True,
    setup_requires = setup_requirements,
    install_requires=requirements,
    license="ISCL",
    zip_safe=False,