Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,8 @@ test: ...@@ -9,7 +9,8 @@ test:
stage: test stage: test
script: script:
- export PYTHONPATH="/usr/local/lib64/python2.7/site-packages:/usr/local/lib/python2.7/site-packages" - 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 install
- python setup.py test - python setup.py test
# As a temporary measure # As a temporary measure
...@@ -30,7 +31,7 @@ pages: ...@@ -30,7 +31,7 @@ pages:
# Build receipe for standalone wheels on Linux # Build receipe for standalone wheels on Linux
build:wheel: wheel:
stage: build stage: build
script: script:
- pip install wheel - pip install wheel
...@@ -40,23 +41,21 @@ build:wheel: ...@@ -40,23 +41,21 @@ build:wheel:
artifacts: artifacts:
expire_in: 3h expire_in: 3h
paths: paths:
- wheelhouse - dist
deploy:wheel:
stage: deploy
# deploy:wheel: script:
# stage: deploy - pip install twine
# image: containers.ligo.org/lscsoft/lalsuite-manylinux:master - twine upload dist/*
# script: artifacts:
# - /opt/python/cp36-cp36m/bin/pip install twine expire_in: 3h
# - /opt/python/cp36-cp36m/bin/twine upload wheelhouse/* paths:
- dist
# artifacts: only:
# expire_in: 3h - master
# paths: #only:
# - wheelhouse # - tags
# only: # except:
# - master@lscsoft/lalsuite # - pushes
# except: # - web
# - pushes \ No newline at end of file
# - web
\ No newline at end of file
...@@ -603,7 +603,7 @@ class Frame(): ...@@ -603,7 +603,7 @@ class Frame():
# Loop through each interferometer # Loop through each interferometer
for ifo in self.ifos: for ifo in self.ifos:
# Calculate the number of samples in the timeseries # Calculate the number of samples in the timeseries
nsamp = (self.end-self.start)*rate nsamp = int((self.end-self.start)*rate)
# Make the timeseries # Make the timeseries
h_resp = lal.CreateREAL8TimeSeries("inj time series", epoch, 0, 1.0/rate, lal.StrainUnit, nsamp) 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 # Loop over all of the injections corresponding to this frame
......
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from setuptools.command.build_ext import build_ext as _build_ext
try: try:
from setuptools import setup from setuptools import setup
...@@ -14,27 +15,37 @@ with open('README.rst') as readme_file: ...@@ -14,27 +15,37 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file: with open('HISTORY.rst') as history_file:
history = history_file.read() history = history_file.read()
requirements = [ # see https://stackoverflow.com/a/21621689/1862861 for why this is here
'numpy', class build_ext(_build_ext):
'matplotlib', def finalize_options(self):
'pandas', _build_ext.finalize_options(self)
'scipy', # 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',
'setuptools_scm'
] ]
with open("requirements.txt") as requires_file:
requirements = requires_file.read().split("\n")
test_requirements = [ test_requirements = [
"py", "py",
"pytest", "pytest",
"coverage" "coverage"
# TODO: put package test requirements here
] ]
setup( setup(
name='minke', name='minke',
version='1.0.1', version='1.0.1',
use_scm_version=True,
description="Minke is a Python package to produce Mock Data Challenge data sets for LIGO interferometers.", description="Minke is a Python package to produce Mock Data Challenge data sets for LIGO interferometers.",
long_description=readme + '\n\n' + history, long_description=readme + '\n\n' + history,
author="Daniel Williams", author="Daniel Williams",
author_email='d.williams.2@research.gla.ac.uk', author_email='daniel.williams@ligo.org',
url='https://github.com/transientlunatic/minke', url='https://github.com/transientlunatic/minke',
packages=[ packages=[
'minke', 'minke',
...@@ -42,6 +53,7 @@ setup( ...@@ -42,6 +53,7 @@ setup(
package_dir={'minke': package_dir={'minke':
'minke'}, 'minke'},
include_package_data=True, include_package_data=True,
setup_requires = setup_requirements,
install_requires=requirements, install_requires=requirements,
license="ISCL", license="ISCL",
zip_safe=False, zip_safe=False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment