-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
645 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[settings] | ||
line_length=79 | ||
multi_line_output=3 | ||
known_third_party = h5py,matplotlib,numpy,pytest,scipy,setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v1.9.2 | ||
hooks: | ||
- id: seed-isort-config | ||
args: [--application-directories=src] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.20 | ||
hooks: | ||
- id: isort | ||
args: [] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.6 | ||
|
||
- repo: https://github.com/dfm/black_nbconvert | ||
rev: v0.1.1 | ||
hooks: | ||
- id: black_nbconvert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include README.rst LICENSE HISTORY.rst AUTHORS.rst | ||
include LICENSE *.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[build-system] | ||
requires = ["setuptools>=40.6.0", "wheel", "setuptools_scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
line-length = 79 | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,72 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
#!/usr/bin/env python | ||
|
||
# Inspired by: | ||
# https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ | ||
|
||
import codecs | ||
import os | ||
import sys | ||
from setuptools import setup | ||
|
||
if sys.argv[-1] == "publish": | ||
os.system("python setup.py sdist; twine upload dist/*") | ||
sys.exit() | ||
|
||
# Hackishly inject a constant into builtins to enable importing of the | ||
# package before all the dependencies are built. | ||
if sys.version_info[0] < 3: | ||
import __builtin__ as builtins | ||
else: | ||
import builtins | ||
builtins.__EMCEE_SETUP__ = True | ||
import emcee # NOQA | ||
|
||
setup( | ||
name="emcee", | ||
version=emcee.__version__, | ||
author="Daniel Foreman-Mackey", | ||
author_email="[email protected]", | ||
packages=[ | ||
"emcee", | ||
"emcee.moves", "emcee.backends", | ||
"emcee.tests", "emcee.tests.unit", "emcee.tests.integration", | ||
], | ||
url="http://emcee.readthedocs.io", | ||
license="MIT", | ||
description=("The Python ensemble sampling toolkit for affine-invariant " | ||
"MCMC"), | ||
long_description=open("README.rst").read(), | ||
package_data={"": ["LICENSE", "AUTHORS.rst"]}, | ||
include_package_data=True, | ||
install_requires=["numpy"], | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
], | ||
zip_safe=True, | ||
) | ||
import re | ||
|
||
from setuptools import find_packages, setup | ||
|
||
# PROJECT SPECIFIC | ||
|
||
NAME = "emcee" | ||
PACKAGES = find_packages(where="src") | ||
META_PATH = os.path.join("src", "emcee", "__init__.py") | ||
CLASSIFIERS = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
] | ||
INSTALL_REQUIRES = ["numpy"] | ||
|
||
# END PROJECT SPECIFIC | ||
|
||
|
||
HERE = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
|
||
def read(*parts): | ||
with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f: | ||
return f.read() | ||
|
||
|
||
def find_meta(meta, meta_file=read(META_PATH)): | ||
meta_match = re.search( | ||
r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), meta_file, re.M | ||
) | ||
if meta_match: | ||
return meta_match.group(1) | ||
raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) | ||
|
||
|
||
if __name__ == "__main__": | ||
setup( | ||
name=NAME, | ||
use_scm_version={ | ||
"write_to": os.path.join( | ||
"src", NAME, "{0}_version.py".format(NAME) | ||
), | ||
"write_to_template": '__version__ = "{version}"\n', | ||
}, | ||
author=find_meta("author"), | ||
author_email=find_meta("email"), | ||
maintainer=find_meta("author"), | ||
maintainer_email=find_meta("email"), | ||
url=find_meta("uri"), | ||
license=find_meta("license"), | ||
description=find_meta("description"), | ||
long_description=read("README.rst"), | ||
long_description_content_type="text/x-rst", | ||
packages=PACKAGES, | ||
package_dir={"": "src"}, | ||
include_package_data=True, | ||
install_requires=INSTALL_REQUIRES, | ||
classifiers=CLASSIFIERS, | ||
zip_safe=False, | ||
options={"bdist_wheel": {"universal": "1"}}, | ||
) |
Oops, something went wrong.