Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

44 changes: 38 additions & 6 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
# Docs ref: https://docs.codecov.io/docs/codecovyml-reference
# Validation check: $ curl --data-binary @codecov.yml https://codecov.io/validate


codecov:
token: 057953e4-d263-41c0-913c-5d45c0371df9
bot: "codecov-io"
strict_yaml_branch: "yaml-config"
require_ci_to_pass: yes
notify:
wait_for_ci: yes

coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: auto
threshold: 0.01
patch: false
base: auto # target to compare against
target: auto # target "X%" coverage to hit on project
threshold: 1% # allow this much decrease from base
if_ci_failed: error
patch:
default:
base: auto # target to compare against
target: 50% # target "X%" coverage to hit on patch
# threshold: 50% # allow this much decrease on patch
changes: false

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

# https://docs.codecov.io/docs/ignoring-paths
ignore:
- "ot/externals/"
- "ot/gpu/"

# https://docs.codecov.io/docs/pull-request-comments
comment:
layout: "header, diff, sunburst, uncovered"
layout: header, diff, sunburst, uncovered
behavior: default
codecov:
token: 057953e4-d263-41c0-913c-5d45c0371df9
require_changes: true # if true: only post the comment if coverage changes
124 changes: 60 additions & 64 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
from codecs import open
from os import path
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
import re
import os
import sys
import re
import subprocess
import sys

here = path.abspath(path.dirname(__file__))
from setuptools import find_packages, setup
from setuptools.extension import Extension

import numpy
from Cython.Build import cythonize


# dirty but working
Expand All @@ -21,73 +19,71 @@
# The beautiful part is, I don't even need to check exceptions here.
# If something messes up, let the build process fail noisy, BEFORE my release!

# thanks Pipy for handling markdown now
# thanks PyPI for handling markdown now
ROOT = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(ROOT, 'README.md'), encoding="utf-8") as f:
README = f.read()

opt_arg = ["-O3"]
opt_args = ["-O3"]

# clean cython output is clean is called
if 'clean' in sys.argv[1:]:
if os.path.isfile('ot/lp/emd_wrap.cpp'):
os.remove('ot/lp/emd_wrap.cpp')


# add platform dependant optional compilation argument
if sys.platform.startswith('darwin'):
opt_arg.append("-stdlib=libc++")
opt_args.append("-stdlib=libc++")
sdk_path = subprocess.check_output(['xcrun', '--show-sdk-path'])
os.environ['CFLAGS'] = '-isysroot "{}"'.format(sdk_path.rstrip().decode("utf-8"))

setup(name='POT',
version=__version__,
description='Python Optimal Transport Library',
long_description=README,
long_description_content_type='text/markdown',
author=u'Remi Flamary, Nicolas Courty',
author_email='remi.flamary@gmail.com, ncourty@gmail.com',
url='https://github.com/PythonOT/POT',
packages=find_packages(),
ext_modules=cythonize(Extension(
"ot.lp.emd_wrap", # the extension name
sources=["ot/lp/emd_wrap.pyx", "ot/lp/EMD_wrapper.cpp"], # the Cython source and
# additional C++ source files
language="c++", # generate and compile C++ code,
include_dirs=[numpy.get_include(), os.path.join(ROOT, 'ot/lp')],
extra_compile_args=opt_arg
)),
platforms=['linux', 'macosx', 'windows'],
download_url='https://github.com/PythonOT/POT/archive/{}.tar.gz'.format(__version__),
license='MIT',
scripts=[],
data_files=[],
setup_requires=["numpy>=1.16", "cython>=0.23"],
install_requires=["numpy>=1.16", "scipy>=1.0"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Environment :: Console',
'Operating System :: OS Independent',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: C++',
'Programming Language :: C',
'Programming Language :: Cython',
'Topic :: Utilities',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Information Analysis',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)
setup(
name='POT',
version=__version__,
description='Python Optimal Transport Library',
long_description=README,
long_description_content_type='text/markdown',
author=u'Remi Flamary, Nicolas Courty',
author_email='remi.flamary@gmail.com, ncourty@gmail.com',
url='https://github.com/PythonOT/POT',
packages=find_packages(),
ext_modules=cythonize(Extension(
name="ot.lp.emd_wrap",
sources=["ot/lp/emd_wrap.pyx", "ot/lp/EMD_wrapper.cpp"], # cython/c++ src files
language="c++",
include_dirs=[numpy.get_include(), os.path.join(ROOT, 'ot/lp')],
extra_compile_args=opt_args,
)),
platforms=['linux', 'macosx', 'windows'],
download_url='https://github.com/PythonOT/POT/archive/{}.tar.gz'.format(__version__),
license='MIT',
scripts=[],
data_files=[],
setup_requires=["numpy>=1.16", "cython>=0.23"],
install_requires=["numpy>=1.16", "scipy>=1.0"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Environment :: Console',
'Operating System :: OS Independent',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: C++',
'Programming Language :: C',
'Programming Language :: Cython',
'Topic :: Utilities',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Information Analysis',
'Programming Language :: Python :: 2',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 2 should be removed

'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)