commit
stringlengths 40
40
| subject
stringlengths 1
3.25k
| old_file
stringlengths 4
311
| new_file
stringlengths 4
311
| old_contents
stringlengths 0
26.3k
| lang
stringclasses 3
values | proba
float64 0
1
| diff
stringlengths 0
7.82k
|
|---|---|---|---|---|---|---|---|
d8e4fc0ed36ce76c98f8aff630b8073322fbb2e3
|
version bump [ci skip]
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = ['numpy', 'xarray', 'netcdf4']
tests_require = ['pytest', 'nose', 'coveralls', 'flake8', 'mypy']
setup(name='pyrinex',
packages=find_packages(),
description='Python RINEX 2/3 NAV/OBS reader that is very fast',
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
author='Michael Hirsch, Ph.D.',
version='1.3.0',
url='https://github.com/scivision/pyrinex',
install_requires=install_requires,
tests_require=tests_require,
python_requires='>=3.6',
extras_require={'plot': ['matplotlib', 'seaborn', 'pymap3d'],
'tests': tests_require, },
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Atmospheric Science',
],
scripts=['ReadRinex.py'],
include_package_data=True,
)
|
Python
| 0
|
@@ -462,16 +462,17 @@
n='1.3.0
+r
',%0A
|
ae3ca278293982818b17bfaf61f7f61538411198
|
Fix env tests
|
tests/environment/testenv.py
|
tests/environment/testenv.py
|
import os
import subprocess
import sys
makeenvout = subprocess.Popen('cd ../../environment; make clean; make all', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8')
if "Error 1" in makeenvout:
print('Environment build failed. Make output:\n#######################################################')
print(makeenvout + '\n#######################################################')
sys.exit(1)
else:
print('Environment build succeeded.')
# Assume all is well.
isGood = True
# Build starter packages (where necessary)
makecppout = subprocess.Popen('cd ../../airesources/C++; g++ MyBot.cpp -std=c++11 -o MyBot', stderr=subprocess.PIPE, shell = True).stderr.read().decode('utf-8')
if "error" in makecppout:
print('C++ starter package build failed. Build output:\n#######################################################')
print(makecppout + '\n#######################################################')
isGood = False
else:
print('C++ starter package build succeeded.')
makejavaout = subprocess.Popen('cd ../../airesources/Java; javac MyBot.java', stderr=subprocess.PIPE, shell = True).stderr.read().decode('utf-8')
if "error" in makejavaout:
print('Java starter package build failed. Build output:\n#######################################################')
print(makejavaout + '\n#######################################################')
isGood = False
else:
print('Java starter package build succeeded.')
makerustout = subprocess.Popen('cd ../../airesources/Rust; cargo build --release', stderr=subprocess.PIPE, shell = True).stderr.read().decode('utf-8')
if "error" in makerustout:
print('Rust starter package build failed. Build output:\n#######################################################')
print(makerustout + '\n#######################################################')
isGood = False
else:
print('Rust starter package build succeeded.')
# Do scala eventually.
# Ensures that the environment can run a basic game where a bot wins. Confirm that the bot expected to win does indeed win.
genlines = subprocess.Popen('../../environment/environment -d "10 10" -q "python3 ModBot.py" "python3 ModBot.py" -s 1001', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8').split('\n')
if genlines[3].split()[1] != "1" or genlines[4].split()[1] != "2" or genlines[5] != " " or genlines[6] != " ":
print('General environment test failed. Environment output:\n#######################################################')
print('\n'.join(genlines) + '\n#######################################################')
isGood = False
else:
print('General environment test succeeded.')
# Ensures that the environment can run a basic game where a bot wins. Confirm that the bot expected to win does indeed win.
splines = subprocess.Popen('../../environment/environment -d "10 10" -q "../../airesources/C++/MyBot" "cd ../../airesources/Java; java MyBot" "python3 ../../airesources/Python/MyBot.py" "../../airesources/Rust/target/release/MyBot" -s 1000', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8').split('\n')
if splines[9] != " " or splines[10] != " ":
print('Starter package test failed. Environment output:\n#######################################################')
print('\n'.join(splines) + '\n#######################################################')
isGood = False
else:
print('Starter package test succeeded.')
# Ensures that tie evaluation is correct. Confirm that the bot expected to win does indeed win.
tielines = subprocess.Popen('../../environment/environment -d "10 10" -q "python3 ModBot.py" "python3 ModBot.py" -s 998', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8').split('\n')
if tielines[3].split()[1] != "2" or tielines[4].split()[1] != "1" or tielines[5] != " " or tielines[6] != " ":
print('Tie evaluation test failed. Environment output:\n#######################################################')
print('\n'.join(tielines) + '\n#######################################################')
isGood = False
else:
print('Tie evaluation test succeeded.')
# Ensures that all timeouts work well.
timelines = subprocess.Popen('../../environment/environment -d "20 20" -q "python3 FailInitBot.py" "python3 TimeoutInitBot.py" "python3 Fail10Bot.py" "python3 Timeout10Bot.py" "python3 ModBot.py" -s 998', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8').split('\n')
if timelines[6].split()[1] != "5" or timelines[7].split()[1] != "4" or timelines[8].split()[1] != "3" or timelines[9].split()[1] != "2" or timelines[10].split()[1] != "1" or timelines[11] != "1 2 3 4 ":
print('Timeout evaluation test failed. Environment output:\n#######################################################')
print('\n'.join(timelines) + '\n#######################################################')
isGood = False
else:
print('Timeout evaluation test succeeded.')
# Output (in human form) the result of the tests.
if(isGood):
print('All environment tests succeeded.')
else:
print('Environment tests failed.')
sys.exit(1 - int(isGood))
|
Python
| 0.000003
|
@@ -2109,35 +2109,30 @@
environment/
-environment
+halite
-d %2210 10%22
@@ -2832,35 +2832,30 @@
environment/
-environment
+halite
-d %2210 10%22
@@ -3572,35 +3572,30 @@
environment/
-environment
+halite
-d %2210 10%22
@@ -4205,27 +4205,22 @@
ronment/
-environment
+halite
-d %2220
|
98c6d3c3b53f3409677fab5e234c096790386a1c
|
Prepare openprocurement.auth 1.0.0.dev8.
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import os
version = '1.0.0.dev7'
setup(name='openprocurement.auth',
version=version,
description="",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
],
keywords='',
author='Quintagroup, Ltd.',
author_email='info@quintagroup.com',
license='Apache License 2.0',
url='https://github.com/openprocurement/openprocurement.auth',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['openprocurement'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'Flask',
'Flask-SQLAlchemy',
'werkzeug',
'Flask-OAuthlib'
],
entry_points={
'paste.app_factory': [
'oauth_provider = openprocurement.auth.provider:make_oath_provider_app'
]
},
)
|
Python
| 0
|
@@ -72,9 +72,9 @@
.dev
-7
+8
'%0A%0As
|
5709801ddb760480a5643064af49f723f2f38898
|
Fix for easy_install
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
setup(
name='django-generic-images',
version='0.11b',
author='Mikhail Korobov',
author_email='kmike84@gmail.com',
url='http://bitbucket.org/kmike/django-generic-images/',
description = 'Generic images pluggable django app',
long_description = "This app provides image model (with useful managers etc) that can be attached to any other Django model using generic relations. ",
license = 'MIT license',
packages=['generic_images', 'generic_utils'],
package_data={'generic_images': ['locale/en/LC_MESSAGES/*','locale/ru/LC_MESSAGES/*']},
classifiers=(
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Natural Language :: Russian',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules'
),
)
|
Python
| 0
|
@@ -114,10 +114,9 @@
'0.1
-1b
+2
',%0A
|
425a384436ff4c9d3521755aadc2b37f583729c6
|
fix link
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import io
def read_all(f):
with io.open(f, encoding="utf-8") as I:
return I.read()
requirements = list(map(str.strip, open("requirements.txt").readlines()))
setup(
name='redisgraph',
version='2.1.2',
description='RedisGraph Python Client',
long_description=read_all("README.md"),
long_description_content_type='text/markdown',
url='https://github.com/redislabs/redisgraph-py',
packages=find_packages(),
install_requires=requirements,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Topic :: Database'
],
keywords='Redis Graph Extension',
author='RedisLabs',
author_email='oss@redislabs.com'
)
|
Python
| 0
|
@@ -429,25 +429,26 @@
hub.com/
-r
+R
edis
-labs
+Graph
/redisgr
|
4d6fdc98fd681a78eeeff6041efdfe7107a9743c
|
Set new minimum pytz version
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import account
setup(
name="django-user-accounts",
version=account.__version__,
author="Brian Rosner",
author_email="brosner@gmail.com",
description="a Django user account app",
long_description=open("README.rst").read(),
license="MIT",
url="http://github.com/pinax/django-user-accounts",
packages=find_packages(),
install_requires=[
"django-appconf>=0.6",
"pytz>=2013.9"
],
zip_safe=False,
package_data={
"account": [
"locale/*/LC_MESSAGES/*",
],
},
test_suite="runtests.runtests",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Framework :: Django",
]
)
|
Python
| 0
|
@@ -467,11 +467,11 @@
=201
-3.9
+5.6
%22%0A
|
2f09db445fae93c7db51493ca34e53cc9ce1b51f
|
Bump version: 0.0.21 → 0.0.22
|
setup.py
|
setup.py
|
# /setup.py
#
# Installation and setup script for travis-bump-version
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for travis-bump-version."""
from setuptools import find_packages
from setuptools import setup
setup(name="travis-bump-version",
version="0.0.21",
description="Bump version files on travis builds",
long_description_markdown_filename="README.md",
author="Sam Spilsbury",
author_email="smspillaz@gmail.com",
url="http://github.com/polysquare/travis-runner",
classifiers=["Development Status :: 3 - Alpha",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License"],
license="MIT",
keywords="development linters",
packages=find_packages(exclude=["tests"]),
install_requires=["pyaml", "bumpversion"],
extras_require={
"green": ["nose-parameterized",
"testtools",
"six",
"setuptools-green"],
"polysquarelint": ["polysquare-setuptools-lint>=0.0.21"],
"upload": ["setuptools-markdown"]
},
entry_points={
"console_scripts": [
"travis-bump-version=travisbumpversion.main:main"
]
},
test_suite="nose.collector",
zip_safe=True,
include_package_data=True)
|
Python
| 0
|
@@ -292,17 +292,17 @@
n=%220.0.2
-1
+2
%22,%0A
@@ -1574,17 +1574,17 @@
t%3E=0.0.2
-1
+2
%22%5D,%0A
|
4d43c39fb5aaac3b9822349f678484fbfb2ce6fe
|
Update classifiers in setup.py Remove python3.3 version from classifiers list
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = '\n' + f.read()
about = {}
with open(os.path.join(here, "pipenv", "__version__.py")) as f:
exec (f.read(), about)
if sys.argv[-1] == "publish":
os.system("python setup.py sdist bdist_wheel upload")
sys.exit()
required = [
'pip>=9.0.1',
'certifi',
'setuptools>=36.2.1',
'virtualenv-clone>=0.2.5',
'virtualenv',
'requests[security];python_version<"2.7"',
'ordereddict;python_version<"2.7"',
]
# https://pypi.python.org/pypi/stdeb/0.8.5#quickstart-2-just-tell-me-the-fastest-way-to-make-a-deb
class DebCommand(Command):
"""Support for setup.py deb"""
description = 'Build and publish the .deb package.'
user_options = []
@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.status('Removing previous builds…')
rmtree(os.path.join(here, 'deb_dist'))
except FileNotFoundError:
pass
self.status(u'Creating debian mainfest…')
os.system(
'python setup.py --command-packages=stdeb.command sdist_dsc -z artful --package3=pipenv --depends3=python3-virtualenv-clone'
)
self.status(u'Building .deb…')
os.chdir('deb_dist/pipenv-{0}'.format(about['__version__']))
os.system('dpkg-buildpackage -rfakeroot -uc -us')
class UploadCommand(Command):
"""Support setup.py publish."""
description = 'Build and publish the package.'
user_options = []
@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.status('Removing previous builds…')
rmtree(os.path.join(here, 'dist'))
except FileNotFoundError:
pass
self.status('Building Source distribution…')
os.system('{0} setup.py sdist bdist_wheel'.format(sys.executable))
self.status('Uploading the package to PyPi via Twine…')
os.system('twine upload dist/*')
self.status('Pushing git tags…')
os.system('git tag v{0}'.format(about['__version__']))
os.system('git push --tags')
sys.exit()
setup(
name='pipenv',
version=about['__version__'],
description='Python Development Workflow for Humans.',
long_description=long_description,
author='Kenneth Reitz',
author_email='me@kennethreitz.org',
url='https://github.com/pypa/pipenv',
packages=find_packages(exclude=['tests', 'tasks']),
entry_points={
'console_scripts': [
'pipenv=pipenv:cli',
'pewtwo=pipenv.patched.pew.pew:pew',
'pipenv-resolver=pipenv.resolver:main',
]
},
package_data={
'': ['LICENSE', 'NOTICES'],
"pipenv.vendor.requests": ["*.pem"],
"pipenv.vendor.certifi": ["*.pem"],
"pipenv.vendor.click_completion": ["*.j2"],
"pipenv.patched.notpip._vendor.certifi": ["*.pem"],
"pipenv.patched.notpip._vendor.requests": ["*.pem"],
"pipenv.patched.notpip._vendor.distlib._backport": ["sysconfig.cfg"],
"pipenv.patched.notpip._vendor.distlib": ["t32.exe", "t64.exe", "w32.exe", "w64.exe"],
},
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
install_requires=required,
extras_require={},
include_package_data=True,
license='MIT',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
cmdclass={'upload': UploadCommand, 'deb': DebCommand},
)
|
Python
| 0.000001
|
@@ -4093,57 +4093,8 @@
3',%0A
- 'Programming Language :: Python :: 3.3',%0A
|
7a16f5f6258b304596a7c5a175de2a6e4828eed1
|
Fix bug in automatic generation of the API docs that was not working. Thanks to Chris Burns for review.
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import sys
import os
import zipfile
from nipy import __doc__
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
# The quiet=True option will silence all of the name setting warnings:
# Ignoring attempt to set 'name' (from 'nipy.core' to
# 'nipy.core.image')
# Robert Kern recommends setting quiet=True on the numpy list, stating
# these messages are probably only used in debugging numpy distutils.
config.get_version('nipy/version.py') # sets config.version
config.add_subpackage('nipy', 'nipy')
return config
################################################################################
# For some commands, use setuptools
if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb',
'bdist_wininst', 'install_egg_info', 'egg_info', 'easy_install',
)).intersection(sys.argv)) > 0:
from setup_egg import extra_setuptools_args
# extra_setuptools_args is injected by the setupegg.py script, for
# running the setup with setuptools.
if not 'extra_setuptools_args' in globals():
extra_setuptools_args = dict()
################################################################################
# Extra command class, for building and shipping documentation
################################################################################
try:
from sphinx.setup_command import BuildDoc
from distutils.cmd import Command
##############################################################################
# Code to force the API generation
class APIDocs(Command):
description = \
""" Generate API docs """
user_options = [
('None', None, 'this command has no options'),
]
def run(self):
os.chdir('doc')
try:
os.system('%s ../tools/build_modref_templates.py'
% sys.executable)
finally:
os.chdir('..')
def initialize_options(self):
pass
def finalize_options(self):
pass
##############################################################################
# Code to build the docs
class MyBuildDoc(BuildDoc):
def run(self):
if not os.path.exists(os.path.join('doc', 'api', 'generated')):
APIDocs.run(self)
# We need to be in the doc directory for to plot_directive to
# work
os.chdir('doc')
try:
BuildDoc.run(self)
finally:
os.chdir('..')
##############################################################################
# Code to copy the sphinx-generated html docs in the distribution.
DOC_BUILD_DIR = os.path.join('build', 'sphinx', 'html')
def relative_path(filename):
""" Return the relative path to the file, assuming the file is
in the DOC_BUILD_DIR directory.
"""
length = len(os.path.abspath(DOC_BUILD_DIR)) + 1
return os.path.abspath(filename)[length:]
class ZipHelp(Command):
description = \
""" Zip the help created by the build_sphinx, and put it in the
source distribution. """
user_options = [
('None', None, 'this command has no options'),
]
def run(self):
if not os.path.exists(DOC_BUILD_DIR):
raise OSError, 'Doc directory does not exist.'
target_file = os.path.join('doc', 'documentation.zip')
# ZIP_DEFLATED actually compresses the archive. However, there
# will be a RuntimeError if zlib is not installed, so we check
# for it. ZIP_STORED produces an uncompressed zip, but does not
# require zlib.
try:
zf = zipfile.ZipFile(target_file, 'w',
compression=zipfile.ZIP_DEFLATED)
except RuntimeError:
zf = zipfile.ZipFile(target_file, 'w',
compression=zipfile.ZIP_STORED)
for root, dirs, files in os.walk(DOC_BUILD_DIR):
relative = relative_path(root)
if not relative.startswith('.doctrees'):
for f in files:
zf.write(os.path.join(root, f),
os.path.join(relative, 'html_docs', f))
zf.close()
def initialize_options(self):
pass
def finalize_options(self):
pass
cmdclass = {'zip_help': ZipHelp,
'build_sphinx': MyBuildDoc,
'api_docs': APIDocs,
}
except ImportError:
""" Fail gracefully if sphinx is not installed """
print "Sphinx is not installed, docs cannot be built"
cmdclass = {}
################################################################################
def main(**extra_args):
from numpy.distutils.core import setup
setup( name = 'nipy',
description = 'This is a neuroimaging python package',
author = 'Various',
author_email = 'nipy-devel@neuroimaging.scipy.org',
url = 'http://neuroimaging.scipy.org',
long_description = __doc__,
configuration = configuration,
cmdclass = cmdclass,
**extra_args)
if __name__ == "__main__":
main(**extra_setuptools_args)
|
Python
| 0
|
@@ -2615,32 +2615,193 @@
def run(self):%0A
+ # We need to be in the doc directory for to plot_directive%0A # and API generation to work%0A os.chdir('doc')%0A try:%0A
if n
@@ -2831,23 +2831,16 @@
th.join(
-'doc',
'api', '
@@ -2873,100 +2873,86 @@
-APIDocs.run(self)%0A # We need to be in the doc directory for to plot_directive to%0A
+ os.system('%25s ../tools/build_modref_templates.py' %0A
@@ -2963,15 +2963,10 @@
-# work%0A
+
@@ -2977,40 +2977,32 @@
-os.chdir('doc')%0A try:
+ %25 sys.executable)
%0A
|
0936621b0a4162589560cc112f4f8e4425fed652
|
Change to semantic version number
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name = "django-ajax-utilities",
url = 'https://github.com/citylive/django-ajax-utilities',
license = 'BSD',
description = "Pagination, xhr and tabbing utilities for the Django framework.",
long_description = open('README','r').read(),
author = 'Jonathan Slenders, City Live nv',
packages = find_packages('src'),
package_data = {'django_ajax': [
'static/*.js', 'static/*/*.js', 'static/*/*/*.js',
'static/*.css', 'static/*/*.css', 'static/*/*/*.css',
'static/*.png', 'static/*/*.png', 'static/*/*/*.png', 'static/*/*/*/*.png',
'static/*.gif', 'static/*/*.gif', 'static/*/*/*.gif', 'static/*/*/*/*.gif',
'templates/*.html', 'templates/*/*.html', 'templates/*/*/*.html'
],},
zip_safe=False, # Don't create egg files, Django cannot find templates in egg files.
include_package_data=True,
package_dir = {'': 'src'},
classifiers = [
'Intended Audience :: Developers',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Environment :: Web Environment',
'Framework :: Django',
],
)
|
Python
| 0.000586
|
@@ -81,16 +81,39 @@
ities%22,%0A
+ version = '1.2.0',%0A
url
|
356a5264ac62408289703eaf46598a9d5bc8a34d
|
add some more paths
|
setup.py
|
setup.py
|
from distutils.core import setup, Extension
from glob import glob
import time
mod = Extension(
'musicplayer',
sources = glob("*.cpp"),
depends = glob("*.h") + glob("*.hpp"),
extra_compile_args = ["--std=c++11"],
undef_macros = ['NDEBUG'],
libraries = [
'avutil',
'avformat',
'avcodec',
'swresample',
'portaudio',
'chromaprint'
]
)
setup(
name = 'musicplayer',
version = time.strftime("1.%Y%m%d.%H%M%S", time.gmtime()),
description = 'Music player core Python module',
author = 'Albert Zeyer',
author_email = 'albzey@gmail.com',
url = 'https://github.com/albertz/music-player-core',
license = '2-clause BSD license',
long_description = open('README.rst').read(),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: C++',
'Programming Language :: Python',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Multimedia :: Sound/Audio :: Analysis',
'Topic :: Multimedia :: Sound/Audio :: Players',
'Topic :: Multimedia :: Sound/Audio :: Players :: MP3',
'Topic :: Software Development :: Libraries :: Python Modules',
],
ext_modules = [mod]
)
|
Python
| 0
|
@@ -72,16 +72,21 @@
ort time
+, sys
%0A%0Amod =
@@ -354,16 +354,475 @@
%09%09%5D%0A%09)%0A%0A
+# Add some more include/lib paths.%0A# Note: This should probably cover already a lot of cases.%0A# However, if this is not enough, get some more inspiration from here:%0A# https://github.com/python-imaging/Pillow/blob/master/setup.py%0Adef addPrefix(prefix):%0A%09mod.include_dirs += %5Bprefix + %22/include%22%5D%0A%09mod.library_dirs += %5Bprefix + %22/lib%22%5D%0AaddPrefix(%22/usr/local%22)%0AaddPrefix(%22/opt/local%22) # e.g. MacPorts%0Aif sys.platform == %22darwin%22: addPrefix(%22/sw%22) # fink dir%0A%0A%0A
setup(%0A%09
|
426d7d622306d4f6b0ca2805b4abe63b0fac66df
|
Fix setup info
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup package."""
from setuptools import setup, find_packages
import os
import imp
import traceback
def get_version():
"""Get version and version_info without importing the entire module."""
devstatus = {
'alpha': '3 - Alpha',
'beta': '4 - Beta',
'candidate': '4 - Beta',
'final': '5 - Production/Stable'
}
path = os.path.join(os.path.dirname(__file__), 'wcmatch')
fp, pathname, desc = imp.find_module('__version__', [path])
try:
v = imp.load_module('__version__', fp, pathname, desc)
return v.version, devstatus[v.version_info[3]]
except Exception:
print(traceback.format_exc())
finally:
fp.close()
def get_requirements(req):
"""Load list of dependencies."""
install_requires = []
with open(req) as f:
for line in f:
if not line.startswith("#"):
install_requires.append(line.strip())
return install_requires
def get_description():
"""Get long description."""
with open("README.md", 'r') as f:
desc = f.read()
return desc
VER, DEVSTATUS = get_version()
setup(
name='wcmatch',
python_requires=">=3.4",
version=VER,
keywords='grep search find',
description='Wildcard file name matcher.',
long_description=get_description(),
long_description_content_type='text/markdown',
author='Isaac Muse',
author_email='Isaac.Muse@gmail.com',
url='https://github.com/facelessuser/wcmatch',
packages=find_packages(exclude=['tests', 'tools']),
setup_requires=get_requirements("requirements/setup.txt"),
zip_safe=False,
license='MIT License',
classifiers=[
'Development Status :: %s' % DEVSTATUS,
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
Python
| 0
|
@@ -1267,19 +1267,27 @@
s='g
-rep
+lob fnmatch
search
find
@@ -1282,19 +1282,23 @@
search
-fin
+wildcar
d',%0A
@@ -1318,16 +1318,21 @@
Wildcard
+/glob
file na
@@ -1676,28 +1676,8 @@
%22),%0A
- zip_safe=False,%0A
|
e241ddd88bfe861eec4f995ae142fd68b646e89b
|
Update for newer version
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-theherk-updates',
version='1.2',
packages=find_packages(),
include_package_data=True,
license='see file LICENSE',
description='Django app for tracking and displaying updates.',
long_description=read('README.md'),
url='https://github.com/theherk/django-theherk-updates',
author='Adam Sherwood',
author_email='theherk@gmail.com',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
|
Python
| 0
|
@@ -195,17 +195,19 @@
sion='1.
-2
+3.0
',%0A p
@@ -455,24 +455,42 @@
herk-updates
+/archive/1.3.0.zip
',%0A autho
|
680311f8663abe4f496850296e1ee434679a8135
|
Bump version to 0.2.2
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mayo',
version='0.2.1',
description='Thin wrapper around source control systems',
long_description=read("README"),
author='Michael Williamson',
author_email='mike@zwobble.org',
url='http://github.com/mwilliamson/mayo',
scripts=["scripts/mayo"],
packages=['mayo'],
install_requires=["argparse==1.2.1", "catchy>=0.2,<0.3"],
keywords="source control vcs scm git mercurial hg",
)
|
Python
| 0.000002
|
@@ -190,17 +190,17 @@
on='0.2.
-1
+2
',%0A d
|
b84cd656dddf9d43acda9b826bc013d71ec2c590
|
Use uuid.getnode() to generate consistent install id (#380)
|
setup.py
|
setup.py
|
"""
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import os
import shutil
import sys
import uuid
from setuptools import setup
from setuptools.command.install import install
import bzt
class InstallWithHook(install, object):
"""
Command adding post-install hook to setup
"""
def run(self):
"""
Do the command's job!
"""
install.run(self)
self.__hook()
def __hook(self):
dirname = bzt.get_configs_dir()
sys.stdout.write("[%s] Creating %s\n" % (bzt.VERSION, dirname))
if not os.path.exists(dirname):
os.makedirs(dirname)
src = os.path.join(os.path.dirname(__file__), "bzt", "10-base.json")
sys.stdout.write("Copying %s to %s\n" % (src, dirname))
shutil.copy(src, dirname + os.path.sep)
sys.stdout.write("Generating install-id\n")
install_id = os.path.join(dirname, '99-installID.yml')
if not os.path.exists(install_id):
with open(install_id, 'w') as fhd:
fhd.write("---\ninstall-id: %s" % uuid.uuid4())
setup(
name="bzt",
version=bzt.VERSION,
description='Taurus Tool for Continuous Testing',
author='Andrey Pokhilko',
author_email='andrey@blazemeter.com',
url='http://gettaurus.org/',
download_url='http://gettaurus.org/docs/DeveloperGuide/#Python-Egg-Snapshots',
license='Apache 2.0',
platform='any',
docs_url='http://gettaurus.org/',
install_requires=[
'pyyaml', 'psutil > 3', 'colorlog', 'colorama', 'lxml == 3.6.0',
'cssselect', 'urwid', 'six', 'nose',
'selenium', 'progressbar33', 'pyvirtualdisplay', 'requests', ],
packages=['bzt', 'bzt.six', 'bzt.modules', 'bzt.resources'],
entry_points={
'console_scripts': [
'bzt=bzt.cli:main',
'jmx2yaml=bzt.jmx2yaml:main'
],
},
include_package_data=True,
package_data={
"bzt": [],
},
cmdclass={"install": InstallWithHook}
)
|
Python
| 0
|
@@ -1565,17 +1565,17 @@
ll-id: %25
-s
+x
%22 %25 uuid
@@ -1579,13 +1579,15 @@
uid.
-uuid4
+getnode
())%0A
|
9712dd202f4fe5ee3938dbea987ced267a5199e5
|
Change version to v0.3.2. Release Notes: fix the incorrect attribute accessing in class Option.
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.3.0',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhaproxy': ['*.peg'],
},
author='Joey',
author_email='majunjiev@gmail.com',
url='https://github.com/imjoey/pyhaproxy',
packages=find_packages(),
platforms='any',
)
|
Python
| 0
|
@@ -84,17 +84,17 @@
on='0.3.
-0
+2
',%0A k
|
a3d35fbbb6650a467f7ffe0abb651c51c2781c98
|
update setup version for 0.7.19
|
setup.py
|
setup.py
|
from setuptools import setup
from setuptools.command.sdist import sdist
import subprocess
class TitoDist(sdist):
def run(self):
subprocess.call(["tito", "build", "--tgz", "-o", "."])
def get_requirements(requirements_file='requirements.txt'):
with open(requirements_file) as f:
return [
line.split('#')[0].rstrip()
for line in f.readlines()
if not line.startswith('#')
]
setup(
name="koji-containerbuild",
version="0.7.5",
author="Pavol Babincak",
author_email="pbabinca@redhat.com",
description="Container build support for Koji buildsystem",
license="LGPLv2+",
url="https://github.com/containerbuildsystem/koji-containerbuild",
packages=[
'koji_containerbuild',
'koji_containerbuild.plugins',
],
install_requires=get_requirements(),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Internet",
"License :: OSI Approved :: GNU Lesser General Public License v2"
" or later (LGPLv2+)",
],
cmdclass={
'sdist': TitoDist,
}
)
|
Python
| 0
|
@@ -502,9 +502,10 @@
0.7.
-5
+19
%22,%0A
|
482b38eca84e82a8e3390613e3a7a17f708a8e71
|
add a regression test
|
tests/py/test_charts_json.py
|
tests/py/test_charts_json.py
|
from __future__ import absolute_import, division, print_function, unicode_literals
import datetime
import json
from mock import patch
from gittip.billing.payday import Payday
from gittip.testing import Harness
def today():
return datetime.datetime.utcnow().date().strftime('%Y-%m-%d')
class TestChartsJson(Harness):
def setUp(self):
Harness.setUp(self)
self.alice = self.make_participant('alice', claimed_time='now')
self.bob = self.make_participant('bob', claimed_time='now')
self.carl = self.make_participant('carl', claimed_time='now')
self.make_exchange('bill', 10, 0, self.alice)
self.make_exchange('bill', 10, 0, self.bob)
self.make_participant('notactive', claimed_time='now')
self.alice.set_tip_to(self.carl, '1.00')
self.bob.set_tip_to(self.carl, '2.00')
def run_payday(self):
with patch.object(Payday, 'fetch_card_holds') as fch:
fch.return_value = {}
Payday.start().run()
def test_no_payday_returns_empty_list(self):
assert json.loads(self.client.GET('/carl/charts.json').body) == []
def test_zeroth_payday_is_ignored(self):
self.run_payday() # zeroeth
assert json.loads(self.client.GET('/carl/charts.json').body) == []
def test_first_payday_comes_through(self):
self.run_payday() # zeroeth, ignored
self.run_payday() # first
expected = [ { "date": today()
, "npatrons": 2
, "receipts": 3.00
}
]
actual = json.loads(self.client.GET('/carl/charts.json').body)
assert actual == expected
def test_second_payday_comes_through(self):
self.run_payday() # zeroth, ignored
self.run_payday() # first
self.alice.set_tip_to(self.carl, '5.00')
self.bob.set_tip_to(self.carl, '0.00')
self.run_payday() # second
expected = [ { "date": today()
, "npatrons": 1 # most recent first
, "receipts": 5.00
}
, { "date": today()
, "npatrons": 2
, "receipts": 3.00
}
]
actual = json.loads(self.client.GET('/carl/charts.json').body)
assert actual == expected
def test_sandwiched_tipless_payday_comes_through(self):
self.run_payday() # zeroth, ignored
self.run_payday() # first
# Oops! Sorry, Carl. :-(
self.alice.set_tip_to(self.carl, '0.00')
self.bob.set_tip_to(self.carl, '0.00')
self.run_payday() # second
# Bouncing back ...
self.alice.set_tip_to(self.carl, '5.00')
self.run_payday() # third
expected = [ { "date": today()
, "npatrons": 1 # most recent first
, "receipts": 5.00
}
, { "date": today()
, "npatrons": 0
, "receipts": 0.00
}
, { "date": today()
, "npatrons": 2
, "receipts": 3.00
}
]
actual = json.loads(self.client.GET('/carl/charts.json').body)
assert actual == expected
def test_out_of_band_transfer_gets_included_with_prior_payday(self):
self.run_payday() # zeroth, ignored
self.run_payday() # first
self.run_payday() # second
# Do an out-of-band transfer.
self.db.run("UPDATE participants SET balance=balance - 4 WHERE username='alice'")
self.db.run("UPDATE participants SET balance=balance + 4 WHERE username='carl'")
self.db.run("INSERT INTO transfers (tipper, tippee, amount, context) "
"VALUES ('alice', 'carl', 4, 'tip')")
self.run_payday() # third
expected = [ { "date": today()
, "npatrons": 2 # most recent first
, "receipts": 3.00
}
, { "date": today()
, "npatrons": 3 # Since this is rare, don't worry that we double-count alice.
, "receipts": 7.00
}
, { "date": today()
, "npatrons": 2
, "receipts": 3.00
}
]
actual = json.loads(self.client.GET('/carl/charts.json').body)
assert actual == expected
def test_never_received_gives_empty_array(self):
self.run_payday() # zeroeth, ignored
self.run_payday() # first
self.run_payday() # second
self.run_payday() # third
expected = []
actual = json.loads(self.client.GET('/alice/charts.json').body)
assert actual == expected
def test_transfer_volume(self):
self.run_payday()
self.run_payday()
expected = { "date": today()
, "weekly_gifts": 3.0
, "charges": 0.0
, "withdrawals": 0.0
, "active_users": 3
, "total_users": 4
, "total_gifts": 6.0
}
actual = json.loads(self.client.GET('/about/charts.json').body)[0]
assert actual == expected
|
Python
| 0.000031
|
@@ -5404,28 +5404,435 @@
assert actual == expected%0A
+%0A def test_anonymous_receiver(self):%0A self.run_payday()%0A self.run_payday()%0A self.client.POST('/carl/anonymous.json',%0A %7B'toggle': 'receiving'%7D,%0A auth_as='carl')%0A%0A r = self.client.GxT('/carl/charts.json')%0A assert r.code == 401%0A%0A r = self.client.GxT('/carl/charts.json', auth_as='alice')%0A assert r.code == 403%0A
|
0112ec2ec3698834c36d56ab4d8b08628808e348
|
Bump version
|
setup.py
|
setup.py
|
import sys
import os.path
import setuptools
needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
REQUIREMENT_DIR = "requirements"
with open("README.rst") as fp:
long_description = fp.read()
with open(os.path.join("docs", "pages", "introduction", "summary.txt")) as f:
summary = f.read()
with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
install_requires = [line.strip() for line in f if line.strip()]
with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
tests_require = [line.strip() for line in f if line.strip()]
setuptools.setup(
name="pathvalidate",
version="0.5.2",
author="Tsuyoshi Hombashi",
author_email="gogogo.vm@gmail.com",
url="https://github.com/thombashi/pathvalidate",
keywords=["path", "validation", "validator", "sanitize"],
license="MIT License",
description=summary,
long_description=long_description,
include_package_data=True,
install_requires=install_requires,
packages=setuptools.find_packages(exclude=['test*']),
setup_requires=pytest_runner,
tests_require=tests_require,
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
|
Python
| 0
|
@@ -704,11 +704,11 @@
=%220.
-5.2
+6.0
%22,%0A
|
7afe49c3f10461d5f1344574edf136c7ff3f9e76
|
simplify bug reproduce
|
tests/python/test_dynamic.py
|
tests/python/test_dynamic.py
|
import taichi as ti
@ti.all_archs
def test_dynamic():
x = ti.var(ti.f32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
pass
for i in range(n):
x[i] = i
for i in range(n):
assert x[i] == i
@ti.all_archs
def test_dynamic2():
x = ti.var(ti.f32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
for i in range(n):
x[i] = i
func()
for i in range(n):
assert x[i] == i
# @ti.all_archs
def test_dynamic_matrix():
x = ti.Matrix(2, 1, dt=ti.i32)
n = 8192
@ti.layout
def place():
ti.root.dynamic(ti.i, n, chunk_size=16).place(x)
@ti.kernel
def func():
ti.serialize()
for i in range(n // 4):
x[i * 4][1, 0] = i
func()
for i in range(n // 4):
print('i', i)
print(x[i * 4][1, 0])
print(x[i * 4 + 1][1, 0])
assert x[i * 4][1, 0] == i
assert x[i * 4 + 1][1, 0] == 0
test_dynamic_matrix()
@ti.all_archs
def test_append():
x = ti.var(ti.i32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
for i in range(n):
ti.append(x, [], i)
func()
elements = []
for i in range(n):
elements.append(x[i])
elements.sort()
for i in range(n):
assert elements[i] == i
@ti.all_archs
def test_length():
x = ti.var(ti.i32)
y = ti.var(ti.f32, shape=())
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
for i in range(n):
ti.append(x, [], i)
func()
@ti.kernel
def get_len():
y[None] = ti.length(x, [])
get_len()
assert y[None] == n
@ti.all_archs
def test_append_ret_value():
if ti.get_os_name() == 'win':
return
x = ti.var(ti.i32)
y = ti.var(ti.i32)
z = ti.var(ti.i32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
ti.root.dynamic(ti.i, n, 32).place(y)
ti.root.dynamic(ti.i, n, 32).place(z)
@ti.kernel
def func():
for i in range(n):
u = ti.append(x, [], i)
y[u] = i + 1
z[u] = i + 3
func()
for i in range(n):
assert x[i] + 1 == y[i]
assert x[i] + 3 == z[i]
@ti.all_archs
def test_dense_dynamic():
if ti.get_os_name() == 'win':
return
n = 128
x = ti.var(ti.i32)
l = ti.var(ti.i32, shape=n)
@ti.layout
def place():
ti.root.dense(ti.i, n).dynamic(ti.j, n, 8).place(x)
@ti.kernel
def func():
ti.serialize()
for i in range(n):
for j in range(n):
ti.append(x, j, i)
for i in range(n):
l[i] = ti.length(x, i)
func()
for i in range(n):
assert l[i] == n
@ti.all_archs
def test_dense_dynamic_len():
if ti.get_os_name() == 'win':
return
n = 128
x = ti.var(ti.i32)
l = ti.var(ti.i32, shape=n)
@ti.layout
def place():
ti.root.dense(ti.i, n).dynamic(ti.j, n, 32).place(x)
@ti.kernel
def func():
for i in range(n):
l[i] = ti.length(x, i)
func()
for i in range(n):
assert l[i] == 0
|
Python
| 0.000026
|
@@ -611,12 +611,10 @@
n =
-8192
+16
%0A%0A
@@ -679,18 +679,17 @@
nk_size=
-16
+8
).place(
@@ -792,32 +792,51 @@
0%5D = i%0A%0A func()
+%0A %0A print('here')
%0A%0A for i in ran
@@ -863,12 +863,29 @@
t('i
+=
', i
+, ' i*4=', i * 4
)%0A
@@ -888,24 +888,29 @@
)%0A print(
+'a',
x%5Bi * 4%5D%5B1,
@@ -923,16 +923,21 @@
print(
+'b',
x%5Bi * 4
@@ -975,24 +975,49 @@
%5B1, 0%5D == i%0A
+ if i + 1 %3C n // 4:%0A
assert x
|
9212d6b8e303296c7e3c951192d89de78053d74d
|
Add pytools to install_requires.
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: latin-1 -*-
def get_config_schema():
from aksetup_helper import ConfigSchema, \
IncludeDir, LibraryDir, Libraries, BoostLibraries, \
Switch, StringListOption, make_boost_base_options
return ConfigSchema(make_boost_base_options() + [
Switch("USE_SILO", False, "Compile libsilo interface"),
BoostLibraries("python"),
IncludeDir("SILO", []),
LibraryDir("SILO", []),
Libraries("SILO", ["siloh5", "hdf5"]),
StringListOption("CXXFLAGS", [],
help="Any extra C++ compiler options to include"),
])
def main():
from aksetup_helper import hack_distutils, get_config, setup, \
PyUblasExtension
hack_distutils()
conf = get_config(get_config_schema())
INCLUDE_DIRS = conf["BOOST_INC_DIR"] \
LIBRARY_DIRS = conf["BOOST_LIB_DIR"]
LIBRARIES = conf["BOOST_PYTHON_LIBNAME"]
EXTRA_DEFINES = {}
EXTRA_INCLUDE_DIRS = []
EXTRA_LIBRARY_DIRS = []
EXTRA_LIBRARIES = []
ver_dic = {}
exec(compile(
open("pyvisfile/__init__.py").read(),
"pyvisfile/__init__.py", 'exec'), ver_dic)
requirements = []
ext_modules = []
if conf["USE_SILO"]:
EXTRA_DEFINES["USE_SILO"] = 1
EXTRA_INCLUDE_DIRS.extend(conf["SILO_INC_DIR"])
EXTRA_LIBRARY_DIRS.extend(conf["SILO_LIB_DIR"])
EXTRA_LIBRARIES.extend(conf["SILO_LIBNAME"])
ext_modules.append(PyUblasExtension("_internal",
["src/wrapper/wrap_silo.cpp"],
include_dirs=INCLUDE_DIRS + EXTRA_INCLUDE_DIRS,
library_dirs=LIBRARY_DIRS + EXTRA_LIBRARY_DIRS,
libraries=LIBRARIES + EXTRA_LIBRARIES,
extra_compile_args=conf["CXXFLAGS"],
define_macros=list(EXTRA_DEFINES.iteritems()),
))
requirements.append("PyUblas>=0.92.1")
setup(name="pyvisfile",
version=ver_dic["VERSION_TEXT"],
description="Large-scale Visualization Data Storage",
long_description="""
Pyvisfile allows you to write a variety of visualization file formats,
including
* `Kitware's <http://www.kitware.com>`_
`XML-style <http://www.vtk.org/VTK/help/documentation.html>`_
`Vtk <http://vtk.org>`_ data files.
* Silo visualization files, as
introduced by LLNL's
`MeshTV <https://wci.llnl.gov/codes/meshtv/>`_ and
more recently used by the
`VisIt <https://wci.llnl.gov/codes/visit/>`_
large-scale visualization program.
pyvisfiles supports many mesh geometries, such such as unstructured
and rectangular structured meshes, particle meshes, as well as
scalar and vector variables on them. In addition, pyvisfile allows the
semi-automatic writing of parallelization-segmented visualization files
in both Silo and Vtk formats. For Silo files, pyvisfile also
supports the writing of expressions as visualization variables.
pyvisfile can write Vtk files without any extra software installed.
To use pyvisfile to create Silo files, you need `libsilo
<https://wci.llnl.gov/codes/silo/>`_ as well as `Boost.Python
<http://www.boost.org>`_ and `PyUblas
<http://mathema.tician.de/software/pyublas>`_. To build
pyvisfile's Silo support, please refer to the `PyUblas
documentation <http://tiker.net/doc/pyublas>`_ for build
instructions first. Check the
`VisIt source page <https://wci.llnl.gov/codes/visit/source.html>`_
for the latest Silo source code.
""",
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Other Audience',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: C++',
'Programming Language :: Python',
'Topic :: Multimedia :: Graphics :: 3D Modeling',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries',
],
author=u"Andreas Kloeckner",
author_email="inform@tiker.net",
license="MIT",
url="http://mathema.tician.de/software/pyvisfile",
# dependencies
setup_requires=requirements,
install_requires=requirements,
packages=[
"pyvisfile",
"pyvisfile.silo",
"pyvisfile.vtk"
],
ext_package="pyvisfile.silo",
ext_modules=ext_modules,
zip_safe=False)
if __name__ == '__main__':
main()
|
Python
| 0
|
@@ -4858,32 +4858,96 @@
nstall_requires=
+%5B%0A %22pytools%3E=2013.2%22%0A %5D +
requirements,%0A%0A
|
3232f9c1a0cb864033e1fd62b3b8edffc1eca5ff
|
disable WIP sparse tests with multihreading
|
tests/python/test_dynamic.py
|
tests/python/test_dynamic.py
|
import taichi as ti
@ti.all_archs
def test_dynamic():
x = ti.var(ti.f32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
pass
for i in range(n):
x[i] = i
for i in range(n):
assert x[i] == i
@ti.all_archs
def test_dynamic2():
if ti.cfg.arch == ti.cuda:
return
x = ti.var(ti.f32)
n = 128
@ti.layout
def place():
ti.root.dynamic(ti.i, n, 32).place(x)
@ti.kernel
def func():
ti.serialize()
for i in range(n):
x[i] = i
func()
for i in range(n):
assert x[i] == i
@ti.all_archs
def test_dynamic_matrix():
if ti.cfg.arch == ti.cuda:
return
x = ti.Matrix(3, 2, dt=ti.f32)
n = 8192
@ti.layout
def place():
ti.root.dynamic(ti.i, n, chunk_size=128).place(x)
@ti.kernel
def func():
ti.serialize()
for i in range(n // 4):
x[i * 4][1, 0] = i
func()
for i in range(n // 4):
assert x[i * 4][1, 0] == i
assert x[i * 4 + 1][1, 0] == 0
|
Python
| 0
|
@@ -622,24 +622,33 @@
c_matrix():%0A
+ return%0A
if ti.cfg.
|
4625bc72cb942d9022928b2a4444fee769aef013
|
update version number
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name = 'kaggle',
version = '1.0.4',
description = 'Kaggle API',
long_description = 'Official API for https://www.kaggle.com, accessible using a command line tool implemented in Python. Beta release - Kaggle reserves the right to modify the API functionality currently offered.',
author = 'Kaggle',
author_email = 'support@kaggle.com',
url = 'https://github.com/Kaggle/kaggle-api',
keywords = ['Kaggle', 'API'],
entry_points = {
'console_scripts': [
'kaggle = kaggle.cli:main'
]
},
install_requires = ['urllib3 >= 1.15', 'six >= 1.10', 'certifi', 'python-dateutil'],
packages = find_packages(),
license = 'Apache 2.0'
)
|
Python
| 0.000002
|
@@ -89,9 +89,9 @@
1.0.
-4
+5
',%0A
|
782adff84ee7aaa3301a1c55e7afa30d27916816
|
Fix package versions.
|
setup.py
|
setup.py
|
# Copyright 2022 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Install script for setuptools."""
import imp # pylint: disable=deprecated-module
import setuptools
# Additional requirements for testing.
testing_require = [
'gym',
'gym[atari]',
'mock',
'pytest-xdist',
'pytype',
]
setuptools.setup(
name='enn_acme',
description=(
'ENN_ACME. '
'An interface for designing RL agents in Acme using the ENN library.'),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/deepmind/enn_acme',
author='DeepMind',
author_email='enn_acme-eng+os@google.com',
license='Apache License, Version 2.0',
# TODO(author1): Use LINT.IfChange(version) instead of imp.
version=imp.load_source('_metadata', 'enn_acme/_metadata.py').__version__,
keywords='probabilistic-inference python machine-learning',
packages=setuptools.find_packages(),
install_requires=[
'absl-py',
'bsuite',
'chex',
'dm-acme @ git+https://git@github.com/deepmind/acme',
'dm-env',
'dm-haiku',
'dm-launchpad==0.5.2',
'dm-reverb==0.7.2',
'dm-sonnet',
'enn @ git+https://git@github.com/deepmind/enn',
'jax',
'jaxlib',
'neural_testbed @ git+https://git@github.com/deepmind/neural_testbed',
'numpy',
'optax',
'pandas',
'pyarrow',
'rlax',
'requests',
'tensorflow==2.8.0',
'typing-extensions',
],
extras_require={
'testing': testing_require,
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
)
|
Python
| 0.000025
|
@@ -1691,51 +1691,15 @@
acme
- @ git+https://git@github.com/deepmind/acme
+==0.4.0
',%0A
@@ -1762,17 +1762,17 @@
ad==0.5.
-2
+0
',%0A
@@ -1790,17 +1790,17 @@
rb==0.7.
-2
+0
',%0A
@@ -2116,24 +2116,104 @@
ow==2.8.0',%0A
+ 'tensorflow-datasets==4.4.0',%0A 'tensorflow_probability==0.15.0',%0A
'typ
|
5eaf0275747827f65ac67ecd4f8dd5d05a650ee3
|
Remove low_cut
|
turbustat/statistics/mvc/mvc.py
|
turbustat/statistics/mvc/mvc.py
|
# Licensed under an MIT open source license - see LICENSE
import numpy as np
from numpy.fft import fft2, fftshift
from ..base_pspec2 import StatisticBase_PSpec2D
class MVC(StatisticBase_PSpec2D):
"""
Implementation of Modified Velocity Centroids (Lazarian & Esquivel, 03)
Parameters
----------
centroid : numpy.ndarray
Normalized first moment array.
moment0 : numpy.ndarray
Moment 0 array.
linewidth : numpy.ndarray
Normalized second moment array
header : FITS header
Header of any of the arrays. Used only to get the
spatial scale.
ang_units : bool, optional
When enabled, the frequencies are converted to 1/deg using the
given header.
"""
def __init__(self, centroid, moment0, linewidth, header, ang_units=False):
self.centroid = centroid
self.moment0 = moment0
self.linewidth = linewidth
self.ang_units = ang_units
# Get rid of nans.
self.centroid[np.isnan(self.centroid)] = np.nanmin(self.centroid)
self.moment0[np.isnan(self.moment0)] = np.nanmin(self.moment0)
self.linewidth[np.isnan(self.linewidth)] = np.nanmin(self.linewidth)
self.degperpix = np.abs(header["CDELT2"])
assert self.centroid.shape == self.moment0.shape
assert self.centroid.shape == self.linewidth.shape
self.shape = self.centroid.shape
self._ps1D_stddev = None
def compute_pspec(self):
'''
Compute the 2D power spectrum.
The quantity calculated here is the same as Equation 3 in Lazarian &
Esquivel (2003), but the inputted arrays are not in the same form as
described. We can, however, adjust for the use of normalized Centroids
and the linewidth.
An unnormalized centroid can be constructed by multiplying the centroid
array by the moment0. Velocity dispersion is the square of the
linewidth subtracted by the square of the normalized centroid.
'''
term1 = fft2(self.centroid*self.moment0)
term2 = np.power(self.linewidth, 2) + np.power(self.centroid, 2)
mvc_fft = term1 - term2 * fft2(self.moment0)
# Shift to the center
mvc_fft = fftshift(mvc_fft)
self._ps2D = np.abs(mvc_fft) ** 2.
def run(self, verbose=False, logspacing=True,
return_stddev=True, low_cut=None, high_cut=0.5):
'''
Full computation of MVC.
Parameters
----------
verbose: bool, optional
Enables plotting.
logspacing : bool, optional
Return logarithmically spaced bins for the lags.
return_stddev : bool, optional
Return the standard deviation in the 1D bins.
low_cut : float, optional
Low frequency cut off in frequencies used in the fitting.
high_cut : float, optional
High frequency cut off in frequencies used in the fitting.
'''
self.compute_pspec()
self.compute_radial_pspec(logspacing=logspacing,
return_stddev=return_stddev)
self.fit_pspec(low_cut=low_cut, high_cut=high_cut,
large_scale=0.5)
if verbose:
print self.fit.summary()
self.plot_fit(show=True, show_2D=True)
return self
class MVC_Distance(object):
"""
Distance metric for MVC.
Parameters
----------
data1 : dict
A dictionary containing the centroid, moment 0, and linewidth arrays
of a spectral cube. This output is created by Mask_and_Moments.to_dict.
The minimum expected keys are 'centroid', 'moment0' and 'linewidth'. If
weight_by_error is enabled, the dictionary should also contain the
error arrays, where the keys are the three above with '_error'
appended to the end.
data2 : dict
See data1.
fiducial_model : MVC
Computed MVC object. use to avoid recomputing.
weight_by_error : bool, optional
When enabled, the property arrays are weighted by the inverse
squared of the error arrays.
"""
def __init__(self, data1, data2, fiducial_model=None,
weight_by_error=False, ang_units=False):
# Create weighted or non-weighted versions
if weight_by_error:
centroid1 = data1["centroid"][0] * \
data1["centroid_error"][0] ** -2.
moment01 = data1["moment0"][0] * \
data1["moment0_error"][0] ** -2.
linewidth1 = data1["linewidth"][0] * \
data1["linewidth_error"][0] ** -2.
centroid2 = data2["centroid"][0] * \
data2["centroid_error"][0] ** -2.
moment02 = data2["moment0"][0] * \
data2["moment0_error"][0] ** -2.
linewidth2 = data2["linewidth"][0] * \
data2["linewidth_error"][0] ** -2.
else:
centroid1 = data1["centroid"][0]
moment01 = data1["moment0"][0]
linewidth1 = data1["linewidth"][0]
centroid2 = data2["centroid"][0]
moment02 = data2["moment0"][0]
linewidth2 = data2["linewidth"][0]
if fiducial_model is not None:
self.mvc1 = fiducial_model
else:
self.mvc1 = MVC(centroid1, moment01, linewidth1,
data1["centroid"][1], ang_units=ang_units)
self.mvc1.run(low_cut=low_cut)
self.mvc2 = MVC(centroid2, moment02, linewidth2,
data2["centroid"][1], ang_units=ang_units)
self.mvc2.run(low_cut=low_cut)
self.ang_units = ang_units
def distance_metric(self, low_cut=None, high_cut=0.5, verbose=False,
label1=None, label2=None):
'''
Implements the distance metric for 2 MVC transforms.
We fit the linear portion of the transform to represent the powerlaw
A linear model with an interaction term is fit to the two powerlaws.
The distance is the t-statistic of the interaction.
Parameters
----------
low_cut : int or float, optional
Set the cut-off for low spatial frequencies. Visually, below ~2
deviates from the power law (for the simulation set).
high_cut : int or float, optional
Set the cut-off for high spatial frequencies. Values beyond the
size of the root grid are found to have no meaningful contribution
verbose : bool, optional
Enables plotting.
label1 : str, optional
Object or region name for dataset1
label2 : str, optional
Object or region name for dataset2
'''
# Construct t-statistic
self.distance = \
np.abs((self.mvc1.slope - self.mvc2.slope) /
np.sqrt(self.mvc1.slope_err**2 +
self.mvc2.slope_err**2))
if verbose:
print self.mvc1.fit.summary()
print self.mvc2.fit.summary()
import matplotlib.pyplot as p
self.mvc1.plot_fit(show=False, color='b', label=label1, symbol='D')
self.mvc2.plot_fit(show=False, color='g', label=label2, symbol='o')
p.legend(loc='best')
p.show()
return self
|
Python
| 0.000009
|
@@ -5482,39 +5482,24 @@
lf.mvc1.run(
-low_cut=low_cut
)%0A%0A s
@@ -5635,31 +5635,16 @@
vc2.run(
-low_cut=low_cut
)%0A%0A
|
8e9c2ec76bdcd1711c525ef34c09413626a7ee95
|
remove python-daemon dependency
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import os
home = []
for path, subdirs, files in os.walk('vmmaster/home'):
path = path.replace('vmmaster/', '')
for name in files:
home.append(os.path.join(path, name))
setup(
name='vmmaster',
version='0.1',
description='Python KVM-based virtual machine environment system for selenium testing',
url='https://github.com/nwlunatic/vmmaster',
packages=find_packages(),
install_requires=[
"netifaces>=0.8",
"graypy==0.2.9",
"docopt==0.6.1",
"python-daemon==1.6"
],
scripts=['bin/vmmaster'],
package_data={
'vmmaster': home,
},
include_package_data=True,
data_files=[
# ('/etc/init', ['etc/init/vmmaster.conf']),
('/etc/init.d', ['etc/init.d/vmmaster'])
]
)
|
Python
| 0.00002
|
@@ -545,37 +545,8 @@
1%22,%0A
- %22python-daemon==1.6%22%0A
@@ -682,61 +682,8 @@
s=%5B%0A
- # ('/etc/init', %5B'etc/init/vmmaster.conf'%5D),%0A
|
06e95f36d335a2d3912fb288fff7d376bba5078f
|
Enforce double quotes for English sentences
|
setup.py
|
setup.py
|
import codecs
import os
import re
import setuptools
def find_version(*file_paths):
# Credits: https://packaging.python.org/single_source_version.
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, *file_paths), 'r', 'utf8') as f:
version_file = f.read()
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find the version string.")
setuptools.setup(
name='nani',
version=find_version('nani.py'),
description="An alternative approach to defining and viewing NumPy's "
"arrays",
keywords='nani numpy dtype view wrap',
license='MIT',
url='https://github.com/christophercrouzet/nani',
author='Christopher Crouzet',
author_email='christopher.crouzet@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
install_requires=['numpy'],
packages=[],
py_modules=['nani'],
include_package_data=True
)
|
Python
| 0.015519
|
@@ -848,17 +848,17 @@
author=
-'
+%22
Christop
@@ -868,17 +868,17 @@
Crouzet
-'
+%22
,%0A au
|
debc9387d5ca4787c0bd2d0fa454f3b5bed8bade
|
Fix first SQS test.
|
tests/sqs/test_connection.py
|
tests/sqs/test_connection.py
|
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# 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, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing 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 MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR 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.
"""
Some unit tests for the SQSConnection
"""
import unittest
import time
from boto.sqs.connection import SQSConnection
from boto.sqs.message import MHMessage
from boto.exception import SQSError
class SQSConnectionTest (unittest.TestCase):
def test_1_basic(self):
print '--- running SQSConnection tests ---'
c = SQSConnection()
rs = c.get_all_queues()
num_queues = 0
for q in rs:
num_queues += 1
# try illegal name
try:
queue = c.create_queue('bad_queue_name')
except SQSError:
pass
# now create one that should work and should be unique (i.e. a new one)
queue_name = 'test%d' % int(time.time())
timeout = 60
queue = c.create_queue(queue_name, timeout)
time.sleep(60)
rs = c.get_all_queues()
i = 0
for q in rs:
i += 1
assert i == num_queues+1
assert queue.count_slow() == 0
# check the visibility timeout
t = queue.get_timeout()
assert t == timeout, '%d != %d' % (t, timeout)
# now try to get queue attributes
a = q.get_attributes()
assert a.has_key('ApproximateNumberOfMessages')
assert a.has_key('VisibilityTimeout')
a = q.get_attributes('ApproximateNumberOfMessages')
assert a.has_key('ApproximateNumberOfMessages')
assert not a.has_key('VisibilityTimeout')
a = q.get_attributes('VisibilityTimeout')
assert not a.has_key('ApproximateNumberOfMessages')
assert a.has_key('VisibilityTimeout')
# now change the visibility timeout
timeout = 45
queue.set_timeout(timeout)
time.sleep(60)
t = queue.get_timeout()
assert t == timeout, '%d != %d' % (t, timeout)
# now add a message
message_body = 'This is a test\n'
message = queue.new_message(message_body)
queue.write(message)
time.sleep(60)
assert queue.count_slow() == 1
time.sleep(90)
# now read the message from the queue with a 10 second timeout
message = queue.read(visibility_timeout=10)
assert message
assert message.get_body() == message_body
# now immediately try another read, shouldn't find anything
message = queue.read()
assert message == None
# now wait 30 seconds and try again
time.sleep(30)
message = queue.read()
assert message
# now delete the message
queue.delete_message(message)
time.sleep(30)
assert queue.count_slow() == 0
# create another queue so we can test force deletion
# we will also test MHMessage with this queue
queue_name = 'test%d' % int(time.time())
timeout = 60
queue = c.create_queue(queue_name, timeout)
queue.set_message_class(MHMessage)
time.sleep(30)
# now add a couple of messages
message = queue.new_message()
message['foo'] = 'bar'
queue.write(message)
message_body = {'fie' : 'baz', 'foo' : 'bar'}
message = queue.new_message(body=message_body)
queue.write(message)
time.sleep(30)
m = queue.read()
assert m['foo'] == 'bar'
# now delete that queue and messages
c.delete_queue(queue, True)
print '--- tests completed ---'
|
Python
| 0.000141
|
@@ -1711,19 +1711,76 @@
'bad
-_
+*queue*name')%0A self.fail('
queue
-_
+
name
+ should have been bad
')%0A
|
860cdbf4cbfa36d668ccc58c777dcc7f33ca494b
|
change version!
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import codecs
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read_file(filename):
"""Open a related file and return its content."""
with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:
content = f.read()
return content
README = read_file('README.md')
setup(
name='django-jalali-date',
version='0.2.1',
packages=find_packages(),
include_package_data=True,
description=(
'Jalali Date support for user interface. Easy conversion of DateTimeFiled to JalaliDateTimeField within the admin site.'),
url='http://github.com/a-roomana/django-jalali-date',
download_url='https://pypi.python.org/pypi/django-jalali-date/',
author='Arman Roomana',
author_email='roomana.arman@gmail.com',
keywords="django jalali date",
license='Python Software Foundation License',
platforms=['any'],
install_requires=[
"pytz",
"django",
"jdatetime"
],
long_description=README,
use_2to3 = True,
zip_safe=False,
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
Python
| 0
|
@@ -430,9 +430,9 @@
0.2.
-1
+2
',%0A
|
a6495e0ecdb0187c3ec0bed038b01a2fe55227d2
|
Update library tests to include backend
|
tests/stream/test_library.py
|
tests/stream/test_library.py
|
from __future__ import absolute_import, unicode_literals
import mock
import pytest
from mopidy.audio import scan
from mopidy.internal import path
from mopidy.models import Track
from mopidy.stream import actor
from tests import path_to_data_dir
@pytest.fixture
def scanner():
return scan.Scanner(timeout=100, proxy_config={})
@pytest.fixture
def backend(scanner):
backend = mock.Mock()
backend.uri_schemes = ['file']
backend._scanner = scanner
return backend
@pytest.fixture
def track_uri():
return path.path_to_uri(path_to_data_dir('song1.wav'))
def test_lookup_ignores_unknown_scheme(backend):
library = actor.StreamLibraryProvider(backend, [])
assert library.lookup('http://example.com') == []
def test_lookup_respects_blacklist(backend, track_uri):
library = actor.StreamLibraryProvider(backend, [track_uri])
assert library.lookup(track_uri) == [Track(uri=track_uri)]
def test_lookup_respects_blacklist_globbing(backend, track_uri):
blacklist = [path.path_to_uri(path_to_data_dir('')) + '*']
library = actor.StreamLibraryProvider(backend, blacklist)
assert library.lookup(track_uri) == [Track(uri=track_uri)]
def test_lookup_converts_uri_metadata_to_track(backend, track_uri):
library = actor.StreamLibraryProvider(backend, [])
assert library.lookup(track_uri) == [Track(length=4406, uri=track_uri)]
|
Python
| 0
|
@@ -83,38 +83,8 @@
st%0A%0A
-from mopidy.audio import scan%0A
from
@@ -234,23 +234,22 @@
ure%0Adef
-scanner
+config
():%0A
@@ -259,142 +259,142 @@
urn
-scan.Scanner(timeout=100, proxy_config=%7B%7D)%0A%0A%0A@pytest.fixture%0Adef backend(scanner):%0A backend = mock.Mock()%0A backend.uri_schemes =
+%7B%0A 'proxy': %7B%7D,%0A 'stream': %7B%0A 'timeout': 1000,%0A 'metadata_blacklist': %5B%5D,%0A 'protocols':
%5B'f
@@ -402,39 +402,115 @@
le'%5D
+,
%0A
-backend._scanner = scanner
+ %7D,%0A 'file': %7B%0A 'enabled': False%0A %7D,%0A %7D%0A%0A%0A@pytest.fixture%0Adef audio():
%0A
@@ -517,23 +517,27 @@
return
-backend
+mock.Mock()
%0A%0A%0A@pyte
@@ -668,85 +668,98 @@
eme(
-backend):%0A library = actor.StreamLibraryProvider(backend, %5B%5D
+audio, config):%0A backend = actor.StreamBackend(audio=audio, config=config
)%0A
-%0A
-assert
+backend.
libr
@@ -834,23 +834,29 @@
acklist(
-backend
+audio, config
, track_
@@ -869,66 +869,125 @@
-library = actor.StreamLibraryProvider(backend, %5Btrack_uri%5D
+config%5B'stream'%5D%5B'metadata_blacklist'%5D.append(track_uri)%0A backend = actor.StreamBackend(audio=audio, config=config
)%0A%0A
@@ -988,32 +988,40 @@
ig)%0A%0A assert
+backend.
library.lookup(t
@@ -1102,23 +1102,29 @@
lobbing(
-backend
+audio, config
, track_
@@ -1146,12 +1146,16 @@
list
+_glob
=
-%5B
path
@@ -1198,70 +1198,135 @@
'*'
-%5D
%0A
-library = actor.StreamLibraryProvider(backend, blacklist
+config%5B'stream'%5D%5B'metadata_blacklist'%5D.append(blacklist_glob)%0A backend = actor.StreamBackend(audio=audio, config=config
)%0A%0A
@@ -1327,32 +1327,40 @@
ig)%0A%0A assert
+backend.
library.lookup(t
@@ -1444,23 +1444,29 @@
o_track(
-backend
+audio, config
, track_
@@ -1475,23 +1475,23 @@
i):%0A
-library
+backend
= actor
@@ -1501,49 +1501,66 @@
ream
-LibraryProvider(backend, %5B%5D)%0A%0A assert
+Backend(audio=audio, config=config)%0A%0A result = backend.
libr
@@ -1572,32 +1572,50 @@
ookup(track_uri)
+%0A assert result
== %5BTrack(lengt
|
2fc425f4d76e9baf6c312c2bbc2ff40d763dfc4b
|
Update prefect[gcp,viz] requirement from ~=0.15.0 to >=0.15,<1.1
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""Setup script to make PUDL directly installable with pip."""
from pathlib import Path
from setuptools import find_packages, setup
readme_path = Path(__file__).parent / "README.rst"
long_description = readme_path.read_text()
setup(
name="catalystcoop.pudl",
description="An open data processing pipeline for public US utility data.",
long_description=long_description,
long_description_content_type="text/x-rst",
use_scm_version=True,
author="Catalyst Cooperative",
author_email="pudl@catalyst.coop",
maintainer="Zane A. Selvans",
maintainer_email="zane.selvans@catalyst.coop",
url="https://catalyst.coop/pudl",
project_urls={
"Source": "https://github.com/catalyst-cooperative/pudl",
"Documentation": "https://catalystcoop-pudl.readthedocs.io",
"Issue Tracker": "https://github.com/catalyst-cooperative/pudl/issues",
},
license="MIT",
keywords=[
"electricity", "energy", "data", "analysis", "mcoe", "climate change",
"finance", "eia 923", "eia 860", "ferc", "form 1", "epa ampd",
"epa cems", "coal", "natural gas", "eia 861", "ferc 714"],
python_requires=">=3.8,<3.11",
setup_requires=["setuptools_scm"],
install_requires=[
"addfips~=0.3.1",
"catalystcoop.dbfread~=3.0",
"coloredlogs~=15.0",
"datapackage~=1.11", # Transition datastore to use frictionless.
# "email-validator>=1.0.3", # pydantic[email] dependency
"fsspec>=2021.7,<2023.0",
"gcsfs>=2021.7,<2023.0",
"geopandas>=0.9,<0.11",
"jinja2>=2,<4",
"matplotlib~=3.0", # Should make this optional with a "viz" extras
"networkx>=2.2,<3",
"numpy>=1.18.5,<2",
"pandas>=1.3,!=1.3.3,<1.5", # IntCastingNaNError on v1.3.3 in unit tests
"prefect[viz, gcp]~=0.15.0",
"pyarrow>=5,<8",
"pydantic[email]~=1.7",
"python-snappy>=0.6,<1",
"pygeos>=0.10,<0.13",
"pyyaml>=5,<7",
"scikit-learn>=1.0,<1.1",
"scipy>=1.6,<1.9",
"sqlalchemy>=1.4,<2",
"timezonefinder~=5.0",
"xlsxwriter~=3.0",
],
extras_require={
"dev": [
"autopep8~=1.5",
"ipdb~=0.13.4",
"isort~=5.0",
"jedi~=0.18",
"lxml~=4.6",
"tox~=3.20",
"twine~=3.3",
],
"doc": [
"doc8~=0.9",
"sphinx~=4.0",
"sphinx-autoapi~=1.8",
"sphinx-issues>=1.2,<4.0",
"sphinx-reredirects",
"sphinx-rtd-dark-mode~=1.2",
"sphinx-rtd-theme~=1.0",
"sphinxcontrib_bibtex~=2.4",
],
"test": [
"bandit~=1.6",
"coverage>=5.3,<7.0",
"doc8~=0.9",
"flake8~=4.0",
"flake8-builtins~=1.5",
"flake8-colors~=0.1",
"flake8-docstrings~=1.5",
"flake8-rst-docstrings~=0.2",
"flake8-use-fstring~=1.0",
"mccabe~=0.6",
"nbval~=0.9",
"pep8-naming~=0.12",
"pre-commit~=2.9",
"pydocstyle>=5.1,<7.0",
"pytest>=6.2,<8.0",
"pytest-console-scripts~=1.1",
"pytest-cov>=2.10,<4.0",
"responses~=0.14",
"tox~=3.20",
],
},
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
],
packages=find_packages("src"),
package_dir={"": "src"},
# package_data is data that is deployed within the python package on the
# user"s system. setuptools will get whatever is listed in MANIFEST.in
include_package_data=True,
# This defines the interfaces to the command line scripts we"re including:
entry_points={
"console_scripts": [
"censusdp1tract_to_sqlite = pudl.convert.censusdp1tract_to_sqlite:main",
"metadata_to_rst = pudl.convert.metadata_to_rst:main",
"epacems_to_parquet = pudl.convert.epacems_to_parquet:main",
"ferc1_to_sqlite = pudl.convert.ferc1_to_sqlite:main",
"pudl_datastore = pudl.workspace.datastore:main",
"pudl_etl = pudl.cli:main",
"pudl_setup = pudl.workspace.setup_cli:main",
# Currently blows up memory usage to 100+ GB.
# See https://github.com/catalyst-cooperative/pudl/issues/1174
# "pudl_territories = pudl.analysis.service_territory:main",
"state_demand = pudl.analysis.state_demand:main",
]
},
)
|
Python
| 0.000001
|
@@ -1861,16 +1861,19 @@
gcp%5D
-~
+%3E
=0.15
-.0
+,%3C1.1
%22,%0A
|
ca37e97424dcaccce130d775174bebad4f3ac9db
|
Version 1.7.0 - Added Python 3 support and tests.
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
import sys
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
requirements_file = 'requirements-py2.txt' if sys.version_info.major == 2 else 'requirements-py3.txt'
with open(requirements_file, 'r') as r:
requires = r.read()
version = '1.6.4'
setup(
name='tethys_dataset_services',
version=version,
packages=find_packages(),
include_package_data=True,
license='BSD 2-Clause License',
description='A generic Python interface for dataset services such as CKAN and HydroShare',
long_description=README,
url='',
author='Nathan Swain',
author_email='nathan.swain@byu.net',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License', # example license
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
install_requires=requires,
test_suite='tethys_dataset_services.tests'
)
|
Python
| 0
|
@@ -468,11 +468,11 @@
'1.
-6.4
+7.0
'%0Ase
|
4ed7e3dba1214d2b30d4149fe510054ff46ce721
|
Fix screw-up in last commit: entry point is main, not setup_main
|
setup.py
|
setup.py
|
import sys
from setuptools import setup, find_packages
if sys.version_info[0] < 3:
sys.exit("This package does not work with Python 2.")
# You can't just put `from pypandoc import convert` at the top of your
# setup.py and then put `description=convert("README.md", "rst")` in
# your `setup()` invocation, because even if you list list `pypandoc`
# in `setup_requires`, it won't be interpreted and installed until
# after the keyword argument values of the `setup()` invocation have
# been evaluated. Therefore, we define a `lazy_convert` class which
# impersonates a string but doesn't actually import or use `pypandoc`
# until the value of the string is needed. This defers the use of
# `pypandoc` until after setuptools has figured out that it is needed
# and made it available.
class lazy_convert(object):
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
def __str__(self):
from pypandoc import convert
return str(convert(*self.args, **self.kwargs))
def __repr__(self):
return repr(str(self))
def split(self, *args, **kwargs):
return str(self).split(*args, **kwargs)
def replace(self, *args, **kwargs):
return str(self).replace(*args, **kwargs)
setup(
name="coal_mine",
version='0.4.3',
author='Quantopian Inc.',
author_email='opensource@quantopian.com',
description="Coal Mine - Periodic task execution monitor",
url='https://github.com/quantopian/coal-mine',
long_description=lazy_convert('README.md', 'rst'),
license='Apache 2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
'Topic :: System :: Monitoring',
'Topic :: System :: Systems Administration',
],
packages=find_packages(),
setup_requires=['pypandoc'],
install_requires=open('requirements.txt').read(),
entry_points={
'console_scripts': [
"coal-mine = coal_mine.server:main",
"cmcli = coal_mine.cli:setup_main"
]
},
zip_safe=True,
)
|
Python
| 0.000009
|
@@ -2300,22 +2300,16 @@
ine.cli:
-setup_
main%22%0A
|
e2e56c9965d0781fc427b28f984c05a00dc2be68
|
Bump version to 0.3.93
|
setup.py
|
setup.py
|
#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
version = '0.3.92'
setup(name='mi-instrument',
version=version,
description='OOINet Marine Integrations',
url='https://github.com/oceanobservatories/mi-instrument',
license='BSD',
author='Ocean Observatories Initiative',
author_email='contactooici@oceanobservatories.org',
keywords=['ooici'],
packages=find_packages(),
package_data={
'': ['*.yml'],
'mi.platform.rsn': ['node_config_files/*.yml'],
},
dependency_links=[
],
test_suite='pyon',
entry_points={
'console_scripts': [
'run_driver=mi.core.instrument.wrapper:main',
'playback=mi.core.instrument.playback:main',
'analyze=mi.core.instrument.playback_analysis:main',
'oms_extractor=mi.platform.rsn.oms_extractor:main',
'shovel=mi.core.shovel:main',
'oms_aa_server=mi.platform.rsn.oms_alert_alarm_server:main',
],
},
)
|
Python
| 0.000001
|
@@ -147,9 +147,9 @@
.3.9
-2
+3
'%0A%0As
|
a3a1a2ad17bc856ccb83bb2098f11d1dfdc91a44
|
Fix name of bs4
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='debian-devel-changes-bot',
packages=find_packages(),
install_requires=['bs4', 'python-debian', 'requests', 'pydbus'])
|
Python
| 0.999999
|
@@ -158,17 +158,28 @@
ires=%5B'b
-s
+eautifulsoup
4', 'pyt
|
fb4512783a81474fa5d5aa1641561ec337a8989e
|
Remove Python 2.6 classifier from setup.py
|
setup.py
|
setup.py
|
import sys
from setuptools import setup, find_packages
py26_dependency = []
if sys.version_info[:2] <= (2, 6):
py26_dependency = ["argparse >= 1.1", "ordereddict >= 1.1"]
setup(
name='dataset',
version='0.7.1',
description="Toolkit for Python-based data processing.",
long_description="",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
keywords='sql sqlalchemy etl loading utility',
author='Friedrich Lindenberg, Gregor Aisch, Stefan Wehrmeyer',
author_email='info@okfn.org',
url='http://github.com/pudo/dataset',
license='MIT',
packages=find_packages(exclude=['ez_setup', 'examples', 'test']),
namespace_packages=[],
include_package_data=False,
zip_safe=False,
install_requires=[
'sqlalchemy >= 0.9.1',
'alembic >= 0.6.2',
'normality >= 0.2.2',
"PyYAML >= 3.10",
"six >= 1.7.3"
] + py26_dependency,
tests_require=[],
test_suite='test',
entry_points={
'console_scripts': [
'datafreeze = dataset.freeze.app:main',
]
}
)
|
Python
| 0.003628
|
@@ -509,57 +509,8 @@
t%22,%0A
- 'Programming Language :: Python :: 2.6',%0A
|
b89a469d83d93f0d29e3fe1a400f9a1ca22db4af
|
Update TestJWTAuthentication.test_get_payload
|
tests/test_authentication.py
|
tests/test_authentication.py
|
from __future__ import unicode_literals
from datetime import datetime, timedelta
from django.test import TestCase
from django.utils.six.moves import reload_module
from jose import jwt
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.test import APIRequestFactory
from rest_framework_simplejwt import authentication
from rest_framework_simplejwt.settings import api_settings
from .utils import override_api_settings
class TestJWTAuthentication(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.backend = authentication.JWTAuthentication()
self.fake_token = b'TokenMcTokenface'
self.fake_header = b'Bearer ' + self.fake_token
def test_get_header(self):
# Should return None if no authorization header
request = self.factory.get('/test-url/')
self.assertIsNone(self.backend.get_header(request))
# Should pull correct header off request
request = self.factory.get('/test-url/', HTTP_AUTHORIZATION=self.fake_header)
self.assertEqual(self.backend.get_header(request), self.fake_header)
# Should work for unicode headers
request = self.factory.get('/test-url/', HTTP_AUTHORIZATION=self.fake_header.decode('utf-8'))
self.assertEqual(self.backend.get_header(request), self.fake_header)
def test_get_token(self):
# Should return None if header lacks correct type keyword
with override_api_settings(AUTH_HEADER_TYPE='JWT'):
reload_module(authentication)
self.assertIsNone(self.backend.get_token(self.fake_header))
reload_module(authentication)
# Should raise error if header is malformed
with self.assertRaises(AuthenticationFailed):
self.backend.get_token(b'Bearer one two')
with self.assertRaises(AuthenticationFailed):
self.backend.get_token(b'Bearer')
# Otherwise, should return token in header
self.assertEqual(self.backend.get_token(self.fake_header), self.fake_token)
def test_get_payload(self):
# No expiry tokens should cause exception
payload = {'foo': 'bar'}
no_exp_token = jwt.encode(payload, api_settings.SECRET_KEY, algorithm='HS256')
with self.assertRaises(AuthenticationFailed):
self.backend.get_payload(no_exp_token)
# Expired tokens should cause exception
payload['exp'] = datetime.utcnow() - timedelta(seconds=1)
expired_token = jwt.encode(payload, api_settings.SECRET_KEY, algorithm='HS256')
with self.assertRaises(AuthenticationFailed):
self.backend.get_payload(expired_token)
# Token with invalid signature should cause exception
payload['exp'] = datetime.utcnow() + timedelta(days=1)
token = jwt.encode(payload, api_settings.SECRET_KEY, algorithm='HS256')
payload['foo'] = 'baz'
other_token = jwt.encode(payload, api_settings.SECRET_KEY, algorithm='HS256')
incorrect_payload = other_token.rsplit('.', 1)[0]
correct_sig = token.rsplit('.', 1)[-1]
invalid_token = incorrect_payload + '.' + correct_sig
with self.assertRaises(AuthenticationFailed):
self.backend.get_payload(invalid_token)
|
Python
| 0.000001
|
@@ -2861,33 +2861,32 @@
orithm='HS256')%0A
-%0A
payload%5B
@@ -3253,16 +3253,148 @@
(invalid_token)%0A
+%0A # Otherwise, should return data payload for token%0A self.assertEqual(self.backend.get_payload(other_token), payload)%0A
|
4bea05c2105fcc85ad87dac2fe6583e7da09e58f
|
update test_single_day_simulation() to use keyword arguments; add abandon dist
|
tests/test_day_simulation.py
|
tests/test_day_simulation.py
|
from .. import stimulus
import random
def test_single_day_simulation():
agent1_schedule = stimulus.AgentSchedule()
agent2_schedule = stimulus.AgentSchedule(regular_start=30600, regular_end=(3600*16.5 + 1800), regular_lunch=(3600*12 + 1800))
agent1 = stimulus.Agent(agent1_schedule)
agent2 = stimulus.Agent(agent2_schedule)
agent3 = stimulus.Agent(agent1_schedule)
call_durations = random.sample(range(100,500), 200)
arrival_times = random.sample(range(28800,32000), 200)
calls_list = []
for arr, dur in zip(arrival_times, call_durations):
calls_list.append(stimulus.Call(arr,dur))
day1 = stimulus.Day([agent1, agent2, agent3], calls_list)
simulated_day = stimulus.simulate_day(day1)
assert simulated_day['SL'] >= 0 and simulated_day['SL'] <= 1 and simulated_day['AHT'] >= 0 and isinstance(simulated_day['simulated_day_object'], stimulus.Day)
|
Python
| 0
|
@@ -650,16 +650,23 @@
lus.Day(
+agents=
%5Bagent1,
@@ -683,16 +683,22 @@
gent3%5D,
+calls=
calls_li
@@ -700,16 +700,45 @@
ls_list)
+%0A aban_dist = %5B1800, .999%5D
%0A%0A si
@@ -776,17 +776,45 @@
_day(day
-1
+=day1, abandon_dist=aban_dist
)%0A%0A a
|
4575d548911695e2285a0ab0cade5e10511b3870
|
Update setup.py
|
setup.py
|
setup.py
|
#!/usr/bin/env python
'''
Copyright (c) 2016 Tim Savannah All Rights Reserved.
This software is licensed under the terms of the GPLv2.
You should have received a copy of this with the source distribution as LICENSE,
otherwise the most up to date license can be found at
https://github.com/kata198/usrsvc/LICENSE
A user service manager for running/managing/monitoring daemons and services
'''
import os
import sys
from setuptools import setup
if __name__ == '__main__':
dirName = os.path.dirname(__file__)
if dirName and os.getcwd() != dirName:
os.chdir(dirName)
summary = 'A service manager for running/managing/monitoring/auto-restarting daemons and services at the user (non-root) level'
# Use README.rst for the long_description ( for pypi )
try:
with open('README.rst', 'rt') as f:
long_description = f.read()
except Exception as e:
sys.stderr.write('Error reading from README.rst: %s\n' %(str(e),))
long_description = summary
# Use README.md (actually looks sane uninterpreted) as the --readme option.
try:
with open('README.md', 'rt') as f:
readme_description = f.read()
except Exception as e:
sys.stderr.write('Error reading from README.rst: %s\n' %(str(e),))
readme_description = summary
try:
with open('usrsvcmod/client/_readme_contents.py', 'wt') as f:
f.write('README_CONTENTS = """%s"""\n' %(readme_description,) )
f.flush()
try:
os.fsync(f)
except:
pass
except Exception as e:
sys.stderr.write('Warning, failed to update readme.py - extended help will not be available.\n')
sys.stderr.write(str(e) + '\n')
setup(name='usrsvc',
version='1.5.10',
packages=['usrsvcmod', 'usrsvcmod.Monitoring', 'usrsvcmod.client'],
scripts=['usrsvc', 'usrsvcd'],
author='Tim Savannah',
author_email='kata198@gmail.com',
maintainer='Tim Savannah',
url='https://github.com/kata198/usrsvc',
maintainer_email='kata198@gmail.com',
requires=['configobj', 'NamedAtomicLock', 'func_timeout'],
install_requires=['configobj', 'NamedAtomicLock>=1.1.0', 'func_timeout', 'python-subprocess2'],
description=summary,
long_description=long_description,
license='GPLv2',
keywords=['usrsvc', 'usrsvcd', 'daemon', 'user', 'services', 'service', 'init', 'script', 'start', 'stop', 'restart', 'manage', 'programs', 'applications', 'supervisor', 'supervisord', 'systemd', 'daemontools'],
classifiers=['Development Status :: 4 - Beta',
'Programming Language :: Python',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: System :: Boot :: Init',
]
)
|
Python
| 0.000001
|
@@ -2744,16 +2744,29 @@
::
-4 - Beta
+5 - Production/Stable
',%0A
@@ -3378,16 +3378,83 @@
: 3.5',%0A
+ 'Programming Language :: Python :: 3.6',%0A
|
24cf02b76ca99abb0ae09284b312ca6b250d773f
|
add comma after readme
|
setup.py
|
setup.py
|
import distribute_setup
distribute_setup.use_setuptools()
import os
from setuptools import setup, find_packages
import emit
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError: # for tox
return ''
setup(
# System information
name='emit',
version=emit.__version__,
packages=find_packages(exclude=('test',)),
scripts=['emit/bin/emit_digraph'],
zip_safe=True,
extras_require = {
'celery-routing': ['celery>=3.0.13'],
'rq-routing': ['rq>=0.3.4', 'redis>=2.7.2'],
},
# Human information
author='Brian Hicks',
author_email='brian@brianthicks.com',
url='https://github.com/brianhicks/emit',
description='Build a graph to process streams',
keywords='stream processing',
long_description=read('README.rst')
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
Python
| 0.000124
|
@@ -1,63 +1,4 @@
-import distribute_setup%0Adistribute_setup.use_setuptools()%0A%0A
impo
@@ -789,16 +789,17 @@
ME.rst')
+,
%0A lic
|
ea7c54caa83595566bdfa4f63667db2f0d8c140a
|
Add test for empty metrics queue
|
tests/test_metrics_logger.py
|
tests/test_metrics_logger.py
|
import datetime
from time import sleep
import pytest
from sacred import Experiment
from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics
@pytest.fixture()
def ex():
return Experiment("Test experiment")
def test_log_scalar_metric_with_run(ex):
START = 10
END = 100
STEP_SIZE = 5
messages = {}
@ex.main
def main_function(_run):
for i in range(START, END, STEP_SIZE):
val = i*i
_run.log_scalar("training.loss", val, i)
messages["messages"] = ex.current_run._metrics.get_last_metrics()
"""Calling get_last_metrics clears the metrics logger internal queue.
If we don't call it here, it would be called during Sacred heartbeat
event after the run finishes, and the data we want to test would
be lost."""
ex.run()
assert ex.current_run is not None
messages = messages["messages"]
assert len(messages) == (END - START)/STEP_SIZE
for i in range(len(messages)-1):
assert messages[i].step < messages[i+1].step
assert messages[i].step == START + i * STEP_SIZE
assert messages[i].timestamp <= messages[i + 1].timestamp
def test_log_scalar_metric_with_ex(ex):
messages = {}
START = 10
END = 100
STEP_SIZE = 5
@ex.main
def main_function(_run):
for i in range(START, END, STEP_SIZE):
val = i*i
ex.log_scalar("training.loss", val, i)
messages["messages"] = ex.current_run._metrics.get_last_metrics()
ex.run()
assert ex.current_run is not None
messages = messages["messages"]
assert len(messages) == (END - START) / STEP_SIZE
for i in range(len(messages)-1):
assert messages[i].step < messages[i+1].step
assert messages[i].step == START + i * STEP_SIZE
assert messages[i].timestamp <= messages[i + 1].timestamp
def test_log_scalar_metric_with_implicit_step(ex):
messages = {}
@ex.main
def main_function(_run):
for i in range(10):
val = i*i
ex.log_scalar("training.loss", val)
messages["messages"] = ex.current_run._metrics.get_last_metrics()
ex.run()
assert ex.current_run is not None
messages = messages["messages"]
assert len(messages) == 10
for i in range(len(messages)-1):
assert messages[i].step < messages[i+1].step
assert messages[i].step == i
assert messages[i].timestamp <= messages[i + 1].timestamp
def test_log_scalar_metrics_with_implicit_step(ex):
messages = {}
@ex.main
def main_function(_run):
for i in range(10):
val = i*i
ex.log_scalar("training.loss", val)
ex.log_scalar("training.accuracy", val + 1)
messages["messages"] = ex.current_run._metrics.get_last_metrics()
ex.run()
assert ex.current_run is not None
messages = messages["messages"]
tr_loss_messages = [m for m in messages if m.name == "training.loss"]
tr_acc_messages = [m for m in messages if m.name == "training.accuracy"]
assert len(tr_loss_messages) == 10
# both should have 10 records
assert len(tr_acc_messages) == len(tr_loss_messages)
for i in range(len(tr_loss_messages) - 1):
assert tr_loss_messages[i].step < tr_loss_messages[i + 1].step
assert tr_loss_messages[i].step == i
assert tr_loss_messages[i].timestamp <= tr_loss_messages[i + 1].timestamp
assert tr_acc_messages[i].step < tr_acc_messages[i + 1].step
assert tr_acc_messages[i].step == i
assert tr_acc_messages[i].timestamp <= tr_acc_messages[i + 1].timestamp
def test_linearize_metrics():
entries = [ScalarMetricLogEntry("training.loss", 10, datetime.datetime.utcnow(), 100),
ScalarMetricLogEntry("training.accuracy", 5, datetime.datetime.utcnow(), 50),
ScalarMetricLogEntry("training.loss", 20, datetime.datetime.utcnow(), 200),
ScalarMetricLogEntry("training.accuracy", 10, datetime.datetime.utcnow(), 100),
ScalarMetricLogEntry("training.accuracy", 15, datetime.datetime.utcnow(), 150),
ScalarMetricLogEntry("training.accuracy", 30, datetime.datetime.utcnow(), 300)]
linearized = linearize_metrics(entries)
assert type(linearized) == dict
assert len(linearized.keys()) == 2
assert "training.loss" in linearized
assert "training.accuracy" in linearized
assert len(linearized["training.loss"]["steps"]) == 2
assert len(linearized["training.loss"]["values"]) == 2
assert len(linearized["training.loss"]["timestamps"]) == 2
assert len(linearized["training.accuracy"]["steps"]) == 4
assert len(linearized["training.accuracy"]["values"]) == 4
assert len(linearized["training.accuracy"]["timestamps"]) == 4
assert linearized["training.accuracy"]["steps"] == [5, 10, 15, 30]
assert linearized["training.accuracy"]["values"] == [50, 100, 150, 300]
assert linearized["training.loss"]["steps"] == [10, 20]
assert linearized["training.loss"]["values"] == [100, 200]
|
Python
| 0.000001
|
@@ -364,32 +364,147 @@
function(_run):%0A
+ # First, make sure the queue is empty:%0A assert len(ex.current_run._metrics.get_last_metrics()) == 0%0A
for i in
|
e5013d3ea76434f9b457b9ffa2d81e5f49aa2b7b
|
change python version info and language
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import versioneer
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
# TODO: put package requirements here
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='approx',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="A game for mental mathematicsin approximate numbers",
long_description=readme + '\n\n' + history,
author="Chia-Jung, Yang",
author_email='jeroyang@gmail.com',
url='https://github.com/jeroyang/approx',
packages=[
'approx',
],
package_dir={'approx':
'approx'},
include_package_data=True,
install_requires=requirements,
license="BSD",
zip_safe=False,
keywords='approx',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
test_suite='tests',
tests_require=test_requirements
)
|
Python
| 0
|
@@ -1221,15 +1221,27 @@
::
-English
+Traditional Chinese
',%0A
@@ -1529,16 +1529,65 @@
: 3.4',%0A
+ 'Programming Language :: Python :: 3.5',%0A
%5D,%0A
|
19c04409975a9102ef008963ad312b00ef4e96c6
|
Update Python classifiers in setup module
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
import codecs
from os.path import abspath
from os.path import dirname
from os.path import join
from setuptools import find_packages
from setuptools import setup
import machina
def read_relative_file(filename):
""" Returns contents of the given file, whose path is supposed relative to this module. """
with codecs.open(join(dirname(abspath(__file__)), filename), encoding='utf-8') as f:
return f.read()
setup(
name='django-machina',
version=machina.__version__,
author='Morgan Aubert',
author_email='me@morganaubert.name',
packages=find_packages(),
include_package_data=True,
url='https://github.com/ellmetha/django-machina',
license='BSD',
description='A Django forum engine for building powerful community driven websites.',
long_description=read_relative_file('README.rst'),
keywords='django forum board messages',
zip_safe=False,
install_requires=[
'django>=2.1',
# Django-mptt is required to handle the tree hierarchy of nested forums
'django-mptt>=0.8',
# Machina uses Django-haystack to provide search support
'django-haystack>=2.1',
# Pillow is required for image fields
'pillow>=2.2',
# Machina uses Markdown by default as a syntax for forum messages ; but you can change this
'markdown2>=2.3',
# Machina's default templates use django-widget-tweaks to render form fields ; but you can
# override this
'django-widget-tweaks>=1.4',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Message Boards',
],
)
|
Python
| 0
|
@@ -1897,57 +1897,8 @@
3',%0A
- 'Programming Language :: Python :: 3.4',%0A
@@ -2040,16 +2040,65 @@
: 3.7',%0A
+ 'Programming Language :: Python :: 3.8',%0A
|
a03dc7b23b219097f2dd16450f4e54b0469ffab1
|
Bump version to 0.2.2
|
setup.py
|
setup.py
|
import os
from setuptools import setup
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, '__init__.py'))]
setup(
name='zc_common',
version='0.2.1',
description="Shared code for ZeroCater microservices",
long_description='',
keywords='zerocater python util',
author='ZeroCater',
author_email='tech@zerocater.com',
url='https://github.com/ZeroCater/zc_common',
download_url='https://github.com/ZeroCater/zc_common/tarball/0.2.1',
license='MIT',
packages=get_packages('zc_common'),
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
]
)
|
Python
| 0.000002
|
@@ -321,25 +321,25 @@
ersion='0.2.
-1
+2
',%0A descr
@@ -637,9 +637,9 @@
0.2.
-1
+2
',%0A
|
24e6c057e6696f4c79aaba45d9e4287c5e941587
|
version bump
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
from distutils.command.install import INSTALL_SCHEMES
import os
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
template_files = []
for (path, dirs, files) in os.walk('templates'):
template_files.extend([os.path.join('..', path, f) for f in files])
setup(
name='Toto',
version='0.9.8',
author='JeremyOT',
author_email='',
download_url='https://github.com/JeremyOT/Toto/zipball/master',
license='MIT License',
platforms=['OS X', 'Linux'],
url='https://github.com/JeremyOT/Toto',
packages=['toto','toto.methods','toto.methods.account'],
requires=['tornado(>=2.1)',],
install_requires=['tornado>=2.1',],
provides=['toto',],
scripts=['scripts/toto-create',],
description='A Tornado based framework designed to accelerate web service development',
long_description='Documentation is available at http://jeremyot.com/Toto/docs',
classifiers=['License :: OSI Approved :: MIT License', 'Operating System :: POSIX'],
package_data={'toto': template_files}
)
print """
*****************************************************************************
By default, Toto will not connect to a database. Connect to a database with
the --database option. Database functionality requires the following modules:
pbkdf2>=1.3
MySQL: MySQL-python>=1.2.3
Redis: redis>=2.4.12, hiredis>=0.1.1 (optional)
Postres: psycopg2>=2.4.5
MongoDB: pymongo>=2.1
Toto's event and worker frameworks require pyzmq>=2.2.0
*****************************************************************************
"""
|
Python
| 0.000001
|
@@ -373,9 +373,9 @@
0.9.
-8
+9
',%0A
|
6ede9a1e6dc82de7a269abbfe8b57ee8e6548394
|
Switch to using subprocess as a base rather interface directly interface with Unix system calls. This lets subprocess deal with various issues dealing with the Python interpreter environment.
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
]
test_requirements = [
]
setup(
name = 'pipettor',
version = '0.4.0',
description = "pipettor - robust, easy to use Unix process pipelines",
long_description = readme + '\n\n' + history,
author = "Mark Diekhans",
author_email = 'markd@soe.ucsc.edu',
url = 'https://github.com/diekhans/pipettor',
packages = [
'pipettor',
],
package_dir = {'': 'lib'},
include_package_data = True,
install_requires = requirements,
license = "MIT",
zip_safe = True,
keywords = ['process', 'pipe'],
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Libraries :: Python Modules'
],
)
|
Python
| 0
|
@@ -1130,57 +1130,8 @@
3',%0A
- 'Programming Language :: Python :: 3.6',%0A
@@ -1224,16 +1224,65 @@
: 3.8',%0A
+ 'Programming Language :: Python :: 3.9',%0A
|
dae923853e0218fc77923f4512f72d0109e8f4bb
|
Add boto as requirement for funsize deployment.
|
setup.py
|
setup.py
|
from setuptools import setup
PACKAGE_NAME = 'funsize'
PACKAGE_VERSION = '0.1'
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description='partial mar webservice prototype',
long_description='https://wiki.mozilla.org/User:Ffledgling/Senbonzakura',
classifiers=[],
author='Anhad Jai Singh',
author_email='ffledgling@gmail.com',
url='https://wiki.mozilla.org/User:Ffledgling/Senbonzakura',
license='MPL',
install_requires=[
'Flask==0.10.1',
'celery==3.1.11',
'nose==1.3.3',
'requests==2.2.1',
],
packages=[
'funsize',
'funsize.backend',
'funsize.cache',
'funsize.frontend',
'funsize.utils',
],
tests_require=[
'nose',
'mock'
],
)
|
Python
| 0
|
@@ -586,24 +586,52 @@
ts==2.2.1',%0A
+ 'boto==2.33.0',%0A
%5D,%0A
|
6291a7d617326adbf6cf1c1ca85407b5403f49f5
|
version bump
|
setup.py
|
setup.py
|
#!/usr/bin/env python
try:
from setuptools import setup, find_packages
from setuptools.command.test import test
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from setuptools.command.test import test
import os
here = os.path.dirname(os.path.abspath(__file__))
f = open(os.path.join(here, 'README.md'))
long_description = f.read().strip()
f.close()
setup(
name='django_spam',
version='0.3.0',
author='Nick Kelly',
author_email='nick.kelly@tivix.com',
url='http://github.com/Tivix/django-spam',
description='Redirecting bots to utilize their time better...',
packages=find_packages(exclude=('tests*',)),
long_description=long_description,
keywords='django spam',
zip_safe=False,
include_package_data=True,
py_modules=['django_spam'],
test_suite='runtests.runtests',
install_requires=[
'Django>=1.8.0',
],
classifiers=[
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
]
)
|
Python
| 0.000001
|
@@ -491,17 +491,17 @@
on='0.3.
-0
+1
',%0A a
|
75b68c414b0fc9c0231011f2f70935abfa63089c
|
Package test data again.
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='vumi-wikipedia',
version='0.1a',
description='Vumi Wikipedia App',
packages=find_packages(),
install_requires=[
'vumi > 0.3.1',
],
url='http://github.com/praekelt/vumi-wikipedia',
license='BSD',
long_description=open('README', 'r').read(),
maintainer='Praekelt Foundation',
maintainer_email='dev@praekelt.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking',
],
)
|
Python
| 0
|
@@ -156,24 +156,55 @@
packages(),%0A
+ include_package_data=True,%0A
install_
|
242ba5a29f61267abc06f819886c4a40bee5c28e
|
make version 0.3.19
|
setup.py
|
setup.py
|
from setuptools import setup
setup(name='DukeDSClient',
version='0.3.18',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
license='MIT',
packages=['ddsc','ddsc.core'],
install_requires=[
'requests',
'PyYAML',
'pytz',
'future',
'six',
],
test_suite='nose.collector',
tests_require=['nose', 'mock'],
entry_points={
'console_scripts': [
'ddsclient = ddsc.__main__:main'
]
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Utilities',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
)
|
Python
| 0.000003
|
@@ -77,9 +77,9 @@
.3.1
-8
+9
',%0A
|
0eb5e0008d54f48f7643ca1dfbefc861c082aa63
|
Remove multi-line license entry
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
with open("README.rst") as f:
readme = f.read()
with open("LICENSE") as f:
license = f.read()
setup(
name="daemons",
version="1.3.1",
url="https://github.com/kevinconway/daemons",
license=license,
description="Well behaved unix daemons for every occasion.",
author="Kevin Conway",
author_email="kevinjacobconway@gmail.com",
long_description=readme,
classifiers=[],
packages=find_packages(exclude=["tests", "build", "dist", "docs"]),
requires=[],
)
|
Python
| 0
|
@@ -96,59 +96,8 @@
()%0A%0A
-with open(%22LICENSE%22) as f:%0A license = f.read()%0A%0A
setu
@@ -202,23 +202,37 @@
license=
-l
+%22'Apache L
icense
+ 2.0%22
,%0A de
@@ -489,16 +489,24 @@
%5D),%0A
+install_
requires
|
dd5a4516993599f05cc8291e772de182cdc3c874
|
Update setup for PyIi
|
setup.py
|
setup.py
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name = 'hybra',
packages = ['hybra'],
version = '0.1',
description = 'Toolkit for data management and analysis',
author = 'Matti Nelimarkka, Juho Pääkkönen, Arto Kekkonen',
author_email = 'matti.nelimarkka@aalto.fi, juho.paakkonen@aalto.fi, arto.kekkonen@helsinki.fi',
url = 'https://github.com/HIIT/hybra-core',
download_url = 'https://github.com/HIIT/hybra-core/archive/0.1.tar.gz',
keywords = ['data management', 'data analysis'],
classifiers = [],
)
|
Python
| 0
|
@@ -45,22 +45,18 @@
rom
-distutils.core
+setuptools
imp
@@ -92,33 +92,14 @@
ybra
-',%0A packages = %5B'hybra'%5D
+-core'
,%0A
@@ -112,16 +112,20 @@
n = '0.1
+.0a1
',%0A des
@@ -180,360 +180,1148 @@
ysis
-',%0A author = 'Matti Nelimarkka, Juho P%C3%A4%C3%A4kk%C3%B6nen, Arto Kekkonen',%0A author_email = 'matti.nelimarkka@aalto.fi, juho.paakkonen@aalto.fi, arto.kekkonen@helsinki.fi',%0A url = 'https://github.com/HIIT/hybra-core',%0A download_url = 'https://github.com/HIIT/hybra-core/archive/0.1.tar.gz',%0A keywords = %5B'data management', 'data analysis'%5D,%0A classifiers = %5B%5D,
+.',%0A keywords = %5B'data management', 'data analysis'%5D,%0A url = 'https://github.com/HIIT/hybra-core',%0A download_url = 'https://github.com/HIIT/hybra-core/archive/0.1.0.tar.gz',%0A author = 'Matti Nelimarkka, Juho P%C3%A4%C3%A4kk%C3%B6nen, Arto Kekkonen',%0A author_email = 'matti.nelimarkka@aalto.fi, juho.paakkonen@aalto.fi, arto.kekkonen@helsinki.fi',%0A packages = %5B'hybra'%5D,%0A licence = 'MIT',%0A%0A install_requires=%5B%0A 'dateparser%3E=0.5.1',%0A 'GitPython%3E=2.0.6',%0A 'jupyter%3E=1.0.0',%0A 'jupyter-client%3E=4.3.0',%0A 'jupyter-console%3E=4.1.1',%0A 'jupyter-core%3E=4.1.0',%0A 'matplotlib%3E=1.5.3',%0A 'nbstripout%3E=0.2.9',%0A 'networkx%3E=1.11',%0A 'numpy%3E=1.11.0',%0A 'requests%3E=2.9.1',%0A 'scikit-learn%3E=0.17.1',%0A 'scipy%3E=0.17.1',%0A 'XlsxWriter%3E=0.9.6',%0A 'wordcloud%3E=1.2.1',%0A 'tldextract%3E=2.1.0'%0A %5D,%0A%0A # See https://pypi.python.org/pypi?%253Aaction=list_classifiers%0A classifiers=%5B%0A 'Development Status :: 3 - Alpha',%0A 'Intended Audience :: Science/Research',%0A 'Topic :: Scientific/Engineering',%0A 'License :: OSI Approved :: MIT License',%0A 'Programming Language :: Python :: 2.7',%0A 'Programming Language :: JavaScript'%0A %5D
%0A)%0A
|
6349029e54ce5102afcefbc295e76b06fa1aa235
|
fix github url in setup.py
|
setup.py
|
setup.py
|
import sys
from distutils.core import setup
from distutils.extension import Extension
try:
from Cython.Distutils import build_ext
except ImportError:
sys.stderr.write("""
==================================================
Please install Cython (http://cython.org/),
which is required to build tree-hmm. Usually
you can do:
pip install -U cython
or
easy_install -U cython
==================================================
""")
sys.exit(1)
try:
import numpy
except ImportError:
sys.stderr.write("""
==================================================
Please install numpy,
which is required to build tree-hmm. Usually
you can do:
pip install -U numpy
or
easy_install -U numpy
==================================================
""")
sys.exit(1)
ext_modules = [Extension("treehmm.vb_mf", ["treehmm/vb_mf.pyx"],
#extra_compile_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
#extra_link_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
# extra_compile_args=['-fopenmp', '-I/data/apps/enthought_python/7.3.2/lib/python2.7/site-packages/numpy/core/include', '-L/data/apps/enthought_python/7.3.2/lib/'],
# extra_link_args=['-fopenmp', '-L/data/apps/enthought_python/7.3.2/lib/'],
include_dirs=[numpy.get_include()]),
Extension("treehmm.vb_prodc", ["treehmm/vb_prodc.pyx"],
#extra_compile_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
#extra_link_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
# extra_compile_args=['-fopenmp', '-I/data/apps/enthought_python/7.3.2/lib/python2.7/site-packages/numpy/core/include', '-L/data/apps/enthought_python/7.3.2/lib/'],
# extra_link_args=['-fopenmp', '-L/data/apps/enthought_python/7.3.2/lib/'],
include_dirs=[numpy.get_include()]),
Extension("treehmm.vb_prodc_sepTheta", ["treehmm/vb_prodc_sepTheta.pyx"],
#extra_compile_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
#extra_link_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
# extra_compile_args=['-fopenmp', '-I/data/apps/enthought_python/7.3.2/lib/python2.7/site-packages/numpy/core/include', '-L/data/apps/enthought_python/7.3.2/lib/'],
# extra_link_args=['-fopenmp', '-L/data/apps/enthought_python/7.3.2/lib/'],
include_dirs=[numpy.get_include()]),
Extension("treehmm.clique_hmm", ["treehmm/vb_clique.pyx"],
#extra_compile_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
#extra_link_args=['-fopenmp', '-march=bdver1', '-mtune=bdver1', '-Ofast'],
# extra_compile_args=['-fopenmp', '-I/data/apps/enthought_python/7.3.2/lib/python2.7/site-packages/numpy/core/include', '-L/data/apps/enthought_python/7.3.2/lib/'],
# extra_link_args=['-fopenmp', '-L/data/apps/enthought_python/7.3.2/lib/'],
include_dirs=[numpy.get_include()]),
]
install_requires = ['scipy', 'cython ( >= 0.15.1)']
if sys.version_info[:2] < (2, 7):
install_requires += ['argparse']
setup(
name = 'treehmm',
description = 'Variational Inference for tree-structured Hidden-Markov Models',
version = '0.1.0',
author = ['Jake Biesinger', 'Yuanfeng Wang'],
author_email = 'jake.biesinger@gmail.com',
url = 'https://github.com/xhxielab/tree-hmm',
long_description = open('README.md').read(),
packages = ['treehmm', 'gmtkParam'],
scripts = ['bin/tree-hmm'],
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules,
requires = ['scipy', 'cython ( >= 0.15.1)', 'numpy'],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Topic :: Scientific/Engineering :: Bio-Informatics'],
)
|
Python
| 0.000782
|
@@ -3778,16 +3778,16 @@
com/
-xhxielab
+uci-cbcl
/tre
|
c8fc68eb0913cd550311c601d8552b0bddf6a9a6
|
Change description
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup
from mailhole import __version__
setup(
name = 'mailhole',
version=__version__,
description = 'Fake SMTP server, used for testing',
author = 'Andriy Yurchuk',
author_email = 'ayurchuk@minuteware.net',
url = 'https://github.com/Ch00k/mailhole',
license = 'LICENSE.txt',
long_description = open('README.rst').read(),
entry_points = {
'console_scripts': [
'mailhole = mailhole.mailhole:main'
]
},
packages = ['mailhole'],
)
|
Python
| 0.000004
|
@@ -158,42 +158,64 @@
= '
-Fake SMTP server, used for testing
+A simple application to test email sending functionality
',%0A
|
986d55734ebf91f5262284cc9d6006f029f437c7
|
refactor extra python packages as we will have a few of these
|
setup.py
|
setup.py
|
import glob
import os
from setuptools import setup
# read in the description from README
with open("README.rst") as stream:
long_description = stream.read()
github_url = 'https://github.com/LeapBeyond/scrubadub'
def read_packages_from_file(filename):
with open(filename, 'r') as stream:
for line in stream:
package = line.strip().split('#')[0]
if package:
yield package
# read in the dependencies from the virtualenv requirements file
filename = os.path.join("requirements", "python")
dependencies = list(read_packages_from_file(filename))
# read extra spacy dependencies from python-extras requirements file
filename = os.path.join("requirements", "python-extras")
extras = list(read_packages_from_file(filename))
# get the version
version = None
with open(os.path.join('scrubadub', '__init__.py')) as stream:
for line in stream:
if 'version' in line.lower():
version = line.split()[-1].replace('"', '').replace("'", '')
setup(
name='scrubadub',
version=version,
description=(
"Clean personally identifiable information from dirty dirty text."
),
long_description=long_description,
url=github_url,
download_url="%s/archives/master" % github_url,
author='Dean Malmgren',
author_email='dean.malmgren@datascopeanalytics.com',
license='MIT',
packages=[
'scrubadub',
'scrubadub.filth',
'scrubadub.detectors',
'scrubadub.post_processors',
'scrubadub.post_processors.text_replacers',
],
classifiers=[
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Text Processing',
'Topic :: Utilities',
],
install_requires=dependencies,
extras_require={"spacy": extras},
zip_safe=False,
)
|
Python
| 0
|
@@ -428,256 +428,53 @@
ge%0A%0A
-# read in the dependencies from the virtualenv requirements file%0Afilename = os.path.join(%22requirements%22, %22python%22)%0Adependencies = list(read_packages_from_file(filename))%0A%0A# read extra spacy dependencies from python-extras requirements file%0Afilename
+%0Adef get_package_list(location):%0A location
= o
@@ -485,17 +485,17 @@
th.join(
-%22
+'
requirem
@@ -502,36 +502,31 @@
ents
-%22, %22python-extras%22)%0Aextras =
+', location)%0A return
lis
@@ -555,20 +555,21 @@
ile(
-filename
+location
))%0A%0A
+%0A
# ge
@@ -2072,57 +2072,119 @@
res=
-dependencies,%0A extras_require=%7B%22spacy%22: extras
+get_package_list('python'),%0A extras_require=%7B%0A %22spacy%22: get_package_list('python-extras-spacy'),%0A
%7D,%0A
|
241cb3a2ee4393b7ddad80b4b98031cfd7224f61
|
make sure we are py2 compatible
|
setup.py
|
setup.py
|
"""
setup.py -- setup script for use of packages.
"""
from setuptools import setup, find_packages
__version__ = '1.3.4'
# create entry points
# see http://astropy.readthedocs.org/en/latest/development/scripts.html
entry_points = {
'console_scripts' : [
'filutil = blimpy.filterbank:cmd_tool',
'watutil = blimpy.waterfall:cmd_tool',
'rawutil = blimpy.guppi:cmd_tool',
'fil2h5 = blimpy.fil2h5:cmd_tool',
'h52fil = blimpy.h52fil:cmd_tool',
'matchfils = blimpy.match_fils:cmd_tool',
'bldice = blimpy.dice:cmd_tool'
]
}
install_requires = [
'astropy',
'numpy',
'cython',
'h5py',
'scipy',
'matplotlib',
]
extras_require = {
'full': [
'bitshuffle',
'pyslalib',
]
}
setup(name='blimpy',
version=__version__,
description='Python utilities for Breakthrough Listen SETI observations',
long_description="Python utilities for Breakthrough Listen SETI observations. It includes data handling, formating, dicing and plotting.",
platform=['*nix'],
license='MIT',
install_requires=install_requires,
extras_require=extras_require,
url='https://github.com/ucberkeleyseti/blimpy',
author='Danny Price, Emilio Enriquez, Griffin Foster, Greg Hellbourg',
author_email='dancpr@berkeley.edu',
entry_points=entry_points,
packages=find_packages(),
zip_safe=False,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Topic :: Scientific/Engineering :: Astronomy',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
test_suite="tests",
)
|
Python
| 0
|
@@ -613,18 +613,58 @@
'astropy
-',
+%3C3.0', # 3 is not compatible with py2
%0A
@@ -743,18 +743,55 @@
tplotlib
-',
+%3C3.0', # 3 is not compatible with py2
%0A%5D%0A%0Aextr
|
8345a0eaccdab0805751622c5a83aca25d06ec51
|
bump version number.
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import find_packages, setup, Extension
setup(name='sniffles',
version='3.0.3',
description='Sniffles pcap generator',
long_description='Packet capture generator for IDS evaluation',
maintainer='Victor C. Valgenti',
maintainer_email='vvalgenti@petabi.com',
url='http://petabi.com',
packages=find_packages(),
entry_points={
'console_scripts': [
'sniffles = sniffles.sniffles:main',
'rulegen = sniffles.rand_rule_gen:main',
'regexgen = sniffles.regex_generator:main'
],
'gui_scripts': [
],
},
data_files=[
('share/doc/sniffles', ['README.md', 'LICENSE']),
('share/examples/sniffles',
['examples/example1.xml',
'examples/example2.xml',
'examples/hdr_features_complex.txt',
'examples/hdr_features_simple.txt',
'examples/mac_definition_file.txt',
'examples/re_features_complex.txt',
'examples/re_features_simple.txt',
'examples/sniffles_example_config.txt']),
],
ext_modules=[Extension('sniffles.pcrecomp',
sources=['sniffles/pcrecomp.c',
'sniffles/pcre_chartables.c',
'sniffles/pcre_compile.c',
'sniffles/pcre_globals.c',
'sniffles/pcre_newline.c',
'sniffles/pcre_tables.c'],
depends=['sniffles/pcre_internal.h',
'sniffles/ucp.h',
'sniffles/pcre.h'],
extra_compile_args=['-DLINK_SIZE=2',
'-DPARENS_NEST_LIMIT=250',
'-DNEWLINE=10',
'-DMAX_NAME_COUNT=10000',
'-DMAX_NAME_SIZE=32'])]
)
|
Python
| 0
|
@@ -116,11 +116,11 @@
='3.
-0.3
+1.0
',%0A
@@ -177,24 +177,25 @@
long_descrip
+0
tion='Packet
|
08a933d1f4bd4ac4ca3b211090309a9652d5a129
|
simplify setup.py a bit; s/new bsd license/revised bsd license
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# encoding: utf-8
import os
import sys
import textwrap
from os.path import abspath, dirname, join as pjoin
from distutils.command.build import build
from setuptools.command.develop import develop
from setuptools.command.bdist_egg import bdist_egg
from setuptools import setup, Extension, Command
here = abspath(dirname(__file__))
requires = ()
test_requires = ('pytest',)
classifiers = (
'Development Status :: 4 - Beta',
# 'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Operating System :: POSIX :: Linux',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: Implementation :: CPython',
)
input_c = Extension('evdev._input', sources=['evdev/input.c'], ) # extra_compile_args=['-O0'])
uinput_c = Extension('evdev._uinput', sources=['evdev/uinput.c'], ) # extra_compile_args=['-O0'])
ecodes_c = Extension('evdev._ecodes', sources=['evdev/ecodes.c'], ) # extra_compile_args=['-O0'])
kw = {
'name' : 'evdev',
'version' : '0.4.1',
'description' : 'bindings for the linux input handling subsystem',
'long_description' : open(pjoin(here, 'README.rst')).read(),
'author' : 'Georgi Valkov',
'author_email' : 'georgi.t.valkov@gmail.com',
'license' : 'New BSD License',
'keywords' : 'evdev input uinput',
'classifiers' : classifiers,
'url' : 'https://github.com/gvalkov/python-evdev',
'packages' : ['evdev'],
'ext_modules' : [input_c, uinput_c, ecodes_c],
'install_requires' : requires,
'tests_require' : test_requires,
'include_package_data' : False,
'zip_safe' : True,
'cmdclass' : {},
}
def create_ecodes():
# :todo: expose as a command option
header = '/usr/include/linux/input.h'
if not os.path.isfile(header):
msg = '''\
The linux/input.h header file is missing. You will have to
install the headers for your kernel in order to continue:
yum install kernel-headers-$(uname -r)
apt-get intall linux-headers-$(uname -r)
pacman -S kernel-headers\n\n'''
sys.stderr.write(textwrap.dedent(msg))
sys.exit(1)
from subprocess import check_call
print('writing ecodes.c (using {})'.format(header))
check_call('bash ./ecodes.sh {} > ecodes.c'.format(header),
cwd='{}/evdev'.format(here),
shell=True)
# :todo: figure out a smarter way to do this
# :note: subclassing build_ext doesn't really cut it
class BuildCommand(build):
def run(self):
create_ecodes()
build.run(self)
class DevelopCommand(develop):
def run(self):
create_ecodes()
develop.run(self)
class BdistEggCommand(bdist_egg):
def run(self):
create_ecodes()
bdist_egg.run(self)
class PyTest(Command):
''' setup.py test -> py.test tests '''
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from subprocess import call
errno = call(('py.test', 'tests'))
raise SystemExit(errno)
kw['cmdclass']['test'] = PyTest
kw['cmdclass']['build'] = BuildCommand
kw['cmdclass']['develop'] = DevelopCommand
kw['cmdclass']['bdist_egg'] = BdistEggCommand
if __name__ == '__main__':
setup(**kw)
|
Python
| 0
|
@@ -354,51 +354,8 @@
))%0A%0A
-requires = ()%0Atest_requires = ('pytest',)%0A%0A
clas
@@ -1518,17 +1518,16 @@
l.com',%0A
-%0A
'lic
@@ -1552,11 +1552,15 @@
: '
-New
+Revised
BSD
@@ -1664,17 +1664,16 @@
ifiers,%0A
-%0A
'url
@@ -1777,17 +1777,16 @@
vdev'%5D,%0A
-%0A
'ext
@@ -1841,47 +1841,8 @@
c%5D,%0A
- 'install_requires' : requires,%0A
@@ -1870,21 +1870,18 @@
:
-test_requires
+%5B'pytest'%5D
,%0A%0A
|
9a206428697bc7c3fde779c36d9e6ceb87dfb312
|
Fix setup.py lint errors
|
setup.py
|
setup.py
|
"""Setup script.
Run "python3 setup --help-commands" to list all available commands and their
descriptions.
"""
import os
import sys
from subprocess import call
from setuptools import Command, find_packages, setup
from pyof import __version__
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.egg-info')
os.system('cd docs; make clean')
class Doctest(Command):
"""Run Sphinx doctest."""
if sys.argv[-1] == 'test':
print('Running examples in documentation')
call('make doctest -C docs/', shell=True)
class Linter(Command):
"""Run several code linters."""
description = 'Run many code linters. It may take a while'
user_options = []
def __init__(self, *args, **kwargs):
"""Define linters and a message about them."""
super().__init__(*args, **kwargs)
self.linters = ['pep257', 'pyflakes', 'mccabe', 'isort', 'pep8',
'pylint']
self.extra_msg = 'It may take a while. For a faster version (and ' \
'less checks), run "quick_lint".'
def initialize_options(self):
"""For now, options are ignored."""
pass
def finalize_options(self):
"""For now, options are ignored."""
pass
def run(self):
"""Run pylama and radon."""
files = 'tests setup.py pyof'
print('running pylama with {}. {}'.format(', '.join(self.linters),
self.extra_msg))
cmd = 'pylama -l {} {}'.format(','.join(self.linters), files)
call(cmd, shell=True)
print('Low grades (<= C) for Cyclomatic Complexity:')
call('radon cc --min=C ' + files, shell=True)
print('Low grades (<= C) for Maintainability Index:')
call('radon mi --min=C ' + files, shell=True)
class FastLinter(Linter):
"""Same as Linter, but without the slow pylint."""
description = 'Same as "lint", but much faster (no pylama_pylint).'
def __init__(self, *args, **kwargs):
"""Remove slow linters and redefine the message about the rest."""
super().__init__(*args, **kwargs)
self.linters.remove('pylint')
self.extra_msg = 'This a faster version of "lint", without pylint. ' \
'Run the slower "lint" after solving these issues:'
setup(name='python-openflow',
version=__version__,
description='Library to parse and generate OpenFlow messages',
url='http://github.com/kytos/python-openflow',
author='Kytos Team',
author_email='of-ng-dev@ncc.unesp.br',
license='MIT',
test_suite='tests',
packages=find_packages(exclude=['tests', '*v0x02*']),
cmdclass={
'lint': Linter,
'quick_lint': FastLinter,
'clean': CleanCommand,
},
zip_safe=False)
|
Python
| 0.000002
|
@@ -325,24 +325,25 @@
ct root.%22%22%22%0A
+%0A
user_opt
@@ -379,32 +379,69 @@
_options(self):%0A
+ %22%22%22No initializa options.%22%22%22%0A
pass%0A%0A
@@ -482,32 +482,135 @@
-pass%0A%0A def run(self):
+%22%22%22No finalize options.%22%22%22%0A pass%0A%0A def run(self):%0A %22%22%22Clean build, dist, pyc and egg from package and docs.%22%22%22
%0A
|
26f40f91f5832543bb7c57a238ff4189b262a740
|
Bump version
|
setup.py
|
setup.py
|
#!/usr/bin/env python2
from setuptools import setup, find_packages
requires = open('requirements.txt').read().split('\n')
setup(
name='hamper',
version='1.11.0',
description='Yet another IRC bot',
install_requires=requires,
author='Mike Cooper',
author_email='mythmon@gmail.com',
url='https://www.github.com/hamperbot/hamper',
packages=find_packages(),
entry_points={
'console_scripts': [
'hamper = hamper.commander:main',
],
'hamperbot.plugins': [
'bitly = hamper.plugins.bitly:Bitly',
'botsnack = hamper.plugins.friendly:BotSnack',
'channel_utils = hamper.plugins.channel_utils:ChannelUtils',
'choices = hamper.plugins.questions:ChoicesPlugin',
'dice = hamper.plugins.commands:Dice',
'factoids = hamper.plugins.factoids:Factoids',
'flip = hamper.plugins.flip:Flip',
'friendly = hamper.plugins.friendly:Friendly',
'goodbye = hamper.plugins.goodbye:GoodBye',
'help = hamper.plugins.help:Help',
'karma = hamper.plugins.karma:Karma',
'karma_adv = hamper.plugins.karma_adv:KarmAdv',
'lmgtfy = hamper.plugins.commands:LetMeGoogleThatForYou',
'lookup = hamper.plugins.dictionary:Lookup',
'ponies = hamper.plugins.friendly:OmgPonies',
'quit = hamper.plugins.commands:Quit',
'quotes = hamper.plugins.quotes:Quotes',
'remindme = hamper.plugins.remindme:Reminder',
'rot13 = hamper.plugins.commands:Rot13',
'roulette = hamper.plugins.roulette:Roulette',
'sed = hamper.plugins.commands:Sed',
'seen = hamper.plugins.seen:Seen',
'suggest = hamper.plugins.suggest:Suggest',
'timez = hamper.plugins.timez:Timez',
'tinyurl = hamper.plugins.tinyurl:Tinyurl',
'whatwasthat = hamper.plugins.whatwasthat:WhatWasThat',
'yesno = hamper.plugins.questions:YesNoPlugin',
],
},
)
|
Python
| 0
|
@@ -166,9 +166,9 @@
.11.
-0
+1
',%0A
|
8c09013994291312068cabc463dc996c06312737
|
fix python 2.6 support.
|
setup.py
|
setup.py
|
import os.path as op
from setuptools import setup
VERSION = "0.1.0.dev1"
if __name__ == "__main__":
with open(op.join("machotools", "__version.py"), "wt") as fp:
fp.write("__version__ = '{}'".format(VERSION))
setup(name="machotools",
version=VERSION,
author="David Cournapeau",
author_email="cournape@gmail.com",
license="BSD",
packages=["machotools", "machotools.tests"],
install_requires=["macholib"])
|
Python
| 0
|
@@ -196,16 +196,17 @@
n__ = '%7B
+0
%7D'%22.form
|
786433154a419d41d03fb025aa49e379b9058f72
|
Bump flake8 from 3.9.1 to 3.9.2
|
setup.py
|
setup.py
|
import re
from setuptools import setup
INSTALL_REQUIRES = ["marshmallow>=2.7.0", "python-dotenv"]
DJANGO_REQUIRES = ["dj-database-url", "dj-email-url", "django-cache-url"]
EXTRAS_REQUIRE = {
"django": DJANGO_REQUIRES,
"tests": ["pytest"] + DJANGO_REQUIRES,
"lint": ["flake8==3.9.1", "flake8-bugbear==21.4.3", "mypy==0.812", "pre-commit~=2.4"],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
PYTHON_REQUIRES = ">=3.6"
def find_version(fname):
version = ""
with open(fname) as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError("Cannot find version information")
return version
def read(fname):
with open(fname) as fp:
content = fp.read()
return content
setup(
name="environs",
packages=["environs"],
package_data={"environs": ["py.typed"]},
version=find_version("environs/__init__.py"),
description="simplified environment variable parsing",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Steven Loria",
author_email="sloria1@gmail.com",
url="https://github.com/sloria/environs",
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
license="MIT",
zip_safe=False,
python_requires=PYTHON_REQUIRES,
keywords="environment variables parsing config configuration 12factor envvars",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Typing :: Typed",
],
project_urls={
"Issues": "https://github.com/sloria/environs/issues",
"Changelog": "https://github.com/sloria/environs/blob/master/CHANGELOG.md",
},
)
|
Python
| 0.000001
|
@@ -285,17 +285,17 @@
e8==3.9.
-1
+2
%22, %22flak
|
b665cc442d6d85803e8775f6034b1e531b3588e8
|
Update setup.py and add python_requires
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
"""
from __future__ import unicode_literals
import io
from os import path
try:
from pip.req import parse_requirements
except ImportError:
# pip >= 10
from pip._internal.req import parse_requirements
from setuptools import find_packages, setup
def get_requirements(requirements_file):
"""Use pip to parse requirements file."""
requirements = []
if path.isfile(requirements_file):
for req in parse_requirements(requirements_file, session="hack"):
if req.markers:
requirements.append("%s;%s" % (req.req, req.markers))
else:
requirements.append("%s" % req.req)
return requirements
if __name__ == "__main__":
HERE = path.abspath(path.dirname(__file__))
INSTALL_REQUIRES = get_requirements(path.join(HERE, "requirements.txt"))
MYSQL_REQUIRES = get_requirements(path.join(HERE, "mysql-requirements.txt"))
POSTGRESQL_REQUIRES = get_requirements(
path.join(HERE, "postgresql-requirements.txt"))
LDAP_REQUIRES = get_requirements(path.join(HERE, "ldap-requirements.txt"))
with io.open(path.join(HERE, "README.rst"), encoding="utf-8") as readme:
LONG_DESCRIPTION = readme.read()
setup(
name="modoboa",
description="Mail hosting made simple",
long_description=LONG_DESCRIPTION,
license="ISC",
url="http://modoboa.org/",
author="Antoine Nguyen",
author_email="tonio@ngyn.org",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django :: 1.11",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: ISC License (ISCL)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Communications :: Email",
"Topic :: Internet :: WWW/HTTP",
],
keywords="email",
packages=find_packages(exclude=["doc", "test_data", "test_project"]),
include_package_data=True,
zip_safe=False,
scripts=["bin/modoboa-admin.py"],
install_requires=INSTALL_REQUIRES,
use_scm_version=True,
setup_requires=["setuptools_scm"],
extras_require={
"ldap": LDAP_REQUIRES,
"mysql": MYSQL_REQUIRES,
"postgresql": POSTGRESQL_REQUIRES,
"argon2": ["argon2-cffi >= 16.1.0"],
},
)
|
Python
| 0.000001
|
@@ -18,32 +18,8 @@
thon
-%0A# -*- coding: utf-8 -*-
%0A%0A%22%22
@@ -125,59 +125,8 @@
%22%22%0A%0A
-from __future__ import unicode_literals%0A%0Aimport io%0A
from
@@ -1168,11 +1168,8 @@
ith
-io.
open
@@ -1202,26 +1202,8 @@
st%22)
-, encoding=%22utf-8%22
) as
@@ -2402,32 +2402,32 @@
STALL_REQUIRES,%0A
-
use_scm_
@@ -2436,24 +2436,57 @@
rsion=True,%0A
+ python_requires=%22%3E=3.4%22,%0A
setu
|
09654ba589b25d9680f0858bb0432b5b3881ca51
|
Update setup.py
|
setup.py
|
setup.py
|
from setuptools import setup
test_deps = ['pytest', 'pytest-cov', 'vcrpy', 'pytest-vcr', 'pytest-mock']
extras = {
"test": test_deps
}
setup(name='Mastodon.py',
version='1.2.2',
description='Python wrapper for the Mastodon API',
packages=['mastodon'],
setup_requires=['pytest-runner'],
install_requires=['requests', 'python-dateutil', 'six', 'pytz', 'decorator'],
tests_require=test_deps,
extras_require=extras,
url='https://github.com/halcy/Mastodon.py',
author='Lorenz Diener',
author_email='lorenzd+mastodonpypypi@gmail.com',
license='MIT',
keywords='mastodon api microblogging',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Communications',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
])
|
Python
| 0
|
@@ -391,16 +391,23 @@
ecorator
+%3E=4.0.0
'%5D,%0A
|
a8a4a1a8d8355d85218a123ccc5369f82048bb8f
|
Comment about svn:keywords
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup
from setuptools.command.install import install
from os.path import dirname, join, isfile
from shutil import copy
import re
import sys
def setup_python3():
# Taken from "distribute" setup.py
from distutils.filelist import FileList
from distutils import dir_util, file_util, util, log
tmp_src = join("build", "src")
log.set_verbosity(1)
fl = FileList()
for line in open("MANIFEST.in"):
if not line.strip():
continue
fl.process_template_line(line)
dir_util.create_tree(tmp_src, fl.files)
outfiles_2to3 = []
for f in fl.files:
outf, copied = file_util.copy_file(f, join(tmp_src, f), update=1)
if copied and outf.endswith(".py"):
outfiles_2to3.append(outf)
util.run_2to3(outfiles_2to3)
# arrange setup to use the copy
sys.path.insert(0, tmp_src)
return tmp_src
def find_longdesc():
for path in ("docs/api/py/index.rst", "docs/index.rst"):
try:
index = join(dirname(__file__), path)
return open(index).read()
except IOError:
pass
print("WARNING: Can't find index.rst")
return ""
def revision():
svn_rev = "$Revision$"
match = re.search("\d+", svn_rev)
return match and match.group() or "unknown"
def _copy_ext_file(driver, name):
filename = join("build", driver, name)
if not isfile(filename):
return 0
dest = join(driver, "src", "py")
copy(filename, dest)
return 1
if sys.version_info >= (3,):
src_root = setup_python3()
else:
src_root = "."
# FIXME: We silently fail since on sdist this will work and on install will
# fail, find a better way
_copy_ext_file("firefox", "webdriver.xpi")
_copy_ext_file("chrome", "chrome-extension.zip")
setup(
cmdclass={'install': install},
name='selenium',
version="2.0-dev-%s" % revision(),
description='Python bindings for Selenium',
long_description=find_longdesc(),
url='http://code.google.com/p/selenium/',
src_root=src_root,
package_dir={
'selenium':'.',
'selenium.ie': 'jobbie/src/py',
'selenium.firefox': 'firefox/src/py',
'selenium.chrome' : 'chrome/src/py',
'selenium.chrome_tests': 'chrome/test/py',
'selenium.common': 'common/src/py',
'selenium.docs': 'docs/api/py',
'selenium.remote': 'remote/client/src/py',
'selenium.common_tests': 'common/test/py',
'selenium.common_web': 'common/src/web',
'selenium.firefox_tests': 'firefox/test/py',
'selenium.ie_tests': 'jobbie/test/py',
'selenium.remote_tests': 'remote/client/test/py',
'selenium.selenium': 'selenium/src/py',
},
packages=['selenium',
'selenium.common',
'selenium.docs',
'selenium.firefox',
'selenium.ie',
'selenium.chrome',
'selenium.remote',
'selenium.common_tests',
'selenium.common_web',
'selenium.firefox_tests',
'selenium.ie_tests',
'selenium.chrome_tests',
'selenium.remote_tests',
'selenium.selenium'],
package_data = {
'selenium.firefox':['*.xpi']
},
include_package_data=True,
install_requires=['distribute'],
zip_safe=False,
)
# FIXME: Do manually
# == IE ==
# cp jobbie/prebuilt/Win32/Release/InternetExplorerDriver.dll \
# build/lib.<platform>/webdriver/ie
# == Chrome ==
# cp chrome/src/extension build/lib.<platform>/webdriver/chrome
# On win32
# cp chrome/prebuilt/Win32/Release/npchromedriver.dll build/lib/webdriver/chrome
|
Python
| 0
|
@@ -1902,24 +1902,83 @@
evision():%0D%0A
+ # svn_rev is updated by subversion using svn:keywords%0D%0A
svn_rev
|
3b951d60e4ef22ea0b9edcbb83cd44aecc773ae9
|
Version 0.3.4
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name='megacl',
version='0.3.3',
description='mega.co.nz command line client.',
author='Arthibus Gisséhel',
author_email='public-dev-megacl@gissehel.org',
url='https://github.com/gissehel/megacl.git',
packages=['megacllib'],
scripts=['mcl','megacl'],
license='MIT',
keywords='commandline mega.co.nz mega',
long_description=open('README.rst').read(),
install_requires=['supertools','cltools','mega.py',
'requests', # non declared yet mega.py dependency
'pycrypto', # non declared yet mega.py dependency
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Topic :: Communications',
'Topic :: Internet',
'Topic :: System :: Filesystems',
'Topic :: Utilities',
],
)
|
Python
| 0.000001
|
@@ -125,17 +125,17 @@
on='0.3.
-3
+4
',%0A
|
0a40ab01070018fc3ca32008f55c18e2b65aa23b
|
add support for python 3.10 (#181)
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import os
import setuptools
name = "google-cloud-tasks"
description = "Cloud Tasks API API client library"
version = "2.6.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
"google-api-core[grpc] >= 1.26.0, <3.0.0dev",
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
"proto-plus >= 0.4.0",
"packaging >= 14.3",
]
extras = {"libcst": "libcst >= 0.2.5"}
package_root = os.path.abspath(os.path.dirname(__file__))
readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
readme = readme_file.read()
packages = [
package
for package in setuptools.PEP420PackageFinder.find()
if package.startswith("google")
]
namespaces = ["google"]
if "google.cloud" in packages:
namespaces.append("google.cloud")
setuptools.setup(
name=name,
version=version,
description=description,
long_description=readme,
author="Google LLC",
author_email="googleapis-packages@google.com",
license="Apache 2.0",
url="https://github.com/googleapis/python-tasks",
classifiers=[
release_status,
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Operating System :: OS Independent",
"Topic :: Internet",
],
platforms="Posix; MacOS X; Windows",
packages=packages,
namespace_packages=namespaces,
install_requires=dependencies,
python_requires=">=3.6",
scripts=[
"scripts/fixup_tasks_v2_keywords.py",
"scripts/fixup_tasks_v2beta2_keywords.py",
"scripts/fixup_tasks_v2beta3_keywords.py",
],
include_package_data=True,
zip_safe=False,
)
|
Python
| 0
|
@@ -2257,16 +2257,115 @@
: 3.8%22,%0A
+ %22Programming Language :: Python :: 3.9%22,%0A %22Programming Language :: Python :: 3.10%22,%0A
|
9f542a553e4030b62358ec7f41f23d952608ee75
|
Bump flake8 from 3.8.3 to 3.8.4
|
setup.py
|
setup.py
|
import re
from setuptools import setup, find_packages
EXTRAS_REQUIRE = {
"yaml": ["PyYAML>=3.10"],
"validation": ["prance[osv]>=0.11"],
"lint": ["flake8==3.8.3", "flake8-bugbear==20.1.4", "pre-commit~=2.4"],
"docs": [
"marshmallow>=3.0.0",
"pyyaml==5.3.1",
"sphinx==3.2.1",
"sphinx-issues==1.2.0",
"sphinx-rtd-theme==0.5.0",
],
}
EXTRAS_REQUIRE["tests"] = (
EXTRAS_REQUIRE["yaml"]
+ EXTRAS_REQUIRE["validation"]
+ ["marshmallow>=3.0.0", "pytest", "mock"]
)
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
def find_version(fname):
"""Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ""
with open(fname) as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError("Cannot find version information.")
return version
def read(fname):
with open(fname) as fp:
content = fp.read()
return content
setup(
name="apispec",
version=find_version("src/apispec/__init__.py"),
description="A pluggable API specification generator. Currently supports the "
"OpenAPI Specification (f.k.a. the Swagger specification).",
long_description=read("README.rst"),
author="Steven Loria",
author_email="sloria1@gmail.com",
url="https://github.com/marshmallow-code/apispec",
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
extras_require=EXTRAS_REQUIRE,
license="MIT",
zip_safe=False,
keywords="apispec swagger openapi specification oas documentation spec rest api",
python_requires=">=3.6",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
],
test_suite="tests",
project_urls={
"Funding": "https://opencollective.com/marshmallow",
"Issues": "https://github.com/marshmallow-code/apispec/issues",
"Tidelift": "https://tidelift.com/subscription/pkg/pypi-apispec?utm_source=pypi-apispec&utm_medium=pypi", # noqa: E501
},
)
|
Python
| 0
|
@@ -164,17 +164,17 @@
e8==3.8.
-3
+4
%22, %22flak
|
ab4f0a5bdd640f31ddd03969d1cc6ea38bb79ce0
|
Update version
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='cmsplugin-contact',
version='1.1.2',
description='Extendable contact form plugin for Django CMS with spam protection and i18n',
long_description=open('README.rst').read(),
author='Maccesch',
author_email='maccesch@gmail.com',
url='http://github.com/maccesch/cmsplugin-contact',
packages=find_packages(),
keywords='contact form django cms django-cms spam protection email',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
include_package_data=True,
zip_safe=False,
install_requires=[],
)
|
Python
| 0
|
@@ -96,9 +96,9 @@
1.1.
-2
+3
',%0A
|
4f2ed94d507bbd041aedd49aadb78a16c4c2f5d9
|
Update dependency range for api-core to include v1.0.0 releases (#4944)
|
setup.py
|
setup.py
|
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import os
import setuptools
# Package metadata.
name = 'google-cloud-translate'
description = 'Google Cloud Translation API client library'
version = '1.3.1.dev1'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
# 'Development Status :: 5 - Stable'
release_status = 'Development Status :: 5 - Production/Stable'
dependencies = [
'google-cloud-core<0.29dev,>=0.28.0',
'google-api-core<0.2.0dev,>=0.1.1',
]
extras = {
}
# Setup boilerplate below this line.
package_root = os.path.abspath(os.path.dirname(__file__))
readme_filename = os.path.join(package_root, 'README.rst')
with io.open(readme_filename, encoding='utf-8') as readme_file:
readme = readme_file.read()
# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
packages = [
package for package in setuptools.find_packages()
if package.startswith('google')]
# Determine which namespaces are needed.
namespaces = ['google']
if 'google.cloud' in packages:
namespaces.append('google.cloud')
setuptools.setup(
name=name,
version=version,
description=description,
long_description=readme,
author='Google LLC',
author_email='googleapis-packages@google.com',
license='Apache 2.0',
url='https://github.com/GoogleCloudPlatform/google-cloud-python',
classifiers=[
release_status,
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'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',
'Operating System :: OS Independent',
'Topic :: Internet',
],
platforms='Posix; MacOS X; Windows',
packages=packages,
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
include_package_data=True,
zip_safe=False,
)
|
Python
| 0
|
@@ -1016,19 +1016,19 @@
pi-core%3C
-0.2
+2.0
.0dev,%3E=
|
c2aa884af9b32f223d440cf0c987026c0f6abb7e
|
fix configparser
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import glob
import os
import sys
import ah_bootstrap
from setuptools import setup
#A dirty hack to get around some early import/configurations ambiguities
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
builtins._ASTROPY_SETUP_ = True
from astropy_helpers.setup_helpers import (register_commands, get_debug_option,
get_package_info)
from astropy_helpers.git_helpers import get_git_devstr
from astropy_helpers.version_helpers import generate_version_py
# Get some values from the setup.cfg
from distutils import config
conf = config.ConfigParser()
conf.read(['setup.cfg'])
metadata = dict(conf.items('metadata'))
PACKAGENAME = metadata.get('package_name', 'packagename')
DESCRIPTION = metadata.get('description', 'Astropy affiliated package')
AUTHOR = metadata.get('author', '')
AUTHOR_EMAIL = metadata.get('author_email', '')
LICENSE = metadata.get('license', 'unknown')
URL = metadata.get('url', 'http://astropy.org')
# Get the long description from the package's docstring
__import__(PACKAGENAME)
package = sys.modules[PACKAGENAME]
LONG_DESCRIPTION = package.__doc__
# Store the package name in a built-in variable so it's easy
# to get from other parts of the setup infrastructure
builtins._ASTROPY_PACKAGE_NAME_ = PACKAGENAME
# VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
VERSION = '0.0.dev'
# Indicates if this version is a release version
RELEASE = 'dev' not in VERSION
if not RELEASE:
VERSION += get_git_devstr(False)
# Populate the dict of setup command overrides; this should be done before
# invoking any other functionality from distutils since it can potentially
# modify distutils' behavior.
cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
# Freeze build information in version.py
generate_version_py(PACKAGENAME, VERSION, RELEASE,
get_debug_option(PACKAGENAME))
# Treat everything in scripts except README.rst as a script to be installed
scripts = [fname for fname in glob.glob(os.path.join('scripts', '*'))
if os.path.basename(fname) != 'README.rst']
# Get configuration information from all of the various subpackages.
# See the docstring for setup_helpers.update_package_files for more
# details.
package_info = get_package_info()
# Add the project-global data
package_info['package_data'].setdefault(PACKAGENAME, [])
package_info['package_data'][PACKAGENAME].append('data/*')
# Define entry points for command-line scripts
entry_points = {'console_scripts': []}
entry_point_list = conf.items('entry_points')
for entry_point in entry_point_list:
entry_points['console_scripts'].append('{0} = {1}'.format(entry_point[0],
entry_point[1]))
# Include all .c files, recursively, including those generated by
# Cython, since we can not do this in MANIFEST.in with a "dynamic"
# directory name.
c_files = []
for root, dirs, files in os.walk(PACKAGENAME):
for filename in files:
if filename.endswith('.c'):
c_files.append(
os.path.join(
os.path.relpath(root, PACKAGENAME), filename))
package_info['package_data'][PACKAGENAME].extend(c_files)
# Note that requires and provides should not be included in the call to
# ``setup``, since these are now deprecated. See this link for more details:
# https://groups.google.com/forum/#!topic/astropy-dev/urYO8ckB2uM
setup(name=PACKAGENAME,
version=VERSION,
description=DESCRIPTION,
scripts=scripts,
install_requires=['astropy'],
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
url=URL,
long_description=LONG_DESCRIPTION,
cmdclass=cmdclassd,
zip_safe=False,
use_2to3=True,
entry_points=entry_points,
**package_info
)
|
Python
| 0.000006
|
@@ -662,30 +662,42 @@
cfg%0A
-from distutils
+try:%0A from ConfigParser
import
conf
@@ -696,22 +696,91 @@
ort
-c
+C
onfig
+Parser%0Aexcept ImportError:%0A from configparser import ConfigParser%0A
%0Aconf =
conf
@@ -779,15 +779,8 @@
f =
-config.
Conf
|
d3d66ba7f851884466b53caaddf100191a7da403
|
Version bump.
|
setup.py
|
setup.py
|
from setuptools import setup
try:
from pypandoc import convert
def read_md(f): return convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
def read_md(f): return open(f, 'r').read()
long_description = read_md('README.md')
setup(
name='django-plantains',
version='0.1.0',
description='Persistable oauth2 Mailchimp backend for Django.',
long_description=long_description,
keywords='django, mailchimp, oauth2',
author='Andrew Velis',
author_email='andrew.velis@gmail.com',
url='https://github.com/avelis/django-plantains/',
license='BSD',
packages=[
'plantains',
'plantains.migrations',
],
zip_safe=False,
install_requires=[
'Django>=1.8.1',
'requests',
'jsonfield==1.0.3',
],
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Framework :: Django',
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
|
Python
| 0
|
@@ -353,17 +353,17 @@
on='0.1.
-0
+1
',%0A d
|
bfc85ac3d2b29e5287fa556e0e2215bc39668db5
|
Replace thriftpy dependency with thriftpy2
|
setup.py
|
setup.py
|
"""setup.py - build script for parquet-python."""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='parquet',
version='1.2',
description='Python support for Parquet file format',
author='Joe Crobak',
author_email='joecrow@gmail.com',
url='https://github.com/jcrobak/parquet-python',
license='Apache License 2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
packages=['parquet'],
install_requires=[
'python-snappy',
'thriftpy>=0.3.6',
],
extras_require={
':python_version=="2.7"': [
"backports.csv",
],
},
entry_points={
'console_scripts': [
'parquet = parquet.__main__:main',
]
},
package_data={'parquet': ['*.thrift']},
include_package_data=True,
)
|
Python
| 0.9999
|
@@ -1138,15 +1138,9 @@
ftpy
-%3E=0.3.6
+2
',%0A
|
de051cd25e1f4f5dacb6a3d50cf2d3bf569f712d
|
Remove unused import
|
setup.py
|
setup.py
|
import sys
from setuptools import setup
_version_file = 'hooked/version.py'
with open(_version_file) as vf:
exec(vf.read())
setup(
name='django-gapi-hooked',
version=__version__,
author='G Adventures',
author_email='software@gadventures.com',
description='A tiny library to add a G Adventures API Web Hook receiver view to your code base.',
download_url='https://github.com/gadventures/django-gapi-hooked/tarball/%s' % __version__,
url='https://github.com/gadventures/django-gapi-hooked',
packages=[
'hooked',
],
install_requires=[
'Django>=1.6',
],
keywords=[
'gapi',
'g adventures',
'g api',
'gapipy'
],
setup_requires=[
'pytest-runner',
],
tests_require=[
'pytest',
'pytest-django',
],
)
|
Python
| 0.000001
|
@@ -1,15 +1,4 @@
-import sys%0A
from
|
e5b388ade150cfd294b8b5e2e09a2394307189e5
|
bump version
|
setup.py
|
setup.py
|
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='zensend',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.2.0',
description='ZenSend python bindings',
long_description=long_description,
# The project's main homepage.
url='https://github.com/zensend/zensend_python_api',
# Author details
author='ZenSend',
author_email='tech@fonix.io',
# Choose your license
license='MIT',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
# What does your project relate to?
keywords='sms',
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=['requests >= 2.6.0'],
# List additional groups of dependencies here (e.g. development
# dependencies). You can install these using the following syntax,
# for example:
# $ pip install -e .[dev,test]
extras_require={
'dev': ['check-manifest'],
'test': ['coverage', 'responses', 'unittest2'],
},
# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
package_data={
},
test_suite="tests"
)
|
Python
| 0
|
@@ -607,17 +607,17 @@
sion='1.
-2
+3
.0',%0A%0A
|
c4e1059b387269b6098d05d2227c085e7931b140
|
Update module description for clarity
|
setup.py
|
setup.py
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from distutils.core import setup, Extension
cpp_args = ['-std=c++11', '-stdlib=libc++', '-mmacosx-version-min=10.7']
ext_modules = [
Extension(
'make_asym',
['make_asym.cc'],
include_dirs=['include'],
language='c++',
extra_compile_args=cpp_args,
),
]
setup(
name='make_asym',
version='0.1',
author='Nate Lust',
author_email='nlust@astro.princeton.edu',
description='A python extension module for calculating asymmetry values',
ext_modules=ext_modules,
)
|
Python
| 0
|
@@ -636,25 +636,8 @@
='A
-python extension
modu
@@ -655,16 +655,37 @@
ulating
+centers though least
asymmetr
@@ -689,15 +689,8 @@
etry
- values
',%0A
|
5236a10ab4e7d55c288fc7c093be25325edb4383
|
Make debugging easier by showing server quit messages that came from SQUIT
|
txircd/modules/rfc/cmd_squit.py
|
txircd/modules/rfc/cmd_squit.py
|
from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from txircd.utils import ircLower
from zope.interface import implements
class ServerQuit(ModuleData):
implements(IPlugin, IModuleData)
name = "ServerQuit"
core = True
def actions(self):
return [ ("serverquit", 1, self.sendSQuit),
("commandpermission-SQUIT", 1, self.restrictSQuit) ]
def userCommands(self):
return [ ("SQUIT", 1, UserSQuit(self.ircd)) ]
def serverCommands(self):
return [ ("SQUIT", 1, ServerSQuit(self.ircd)),
("RSQUIT", 1, RemoteSQuit(self.ircd)) ]
def sendSQuit(self, server, reason):
if not server.bursted:
if server.serverID:
server.sendMessage("SQUIT", server.serverID, reason, prefix=server.nextClosest)
return
closestHop = server
while closestHop.nextClosest != self.ircd.serverID:
closestHop = self.ircd.servers[closestHop.nextClosest]
if closestHop == server:
closestHop = None
self.ircd.broadcastToServers(closestHop, "SQUIT", server.serverID, reason, prefix=server.nextClosest)
def restrictSQuit(self, user, data):
if not self.ircd.runActionUntilValue("userhasoperpermission", user, "command-squit", users=[user]):
user.sendMessage(irc.ERR_NOPRIVILEGES, "Permission denied - You do not have the correct operator privileges")
return False
return None
class UserSQuit(Command):
implements(ICommand)
def __init__(self, ircd):
self.ircd = ircd
def parseParams(self, user, params, prefix, tags):
if len(params) < 2:
user.sendSingleError("SQuitParams", irc.ERR_NEEDMOREPARAMS, "SQUIT", "Not enough parameters")
return None
source = self.ircd.serverID
if params[0] not in self.ircd.serverNames:
if ircLower(params[0]) == ircLower(self.ircd.name):
user.sendSingleError("SQuitTarget", irc.ERR_NOSUCHSERVER, self.ircd.name, "You can't unlink this server from itself")
return None
user.sendSingleError("SQuitTarget", irc.ERR_NOSUCHSERVER, params[0], "No such server")
return None
return {
"source": source,
"target": self.ircd.servers[self.ircd.serverNames[params[0]]],
"reason": params[1]
}
def execute(self, user, data):
targetServer = data["target"]
reason = data["reason"]
if targetServer.nextClosest == self.ircd.serverID:
targetServer.disconnect(reason)
user.sendMessage("NOTICE", "*** Disconnected {}".format(targetServer.name))
else:
targetServer.sendMessage("RSQUIT", targetServer.serverID, reason, prefix=self.ircd.serverID)
user.sendMessage("NOTICE", "*** Sent remote SQUIT for {}".format(targetServer.name))
return True
class ServerSQuit(Command):
implements(ICommand)
def __init__(self, ircd):
self.ircd = ircd
def parseParams(self, server, params, prefix, tags):
if len(params) != 2:
return None
targetServerID = params[0]
if targetServerID == self.ircd.serverID:
targetServerID = prefix
if targetServerID not in self.ircd.servers:
if targetServerID in self.ircd.recentlyQuitServers:
return {
"lostserver": True
}
return None
return {
"target": self.ircd.servers[targetServerID],
"reason": params[1]
}
def execute(self, server, data):
if "lostserver" not in data:
data["target"].disconnect(data["reason"])
return True
class RemoteSQuit(Command):
implements(ICommand)
def __init__(self, ircd):
self.ircd = ircd
def parseParams(self, server, params, prefix, tags):
if len(params) != 2:
return None
if params[0] not in self.ircd.servers:
if params[0] in self.ircd.recentlyQuitServers:
return {
"lostserver": True
}
return None
return {
"target": self.ircd.servers[params[0]],
"reason": params[1]
}
def execute(self, server, data):
if "lostserver" in data:
return True
targetServer = data["target"]
if targetServer.nextClosest == self.ircd.serverID:
targetServer.disconnect(data["reason"])
return True
targetServer.sendMessage("RSQUIT", targetServer.serverID, data["reason"], prefix=targetServer.nextClosest)
return True
squit = ServerQuit()
|
Python
| 0
|
@@ -3285,32 +3285,79 @@
et%22%5D.disconnect(
+%22Received SQUIT from remote server: %7B%7D%22.format(
data%5B%22reason%22%5D)%0A
@@ -3355,16 +3355,17 @@
eason%22%5D)
+)
%0A%09%09retur
|
c4c62593be68afb2431a4cae5fd17c2ab4636881
|
fix packaging for sfa-nuke-plc.py
|
setup.py
|
setup.py
|
#!/usr/bin/python
"""
Installation script for the geniwrapper module
"""
import os, sys
import shutil
from distutils.core import setup
scripts = [ 'config/sfa-config-tty',
'sfa/plc/sfa-import-plc.py',
'sfa/server/sfa-server.py',
'sfa/client/sfi.py',
'sfa/client/getNodes.py',
'sfa/client/getRecord.py',
'sfa/client/setRecord.py',
'sfa/client/genidump.py',
]
package_dirs = [ 'sfa',
'sfa/client',
'sfa/methods',
'sfa/plc',
'sfa/server',
'sfa/trust',
'sfa/util',
]
data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml',
'config/registries.xml',
'config/sfa_config',
'config/sfi_config',
]),
('/etc/init.d/', ['sfa/init.d/sfa']),
]
initscripts = [ '/etc/init.d/sfa' ]
if sys.argv[1] in ['uninstall', 'remove', 'delete', 'clean']:
python_path = sys.path
site_packages_path = [ path + os.sep + 'sfa' for path in python_path if path.endswith('site-packages')]
remove_dirs = ['/etc/sfa/'] + site_packages_path
remove_files = [ '/usr/bin/sfa-config-tty',
'/usr/bin/sfa-import-plc.py',
'/usr/bin/sfa-nuke-plc.py',
'/usr/bin/sfa-server.py',
'/usr/bin/sfi.py',
'/usr/bin/getNodes.py',
'/usr/bin/getRecord.py',
'/usr/bin/setRecord.py',
'/usr/bin/genidump.py',
] + initscripts
# remove files
for filepath in remove_files:
print "removing", filepath, "...",
try:
os.remove(filepath)
print "success"
except: print "failed"
# remove directories
for directory in remove_dirs:
print "removing", directory, "...",
try:
shutil.rmtree(directory)
print "success"
except: print "failed"
else:
# avoid repeating what's in the specfile already
setup(name='sfa',
packages = package_dirs,
data_files = data_files,
ext_modules = [],
py_modules = [],
scripts = scripts,
)
|
Python
| 0
|
@@ -79,15 +79,24 @@
ort
-os, sys
+sys, os, os.path
%0Aimp
@@ -140,22 +140,19 @@
setup%0A%0A
-script
+bin
s = %5B 'c
@@ -208,32 +208,72 @@
mport-plc.py', %0A
+ 'sfa/plc/sfa-nuke-plc.py', %0A
'sfa
@@ -499,16 +499,87 @@
%5D%0A
+remove_bins = %5B '/usr/bin/' + os.path.basename(bin) for bin in bins %5D%0A%0A
package_
@@ -1438,431 +1438,19 @@
s =
-%5B '/usr/bin/sfa-config-tty',%0A '/usr/bin/sfa-import-plc.py', %0A '/usr/bin/sfa-nuke-plc.py', %0A '/usr/bin/sfa-server.py', %0A '/usr/bin/sfi.py', %0A '/usr/bin/getNodes.py',%0A '/usr/bin/getRecord.py',%0A '/usr/bin/setRecord.py',%0A '/usr/bin/genidump.py',%0A %5D
+remove_bins
+ i
@@ -2118,22 +2118,19 @@
ripts =
-script
+bin
s, %0A
|
add478d733628b635ce320b9cb8353086a12fa58
|
Send numeric 381 (RPL_YOUREOPER) on successful oper attempt
|
txircd/modules/rfc/mech_oper.py
|
txircd/modules/rfc/mech_oper.py
|
from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IMode, IModuleData, Mode, ModuleData
from txircd.utils import ircLower, ModeType
from zope.interface import implements
from fnmatch import fnmatch
class Oper(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Oper"
core = True
def hookIRCd(self, ircd):
self.ircd = ircd
def userCommands(self):
return [ ("OPER", 1, UserOper(self.ircd)) ]
def actions(self):
return [ ("userhasoperpermission", 1, self.operPermission),
("modepermission-user-o", 1, self.nope) ]
def userModes(self):
return [ ("o", ModeType.NoParam, self) ]
def operPermission(self, user, permissionType):
# For now, we're just going to check for usermode +o
# Later, when we add a permission system, this can be expanded
return "o" in user.modes
def nope(self, user, settingUser, adding, param):
if adding:
return False
return None
class UserOper(Command):
implements(ICommand)
def __init__(self, ircd):
self.ircd = ircd
def parseParams(self, user, params, prefix, tags):
if len(params) < 2:
user.sendSingleError("OperCmd", irc.ERR_NEEDMOREPARAMS, "OPER", ":Not enough parameters")
return None
return {
"username": params[0],
"password": params[1]
}
def execute(self, user, data):
configuredOpers = self.ircd.config.getWithDefault("opers", {})
username = data["username"]
if username not in configuredOpers:
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
operData = configuredOpers[username]
if "password" not in operData:
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
password = data["password"]
if "hash" in operData:
compareFunc = "compare-{}".format(operData["hash"])
if compareFunc not in self.ircd.functionCache:
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
passwordMatch = self.ircd.functionCache[compareFunc](password, operData["password"])
else:
passwordMatch = (password == operData["password"])
if not passwordMatch:
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
if "host" in operData:
operHost = ircLower(operData["host"])
userHost = ircLower("{}@{}".format(user.ident, user.host))
if not fnmatch(userHost, operHost):
userHost = ircLower("{}@{}".format(user.ident, user.realhost))
if not fnmatch(userHost, operHost):
userHost = ircLower("{}@{}".format(user.ident, user.ip))
if not fnmatch(userHost, operHost):
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
if self.ircd.runActionUntilFalse("opercheck", user, username, password, operData): # Allow other modules to implement additional checks
user.sendMessage(irc.ERR_NOOPERHOST, ":Invalid oper credentials")
return True
user.setModes(self.ircd.serverID, "+o", [])
return True
oper = Oper()
|
Python
| 0
|
@@ -3494,16 +3494,92 @@
o%22, %5B%5D)%0A
+ user.sendMessage(irc.RPL_YOUREOPER, %22:You are now an IRC operator%22)%0A
|
a236613900a6b4af6cdce742309e5b6da88ef712
|
Use rolling filename policy for weights
|
src/c2w2c.py
|
src/c2w2c.py
|
import sys, os.path as path
import model_params
from time import strftime, localtime
from keras.layers import TimeDistributed, Input
from keras.models import Model
from keras.optimizers import Adam
from dataset import make_training_samples_generator, make_test_samples, load_dataset, make_char_vocabulary
from layers import FastDistribute
from models import C2W, LanguageModel, W2C
from util import info, Timer
from validation import test_model
sys.setrecursionlimit(40000)
params = model_params.from_cli_args()
params.print_params()
print 'Loading training data...'
training_data = load_dataset(params.training_dataset, params.train_data_limit)
training_data.print_stats()
print 'Loading test data...'
test_data = load_dataset(params.test_dataset, params.test_data_limit)
test_data.print_stats()
# Vocabularies
V_C = make_char_vocabulary([test_data, training_data])
# Test samples
print 'Preparing test samples...'
test_samples = make_test_samples(params, test_data, V_C)
# The actual C2W2C model
print 'Defining models...'
ctx_in = Input(shape=(params.n_context, params.maxlen, V_C.size), dtype='int8', name='context')
pred_in = Input(shape=(params.maxlen, V_C.size), dtype='int8', name='predicted_word')
W_ctx = FastDistribute(C2W(params, V_C))(ctx_in)
w_np1 = LanguageModel(params, V_C, state_seq=False)(W_ctx)
C_I = W2C(params, V_C, p_input=pred_in)([w_np1, pred_in])
c2w2c = Model(input=[ctx_in, pred_in], output=C_I)
# Separate sub-models for testing / perplexity
lm_Cin = Input(shape=(None, params.maxlen, V_C.size), dtype='int8', name='context')
lm_out = LanguageModel(params, V_C, state_seq=False)(TimeDistributed(C2W(params, V_C))(lm_Cin))
lm = Model(input=lm_Cin, output=lm_out)
w2c_Ein = Input(shape=(params.d_W,), dtype='float32', name='embedding')
w2c_Pin = Input(shape=(params.maxlen, V_C.size), dtype='int8', name='predicted_word')
w2c = W2C(params, V_C, e_input=w2c_Ein, p_input=w2c_Pin)
def update_weights():
lm_weights = [w for i in range(0, 3) for w in c2w2c.layers[i].get_weights()]
w2c_weights = c2w2c.layers[4].get_weights()
lm.set_weights(lm_weights)
w2c.set_weights(w2c_weights)
def delta_str(cur, prev):
return '(%s%f)' % ('-' if cur < prev else '+', abs(prev - cur)) if prev is not None else ''
print 'Compiling models...'
c2w2c.compile(optimizer=Adam(lr=params.learning_rate),
loss='categorical_crossentropy',
sample_weight_mode='temporal',
metrics=['accuracy'])
# optimizers are not important in LM and W2C because these models are used
# only for data validation, thus optimizer never gets used
lm.compile(optimizer='sgd', loss='mse')
w2c.compile(optimizer='sgd', loss='categorical_crossentropy')
print 'Compiled'
if params.init_weight_file:
if path.isfile(params.init_weight_file):
print 'Loading existing weights from "%s" ...' % params.init_weight_file
c2w2c.load_weights(params.init_weight_file)
else:
print 'Initial weight file not found: %s' % params.init_weight_file
fit_t = Timer()
test_t = Timer()
prev_pp = None
prev_loss = None
prev_acc = None
try:
print 'Training model...'
for e in range(0, params.n_epoch):
fit_t.start()
epoch = e + 1
print '=== Epoch %d ===' % epoch
gen, n_samples = make_training_samples_generator(params, training_data, V_C)
h = c2w2c.fit_generator(generator=gen,
samples_per_epoch=n_samples,
nb_epoch=1,
verbose=1)
fit_elapsed, fit_tot = fit_t.lap()
# needed for validation models LM and W2C
update_weights()
test_t.start()
loss = h.history['loss'][0]
acc = h.history['acc'][0]
pp, oov = test_model(params, lm, w2c, test_samples, test_data.vocabulary, V_C)
test_elapsed, test_tot = test_t.lap()
epoch_info = '''Epoch %d summary at %s:
- Model loss: %f %s
- Model accuracy: %f %s
- Model perplexity: %f %s
- OOV rate: %f
- Training took: %s
- Validation took: %s
- Total training: %s
- Total validation: %s''' % (epoch, strftime("%Y-%m-%d %H:%M:%S", localtime()), loss, delta_str(loss, prev_loss),
acc, delta_str(acc, prev_acc), pp, delta_str(pp, prev_pp), oov, fit_elapsed,
test_elapsed, fit_tot, test_tot)
print ''
info(epoch_info)
if params.save_weight_file and (prev_loss is None or prev_loss > loss):
c2w2c.save_weights(params.save_weight_file, overwrite=True)
print 'Model weights saved'
prev_acc = acc
prev_loss = loss
prev_pp = pp
print 'Training complete'
except KeyboardInterrupt:
print 'Training interrupted. Bye'
|
Python
| 0
|
@@ -4510,33 +4510,73 @@
-c2w2c.save_weights(params
+filename = '%25s.%25d' %25 (params.save_weight_file, e %25 5)%0A c2w2c
.sav
@@ -4583,21 +4583,26 @@
e_weight
-_
+s(
file
+name
, overwr
@@ -4643,17 +4643,34 @@
ts saved
-'
+ to %25s' %25 filename
%0A%0A pr
|
c233359e79288812beb45978fa53f764a280f29a
|
Add tests for Terrain3D
|
tests/test_terraindisplay.py
|
tests/test_terraindisplay.py
|
import unittest
from randterrainpy import *
class Terrain2DTester(unittest.TestCase):
def setUp(self):
self.ter1 = Terrain(100, 100) # all black
self.ter2 = Terrain(200, 200) # all white
for x in range(self.ter2.width):
for y in range(self.ter2.length):
self.ter2[x, y] = 1
self.ter3 = Terrain(100, 100) # main diagonal is increasing brightness downwards
for x in range(self.ter3.width):
for y in range(self.ter3.length):
if x == y:
self.ter3[x, y] = float(y) / self.ter1.length
self.ter4 = Terrain(200, 100) # checkerboard pattern
for x in range(self.ter4.width):
for y in range(self.ter4.length):
self.ter4[x, y] = 1 if (x + y) % 2 == 0 else 0
def test_display(self):
self.ter1.display_2d()
self.assertEqual(input("Was the display all black? (y/n): "), "y")
self.ter2.display_2d()
self.assertEqual(input("Was the display all white? (y/n): "), "y")
self.ter3.display_2d()
self.assertEqual(input("Did the display have a whitening diagonal downwards? (y/n): "), "y")
self.ter4.display_2d()
self.assertEqual(input("Was the display a checkerboard? (y/n): "), "y")
class Terrain3DTester(unittest.TestCase):
pass
if __name__ == "__main__":
unittest.main()
|
Python
| 0
|
@@ -592,17 +592,17 @@
self.ter
-1
+3
.length%0A
@@ -1346,16 +1346,1148 @@
e):%0A
+%0A
-pass
+def setUp(self):%0A self.ter1 = Terrain(100, 100) # all low%0A self.ter2 = Terrain(200, 200) # all high%0A for x in range(self.ter2.width):%0A for y in range(self.ter2.length):%0A self.ter2%5Bx, y%5D = 1%0A self.ter3 = Terrain(100, 100) # diagonal on one edge is a ramp%0A for x in range(min(self.ter3.width, self.ter3.length)):%0A self.ter3%5Bx, 0%5D = float(x) / self.ter3.length%0A self.ter4 = Terrain(200, 100) # ramp increasing down y axis%0A for x in range(self.ter4.width):%0A for y in range(self.ter4.length):%0A self.ter4%5Bx, y%5D = float(y) / self.ter4.length%0A%0A def test_display(self):%0A self.ter1.display_3d()%0A self.assertEqual(input(%22Was the terrain all low? (y/n): %22), %22y%22)%0A self.ter2.display_3d()%0A self.assertEqual(input(%22Was the terrain all high? (y/n): %22), %22y%22)%0A self.ter3.display_3d()%0A self.assertEqual(input(%22Was the terrain a thin ramp on one edge of the plot? (y/n): %22), %22y%22)%0A self.ter4.display_3d()%0A self.assertEqual(input(%22Was the terrain a ramp upwards? (y/n): %22), %22y%22)
%0A%0A%0Ai
|
bc8bd227c3d15cde8b2a46c40f7188c34026046d
|
Make assertion about status code
|
tests/test_unknown_target.py
|
tests/test_unknown_target.py
|
"""
Tests for passing invalid target IDs to helpers which require a target ID to
be given.
"""
from typing import Any, Callable, Dict, Union
import pytest
from _pytest.fixtures import SubRequest
from vws import VWS
from vws.exceptions import UnknownTarget
@pytest.fixture()
def _delete_target(client: VWS) -> Callable[[str], None]:
return client.delete_target
@pytest.fixture()
def _get_target_record(client: VWS,
) -> Callable[[str], Dict[str, Union[str, int]]]:
return client.get_target_record
@pytest.fixture()
def _wait_for_target_processed(client: VWS) -> Any:
return client.wait_for_target_processed
@pytest.fixture()
def _get_target_summary_report(
client: VWS,
) -> Callable[[str], Dict[str, Union[str, int]]]:
return client.get_target_summary_report
@pytest.mark.parametrize(
'fixture',
[
'_delete_target',
'_get_target_record',
'_wait_for_target_processed',
'_get_target_summary_report',
],
)
def test_invalid_given_id(
fixture: Callable[[str], None],
request: SubRequest,
) -> None:
"""
Giving an invalid ID to a helper which requires a target ID to be given
causes an ``UnknownTarget`` exception to be raised.
"""
func = request.getfixturevalue(fixture)
with pytest.raises(UnknownTarget):
func(target_id='x')
|
Python
| 0.002373
|
@@ -189,16 +189,43 @@
bRequest
+%0Afrom requests import codes
%0A%0Afrom v
@@ -1351,16 +1351,23 @@
nTarget)
+ as exc
:%0A
@@ -1388,8 +1388,69 @@
id='x')%0A
+ assert exc.value.response.status_code == codes.NOT_FOUND%0A
|
c3834af13fb14d0961e7e8ce29c3bbbe91ebb5ce
|
Update mbutil to 0.2.0
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import sys
import mbtoolbox
with open('mbtoolbox/__init__.py') as f:
for line in f:
if line.find("__version__") >= 0:
version = line.split("=")[1].strip()
version = version.strip('"')
version = version.strip("'")
continue
open_kwds = {}
if sys.version_info > (3,):
open_kwds['encoding'] = 'utf-8'
with open('README.md', **open_kwds) as f:
readme = f.read()
setup(
name='mbtoolbox',
version=mbtoolbox.__version__,
description="MBTiles toolbox tool for optimizing and verifying MBTiles files",
long_description=readme,
classifiers=[],
keywords='',
author='Lukas Martinelli',
author_email='me@lukasmartinelli.ch',
url='https://github.com/lukasmartinelli/mbtoolbox',
license='BSD',
packages=find_packages(exclude=[]),
include_package_data=True,
install_requires=['docopt==0.6.2', 'mercantile==0.8.3',
'humanize==0.5.1', 'mbutil==0.2.0beta'],
dependency_links=['https://github.com/mapbox/mbutil/tarball/master#egg=mbutil-0.2.0beta'],
scripts = ['bin/mbverify', 'bin/mboptimize']
)
|
Python
| 0.000002
|
@@ -1010,28 +1010,24 @@
butil==0.2.0
-beta
'%5D,%0A depe
|
d388dc6c620b0e7164a4f97d6876a99d5e8fade3
|
Add nbformat to setup.py requirements
|
setup.py
|
setup.py
|
from setuptools import setup
VERSION = 'v0.0.1'
setup(name='depfinder',
version=VERSION,
author='Eric Dill',
author_email='thedizzle@gmail.com',
py_modules=['depfinder'],
description='Find all the imports in your library',
url='http://github.com/ericdill/depfinder',
platforms='Cross platform (Linux, Mac OSX, Windows)',
install_requires=['stdlib_list', 'setuptools'],
)
|
Python
| 0
|
@@ -407,13 +407,25 @@
uptools'
+, 'nbformat'
%5D,%0A)%0A
|
a52c84f092d89f89130c2696c98779e955f083dc
|
Add tests for version splitting
|
tests/test_version_parser.py
|
tests/test_version_parser.py
|
import pytest
from leak.version_parser import versions_split
def test_versions_split():
pass
def test_wrong_versions_split():
# too many dots
assert versions_split('1.2.3.4') == [0, 0, 0]
# test missing numeric version
with pytest.raises(ValueError):
versions_split('not.numeric')
# test not string provided
with pytest.raises(AttributeError):
versions_split(12345)
|
Python
| 0
|
@@ -92,12 +92,410 @@
-p
ass
+ert versions_split('1.8.1') == %5B1, 8, 1%5D%0A assert versions_split('1.4') == %5B1, 4, 0%5D%0A assert versions_split('2') == %5B2, 0, 0%5D%0A%0A%0Adef test_versions_split_str_mapping():%0A assert versions_split('1.11rc1', type_applyer=str) == %5B'1', '11rc1', '0'%5D%0A assert versions_split('1.10b1', type_applyer=str) == %5B'1', '10b1', '0'%5D%0A assert versions_split('text', type_applyer=str) == %5B'text', '0', '0'%5D
%0A%0A%0Ad
|
bb9d412341a5495c32a76638632a3407080cc4dc
|
Version bump.
|
setup.py
|
setup.py
|
from os.path import abspath, dirname, join, normpath
from setuptools import setup
setup(
# Basic package information:
name = 'Flask-Heroku-Cacheify',
version = '1.3',
py_modules = ('flask_cacheify', ),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package dependencies:
install_requires = [
'Flask-Cache>=0.11.1',
'pylibmc>=1.2.3',
'redis>=2.7.2'
],
# Metadata for PyPI:
author = 'Randall Degges',
author_email = 'rdegges@gmail.com',
license = 'UNLICENSE',
url = 'https://github.com/rdegges/flask-heroku-cacheify',
keywords = 'flask heroku cloud cache memcache memcached redis awesome',
description = 'Automatic Flask cache configuration on Heroku.',
long_description = open(normpath(join(dirname(abspath(__file__)),
'README.md'))).read()
)
|
Python
| 0
|
@@ -172,17 +172,17 @@
on = '1.
-3
+4
',%0A p
|
1a9a4ea4c097724ec25e8d20104f3e384c37647d
|
Bump to 0.1.2
|
setup.py
|
setup.py
|
# Copyright (c) 2008, Idan Gazit
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the author nor the names of other
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
setup(
name = "consonance",
version = "0.1.1",
packages = find_packages(),
author = "Idan Gazit",
author_email = "idan@pixane.net",
description = "A django app for consuming public FriendFeed streams.",
url = "http://github.com/idangazit/consonance/",
license = "BSD",
classifiers = [
"Framework :: Django",
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
#package_data = {"": ["*.rst", "*.html", "*.txt", "ez_setup.py"]},
scripts = ["consonance_fetch.py"],
include_package_data = True,
)
|
Python
| 0.000596
|
@@ -1703,17 +1703,17 @@
= %220.1.
-1
+2
%22,%0A p
|
4121a03db5dd226039f585369941b955c9aba88e
|
This is 5.15.0
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""
Raven
=====
Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
`Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons
<http://www.pylonsproject.org/>`_. Raven also includes drop-in support for any
`WSGI <http://wsgi.readthedocs.org/>`_-compatible web application.
"""
# Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when running `python
# setup.py test` (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
for m in ('multiprocessing', 'billiard'):
try:
__import__(m)
except ImportError:
pass
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
install_requires = [
'contextlib2',
]
unittest2_requires = ['unittest2']
flask_requires = [
'Flask>=0.8',
'blinker>=1.1',
]
flask_tests_requires = [
'Flask-Login>=0.2.0',
]
webpy_tests_requires = [
'paste',
'web.py',
]
# If it's python3, remove unittest2 & web.py
if sys.version_info[0] == 3:
unittest2_requires = []
webpy_tests_requires = []
# If it's python3.2 or greater, don't use contextlib backport
if sys.version_info[1] >= 2:
install_requires.remove('contextlib2')
tests_require = [
'six',
'bottle',
'celery>=2.5',
'Django>=1.4',
'django-celery>=2.5',
'exam>=0.5.2',
'flake8>=2.0,<2.1',
'logbook',
'mock',
'nose',
'pep8',
'pytz',
'pytest',
'pytest-django==2.9.1',
'pytest-timeout==0.4',
'requests',
'tornado',
'webob',
'webtest',
'anyjson',
] + (flask_requires + flask_tests_requires +
unittest2_requires + webpy_tests_requires)
class PyTest(TestCommand):
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name='raven',
version='5.14.0',
author='Sentry',
author_email='hello@getsentry.com',
url='https://github.com/getsentry/raven-python',
description='Raven is a client for Sentry (https://getsentry.com)',
long_description=__doc__,
packages=find_packages(exclude=("tests", "tests.*",)),
zip_safe=False,
extras_require={
'flask': flask_requires,
'tests': tests_require,
},
license='BSD',
tests_require=tests_require,
install_requires=install_requires,
cmdclass={'test': PyTest},
include_package_data=True,
entry_points={
'console_scripts': [
'raven = raven.scripts.runner:main',
],
'paste.filter_app_factory': [
'raven = raven.contrib.paste:sentry_filter_factory',
],
},
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python',
'Topic :: Software Development',
],
)
|
Python
| 0.999999
|
@@ -2335,17 +2335,17 @@
ion='5.1
-4
+5
.0',%0A
|
b1701c7e56c4ee44d9420f2209d10664348f0d0c
|
Remove client from global setup for now
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import os
import sys
modules = [
'common',
'backend',
'client',
'shell',
'utils',
]
return_code = 0
for module in modules:
return_code = max(return_code, os.system("cd %s && ./setup.py %s" % (module, " ".join(sys.argv[1:]))) >> 8)
for root, dirs, files in os.walk("plugins"):
if "setup.py" in files:
os.system("cd %s && ./setup.py %s" % (root, " ".join(sys.argv[1:])))
#TODO: the untested utils module is breaking the build as the test return status code 1
# reactivate the exiting with return code when utils has tests
#sys.exit(return_code)
|
Python
| 0
|
@@ -78,20 +78,8 @@
d',%0A
- 'client',%0A
's
|
0b71b279064a4fa45825e0d34bee651a1295071e
|
Use 2to3 for installing on Python 3
|
setup.py
|
setup.py
|
# -*- coding: UTF-8 -*-
"""
Setup script for building hgtools distribution
Copyright © 2010-2011 Jason R. Coombs
"""
import setuptools
long_description = open('README').read()
# HGTools uses a special technique for getting the version from
# mercurial, because it can't require itself to install itself.
# Don't use this technique in your project. Instead, follow the
# directions in the README or see jaraco.util for an example.
from hgtools.plugins import calculate_version, patch_egg_info
patch_egg_info(force_hg_version=True)
# set up distutils/setuptools to convert to Python 3 when
# appropriate
try:
from distutils.command.build_py import build_py_2to3 as build_py
# exclude some fixers that break already compatible code
from lib2to3.refactor import get_fixers_from_package
fixers = get_fixers_from_package('lib2to3.fixes')
for skip_fixer in []:
fixers.remove('lib2to3.fixes.fix_' + skip_fixer)
build_py.fixer_names = fixers
except ImportError:
from distutils.command.build_py import build_py
setup_params = dict(
name="hgtools",
version=calculate_version(options=dict(increment='0.0.1')),
author="Jannis Leidel/Jason R. Coombs",
author_email="jaraco@jaraco.com",
url="http://bitbucket.org/jaraco/hgtools/",
download_url="http://bitbucket.org/jaraco/hgtools/downloads/",
description="Classes and setuptools plugin for Mercurial repositories",
long_description=long_description,
license="GPL2",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Topic :: Software Development :: Version Control",
"Framework :: Setuptools Plugin",
],
packages=setuptools.find_packages(),
entry_points = {
"setuptools.file_finders": [
"hg = hgtools.plugins:file_finder"
],
"distutils.setup_keywords": [
"use_hg_version = hgtools.plugins:version_calc",
],
},
cmdclass=dict(build_py=build_py),
)
if __name__ == '__main__':
setuptools.setup(**setup_params)
|
Python
| 0.000225
|
@@ -534,490 +534,8 @@
e)%0A%0A
-# set up distutils/setuptools to convert to Python 3 when%0A# appropriate%0Atry:%0A%09from distutils.command.build_py import build_py_2to3 as build_py%0A%09# exclude some fixers that break already compatible code%0A%09from lib2to3.refactor import get_fixers_from_package%0A%09fixers = get_fixers_from_package('lib2to3.fixes')%0A%09for skip_fixer in %5B%5D:%0A%09%09fixers.remove('lib2to3.fixes.fix_' + skip_fixer)%0A%09build_py.fixer_names = fixers%0Aexcept ImportError:%0A%09from distutils.command.build_py import build_py%0A%0A
setu
@@ -1586,40 +1586,21 @@
%7D,%0A%09
-cmdclass=dict(build_py=build_py)
+use_2to3=True
,%0A)%0A
|
dc1c377a5b6011b587413c586b33000e867ab5bc
|
Declare dependency
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='zeit.securitypolicy',
version='2.2.10.dev0',
author='gocept, Zeit Online',
author_email='zon-backend@zeit.de',
url='http://www.zeit.de/',
description="vivi roles and permissions",
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,
license='BSD',
namespace_packages=['zeit'],
install_requires=[
'plone.testing',
'setuptools',
'xlrd',
'zeit.brightcove',
'zeit.calendar',
'zeit.cms>=3.9.0.dev0',
'zeit.content.article',
'zeit.content.cp >= 2.10.0.dev0',
'zeit.content.image>=2.6.0.dev0',
'zeit.content.link',
'zeit.content.quiz',
'zeit.content.rawxml',
'zeit.content.text',
'zeit.content.video',
'zeit.invalidate',
'zeit.push',
'zeit.retresco>=1.19.0.dev0',
'zeit.seo>=1.6.0.dev0',
'zeit.vgwort>=2.4.0.dev0',
'zope.app.zcmlfiles',
],
)
|
Python
| 0
|
@@ -582,16 +582,17 @@
.cms%3E=3.
+1
9.0.dev0
|
a0ff5a8b6817be12aae5184a4a33af89c05ec552
|
Bump 0.7
|
setup.py
|
setup.py
|
import pathlib
import setuptools
ROOT = str(pathlib.Path(__file__).parent)
extras = {}
with open(ROOT + '/requirements-doc.txt', encoding='utf-8') as fp:
extras['doc'] = fp.read().splitlines()
with open(ROOT + '/requirements-test.txt', encoding='utf-8') as fp:
extras['test'] = fp.read().splitlines()
with open(ROOT + '/PYPI-README.md', encoding="utf-8") as fp:
long_description = fp.read()
setuptools.setup(
name='Pymem',
version='1.6',
long_description=long_description,
long_description_content_type="text/markdown",
description='pymem: python memory access made easy',
author='Fabien Reboia',
author_email='srounet@gmail.com',
maintainer='Fabien Reboia',
maintainer_email='srounet@gmail.com',
url='http://pymem.readthedocs.org/en/latest/',
license="mit",
packages=["pymem", "pymem.ressources"],
platforms=["windows"],
keywords='memory win32 windows process',
classifiers=[
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
],
extras_require=extras,
)
|
Python
| 0.000025
|
@@ -454,17 +454,17 @@
sion='1.
-6
+7
',%0A l
|
680e64eb7bf37ff303d50310aef91eca0770bef7
|
Update unit tests: words_counter_tests.py.
|
tests/words_counter_tests.py
|
tests/words_counter_tests.py
|
import unittest
from twitchbot import WordsCounter
class WordsCounterTests(unittest.TestCase):
def setUp(self):
self.words_counter = WordsCounter()
def test_count_words_counts_words_correct(self):
self.words_counter.count_words("word2 word1")
self.assertEqual(self.words_counter.get_top_words(), [("word1", 1), ("word2", 1)])
self.words_counter.count_words("word3 word3 word2 word3")
self.assertEqual(self.words_counter.get_top_words(), [("word3", 3), ("word2", 2), ("word1", 1)])
def test_count_words_does_not_count_non_words_characters(self):
self.words_counter.count_words(",word2..,word1-+=")
self.assertEqual(self.words_counter.get_top_words(), [("word1", 1), ("word2", 1)])
self.words_counter.count_words("word3,word3.word2;word3!")
self.assertEqual(self.words_counter.get_top_words(), [("word3", 3), ("word2", 2), ("word1", 1)])
def test_get_top_words_returns_exact_words_number(self):
self.words_counter.count_words("word2 word1")
self.assertEqual(self.words_counter.get_top_words(1), [("word1", 1)])
self.assertEqual(self.words_counter.get_top_words(2), [("word1", 1), ("word2", 1)])
self.words_counter.count_words("word2")
self.assertEqual(self.words_counter.get_top_words(1), [("word2", 2)])
self.assertEqual(self.words_counter.get_top_words(2), [("word2", 2), ("word1", 1)])
self.words_counter.count_words("word3 word3 word2 word3 word3")
self.assertEqual(self.words_counter.get_top_words(1), [("word3", 4)])
self.assertEqual(self.words_counter.get_top_words(2), [("word3", 4), ("word2", 3)])
self.assertEqual(self.words_counter.get_top_words(3), [("word3", 4), ("word2", 3), ("word1", 1)])
self.assertEqual(self.words_counter.get_top_words(4), [("word3", 4), ("word2", 3), ("word1", 1)])
if __name__ == '__main__':
unittest.main()
|
Python
| 0
|
@@ -21,16 +21,20 @@
m twitch
+chat
bot impo
|
db7ec441727f747c08e2d7532bb820e2263c70e6
|
Make sure we have the latest version of the orcid library
|
setup.py
|
setup.py
|
"""
Sample project to be edited.
"""
from pip.req import parse_requirements
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
import sys
import os
# Workaround for development under Vagrant using vbox shared directories
# Hard links aren't allowed which breaks setup.
# Is a quick hack that fixes the issue just under vagrant with vbox
# From stackoverflow:
# https://stackoverflow.com/questions/7719380/python-setup-py-sdist-error-operation-not-permitted
# if you are not using vagrant, just delete os.link directly,
# The hard link only saves a little disk space, so you should not care
if os.environ.get('USER','') == 'vagrant':
del os.link
class Tox(TestCommand):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
dependencies = ['click==4.1', 'rdflib', 'rdflib-jsonld',
'orcidfind', 'pyparsing', 'pytz', 'requests==2.7.0', 'docker-py']
setup(
name='smartcontainers',
version='0.0.2',
url='https://github.com/charlesvardeman/smartcontainers',
license='Apache Software License',
author='Charles Vardeman',
author_email='charles.vardeman@gmail.com',
description='Tool to track provenance of docker containers',
long_description=__doc__,
packages=find_packages(exclude=['tests', 'docs', 'scripts', 'resources']),
include_package_data=True,
dependency_links=[
"git+ssh://git@github.com/charlesvardeman/orcidfind/tarball/master#egg=orcidfind"
],
zip_safe=False,
platforms='any',
install_requires=dependencies,
tests_require=['tox'],
cmdclass = {'test': Tox},
entry_points={
'console_scripts': [
'sc= sc.cli:cli',
],
},
classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
# 'Development Status :: 1 - Planning',
'Development Status :: 2 - Pre-Alpha',
# 'Development Status :: 3 - Alpha',
# 'Development Status :: 4 - Beta',
# 'Development Status :: 5 - Production/Stable',
# 'Development Status :: 6 - Mature',
# 'Development Status :: 7 - Inactive',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: Unix',
'Operating System :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
|
Python
| 0
|
@@ -1382,16 +1382,25 @@
+ 'orcid',
'orcidf
|
437fef8ec538517252992d7a0f2ef213ae0a7128
|
Update setup.py
|
setup.py
|
setup.py
|
#from distutils.core import setup
from setuptools import setup
def make_data_file_list(target, source):
"""
creates a list of tuples (target_directory, file_list)
that setup should copy into the egg in
the install process. Gets around no way to specify a recursive
directory tree copy, directories must be created by
name on left side of tuple against an empty file list on the right
"""
import os
def visit(destination_directory, source_directory):
# print destination_directory + " " + source_directory
files = os.listdir(source_directory)
transfer_list = []
todo = []
for file_name in files:
# print type(file_name)
source_file = os.path.join(source_directory, file_name)
# print "source_file " + source_file
next_destination_directory = os.path.join(destination_directory, file_name)
if file_name.startswith("__") and file_name != '__init__.py':
pass
elif os.path.isdir(source_file):
transfer_list.append((next_destination_directory, []))
todo.append((next_destination_directory, source_file))
elif os.path.isfile(source_file):
transfer_list.append((destination_directory, [source_file]))
for next_target, next_source in todo:
transfer_list += visit(next_target, next_source)
return transfer_list
return visit(target, source)
data_file_list = make_data_file_list("ctree/tools/generators/templates", "ctree/tools/generators/templates")
# import pprint
# pprint.pprint(data_file_list)
setup(
name='ctree',
version='0.95a',
packages=[
'ctree',
'ctree.c',
'ctree.cilk',
'ctree.cpp',
'ctree.ocl',
'ctree.omp',
'ctree.py',
'ctree.simd',
'ctree.templates',
'ctree.opentuner',
'ctree.metrics',
'ctree.tools',
'ctree.tools.generators',
'ctree.visual',
],
package_data={
'ctree': ['defaults.cfg'],
},
install_requires=[
'numpy',
'mako',
'pyserial',
# 'readline',
],
data_files=data_file_list,
entry_points={
'console_scripts': ['ctree = ctree.tools.runner:main'],
}
)
|
Python
| 0
|
@@ -1692,16 +1692,105 @@
'0.95a',
+%0A description='A C-family AST implementation designed to be an IR for DSL compilers.',
%0A%0A pa
|
de47a75f04c0fd2199315b2b096943a08d495185
|
Remove SETUPTOOLS_REQUIRES
|
setup.py
|
setup.py
|
#!/usr/bin/env python
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import os.path
from typing import Dict
import setuptools
MODULE_NAME = "SimpleSQLite"
REPOSITORY_URL = "https://github.com/thombashi/{:s}".format(MODULE_NAME)
REQUIREMENT_DIR = "requirements"
ENCODING = "utf8"
pkg_info = {} # type: Dict[str, str]
def get_release_command_class() -> Dict[str, setuptools.Command]:
try:
from releasecmd import ReleaseCommand
except ImportError:
return {}
return {"release": ReleaseCommand}
with open(os.path.join(MODULE_NAME.lower(), "__version__.py")) as f:
exec(f.read(), pkg_info)
with open("README.rst", encoding=ENCODING) as fp:
long_description = fp.read()
with open(os.path.join("docs", "pages", "introduction", "summary.txt"), encoding=ENCODING) as f:
summary = f.read().strip()
with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
install_requires = [line.strip() for line in f if line.strip()]
with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
tests_requires = [line.strip() for line in f if line.strip()]
SETUPTOOLS_REQUIRES = ["setuptools>=38.3.0"]
setuptools.setup(
name=MODULE_NAME,
version=pkg_info["__version__"],
url=REPOSITORY_URL,
author=pkg_info["__author__"],
author_email=pkg_info["__email__"],
description=summary,
include_package_data=True,
keywords=["SQLite", "CSV", "Google Sheets", "JSON"],
license=pkg_info["__license__"],
long_description=long_description,
long_description_content_type="text/x-rst",
packages=setuptools.find_packages(exclude=["test*"]),
package_data={MODULE_NAME: ["py.typed"]},
project_urls={
"Documentation": "https://{:s}.rtfd.io/".format(MODULE_NAME),
"Source": REPOSITORY_URL,
"Tracker": "{:s}/issues".format(REPOSITORY_URL),
},
python_requires=">=3.5",
install_requires=SETUPTOOLS_REQUIRES + install_requires,
setup_requires=SETUPTOOLS_REQUIRES,
tests_require=tests_requires,
extras_require={"logging": ["loguru>=0.4.1,<1"], "test": tests_requires},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Database",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
cmdclass=get_release_command_class(),
)
|
Python
| 0.000001
|
@@ -1139,54 +1139,8 @@
)%5D%0A%0A
-SETUPTOOLS_REQUIRES = %5B%22setuptools%3E=38.3.0%22%5D%0A%0A
setu
@@ -1893,86 +1893,24 @@
res=
-SETUPTOOLS_REQUIRES + install_requires,%0A setup_requires=SETUPTOOLS_REQUIRES
+install_requires
,%0A
|
9002df839fc092db0c656174fa9cf57a3bfecdaa
|
Bump to 0.2.0
|
setup.py
|
setup.py
|
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
def read(filename):
with open(filename, 'r') as fh:
return fh.read()
class ToxTest(TestCommand):
user_options = [('tox-args=', 'a', 'Arguments to pass to tox')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import tox
import shlex
args = []
if self.tox_args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
if __name__ == "__main__":
setup(
name='datestuff',
version='0.1.0',
author='Alec Nikolas Reiter',
author_email='alecreiter@gmail.com',
description='Stuff for dates',
long_description=read('README.rst'),
license='MIT',
packages=['datestuff'],
zip_safe=False,
url="https://github.com/justanr/datestuff",
keywords=['dates'],
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Utilities',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
test_suite='test',
tests_require=['tox'],
cmdclass={'tox': ToxTest},
)
|
Python
| 0.000291
|
@@ -823,9 +823,9 @@
='0.
-1
+2
.0',
|
eb871da3c808fbbf5a7971147265471de87f1a01
|
Refactor import
|
setup.py
|
setup.py
|
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import os.path
from typing import Dict, List # noqa
import setuptools
MODULE_NAME = "pathvalidate"
REPOSITORY_URL = "https://github.com/thombashi/{:s}".format(MODULE_NAME)
REQUIREMENT_DIR = "requirements"
ENCODING = "utf8"
pkg_info = {} # type: Dict[str, str]
def get_release_command_class() -> Dict[str, setuptools.Command]:
try:
from releasecmd import ReleaseCommand
except ImportError:
return {}
return {"release": ReleaseCommand}
with open(os.path.join(MODULE_NAME, "__version__.py")) as f:
exec(f.read(), pkg_info)
with open("README.rst", encoding=ENCODING) as fp:
long_description = fp.read()
with open(os.path.join("docs", "pages", "introduction", "summary.txt"), encoding=ENCODING) as f:
summary = f.read().strip()
with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
TESTS_REQUIRES = [line.strip() for line in f if line.strip()]
SETUPTOOLS_REQUIRES = ["setuptools>=38.3.0"]
setuptools.setup(
name=MODULE_NAME,
version=pkg_info["__version__"],
url=REPOSITORY_URL,
author=pkg_info["__author__"],
author_email=pkg_info["__email__"],
description=summary,
keywords=["file", "path", "validation", "validator", "sanitization", "sanitizer"],
license=pkg_info["__license__"],
long_description=long_description,
long_description_content_type="text/x-rst",
include_package_data=True,
packages=setuptools.find_packages(exclude=["test*"]),
package_data={MODULE_NAME: ["py.typed"]},
project_urls={
"Documentation": "https://{:s}.rtfd.io/".format(MODULE_NAME),
"Source": REPOSITORY_URL,
"Tracker": "{:s}/issues".format(REPOSITORY_URL),
},
python_requires=">=3.5",
extras_require={"test": TESTS_REQUIRES},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Filesystems",
"Topic :: Text Processing",
],
cmdclass=get_release_command_class(),
)
|
Python
| 0.000001
|
@@ -108,22 +108,8 @@
Dict
-, List # noqa
%0A%0Aim
|
552a0ea213d0181175e3550f9fc6a1e6329c9a6b
|
Version bump
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name='dfttopif',
version='0.2.0',
description='Library for parsing Density Functional Theory calculations',
url='https://github.com/CitrineInformatics/pif-dft',
install_requires=[
'ase',
'pypif==1.1.6',
'dftparse>=0.2.1'
],
extras_require={
'report': ["requests"],
},
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
'citrine.dice.converter': [
'dft = dfttopif'
]
}
)
|
Python
| 0.000001
|
@@ -81,17 +81,17 @@
sion='0.
-2
+3
.0',%0A
|
0ee42f3b0c7d817720f43b8c48cb622ca38b4620
|
Version 0.2
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
import itertools
from physt import __version__
options = dict(
name='physt',
version=__version__,
packages=find_packages(),
license='MIT',
description='P(i/y)thon h(i/y)stograms.',
long_description=open('README.rst').read(),
author='Jan Pipek',
author_email='jan.pipek@gmail.com',
url='https://github.com/janpipek/physt',
install_requires = ['numpy'],
extras_require = {
# 'all' : []
},
entry_points = {
'console_scripts' : [
]
},
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules"
]
)
extras = options['extras_require']
extras['full'] = list(set(itertools.chain.from_iterable(extras.values())))
setup(**options)
|
Python
| 0.000001
|
@@ -299,11 +299,10 @@
DME.
-rst
+md
').r
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.