Commit 4384cc59 authored by Ruxandra Cojocaru's avatar Ruxandra Cojocaru

Restructured project. Modified setup.py to follow crispy example. Added...

Restructured project. Modified setup.py to follow crispy example. Added LICENSE.txt and requirements.txt
parent e5adeeee
The MIT License (MIT)
Copyright (c) 2016-2018 European Synchrotron Radiation Facility
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# List all dependencies of swarp
# Requires pip >= 8.0
numpy
cv2
scipy
matplotlib>1.0
mpltoolkits
pil
h5py
joblib
configobj
......@@ -21,61 +21,112 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Setup file written by R. Cojocaru, starting July 2018.
"""
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
__license__ = 'MIT'
__copyright__ = 'European Synchrotron Radiation Facility, Grenoble, France'
__date__ = '31/07/2018'
import os
from setuptools import setup
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
### Metadata
name='SWaRP',
version='1.0.0',
description='x-ray speckle tracking WaveFront Reconstruction Software',
long_description=read('README.rst'),
url='https://gitlab.esrf.fr/cojocaru/PUCCAwfrs',
download_url='https://gitlab.esrf.fr/cojocaru/PUCCAwfrs',
license='MIT',
author='Ruxandra Cojocaru, Sebastien Berujon',
author_email='cojocaru@esrf.fr, sebastien.berujon@esrf.fr',
maintainer='DAU',
maintainer_email='DAU email?',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Physics',
],
### Dependencies
install_requires = ['numpy',
'cv2'
'scipy',
'matplotlib>1.0',
'mpltoolkits',
'pil',
'h5py',
'joblib',
'configobj',
]
#~ dependency_links=[
#~ 'git+https://github.com/Turbo87/utm.git@v0.3.1#egg=utm-0.3.1',
#~ ],
### Contents
packages==['SWaRP'],
scripts=[
'wavefront.py',
'detectordistortion.py',
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def get_readme():
_dir = os.path.dirname(os.path.abspath(__file__))
long_description = ''
with open(os.path.join(_dir, 'README.md')) as f:
for line in f:
if 'main_window' not in line:
long_description += line
return long_description
def get_version():
from swarp import version
return version.strictversion
def install_requires():
with open('requirements.txt') as fp:
install_requires = fp.readlines()
return install_requires
def main():
"""The main entry point."""
if sys.version_info < (2, 7):
sys.exit('swarp requires at least Python 2.7')
#~ elif sys.version_info[0] == 3 and sys.version_info < (3, 4):
#~ sys.exit('swarp requires at least Python 3.4')
kwargs = dict(
name='swarp',
version=get_version(),
description='x-ray Speckle tracking WAveFront Reconstruction Package',
long_description=read('README.md'),
license='MIT',
author='Ruxandra Cojocaru, Sebastien Berujon',
author_email='cojocaru@esrf.fr, sebastien.berujon@esrf.fr',
url='https://gitlab.esrf.fr/cojocaru/swarp',
download_url='https://gitlab.esrf.fr/cojocaru/swarp',
keywords='wavefront, speckle, x-ray, synchrotron',
install_requires=install_requires(),
platforms=[
'MacOS :: MacOS X',
'Microsoft :: Windows',
'POSIX :: Linux',
],
provides=['igor ({})'.format(__version__)],
)
packages=[
'swarp',
'swarp.resources',
'swarp.tests',
],
package_data={
'swarp.resources': [
'gui/uis/*.ui',
'gui/uis/quanty/*.ui',
'gui/icons/*.svg',
'modules/quanty/parameters/*.json.gz',
'modules/quanty/templates/*.lua',
],
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: X11 Applications :: Qt',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering :: Physics',
]
)
# At the moment pip/setuptools doesn't play nice with shebang paths
# containing white spaces.
# See: https://github.com/pypa/pip/issues/2783
# https://github.com/xonsh/xonsh/issues/879
# The most straight forward workaround is to have a .bat script to run
# swarp on Windows.
if 'win32' in sys.platform:
kwargs['scripts'] = ['scripts/swarp.bat']
else:
kwargs['scripts'] = ['scripts/swarp']
setup(**kwargs)
if __name__ == '__main__':
main()
......@@ -4,7 +4,7 @@
Written by R. Cojocaru, starting November 2016
Based on Matlab code by S. Berujon
Copyright (C) 2018 European Synchrotron Radiation Facility
Copyright (C) 2016-2018 European Synchrotron Radiation Facility
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
......
......@@ -2,7 +2,7 @@
Written by R. Cojocaru, November 2016; Updated January 2017
Based on Matlab code by S. Berujon
Copyright (C) 2018 European Synchrotron Radiation Facility
Copyright (C) 2016-2018 European Synchrotron Radiation Facility
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
......
""" Unit tests
Copyright (C) 2016-2018 European Synchrotron Radiation Facility
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
__license__ = 'MIT'
__copyright__ = 'European Synchrotron Radiation Facility, Grenoble, France'
__date__ = '13/08/2018'
import unittest
import numpy as np
import func
......
......@@ -5,7 +5,7 @@
Written by R. Cojocaru, starting Feb. 2017
Based on a Matlab script by S. Berujon
Copyright (C) 2018 European Synchrotron Radiation Facility
Copyright (C) 2016-2018 European Synchrotron Radiation Facility
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment