commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
e1a54c7d08f33601e48aec485ac72d9d81730186
spec/helper.py
spec/helper.py
from expects import * from pygametemplate import Game import datetime class TestGame(Game): """An altered Game class for testing purposes.""" def __init__(self, resolution): super(TestGame, self).__init__(resolution) def log(self, *error_message): """Altered log function which just raises errors.""" raise game = TestGame((1280, 720))
from expects import * from example_view import ExampleView from pygametemplate import Game import datetime class TestGame(Game): """An altered Game class for testing purposes.""" def __init__(self, StartingView, resolution): super(TestGame, self).__init__(StartingView, resolution) def log(self, *error_message): """Altered log function which just raises errors.""" raise game = TestGame(ExampleView, (1280, 720))
Fix TestGame class to match the View update to Game
Fix TestGame class to match the View update to Game
Python
mit
AndyDeany/pygame-template
--- +++ @@ -1,5 +1,6 @@ from expects import * +from example_view import ExampleView from pygametemplate import Game import datetime @@ -7,12 +8,12 @@ class TestGame(Game): """An altered Game class for testing purposes.""" - def __init__(self, resolution): - super(TestGame, self).__init__(resolution) + def __init__(self, StartingView, resolution): + super(TestGame, self).__init__(StartingView, resolution) def log(self, *error_message): """Altered log function which just raises errors.""" raise -game = TestGame((1280, 720)) +game = TestGame(ExampleView, (1280, 720))
9cca5d4ce1c5097e48e55ad3a48b09a01cc0aa6b
lumberjack/config/__init__.py
lumberjack/config/__init__.py
# -*- coding: utf-8 -*- """ Module to allow quick configuration. """ from six.moves import configparser from six import StringIO import pkg_resources import logging.config def configure(mode, disable_existing_loggers=False): """Configure from predefined useful default modes.""" cfg = configparser.ConfigParser() modefn = "{0}.cfg".format(mode) if not mode.endswith(".cfg") else mode for filename in ["base.cfg", modefn]: cfg.readfp(pkg_resources.resource_stream(__name__, filename)) cfgbuffer = StringIO() cfg.write(cfgbuffer) cfgbuffer.seek(0) return logging.config.fileConfig(cfgbuffer, disable_existing_loggers=disable_existing_loggers)
# -*- coding: utf-8 -*- """ Module to allow quick configuration. """ from six.moves import configparser from six import StringIO import pkg_resources import logging.config def configure(mode, disable_existing_loggers=False): """Configure from predefined useful default modes.""" cfg = configparser.ConfigParser() modefn = "{0}.cfg".format(mode) if not mode.endswith(".cfg") else mode for filename in ["base.cfg", modefn]: cfg.readfp(pkg_resources.resource_stream(__name__, filename)) cfg.read("lumberjack.cfg") cfgbuffer = StringIO() cfg.write(cfgbuffer) cfgbuffer.seek(0) return logging.config.fileConfig(cfgbuffer, disable_existing_loggers=disable_existing_loggers)
Read a custom lumberjack.cfg on startup if necessary.
Read a custom lumberjack.cfg on startup if necessary.
Python
mit
alexrudy/lumberjack
--- +++ @@ -14,6 +14,7 @@ modefn = "{0}.cfg".format(mode) if not mode.endswith(".cfg") else mode for filename in ["base.cfg", modefn]: cfg.readfp(pkg_resources.resource_stream(__name__, filename)) + cfg.read("lumberjack.cfg") cfgbuffer = StringIO() cfg.write(cfgbuffer) cfgbuffer.seek(0)
fb41f01360423d176864a4846d0e769d4df03978
penchy/tests/test_compat.py
penchy/tests/test_compat.py
from hashlib import sha1 from tempfile import TemporaryFile from contextlib import contextmanager from penchy.compat import unittest, nested, update_hasher class NestedTest(unittest.TestCase): def test_reraising_exception(self): e = Exception('reraise this') with self.assertRaises(Exception) as raised: with nested(TemporaryFile(), TemporaryFile()) as (a, b): raise e self.assertEqual(raised.exception, e) def test_raising_on_exit(self): @contextmanager def raising_cm(exception): yield raise exception on_exit = Exception('throw on exit') with self.assertRaises(Exception) as raised: with nested(raising_cm(on_exit)): pass self.assertEqual(raised.exception, on_exit) class HasherTest(unittest.TestCase): def setUp(self): self.control = sha1() self.h = sha1() def test_str_hash(self): s = 'foo' self.control.update(s) update_hasher(self.h, s) self.assertEqual(self.control.hexdigest(), self.h.hexdigest()) def test_unicode_hash(self): u = u'foo' self.control.update(u.encode('utf8')) update_hasher(self.h, u) self.assertEqual(self.control.hexdigest(), self.h.hexdigest())
from hashlib import sha1 from tempfile import TemporaryFile from contextlib import contextmanager from penchy.compat import unittest, nested, update_hasher, unicode_ class NestedTest(unittest.TestCase): def test_reraising_exception(self): e = Exception('reraise this') with self.assertRaises(Exception) as raised: with nested(TemporaryFile(), TemporaryFile()) as (a, b): raise e self.assertEqual(raised.exception, e) def test_raising_on_exit(self): @contextmanager def raising_cm(exception): yield raise exception on_exit = Exception('throw on exit') with self.assertRaises(Exception) as raised: with nested(raising_cm(on_exit)): pass self.assertEqual(raised.exception, on_exit) class HasherTest(unittest.TestCase): def setUp(self): self.control = sha1() self.h = sha1() def test_str_hash(self): s = str('foo') update_hasher(self.h, s) self.assertEqual(self.h.hexdigest(), '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33') def test_unicode_hash(self): u = unicode_('foo') update_hasher(self.h, u) self.assertEqual(self.h.hexdigest(), '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33')
Replace control hasher with constant hexdigest.
tests: Replace control hasher with constant hexdigest. Signed-off-by: Michael Markert <5eb998b7ac86da375651a4cd767b88c9dad25896@googlemail.com>
Python
mit
fhirschmann/penchy,fhirschmann/penchy
--- +++ @@ -2,7 +2,7 @@ from tempfile import TemporaryFile from contextlib import contextmanager -from penchy.compat import unittest, nested, update_hasher +from penchy.compat import unittest, nested, update_hasher, unicode_ class NestedTest(unittest.TestCase): @@ -33,15 +33,13 @@ self.h = sha1() def test_str_hash(self): - s = 'foo' - self.control.update(s) + s = str('foo') update_hasher(self.h, s) - self.assertEqual(self.control.hexdigest(), - self.h.hexdigest()) + self.assertEqual(self.h.hexdigest(), + '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33') def test_unicode_hash(self): - u = u'foo' - self.control.update(u.encode('utf8')) + u = unicode_('foo') update_hasher(self.h, u) - self.assertEqual(self.control.hexdigest(), - self.h.hexdigest()) + self.assertEqual(self.h.hexdigest(), + '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33')
36d8243712b5be7f7f7449abcd9640024cee0f19
src/tpn/data_io.py
src/tpn/data_io.py
#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, boxes: 4 by n numpy array, rois: 4 by n numpy array } """ def save_track_proto_to_zip(track_proto, save_file): zf = zipfile.ZipFile(save_file, 'w') print "Writing to zip file {}...".format(save_file) for track_id, track in enumerate(track_proto['tracks']): track_obj = {} track_obj['frames'] = np.asarray([box['frame'] for box in track]) track_obj['anchors'] = np.asarray([box['anchor'] for box in track]) track_obj['scores'] = np.asarray([box['scores'] for box in track]) track_obj['features'] = np.asarray([box['feature'] for box in track]) track_obj['boxes'] = np.asarray([box['bbox'] for box in track]) track_obj['rois'] = np.asarray([box['roi'] for box in track]) zf.writestr('{:06d}.pkl'.format(track_id), cPickle.dumps(track_obj, cPickle.HIGHEST_PROTOCOL)) if (track_id + 1) % 1000 == 0: print "\t{} tracks written.".format(track_id + 1) print "\tTotally {} tracks written.".format(track_id + 1) zf.close()
#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, boxes: 4 by n numpy array, rois: 4 by n numpy array } """ def save_track_proto_to_zip(track_proto, save_file): zf = zipfile.ZipFile(save_file, 'w') print "Writing to zip file {}...".format(save_file) for track_id, track in enumerate(track_proto['tracks']): track_obj = {} for key in track[0]: track_obj[key] = np.asarray([box[key] for box in track]) zf.writestr('{:06d}.pkl'.format(track_id), cPickle.dumps(track_obj, cPickle.HIGHEST_PROTOCOL)) if (track_id + 1) % 1000 == 0: print "\t{} tracks written.".format(track_id + 1) print "\tTotally {} tracks written.".format(track_id + 1) zf.close()
Simplify save_track_proto_to_zip to save all keys in track_proto.
Simplify save_track_proto_to_zip to save all keys in track_proto.
Python
mit
myfavouritekk/TPN
--- +++ @@ -19,12 +19,8 @@ print "Writing to zip file {}...".format(save_file) for track_id, track in enumerate(track_proto['tracks']): track_obj = {} - track_obj['frames'] = np.asarray([box['frame'] for box in track]) - track_obj['anchors'] = np.asarray([box['anchor'] for box in track]) - track_obj['scores'] = np.asarray([box['scores'] for box in track]) - track_obj['features'] = np.asarray([box['feature'] for box in track]) - track_obj['boxes'] = np.asarray([box['bbox'] for box in track]) - track_obj['rois'] = np.asarray([box['roi'] for box in track]) + for key in track[0]: + track_obj[key] = np.asarray([box[key] for box in track]) zf.writestr('{:06d}.pkl'.format(track_id), cPickle.dumps(track_obj, cPickle.HIGHEST_PROTOCOL)) if (track_id + 1) % 1000 == 0:
a1fda2708065890b5596e19c3fe628cb9800f5f9
admin.py
admin.py
from django.contrib import admin from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ from . models import Meal import os class MealAdmin(admin.ModelAdmin): def file(self): class Meta: allow_tags = True verbose_name = _('File') return format_html('<a href="{0}">{1}</a>', self.get_absolute_url(), os.path.basename(self.file.name)) list_display = ('id', file, 'expiration_time') ordering = ('expiration_time',) fields = ('id', 'file', 'expiration_time') admin.site.register(Meal, MealAdmin)
from django.contrib import admin from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ from . models import Meal import os class MealAdmin(admin.ModelAdmin): def file(self): class Meta: allow_tags = True verbose_name = _('File') return format_html(u'<a href="{0}">{1}</a>', self.get_absolute_url(), os.path.basename(self.file.name)) list_display = ('id', file, 'expiration_time') ordering = ('expiration_time',) fields = ('id', 'file', 'expiration_time') admin.site.register(Meal, MealAdmin)
Fix unicode string bug in previous commit
Fix unicode string bug in previous commit
Python
mit
ntrrgc/lasana,ntrrgc/lasana,ntrrgc/lasana
--- +++ @@ -10,7 +10,7 @@ allow_tags = True verbose_name = _('File') - return format_html('<a href="{0}">{1}</a>', + return format_html(u'<a href="{0}">{1}</a>', self.get_absolute_url(), os.path.basename(self.file.name))
ad2b8e6978d5bb2acdb72fdb60c31ecbcb84351f
setup.py
setup.py
#!/usr/bin/env python # :WORKAROUND: http://bugs.python.org/issue15881#msg170215 import multiprocessing from setuptools import setup setup( name='mangopi', author='Jiawei Li', version='0.1.0', description='A manga API with a pluggable site architecture.', keywords='manga api', install_requires=['underscore.py==0.1.3'], test_suite='nose.collector', tests_require=['nose'], url='https://github.com/jiaweihli/mangopi/', author_email='jiawei.h.li@gmail.com', license='MIT', packages=['mangopi'] )
#!/usr/bin/env python # :WORKAROUND: http://bugs.python.org/issue15881#msg170215 import multiprocessing from setuptools import setup setup( name='mangopi', author='Jiawei Li', version='0.1.1', description='A manga API with a pluggable site architecture.', keywords='manga api', install_requires=['underscore.py==0.1.3'], test_suite='nose.collector', tests_require=['nose'], url='https://github.com/jiaweihli/mangopi/', author_email='jiawei.h.li@gmail.com', license='MIT', packages=['mangopi', 'mangopi.site'] )
Fix omission of mangopi.site subpackage.
Fix omission of mangopi.site subpackage.
Python
mit
jiaweihli/mangopi
--- +++ @@ -6,7 +6,7 @@ setup( name='mangopi', author='Jiawei Li', - version='0.1.0', + version='0.1.1', description='A manga API with a pluggable site architecture.', keywords='manga api', install_requires=['underscore.py==0.1.3'], @@ -15,5 +15,5 @@ url='https://github.com/jiaweihli/mangopi/', author_email='jiawei.h.li@gmail.com', license='MIT', - packages=['mangopi'] + packages=['mangopi', 'mangopi.site'] )
0c6825ce8b5d1e3b15505c5bcac847c6a57a782e
statirator/main.py
statirator/main.py
import argparse from . import commands VALID_ARGS = ('init', 'compile', 'serve') def create_options(): "Add options to tornado" parser = argparse.ArgumentParser( 'Staitrator - Static multilingual site and blog generator') parser.add_argument('command', choices=VALID_ARGS) init = parser.add_argument_group('Init Options') init.add_argument('-n', '--name', default='Default site', help='Site name and title') init.add_argument('-c', '--site_class', default='statirator.site.Html5Site', help='The base class for the site') init.add_argument('-s', '--source', default='source', help="Site's source directory") init.add_argument('-b', '--build', default='build', help="Site's build directory") return parser def main(): parser = create_options() args = parser.parse_args() cmd = getattr(commands, args[0]) cmd(args) if __name__ == '__main__': main()
import argparse from . import commands def create_options(): "Add options to tornado" parser = argparse.ArgumentParser( 'Staitrator - Static multilingual site and blog generator') sub_parsers = parser.add_subparsers(help='Sub Commands help') init = sub_parsers.add_parser('init', help='Initiate a new site') init.add_argument('directory', help='Target directory') init.add_argument('-n', '--name', default='Default site', help='Site name and title [default: %(default)s]') init.add_argument('-c', '--site_class', default='statirator.site.Html5Site', help='The base class for the site [default: %(default)s]') init.add_argument('-s', '--source', default='source', help="Site's source directory [default: %(default)s]") init.add_argument('-b', '--build', default='build', help="Site's build directory [default: %(default)s]") cmpl = sub_parsers.add_parser('compile', help='Compile the new site') serve = sub_parsers.add_parser('serve', help='Serve the site, listening ' 'on a local port') return parser def main(): parser = create_options() args = parser.parse_args() cmd = getattr(commands, args[0]) cmd(args) if __name__ == '__main__': main()
Move arguments to sub parsers
Move arguments to sub parsers
Python
mit
MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator
--- +++ @@ -1,7 +1,5 @@ import argparse from . import commands - -VALID_ARGS = ('init', 'compile', 'serve') def create_options(): "Add options to tornado" @@ -9,14 +7,22 @@ parser = argparse.ArgumentParser( 'Staitrator - Static multilingual site and blog generator') - parser.add_argument('command', choices=VALID_ARGS) - init = parser.add_argument_group('Init Options') + sub_parsers = parser.add_subparsers(help='Sub Commands help') + init = sub_parsers.add_parser('init', help='Initiate a new site') + + init.add_argument('directory', help='Target directory') init.add_argument('-n', '--name', default='Default site', - help='Site name and title') + help='Site name and title [default: %(default)s]') init.add_argument('-c', '--site_class', default='statirator.site.Html5Site', - help='The base class for the site') - init.add_argument('-s', '--source', default='source', help="Site's source directory") - init.add_argument('-b', '--build', default='build', help="Site's build directory") + help='The base class for the site [default: %(default)s]') + init.add_argument('-s', '--source', default='source', + help="Site's source directory [default: %(default)s]") + init.add_argument('-b', '--build', default='build', + help="Site's build directory [default: %(default)s]") + + cmpl = sub_parsers.add_parser('compile', help='Compile the new site') + serve = sub_parsers.add_parser('serve', help='Serve the site, listening ' + 'on a local port') return parser
a5a81a3fd3c4a6df1c77ec5380b7f04d854ff529
setup.py
setup.py
#from distribute_setup import use_setuptools #use_setuptools() from setuptools import setup, find_packages from os.path import dirname, join here = dirname(__file__) setup( name='btchip-python', version='0.1.28', author='BTChip', author_email='hello@ledger.fr', description='Python library to communicate with Ledger Nano dongle', long_description=open(join(here, 'README.md')).read(), url='https://github.com/LedgerHQ/btchip-python', packages=find_packages(), install_requires=['hidapi>=0.7.99'], extras_require = { 'smartcard': [ 'python-pyscard>=1.6.12-4build1', 'ecdsa>=0.9' ] }, include_package_data=True, zip_safe=False, classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft :: Windows', 'Operating System :: MacOS :: MacOS X' ] )
#from distribute_setup import use_setuptools #use_setuptools() from setuptools import setup, find_packages from os.path import dirname, join here = dirname(__file__) setup( name='btchip-python', version='0.1.28', author='BTChip', author_email='hello@ledger.fr', description='Python library to communicate with Ledger Nano dongle', long_description=open(join(here, 'README.md')).read(), url='https://github.com/LedgerHQ/btchip-python', packages=find_packages(), install_requires=['hidapi>=0.7.99', 'ecdsa>=0.9'], extras_require = { 'smartcard': [ 'python-pyscard>=1.6.12-4build1' ] }, include_package_data=True, zip_safe=False, classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft :: Windows', 'Operating System :: MacOS :: MacOS X' ] )
Move ecdsa from extras_require to install_requires
Move ecdsa from extras_require to install_requires
Python
apache-2.0
LedgerHQ/btchip-python,LedgerHQ/btchip-python,LedgerHQ/btchip-python
--- +++ @@ -14,9 +14,9 @@ long_description=open(join(here, 'README.md')).read(), url='https://github.com/LedgerHQ/btchip-python', packages=find_packages(), - install_requires=['hidapi>=0.7.99'], + install_requires=['hidapi>=0.7.99', 'ecdsa>=0.9'], extras_require = { - 'smartcard': [ 'python-pyscard>=1.6.12-4build1', 'ecdsa>=0.9' ] + 'smartcard': [ 'python-pyscard>=1.6.12-4build1' ] }, include_package_data=True, zip_safe=False,
43be2a77cfc15f57a76b7a456f89d05e4f742b09
setup.py
setup.py
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from setuptools import setup setup( name = 'TracMasterTickets', version = '2.1.1', packages = ['mastertickets'], package_data = { 'mastertickets': ['templates/*.html', 'htdocs/*.js', 'htdocs/*.css' ] }, author = "Noah Kantrowitz", author_email = "coderanger@yahoo.com", description = "Provides support for ticket dependencies and master tickets.", license = "BSD", keywords = "trac plugin ticket dependencies master", url = "http://trac-hacks.org/wiki/MasterTicketsPlugin", classifiers = [ 'Framework :: Trac', ], install_requires = ['Trac', 'Genshi >= 0.5.dev-r698,==dev'], entry_points = { 'trac.plugins': [ 'mastertickets.web_ui = mastertickets.web_ui', 'mastertickets.api = mastertickets.api', ] } )
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from setuptools import setup setup( name = 'TracMasterTickets', version = '2.1.1', packages = ['mastertickets'], package_data = { 'mastertickets': ['templates/*.html', 'htdocs/*.js', 'htdocs/*.css' ] }, author = "Noah Kantrowitz", author_email = "noah@coderanger.net", description = "Provides support for ticket dependencies and master tickets.", license = "BSD", keywords = "trac plugin ticket dependencies master", url = "http://trac-hacks.org/wiki/MasterTicketsPlugin", classifiers = [ 'Framework :: Trac', ], install_requires = ['Trac', 'Genshi >= 0.5.dev-r698,==dev'], entry_points = { 'trac.plugins': [ 'mastertickets.web_ui = mastertickets.web_ui', 'mastertickets.api = mastertickets.api', ] } )
Change my email to avoid Yahoo, which decided to brake my scraper script recently.
Change my email to avoid Yahoo, which decided to brake my scraper script recently.
Python
bsd-3-clause
thmo/trac-mastertickets,pombredanne/trac-mastertickets,thmo/trac-mastertickets,pombredanne/trac-mastertickets
--- +++ @@ -10,7 +10,7 @@ package_data = { 'mastertickets': ['templates/*.html', 'htdocs/*.js', 'htdocs/*.css' ] }, author = "Noah Kantrowitz", - author_email = "coderanger@yahoo.com", + author_email = "noah@coderanger.net", description = "Provides support for ticket dependencies and master tickets.", license = "BSD", keywords = "trac plugin ticket dependencies master",
e192a0d29c0b082458bf0a6f37df86978bfa0032
setup.py
setup.py
from distutils.core import setup setup( name='cstypo', version='0.1.1', author='Juda Kaleta', author_email='juda.kaleta@gmail.com', packages=['cstypo', 'cstypo.templatetags', 'cstypo.tests'], scripts=['bin/cstypo'], url='https://github.com/yetty/cstypo', license=open('LICENSE').read(), description='Package to apply Czech typography easily', long_description=open('README').read(), )
from distutils.core import setup setup( name='cstypo', version='0.1.1', author='Juda Kaleta', author_email='juda.kaleta@gmail.com', packages=['cstypo', 'cstypo.templatetags', 'cstypo.tests'], scripts=['bin/cstypo'], url='https://github.com/yetty/cstypo', license=open('LICENSE').read(), description='Package to apply Czech typography easily', long_description=open('README').read(), requires=['docopt (>=0.5.0)'], )
Add docopt to required packages
Add docopt to required packages
Python
mit
yetty/cstypo
--- +++ @@ -11,4 +11,5 @@ license=open('LICENSE').read(), description='Package to apply Czech typography easily', long_description=open('README').read(), + requires=['docopt (>=0.5.0)'], )
4d19a3236aa450733e4355ec8fb08a4eb8bffb75
setup.py
setup.py
from setuptools import setup setup( name='restea', packages=['restea', 'restea.adapters'], version='0.3.2', description='Simple RESTful server toolkit', author='Walery Jadlowski', author_email='bodb.digr@gmail.com', url='https://github.com/bodbdigr/restea', download_url='https://github.com/bodbdigr/restea/archive/0.3.2.tar.gz', keywords=['rest', 'restful', 'restea'], install_requires=[ 'future==0.15.2', ], setup_requires=[ 'pytest-runner', ], tests_require=[ 'pytest==2.9.1', 'pytest-cov==1.8.1', 'pytest-mock==0.4.3', 'coveralls==0.5', ], license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP', ] )
from setuptools import setup setup( name='restea', packages=['restea', 'restea.adapters'], version='0.3.2', description='Simple RESTful server toolkit', author='Walery Jadlowski', author_email='bodb.digr@gmail.com', url='https://github.com/bodbdigr/restea', download_url='https://github.com/bodbdigr/restea/archive/0.3.2.tar.gz', keywords=['rest', 'restful', 'restea'], install_requires=[ 'future==0.16.0', ], setup_requires=[ 'pytest-runner', ], tests_require=[ 'pytest==3.0.6', 'pytest-cov==2.4.0', 'pytest-mock==1.5.0', 'coveralls==1.1', ], license='MIT', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Internet :: WWW/HTTP', ] )
Revert "Prevent to update latest version of requirements."
Revert "Prevent to update latest version of requirements." This reverts commit 0f341482c7dc9431ed89444c8be2688ea57f61ba.
Python
mit
kkszysiu/restea,bodbdigr/restea
--- +++ @@ -12,16 +12,16 @@ download_url='https://github.com/bodbdigr/restea/archive/0.3.2.tar.gz', keywords=['rest', 'restful', 'restea'], install_requires=[ - 'future==0.15.2', + 'future==0.16.0', ], setup_requires=[ 'pytest-runner', ], tests_require=[ - 'pytest==2.9.1', - 'pytest-cov==1.8.1', - 'pytest-mock==0.4.3', - 'coveralls==0.5', + 'pytest==3.0.6', + 'pytest-cov==2.4.0', + 'pytest-mock==1.5.0', + 'coveralls==1.1', ], license='MIT', classifiers=[
d71f9a1696da6f7aad54cbc7710101e4159a82c9
setup.py
setup.py
#!/usr/bin/env python import re from setuptools import setup, find_packages import sys import warnings dynamic_requires = [] version = 0.9 setup( name='anthemav', version=0.9, author='David McNett', author_email='nugget@macnugget.org', url='https://github.com/nugget/python-anthemav', packages=find_packages(), scripts=[], install_requires=['asyncio'], description='Python API for controlling Anthem Receivers', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], include_package_data=True, zip_safe=True, entry_points = { 'console_scripts': ['anthemav_console=anthemav.__main__:console'] }, )
#!/usr/bin/env python import re from setuptools import setup, find_packages import sys import warnings dynamic_requires = [] version = 0.9 setup( name='anthemav', version=0.9, author='David McNett', author_email='nugget@macnugget.org', url='https://github.com/nugget/python-anthemav', packages=find_packages(), scripts=[], install_requires=['asyncio'], description='Python API for controlling Anthem Receivers', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], include_package_data=True, zip_safe=True, )
Remove vestigial reference to console()
Remove vestigial reference to console()
Python
mit
nugget/python-anthemav
--- +++ @@ -25,10 +25,8 @@ 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Topic :: Software Development :: Libraries :: Python Modules', ], include_package_data=True, zip_safe=True, - entry_points = { - 'console_scripts': ['anthemav_console=anthemav.__main__:console'] - }, )
d851a16318aa8d8055c7bd9643af6401b11b5fed
setup.py
setup.py
""" Copyright 2020 Ronald J. Nowling 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 setup(name="asaph", version=2.0, description="SNP analysis", author="Ronald J. Nowling", author_email="rnowling@gmail.com", license="Apache License, Version 2.0", zip_safe=False, packages=["asaph"], python_requires=">=3.6", install_requires = ["numpy>=0.19.1", "scipy>=0.19.1", "matplotlib", "seaborn", "sklearn", "joblib"], scripts=["bin/asaph_import", "bin/asaph_pca", "bin/asaph_association_tests", "bin/asaph_query", "bin/asaph_pca_association_tests", "bin/asaph_manhattan_plot", "bin/asaph_pca_analysis", "bin/asaph_generate_data", "bin/asaph_clustering"])
""" Copyright 2020 Ronald J. Nowling 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 setup(name="asaph", version=2.0, description="SNP analysis", author="Ronald J. Nowling", author_email="rnowling@gmail.com", license="Apache License, Version 2.0", zip_safe=False, packages=["asaph"], python_requires=">=3.6", install_requires = ["numpy>=0.19.1", "scipy>=0.19.1", "matplotlib", "seaborn", "sklearn", "joblib"], scripts=["bin/asaph_import", "bin/asaph_pca", "bin/asaph_query", "bin/asaph_pca_association_tests", "bin/asaph_manhattan_plot", "bin/asaph_pca_analysis", "bin/asaph_generate_data", "bin/asaph_clustering"])
Remove duplicate association test script
Remove duplicate association test script
Python
apache-2.0
rnowling/aranyani,rnowling/asaph,rnowling/asaph
--- +++ @@ -26,6 +26,6 @@ packages=["asaph"], python_requires=">=3.6", install_requires = ["numpy>=0.19.1", "scipy>=0.19.1", "matplotlib", "seaborn", "sklearn", "joblib"], - scripts=["bin/asaph_import", "bin/asaph_pca", "bin/asaph_association_tests", "bin/asaph_query", "bin/asaph_pca_association_tests", + scripts=["bin/asaph_import", "bin/asaph_pca", "bin/asaph_query", "bin/asaph_pca_association_tests", "bin/asaph_manhattan_plot", "bin/asaph_pca_analysis", "bin/asaph_generate_data", "bin/asaph_clustering"])
2fac8c3e64406cc955ef0a8c39b2070d4517e374
setup.py
setup.py
#!/usr/bin/env python from setuptools import find_packages, setup setup( name='django-mptt', description='''Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.''', version=__import__('mptt').__version__, author='Craig de Stigter', author_email='craig.ds@gmail.com', url='http://github.com/django-mptt/django-mptt', license='MIT License', packages=find_packages(), include_package_data=True, install_requires=( 'Django>=1.8', ), tests_require=( 'mock-django>=0.6.7', 'mock>=1.3', ), classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2", "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 :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", 'Topic :: Utilities', ], )
#!/usr/bin/env python from setuptools import find_packages, setup setup( name='django-mptt', description='''Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.''', version=__import__('mptt').__version__, author='Craig de Stigter', author_email='craig.ds@gmail.com', url='http://github.com/django-mptt/django-mptt', license='MIT License', packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, install_requires=( 'Django>=1.8', ), tests_require=( 'mock-django>=0.6.7', 'mock>=1.3', ), classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2", "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 :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", 'Topic :: Utilities', ], )
Exclude tests from installed packages
Exclude tests from installed packages Fixes #453.
Python
mit
matthiask/django-mptt,emilhdiaz/django-mptt,emilhdiaz/django-mptt,emilhdiaz/django-mptt,matthiask/django-mptt,matthiask/django-mptt,matthiask/django-mptt,emilhdiaz/django-mptt
--- +++ @@ -12,7 +12,7 @@ author_email='craig.ds@gmail.com', url='http://github.com/django-mptt/django-mptt', license='MIT License', - packages=find_packages(), + packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, install_requires=( 'Django>=1.8',
f47888830b7fcc4afb77361c45d2253c2bb03876
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='cc.license', version=version, description="License selection based on ccREL-based metadata.", classifiers=[], keywords='', author='Creative Commons', author_email='software@creativecommons.org', url='http://wiki.creativecommons.org/CcLicense', license='MIT', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, test_suite='nose.collector', install_requires=[ 'setuptools', 'zope.interface', 'nose', ], setup_requires=['setuptools-git',], entry_points=""" # -*- Entry points: -*- """, )
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='cc.license', version=version, description="License selection based on ccREL-based metadata.", classifiers=[], keywords='', author='Creative Commons', author_email='software@creativecommons.org', url='http://wiki.creativecommons.org/CcLicense', license='MIT', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, test_suite='nose.collector', install_requires=[ 'setuptools', 'zope.interface', 'nose', 'Genshi', ], setup_requires=['setuptools-git',], entry_points=""" # -*- Entry points: -*- """, )
Include Genshi as a dependency.
Include Genshi as a dependency.
Python
mit
creativecommons/cc.license,creativecommons/cc.license
--- +++ @@ -20,6 +20,7 @@ 'setuptools', 'zope.interface', 'nose', + 'Genshi', ], setup_requires=['setuptools-git',], entry_points="""
8b718b63ef2978554a6f663488d5d6eaa6b2e917
setup.py
setup.py
from setuptools import setup from sky_area import __version__ as version setup( name='skyarea', packages=['sky_area'], scripts=['bin/run_sky_area'], version=version, description='Compute credible regions on the sky from RA-DEC MCMC samples', author='Will M. Farr', author_email='will.farr@ligo.org', url='http://farr.github.io/skyarea/', license='MIT', keywords='MCMC credible regions skymap LIGO', install_requires=['astropy', 'numpy', 'scipy', 'healpy', 'six'], classifiers=['Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Visualization'] )
from setuptools import setup from sky_area import __version__ as version setup( name='skyarea', packages=['sky_area'], scripts=['bin/run_sky_area'], version=version, description='Compute credible regions on the sky from RA-DEC MCMC samples', author='Will M. Farr', author_email='will.farr@ligo.org', url='http://farr.github.io/skyarea/', license='MIT', keywords='MCMC credible regions skymap LIGO', install_requires=['astropy', 'numpy', 'scipy', 'healpy', 'six'], classifiers=['Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Visualization'] )
Add Python 3.6 to list trove classifiers
Add Python 3.6 to list trove classifiers
Python
mit
lpsinger/skyarea,farr/skyarea
--- +++ @@ -17,6 +17,7 @@ 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering :: Astronomy', 'Topic :: Scientific/Engineering :: Visualization'] )
45e7718d5992218ef09b993fc70ede11103d3bb8
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup long_description = open('README.rst').read() # very convoluted way of reading version from the module without importing it version = ( [l for l in open('flask_injector.py') if '__version__' in l][0] .split('=')[-1] .strip().strip('\'') ) if __name__ == '__main__': setup( name='Flask-Injector', version=version, url='https://github.com/alecthomas/flask_injector', license='BSD', author='Alec Thomas', author_email='alec@swapoff.org', description='Adds Injector, a Dependency Injection framework, support to Flask.', long_description=long_description, py_modules=['flask_injector'], zip_safe=True, platforms='any', install_requires=['Flask', 'injector>=0.10.0', 'typing'], keywords=['Dependency Injection', 'Flask'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries', 'Topic :: Utilities', 'Framework :: Flask', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', ], )
#!/usr/bin/env python from setuptools import setup long_description = open('README.rst').read() # very convoluted way of reading version from the module without importing it version = ( [l for l in open('flask_injector.py') if '__version__ = ' in l][0] .split('=')[-1] .strip().strip('\'') ) if __name__ == '__main__': setup( name='Flask-Injector', version=version, url='https://github.com/alecthomas/flask_injector', license='BSD', author='Alec Thomas', author_email='alec@swapoff.org', description='Adds Injector, a Dependency Injection framework, support to Flask.', long_description=long_description, py_modules=['flask_injector'], zip_safe=True, platforms='any', install_requires=['Flask', 'injector>=0.10.0', 'typing'], keywords=['Dependency Injection', 'Flask'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries', 'Topic :: Utilities', 'Framework :: Flask', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', ], )
Fix reading the package version
Fix reading the package version This hack was broken by b4cad7631bd284df553bbc0fcd4c811bb4182509.
Python
bsd-3-clause
alecthomas/flask_injector
--- +++ @@ -5,7 +5,7 @@ # very convoluted way of reading version from the module without importing it version = ( - [l for l in open('flask_injector.py') if '__version__' in l][0] + [l for l in open('flask_injector.py') if '__version__ = ' in l][0] .split('=')[-1] .strip().strip('\'') )
5b18412ffd0d1521f9817d422bc337afa9b03d6c
setup.py
setup.py
from setuptools import setup setup( name='Fulfil-Shop', version='0.1dev', packages=['shop'], license='BSD', include_package_data=True, zip_safe=False, long_description=open('README.rst').read(), install_requires=[ 'Flask', 'Flask-WTF', 'Flask-Assets', 'cssmin', 'jsmin', 'Flask-Login', 'Flask-Cache', 'Flask-DebugToolbar', 'Flask-Themes2', 'Flask-Babel', 'Flask-Redis', 'Flask-Fulfil', 'raven[flask]', 'premailer', ] )
from setuptools import setup setup( name='Fulfil-Shop', version='0.1dev', packages=['shop'], license='BSD', include_package_data=True, zip_safe=False, long_description=open('README.rst').read(), install_requires=[ 'Flask', 'Flask-WTF', 'Flask-Assets', 'cssmin', 'jsmin', 'Flask-Login', 'Flask-Cache', 'Flask-DebugToolbar', 'Flask-Themes2', 'Flask-Babel', 'Flask-Redis', 'Flask-Session', 'Flask-Fulfil', 'raven[flask]', 'premailer', ] )
Add Flask-session as a dependency
Add Flask-session as a dependency
Python
bsd-3-clause
joeirimpan/shop,joeirimpan/shop,joeirimpan/shop
--- +++ @@ -20,6 +20,7 @@ 'Flask-Themes2', 'Flask-Babel', 'Flask-Redis', + 'Flask-Session', 'Flask-Fulfil', 'raven[flask]', 'premailer',
321c61e7ed57ef8058a68ef12770e139db839fe2
setup.py
setup.py
# -*- coding: utf-8 -*- # (C) Copyright Digital Catapult Limited 2016 try: from setuptools import setup except ImportError: from distutils.core import setup VERSION = "0.0.1" setup(name="file_translate", version=VERSION, description=("Utility to translate the contents of a file by " "running a set of regular expressions over it."), author="Digicat", packages=["file_translate"], data_files=[('file_translate', ['file_translate/*.json'])], entry_points="""\ [console_scripts] file_translate = file_translate.translate:main """)
# -*- coding: utf-8 -*- # (C) Copyright Digital Catapult Limited 2016 try: from setuptools import setup except ImportError: from distutils.core import setup VERSION = "0.0.3" setup(name="file_translate", version=VERSION, description=("Utility to translate the contents of a file by " "running a set of regular expressions over it."), author="Digicat", packages=["file_translate"], data_files=[('file_translate', ['file_translate/config.json'])], entry_points="""\ [console_scripts] file_translate = file_translate.translate:main """)
Add default config file to package
Add default config file to package
Python
mit
catapultbamboo/file_translate
--- +++ @@ -7,7 +7,7 @@ from distutils.core import setup -VERSION = "0.0.1" +VERSION = "0.0.3" setup(name="file_translate", version=VERSION, @@ -15,7 +15,7 @@ "running a set of regular expressions over it."), author="Digicat", packages=["file_translate"], - data_files=[('file_translate', ['file_translate/*.json'])], + data_files=[('file_translate', ['file_translate/config.json'])], entry_points="""\ [console_scripts] file_translate = file_translate.translate:main
d0163cb608b299733ad47111f0ef6b982d1a9a1c
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name="sbd", version="0.1", description="Iridium Short Burst Data DirectIP handling", author="Pete Gadomski", author_email="pete.gadomski@gmail.com", url="https://github.com/gadomski/sbd", scripts=["bin/iridiumd"], install_requires=[ "python-daemon", ] )
#!/usr/bin/env python from distutils.core import setup setup(name="sbd", version="0.1", description="Iridium Short Burst Data DirectIP handling", author="Pete Gadomski", author_email="pete.gadomski@gmail.com", url="https://github.com/gadomski/sbd", packages=["sbd"], scripts=["bin/iridiumd"], install_requires=[ "python-daemon", ] )
Add sbd package to install
Add sbd package to install
Python
mit
gadomski/sbd
--- +++ @@ -8,6 +8,7 @@ author="Pete Gadomski", author_email="pete.gadomski@gmail.com", url="https://github.com/gadomski/sbd", + packages=["sbd"], scripts=["bin/iridiumd"], install_requires=[ "python-daemon",
7d62e82bae98c4e7469b27cb4dfdc0c5bd96c819
setup.py
setup.py
from setuptools import setup, find_packages long_description = ( open('README.rst').read() + '\n' + open('CHANGES.txt').read()) setup( name='more.forwarded', version='0.3.dev0', description="Forwarded header support for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath forwarded', license="BSD", url="http://pypi.python.org/pypi/more.static", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath > 0.13.2', ], extras_require=dict( test=[ 'pytest >= 2.0', 'pytest-cov', 'WebTest >= 2.0.14' ], ), )
import io from setuptools import setup, find_packages long_description = '\n'.join(( io.open('README.rst', encoding='utf-8').read(), io.open('CHANGES.txt', encoding='utf-8').read() )) setup( name='more.forwarded', version='0.3.dev0', description="Forwarded header support for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath forwarded', license="BSD", url="http://pypi.python.org/pypi/more.static", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath > 0.13.2', ], extras_require=dict( test=[ 'pytest >= 2.0', 'pytest-cov', 'WebTest >= 2.0.14' ], ), )
Use io.open with encoding='utf-8' and flake8 compliance
Use io.open with encoding='utf-8' and flake8 compliance
Python
bsd-3-clause
morepath/more.forwarded
--- +++ @@ -1,9 +1,10 @@ +import io from setuptools import setup, find_packages -long_description = ( - open('README.rst').read() - + '\n' + - open('CHANGES.txt').read()) +long_description = '\n'.join(( + io.open('README.rst', encoding='utf-8').read(), + io.open('CHANGES.txt', encoding='utf-8').read() +)) setup( name='more.forwarded',
a5f9abc3f2de2bca89a5c3e5c35a8d7e223be4dd
setup.py
setup.py
from distutils.core import setup setup( name='nipype-pbs-workflows', version='1.0', author='https://www.ctsi.ufl.edu/research/study-development/informatics-consulting/', author_email='ctsit@ctsi.ufl.edu', description='Neuroimaging workflows writtten in nipype with a focus on PBS job scheduler', long_description=open('README.md').read(), url='https://github.com/ctsit/nipype-pbs-workflows', package_dir={'': 'nipype-pbs-workflows'}, packages=[''], )
from distutils.core import setup setup( name='nipype-pbs-workflows', version='1.0.1', author='https://www.ctsi.ufl.edu/research/study-development/informatics-consulting/', author_email='ctsit@ctsi.ufl.edu', description='Neuroimaging workflows writtten in nipype with a focus on PBS job scheduler', long_description=open('README.md').read(), url='https://github.com/ctsit/nipype-pbs-workflows', packages=['nipype-pbs-workflows'], package_dir={'nipype-pbs-workflows': 'src'}, scripts=['src/bedpostx.py', 'src/dcm2niiconverter.py'], )
Install scripts into the correct location
Install scripts into the correct location
Python
bsd-3-clause
ctsit/nipype-pbs-workflows
--- +++ @@ -1,12 +1,13 @@ from distutils.core import setup setup( - name='nipype-pbs-workflows', - version='1.0', + name='nipype-pbs-workflows', + version='1.0.1', author='https://www.ctsi.ufl.edu/research/study-development/informatics-consulting/', author_email='ctsit@ctsi.ufl.edu', description='Neuroimaging workflows writtten in nipype with a focus on PBS job scheduler', long_description=open('README.md').read(), url='https://github.com/ctsit/nipype-pbs-workflows', - package_dir={'': 'nipype-pbs-workflows'}, - packages=[''], + packages=['nipype-pbs-workflows'], + package_dir={'nipype-pbs-workflows': 'src'}, + scripts=['src/bedpostx.py', 'src/dcm2niiconverter.py'], )
b668e1ab2c2fbd973f3bf8865db79f0a7b37141f
tasks.py
tasks.py
import re from invoke import task def get_version(): return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('aiodns/__init__.py').read()).group('version') @task def release(c): version = get_version() c.run("git tag -a aiodns-{0} -m \"aiodns {0} release\"".format(version)) c.run("git push --tags") c.run("python setup.py sdist") c.run("twine upload -r pypi dist/aiodns-{0}*".format(version))
import re from invoke import task def get_version(): return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('aiodns/__init__.py').read()).group('version') @task def release(c): version = get_version() c.run("git tag -a aiodns-{0} -m \"aiodns {0} release\"".format(version)) c.run("git push --tags") c.run("python setup.py sdist") c.run("python setup.py bdist_wheel") c.run("twine upload -r pypi dist/aiodns-{0}*".format(version))
Build universal wheels when releasing
Build universal wheels when releasing
Python
mit
saghul/aiodns
--- +++ @@ -15,5 +15,6 @@ c.run("git push --tags") c.run("python setup.py sdist") + c.run("python setup.py bdist_wheel") c.run("twine upload -r pypi dist/aiodns-{0}*".format(version))
4291d80377e970e02fb95afa6f9f85246cb9c498
DjangoLibrary/tests/factories.py
DjangoLibrary/tests/factories.py
import datetime from django.template.defaultfilters import slugify from factory import DjangoModelFactory, lazy_attribute from random import randint from .models import Author from .models import Book class UserFactory(DjangoModelFactory): class Meta: model = 'auth.User' django_get_or_create = ('username',) first_name = 'John' last_name = 'Doe' username = lazy_attribute( lambda o: slugify(o.first_name + '.' + o.last_name) ) email = lazy_attribute(lambda o: o.username + "@example.com") @lazy_attribute def date_joined(self): return datetime.datetime.now() - datetime.timedelta( days=randint(5, 50) ) last_login = lazy_attribute( lambda o: o.date_joined + datetime.timedelta(days=4) ) class AuthorFactory(DjangoModelFactory): class Meta: model = Author django_get_or_create = ('name',) name = 'Noam Chomsky' class BookFactory(DjangoModelFactory): class Meta: model = Book django_get_or_create = ('title',) title = 'Colorless Green Ideas Sleep Furiously'
import datetime from django.template.defaultfilters import slugify from factory import DjangoModelFactory, lazy_attribute from random import randint class UserFactory(DjangoModelFactory): class Meta: model = 'auth.User' django_get_or_create = ('username',) first_name = 'John' last_name = 'Doe' username = lazy_attribute( lambda o: slugify(o.first_name + '.' + o.last_name) ) email = lazy_attribute(lambda o: o.username + "@example.com") @lazy_attribute def date_joined(self): return datetime.datetime.now() - datetime.timedelta( days=randint(5, 50) ) last_login = lazy_attribute( lambda o: o.date_joined + datetime.timedelta(days=4) )
Revert "Add AuthorFactory and BookFactory."
Revert "Add AuthorFactory and BookFactory." This reverts commit 8cde42f87a82206cf63b3a5e4b0ec6c38d66d3a7.
Python
apache-2.0
kitconcept/robotframework-djangolibrary
--- +++ @@ -2,8 +2,6 @@ from django.template.defaultfilters import slugify from factory import DjangoModelFactory, lazy_attribute from random import randint -from .models import Author -from .models import Book class UserFactory(DjangoModelFactory): @@ -26,19 +24,3 @@ last_login = lazy_attribute( lambda o: o.date_joined + datetime.timedelta(days=4) ) - - -class AuthorFactory(DjangoModelFactory): - class Meta: - model = Author - django_get_or_create = ('name',) - - name = 'Noam Chomsky' - - -class BookFactory(DjangoModelFactory): - class Meta: - model = Book - django_get_or_create = ('title',) - - title = 'Colorless Green Ideas Sleep Furiously'
be6143f06df194150683eceafa63bb2ea5f33d05
paytm.py
paytm.py
import selenium.webdriver as webdriver import bs4 as bs import pyisbn import re def paytm(isbn): if len(isbn) == 10: p_link = 'https://paytm.com/shop/search/?q='+pyisbn.Isbn10(isbn).convert(code='978')+'&sort_price=1' else: p_link = 'https://paytm.com/shop/search/?q='+isbn+'&sort_price=1' # print p_link driver = webdriver.PhantomJS('phantomjs',service_args=['--ssl-protocol=any']) # driver = webdriver.Firefox() try: driver.get(p_link) content = driver.page_source except: content = '' return {'price':'NA','url':p_link}eturn # print content driver.quit() soup = bs.BeautifulSoup(content) p_class = soup.findAll('span',class_="border-radius ng-binding") # print p_class # print p_class if not p_class: return {'price':'NA','url':p_link} else: p_class = p_class[0] try: p_price = re.findall(r'>Rs (.*?)</span>',str(p_class))[0] return {'price':p_price,'url':p_link} except Exception, e: return {'price':'NA','url':p_link}
import selenium.webdriver as webdriver import bs4 as bs import pyisbn import re def paytm(isbn): if len(isbn) == 10: p_link = 'https://paytm.com/shop/search/?q='+pyisbn.Isbn10(isbn).convert(code='978')+'&sort_price=1' else: p_link = 'https://paytm.com/shop/search/?q='+isbn+'&sort_price=1' # print p_link driver = webdriver.PhantomJS('phantomjs',service_args=['--ssl-protocol=any']) # driver = webdriver.Firefox() try: driver.get(p_link) content = driver.page_source except: content = '' return {'price':'NA','url':p_link} # print content driver.quit() soup = bs.BeautifulSoup(content) p_class = soup.findAll('span',class_="border-radius ng-binding") # print p_class if not p_class: return {'price':'NA','url':p_link} else: p_class = p_class[0] try: p_price = re.findall(r'>Rs (.*?)</span>',str(p_class))[0] return {'price':p_price,'url':p_link} except Exception, e: return {'price':'NA','url':p_link}
Fix typo in return during exception while loading page
Fix typo in return during exception while loading page
Python
mit
GingerNinja23/bookbargain
--- +++ @@ -16,12 +16,11 @@ content = driver.page_source except: content = '' - return {'price':'NA','url':p_link}eturn + return {'price':'NA','url':p_link} # print content driver.quit() soup = bs.BeautifulSoup(content) p_class = soup.findAll('span',class_="border-radius ng-binding") - # print p_class # print p_class if not p_class: return {'price':'NA','url':p_link}
32ddc769bffed640e83e99e2657f20bbb3ef5e38
mopidy_soundcloud/__init__.py
mopidy_soundcloud/__init__.py
from __future__ import unicode_literals import os from mopidy import ext, config from mopidy.exceptions import ExtensionError __version__ = '1.0.18' __url__ = 'https://github.com/mopidy/mopidy-soundcloud' class SoundCloudExtension(ext.Extension): dist_name = 'Mopidy-SoundCloud' ext_name = 'soundcloud' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf') return config.read(conf_file) def get_config_schema(self): schema = super(SoundCloudExtension, self).get_config_schema() schema['explore'] = config.List() schema['explore_pages'] = config.Integer() schema['auth_token'] = config.Secret() return schema def validate_config(self, config): if not config.getboolean('soundcloud', 'enabled'): return if not config.get('soundcloud', 'auth_token'): raise ExtensionError("In order to use SoundCloud extension you\ must provide auth_token, for more information referrer to \ https://github.com/mopidy/mopidy-soundcloud/") def validate_environment(self): try: import requests # noqa except ImportError as e: raise ExtensionError('Library requests not found', e) def get_backend_classes(self): from .actor import SoundCloudBackend return [SoundCloudBackend]
from __future__ import unicode_literals import os from mopidy import ext, config from mopidy.exceptions import ExtensionError __version__ = '1.0.18' __url__ = 'https://github.com/mopidy/mopidy-soundcloud' class SoundCloudExtension(ext.Extension): dist_name = 'Mopidy-SoundCloud' ext_name = 'soundcloud' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf') return config.read(conf_file) def get_config_schema(self): schema = super(SoundCloudExtension, self).get_config_schema() schema['explore'] = config.List() schema['explore_pages'] = config.Integer() schema['auth_token'] = config.Secret() return schema def validate_config(self, config): if not config.getboolean('soundcloud', 'enabled'): return if not config.get('soundcloud', 'auth_token'): raise ExtensionError("In order to use SoundCloud extension you\ must provide auth_token, for more information referrer to \ https://github.com/mopidy/mopidy-soundcloud/") def get_backend_classes(self): from .actor import SoundCloudBackend return [SoundCloudBackend]
Remove env check as Mopidy checks deps automatically
ext: Remove env check as Mopidy checks deps automatically
Python
mit
mopidy/mopidy-soundcloud,yakumaa/mopidy-soundcloud
--- +++ @@ -35,12 +35,6 @@ must provide auth_token, for more information referrer to \ https://github.com/mopidy/mopidy-soundcloud/") - def validate_environment(self): - try: - import requests # noqa - except ImportError as e: - raise ExtensionError('Library requests not found', e) - def get_backend_classes(self): from .actor import SoundCloudBackend return [SoundCloudBackend]
6e48c8e6d85d196a90c56ebb7b73b3d61f2fef55
cryptonotifier/Main.py
cryptonotifier/Main.py
import notify2 import Rates def notify(): icon_path = "/home/dushyant/Desktop/Github/Crypto-Notifier/logo.jpg" cryptocurrencies = ["bitcoin", "ethereum", "litecoin", "monero", "ripple", "dash"] result = "" for coin in cryptocurrencies: rate = Rates.fetch_coin(coin) result += "{} - {}\n".format(rate[0], rate[2].encode('utf-8')) print result notify2.init("Cryptocurrency rates notifier") n = notify2.Notification("Crypto Notifier", icon=icon_path) n.set_urgency(notify2.URGENCY_NORMAL) n.set_timeout(1000) n.update("Current Rates", result) n.show() if __name__ == "__main__": notify()
import notify2 import Rates def notify(): icon_path = "/home/dushyant/Desktop/Github/Crypto-Notifier/logo.jpg" cryptocurrencies = ["bitcoin", "ethereum", "litecoin", "monero", "ripple", "dash"] result = "" for coin in cryptocurrencies: rate = Rates.fetch_coin(coin, "INR") result += "{} - {}\n".format(rate[0], rate[2].encode('utf-8')) print result notify2.init("Cryptocurrency rates notifier") n = notify2.Notification("Crypto Notifier", icon=icon_path) n.set_urgency(notify2.URGENCY_NORMAL) n.set_timeout(1000) n.update("Current Rates", result) n.show() if __name__ == "__main__": notify()
Add value for parameter "fiat" in method fetch_coin
Add value for parameter "fiat" in method fetch_coin
Python
mit
dushyantRathore/Crypto-Notifier
--- +++ @@ -16,7 +16,7 @@ result = "" for coin in cryptocurrencies: - rate = Rates.fetch_coin(coin) + rate = Rates.fetch_coin(coin, "INR") result += "{} - {}\n".format(rate[0], rate[2].encode('utf-8')) print result
dcbac0f33df07a61dbe4586f116a6f986a2211c6
tests/testnet/aio/test_amount.py
tests/testnet/aio/test_amount.py
# -*- coding: utf-8 -*- import pytest import logging from bitshares.aio.amount import Amount log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) @pytest.mark.asyncio async def test_aio_amount(bitshares): amount = await Amount("10 CNY", blockchain_instance=bitshares) assert amount["amount"] == 10 copied = amount.copy() assert amount["amount"] == copied["amount"]
# -*- coding: utf-8 -*- import pytest import logging from bitshares.aio.amount import Amount log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) @pytest.mark.asyncio async def test_aio_amount_init(bitshares, assets): amount = await Amount("10 USD", blockchain_instance=bitshares) assert amount["amount"] == 10 copied = await amount.copy() assert amount["amount"] == copied["amount"]
Test for async Amount init
Test for async Amount init
Python
mit
xeroc/python-bitshares
--- +++ @@ -9,8 +9,8 @@ @pytest.mark.asyncio -async def test_aio_amount(bitshares): - amount = await Amount("10 CNY", blockchain_instance=bitshares) +async def test_aio_amount_init(bitshares, assets): + amount = await Amount("10 USD", blockchain_instance=bitshares) assert amount["amount"] == 10 - copied = amount.copy() + copied = await amount.copy() assert amount["amount"] == copied["amount"]
6a2f0ddc309a2ad4ab74ad1f28875ca8f32c4437
src/toaster.py
src/toaster.py
import io import logging import PIL.Image import selenium.webdriver def fetch_screen_capture(uri, size): browser = selenium.webdriver.PhantomJS() browser.set_window_size(*size) browser.get(uri) return browser.get_screenshot_as_png() def toast(uri): logging.info("Toasting %s",uri) toast_image = PIL.Image.open("/app/toast-01.png") black_image = PIL.Image.open("/app/toast-02.png") capture_cropbox = (0, 0) + toast_image.size capture = fetch_screen_capture(uri, toast_image.size) capture_image = PIL.Image.open(io.BytesIO(capture)) capture_image.save("/app/capture.png") capture_mask = capture_image.crop(capture_cropbox).convert("L") composite_image = PIL.Image.composite(toast_image, black_image, capture_mask) renderedImagePath = "/app/render.png" thumbnailPath = "/app/thumbnail.png" composite_image.save(renderedImagePath) size = 500, 500 #open previously generated file compImg = PIL.Image.open(renderedImagePath) compImg.thumbnail(size, PIL.Image.ANTIALIAS) compImg.save(thumbnailPath, "JPEG", quality=60) logging.info("Done toasting %s",uri) return renderedImagePath, thumbnailPath
import io import logging import PIL.Image import selenium.webdriver def fetch_screen_capture(uri, size): browser = selenium.webdriver.PhantomJS() browser.set_window_size(*size) browser.get(uri) return browser.get_screenshot_as_png() def toast(uri): logging.info("Toasting %s",uri) toast_image = PIL.Image.open("/app/toast-01.png") black_image = PIL.Image.open("/app/toast-02.png") capture_cropbox = (0, 0) + toast_image.size capture = fetch_screen_capture(uri, toast_image.size) capture_image = PIL.Image.open(io.BytesIO(capture)) capture_image.save("/app/capture.png") capture_mask = capture_image.crop(capture_cropbox).convert("L") composite_image = PIL.Image.composite(toast_image, black_image, capture_mask) renderedImagePath = "/app/render.png" thumbnailPath = "/app/thumbnail.png" composite_image.save(renderedImagePath) size = 500, 500 #open previously generated file compImg = PIL.Image.open(renderedImagePath) compImg.thumbnail(size, PIL.Image.ANTIALIAS) compImg.save(thumbnailPath, "PNG", quality=60) logging.info("Done toasting %s",uri) return renderedImagePath, thumbnailPath
Fix issue where black boarders would appear on thumbnail
Fix issue where black boarders would appear on thumbnail
Python
mit
mrjackdavis/toaster-website-toast
--- +++ @@ -37,7 +37,7 @@ compImg.thumbnail(size, PIL.Image.ANTIALIAS) - compImg.save(thumbnailPath, "JPEG", quality=60) + compImg.save(thumbnailPath, "PNG", quality=60) logging.info("Done toasting %s",uri)
4f5fe3002f3244f5ce6b90303def86c1763c8afb
wafer/users/tests/test_models.py
wafer/users/tests/test_models.py
# -*- coding: utf-8 -*- # vim:fileencoding=utf-8 ai ts=4 sts=4 et sw=4 """Tests for wafer.user.models""" from django.contrib.auth import get_user_model from django.test import TestCase import sys PY2 = sys.version_info[0] == 2 class UserModelTestCase(TestCase): def test_str_method_issue192(self): """Test that str(user) works correctly""" create = get_user_model().objects.create_user user = create('test', 'test@example.com', 'test_pass') self.assertEqual(str(user.userprofile), 'test') user = create(u'tést', 'test@example.com', 'test_pass') if PY2: self.assertEqual(unicode(user.userprofile), u'tést') else: self.assertEqual(str(user.userprofile), u'tést')
# -*- coding: utf-8 -*- # vim:fileencoding=utf-8 ai ts=4 sts=4 et sw=4 """Tests for wafer.user.models""" from django.contrib.auth import get_user_model from django.test import TestCase import sys class UserModelTestCase(TestCase): def test_str_method_issue192(self): """Test that str(user) works correctly""" create = get_user_model().objects.create_user user = create('test', 'test@example.com', 'test_pass') self.assertEqual(str(user.userprofile), 'test') user = create(u'tést', 'test@example.com', 'test_pass') self.assertEqual(str(user.userprofile), u'tést')
Remove python2 logic from test
Remove python2 logic from test
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
--- +++ @@ -6,7 +6,6 @@ from django.test import TestCase import sys -PY2 = sys.version_info[0] == 2 class UserModelTestCase(TestCase): @@ -17,7 +16,4 @@ user = create('test', 'test@example.com', 'test_pass') self.assertEqual(str(user.userprofile), 'test') user = create(u'tést', 'test@example.com', 'test_pass') - if PY2: - self.assertEqual(unicode(user.userprofile), u'tést') - else: - self.assertEqual(str(user.userprofile), u'tést') + self.assertEqual(str(user.userprofile), u'tést')
a75e2b6c42ded44202e1fef53047c325566466f0
stella/llvm.py
stella/llvm.py
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int(64) tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp, val): if type(val) == int: return GenericValue.int(tp, val) elif type(val) == float: return GenericValue.real(tp, val) def llvm_to_py(tp, val): if tp == int: return val.as_int_signed() elif tp == float: return val.as_real(py_type_to_llvm(tp)) else: raise Exception ("Unknown type {0}".format(tp))
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int(64) #tp_float = Type.float() # Python always works with double precision tp_double = Type.double() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_double else: raise TypeError("Unknown type " + tp) def get_generic_value(tp, val): if type(val) == int: return GenericValue.int(tp, val) elif type(val) == float: return GenericValue.real(tp, val) def llvm_to_py(tp, val): if tp == int: return val.as_int_signed() elif tp == float: return val.as_real(py_type_to_llvm(tp)) else: raise Exception ("Unknown type {0}".format(tp))
Use double precision for floats
Use double precision for floats
Python
apache-2.0
squisher/stella,squisher/stella,squisher/stella,squisher/stella
--- +++ @@ -5,12 +5,14 @@ import logging tp_int = Type.int(64) -tp_float = Type.float() +#tp_float = Type.float() # Python always works with double precision +tp_double = Type.double() + def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: - return tp_float + return tp_double else: raise TypeError("Unknown type " + tp)
6f80a7e5f8dea031db1c7cc676f8c96faf5fc458
test/test_links.py
test/test_links.py
import pytest @pytest.mark.parametrize("name, linked_to", [ ("/home/wicksy/vagrant/Vagrantfile", "/git/wicksy/configfiles/vagrant/Vagrantfile"), ("/home/wicksy/.vimrc", "/git/wicksy/configfiles/dotfiles/.vimrc"), ("/home/wicksy/.bashrc", "/git/wicksy/configfiles/dotfiles/.bashrc"), ("/home/wicksy/.aws", "/git/wicksy/configfiles/dotfiles/.aws"), ("/home/wicksy/.config", "/git/wicksy/configfiles/dotfiles/.config"), ("/home/wicksy/.gitconfig", "/git/wicksy/configfiles/dotfiles/.gitconfig"), ("/home/wicksy/.ssh/config", "/git/wicksy/configfiles/dotfiles/.ssh/config"), ]) def test_links(File, name, linked_to): assert File(name).exists assert File(name).is_symlink assert File(name).linked_to == str(linked_to)
import pytest @pytest.mark.parametrize("name, linked_to", [ ("/home/wicksy/vagrant/Vagrantfile", "/git/wicksy/configfiles/vagrant/Vagrantfile"), ("/home/wicksy/.vimrc", "/git/wicksy/configfiles/dotfiles/.vimrc"), ("/home/wicksy/.bashrc", "/git/wicksy/configfiles/dotfiles/.bashrc"), ("/home/wicksy/.aws", "/git/wicksy/configfiles/dotfiles/.aws"), ("/home/wicksy/.config", "/git/wicksy/configfiles/dotfiles/.config"), ("/home/wicksy/.gitconfig", "/git/wicksy/configfiles/dotfiles/.gitconfig"), ("/home/wicksy/.ssh/config", "/git/wicksy/configfiles/dotfiles/.ssh/config"), ]) def test_links(host, name, linked_to): file = host.file(name) assert file.exists assert file.is_symlink assert file.linked_to == str(linked_to)
Change test function as existing method deprecated
Change test function as existing method deprecated
Python
mit
wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build
--- +++ @@ -10,7 +10,8 @@ ("/home/wicksy/.ssh/config", "/git/wicksy/configfiles/dotfiles/.ssh/config"), ]) -def test_links(File, name, linked_to): - assert File(name).exists - assert File(name).is_symlink - assert File(name).linked_to == str(linked_to) +def test_links(host, name, linked_to): + file = host.file(name) + assert file.exists + assert file.is_symlink + assert file.linked_to == str(linked_to)
1f9ee69ad3bf2e370e473070ebc13ecda18cac20
sale_channel/models/sale.py
sale_channel/models/sale.py
# -*- coding: utf-8 -*- # © 2016 1200 WebDevelopment <1200wd.com> # © 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api class SaleOrder(models.Model): _inherit = "sale.order" sales_channel_id = fields.Many2one( comodel_name='res.partner', string='Sales channel', ondelete='set null', domain="[('category_id', 'ilike', 'sales channel')]", index=True, ) @api.multi def onchange_partner_id(self, partner_id): """Add values from sales_channel partner, if available.""" res = super(SaleOrder, self).onchange_partner_id(partner_id) if partner_id: partner = self.env['res.partner'].browse(partner_id) if partner.sales_channel_id: res['value']['sales_channel_id'] = partner.sales_channel_id return res @api.model def _prepare_invoice(self, order, lines): """Make sure sales_channel_id is set on invoice.""" val = super(SaleOrder, self)._prepare_invoice(order, lines) if order.sales_channel_id: val.update({ 'sales_channel_id': order.sales_channel_id.id, }) return val
# -*- coding: utf-8 -*- # © 2016 1200 WebDevelopment <1200wd.com> # © 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api class SaleOrder(models.Model): _inherit = "sale.order" sales_channel_id = fields.Many2one( comodel_name='res.partner', string='Sales channel', ondelete='set null', domain="[('category_id', 'ilike', 'sales channel')]", index=True, ) @api.multi def onchange_partner_id(self, partner_id): """Add values from sales_channel partner, if available.""" res = super(SaleOrder, self).onchange_partner_id(partner_id) if partner_id: partner = self.env['res.partner'].browse(partner_id) if partner.sales_channel_id: res['value']['sales_channel_id'] = partner.sales_channel_id.id return res @api.model def _prepare_invoice(self, order, lines): """Make sure sales_channel_id is set on invoice.""" val = super(SaleOrder, self)._prepare_invoice(order, lines) if order.sales_channel_id: val.update({ 'sales_channel_id': order.sales_channel_id.id, }) return val
Fix missing id from the onchange
[FIX] Fix missing id from the onchange
Python
agpl-3.0
1200wd/1200wd_addons,1200wd/1200wd_addons
--- +++ @@ -23,7 +23,7 @@ if partner_id: partner = self.env['res.partner'].browse(partner_id) if partner.sales_channel_id: - res['value']['sales_channel_id'] = partner.sales_channel_id + res['value']['sales_channel_id'] = partner.sales_channel_id.id return res @api.model
ed2dc3478691592cb38a1f1923a39bed4bcf423c
tests/test_main.py
tests/test_main.py
# -*- coding:utf-8 -*- from contextlib import redirect_stderr, redirect_stdout from io import StringIO from os.path import devnull from subprocess import check_call from sys import version from pytest import fixture, raises from csft import __main__ as main, __version__ @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft'], stdout=null, stderr=null) def test_main(mocker): obj = object() csft2data = mocker.patch('csft.__main__.csft2data', return_value=obj) pr = mocker.patch('builtins.print') assert 0 == main.main(argv=['csft']) csft2data.assert_called_once_with(main._dir('csft')) pr.assert_called_once_with(obj) def test_wrong_path(capsys): with raises(SystemExit): main.main(argv=[]) assert capsys.readouterr() with raises(SystemExit): main.main(argv=['path/is/not/a/directory']) assert capsys.readouterr() def test_show_version(): def print_version(): try: main.main(argv=['-V']) except SystemExit as err: assert 0 == err.code buffer = StringIO() if version < '3.0': with redirect_stderr(buffer): print_version() else: with redirect_stdout(buffer): print_version() assert __version__ == buffer.getvalue().strip() buffer.close()
# -*- coding:utf-8 -*- from os.path import devnull from subprocess import check_call from pytest import fixture, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft'], stdout=null, stderr=null) def test_main(mocker): obj = object() csft2data = mocker.patch('csft.__main__.csft2data', return_value=obj) pr = mocker.patch('builtins.print') assert 0 == main.main(argv=['csft']) csft2data.assert_called_once_with(main._dir('csft')) pr.assert_called_once_with(obj) def test_wrong_path(capsys): with raises(SystemExit): main.main(argv=[]) assert capsys.readouterr() with raises(SystemExit): main.main(argv=['path/is/not/a/directory']) assert capsys.readouterr() def test_show_version(capsys): try: main.main(argv=['-V']) except SystemExit as err: assert 0 == err.code from csft import __version__ assert __version__ == capsys.readouterr().out.strip()
Use capsys instead of redirect_stderr
Use capsys instead of redirect_stderr
Python
mit
yanqd0/csft
--- +++ @@ -1,14 +1,11 @@ # -*- coding:utf-8 -*- -from contextlib import redirect_stderr, redirect_stdout -from io import StringIO from os.path import devnull from subprocess import check_call -from sys import version from pytest import fixture, raises -from csft import __main__ as main, __version__ +from csft import __main__ as main @fixture @@ -40,20 +37,11 @@ assert capsys.readouterr() -def test_show_version(): - def print_version(): - try: - main.main(argv=['-V']) - except SystemExit as err: - assert 0 == err.code +def test_show_version(capsys): + try: + main.main(argv=['-V']) + except SystemExit as err: + assert 0 == err.code - buffer = StringIO() - if version < '3.0': - with redirect_stderr(buffer): - print_version() - else: - with redirect_stdout(buffer): - print_version() - - assert __version__ == buffer.getvalue().strip() - buffer.close() + from csft import __version__ + assert __version__ == capsys.readouterr().out.strip()
8b7fa42c7cd080f7faebbfaf782fa639104cb96a
pgcli/packages/expanded.py
pgcli/packages/expanded.py
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def expanded_table(rows, headers): header_len = max([len(x) for x in headers]) max_row_len = 0 results = [] sep = u"-[ RECORD {0} ]-------------------------\n" padded_headers = [pad(x, header_len) + u" |" for x in headers] header_len += 2 for row in rows: row_len = max([len(_text_type(x)) for x in row]) row_result = [] if row_len > max_row_len: max_row_len = row_len for header, value in zip(padded_headers, row): row_result.append(u"%s %s" % (header, value)) results.append('\n'.join(row_result)) output = [] for i, result in enumerate(results): output.append(sep.format(i)) output.append(result) output.append('\n') return ''.join(output)
from .tabulate import _text_type def pad(field, total, char=u" "): return field + (char * (total - len(field))) def expanded_table(rows, headers): header_len = max([len(x) for x in headers]) max_row_len = 0 results = [] sep = u"-[ RECORD {0} ]-------------------------\n" padded_headers = [pad(x, header_len) + u" |" for x in headers] header_len += 2 for row in rows: row_len = max([len(_text_type(x)) for x in row]) row_result = [] if row_len > max_row_len: max_row_len = row_len for header, value in zip(padded_headers, row): row_result.append((u"%s" % header) + " " + (u"%s" % value).strip()) results.append('\n'.join(row_result)) output = [] for i, result in enumerate(results): output.append(sep.format(i)) output.append(result) output.append('\n') return ''.join(output)
Remove any whitespace from values
Remove any whitespace from values
Python
bsd-3-clause
dbcli/pgcli,w4ngyi/pgcli,darikg/pgcli,koljonen/pgcli,d33tah/pgcli,koljonen/pgcli,d33tah/pgcli,w4ngyi/pgcli,darikg/pgcli,dbcli/pgcli
--- +++ @@ -19,7 +19,7 @@ max_row_len = row_len for header, value in zip(padded_headers, row): - row_result.append(u"%s %s" % (header, value)) + row_result.append((u"%s" % header) + " " + (u"%s" % value).strip()) results.append('\n'.join(row_result))
a037843f62a3d6b1124f8b62517463ef92cd793f
tvsort_sl/fcntl.py
tvsort_sl/fcntl.py
# coding=utf-8 from __future__ import unicode_literals def fcntl(fd, op, arg=0): return 0 def ioctl(fd, op, arg=0, mutable_flag=True): if mutable_flag: return 0 else: return "" def flock(fd, op): return def lockf(fd, operation, length=0, start=0, whence=0): return
# coding=utf-8 from __future__ import unicode_literals # Variables with simple values FASYNC = 64 FD_CLOEXEC = 1 F_DUPFD = 0 F_FULLFSYNC = 51 F_GETFD = 1 F_GETFL = 3 F_GETLK = 7 F_GETOWN = 5 F_RDLCK = 1 F_SETFD = 2 F_SETFL = 4 F_SETLK = 8 F_SETLKW = 9 F_SETOWN = 6 F_UNLCK = 2 F_WRLCK = 3 LOCK_EX = 2 LOCK_NB = 4 LOCK_SH = 1 LOCK_UN = 8 def fcntl(fd, op, arg=0): return 0 def ioctl(fd, op, arg=0, mutable_flag=True): if mutable_flag: return 0 else: return "" def flock(fd, op): return def lockf(fd, operation, length=0, start=0, whence=0): return
Add missing variables to cntl
Add missing variables to cntl
Python
mit
shlomiLan/tvsort_sl
--- +++ @@ -1,5 +1,31 @@ # coding=utf-8 from __future__ import unicode_literals + +# Variables with simple values + +FASYNC = 64 + +FD_CLOEXEC = 1 + +F_DUPFD = 0 +F_FULLFSYNC = 51 +F_GETFD = 1 +F_GETFL = 3 +F_GETLK = 7 +F_GETOWN = 5 +F_RDLCK = 1 +F_SETFD = 2 +F_SETFL = 4 +F_SETLK = 8 +F_SETLKW = 9 +F_SETOWN = 6 +F_UNLCK = 2 +F_WRLCK = 3 + +LOCK_EX = 2 +LOCK_NB = 4 +LOCK_SH = 1 +LOCK_UN = 8 def fcntl(fd, op, arg=0):
cb52e7b1a507ca7b6065c6994d11d3c07a41e6f1
uniqueids/tasks.py
uniqueids/tasks.py
from celery.task import Task from celery.utils.log import get_task_logger from hellomama_registration import utils logger = get_task_logger(__name__) class AddUniqueIDToIdentity(Task): def run(self, identity, unique_id, write_to, **kwargs): """ identity: the identity to receive the payload. unique_id: the unique_id to add to the identity write_to: the key to write the unique_id to """ full_identity = utils.get_identity(identity) if "details" in full_identity: # not a 404 partial_identity = { "details": full_identity["details"] } partial_identity["details"][write_to] = unique_id utils.patch_identity(identity, partial_identity) return "Identity <%s> now has <%s> of <%s>" % ( identity, write_to, str(unique_id)) else: return "Identity <%s> not found" % (identity,) add_unique_id_to_identity = AddUniqueIDToIdentity()
from celery.task import Task from celery.utils.log import get_task_logger from hellomama_registration import utils logger = get_task_logger(__name__) class AddUniqueIDToIdentity(Task): def run(self, identity, unique_id, write_to, **kwargs): """ identity: the identity to receive the payload. unique_id: the unique_id to add to the identity write_to: the key to write the unique_id to """ full_identity = utils.get_identity(identity) if "details" in full_identity: # not a 404 partial_identity = { "details": full_identity["details"] } # convert to string to enable Django filter lookups partial_identity["details"][write_to] = str(unique_id) utils.patch_identity(identity, partial_identity) return "Identity <%s> now has <%s> of <%s>" % ( identity, write_to, str(unique_id)) else: return "Identity <%s> not found" % (identity,) add_unique_id_to_identity = AddUniqueIDToIdentity()
Make auto gen ID's strings on save to Identity
Make auto gen ID's strings on save to Identity
Python
bsd-3-clause
praekelt/hellomama-registration,praekelt/hellomama-registration
--- +++ @@ -20,7 +20,8 @@ partial_identity = { "details": full_identity["details"] } - partial_identity["details"][write_to] = unique_id + # convert to string to enable Django filter lookups + partial_identity["details"][write_to] = str(unique_id) utils.patch_identity(identity, partial_identity) return "Identity <%s> now has <%s> of <%s>" % ( identity, write_to, str(unique_id))
8d7d058480f909ef3bc22aa9f8ee76179b346784
arthur/exercises.py
arthur/exercises.py
""" UI tools related to exercise search and selection. """ import urwid from arthur.ui import DIVIDER class SearchTool(object): name = u"Mission search" position = ("relative", 20), 30, "middle", 10 def __init__(self): title = urwid.Text(u"Mission search") search = urwid.Edit(u"Search terms: ", multiline=False) self.pile = urwid.Pile([title, DIVIDER, search]) self.widget = urwid.LineBox(urwid.Filler(self.pile))
""" UI tools related to exercise search and selection. """ from arthur.ui import Prompt class SearchTool(Prompt): position = ("relative", 20), 30, "middle", 10 def __init__(self): Prompt.__init__(self, u"Mission search", u"Search terms: ")
Refactor search tool in terms of prompt
Refactor search tool in terms of prompt
Python
isc
crypto101/arthur
--- +++ @@ -1,17 +1,11 @@ """ UI tools related to exercise search and selection. """ -import urwid - -from arthur.ui import DIVIDER +from arthur.ui import Prompt -class SearchTool(object): - name = u"Mission search" +class SearchTool(Prompt): position = ("relative", 20), 30, "middle", 10 def __init__(self): - title = urwid.Text(u"Mission search") - search = urwid.Edit(u"Search terms: ", multiline=False) - self.pile = urwid.Pile([title, DIVIDER, search]) - self.widget = urwid.LineBox(urwid.Filler(self.pile)) + Prompt.__init__(self, u"Mission search", u"Search terms: ")
394f5832c6d3ff3efefbc5c21163adcdedd9a9bb
sale_stock_availability/__openerp__.py
sale_stock_availability/__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'Stock availability in sales order line', 'version': '0.1', 'category': 'Tools', 'description': """ Stock availability in sales order line ====================================== * Add two groups. One for seeing stock on sale orders and other to see only if or not available * Add an option in warehouse to disable stock warning IMPORTANT: ---------- * This module could break some warnings as the ones implemented by "warning" module * If you dont disable warning and give a user availbility to see only "true/false" on sale order stock, he can see stock if the warning is raised """, 'author': 'Moldeo Interactive & Ingenieria Adhoc', 'website': 'http://business.moldeo.coop http://ingadhoc.com/', 'images': [], 'depends': [ 'sale_stock' ], 'demo': [], 'data': [ 'sale_view.xml', 'stock_view.xml', 'security/sale_order.xml', ], 'test': [], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# -*- coding: utf-8 -*- { 'name': 'Stock availability in sales order line', 'version': '0.1', 'category': 'Tools', 'description': """ Stock availability in sales order line ====================================== * Add two groups. One for seeing stock on sale orders and other to see only if or not available * Add an option in warehouse to disable stock warning IMPORTANT: ---------- * This module could break some warnings as the ones implemented by "warning" module * If you dont disable warning and give a user availbility to see only "true/false" on sale order stock, he can see stock if the warning is raised """, 'author': 'Moldeo Interactive & Ingenieria Adhoc', 'website': 'http://business.moldeo.coop http://ingadhoc.com/', 'images': [], 'depends': [ 'sale_stock' ], 'demo': [], 'data': [ 'sale_view.xml', 'stock_view.xml', 'security/sale_order.xml', ], 'test': [], 'installable': True, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
FIX sale stock availa.. description
FIX sale stock availa.. description
Python
agpl-3.0
syci/ingadhoc-odoo-addons,HBEE/odoo-addons,jorsea/odoo-addons,adhoc-dev/odoo-addons,bmya/odoo-addons,bmya/odoo-addons,levkar/odoo-addons,bmya/odoo-addons,dvitme/odoo-addons,ClearCorp/account-financial-tools,jorsea/odoo-addons,sysadminmatmoz/ingadhoc,ingadhoc/account-payment,HBEE/odoo-addons,ingadhoc/stock,adhoc-dev/account-financial-tools,maljac/odoo-addons,ingadhoc/odoo-addons,ingadhoc/product,adhoc-dev/account-financial-tools,maljac/odoo-addons,ingadhoc/odoo-addons,levkar/odoo-addons,ingadhoc/account-invoicing,ingadhoc/account-financial-tools,ingadhoc/sale,levkar/odoo-addons,ingadhoc/odoo-addons,sysadminmatmoz/ingadhoc,jorsea/odoo-addons,dvitme/odoo-addons,ingadhoc/sale,dvitme/odoo-addons,syci/ingadhoc-odoo-addons,HBEE/odoo-addons,ingadhoc/account-analytic,ingadhoc/partner,adhoc-dev/odoo-addons,ingadhoc/sale,ingadhoc/product,ingadhoc/sale,sysadminmatmoz/ingadhoc,adhoc-dev/odoo-addons,ClearCorp/account-financial-tools,levkar/odoo-addons,maljac/odoo-addons,syci/ingadhoc-odoo-addons
--- +++ @@ -4,14 +4,15 @@ 'version': '0.1', 'category': 'Tools', 'description': """ - Stock availability in sales order line - ====================================== - * Add two groups. One for seeing stock on sale orders and other to see only if or not available - * Add an option in warehouse to disable stock warning - IMPORTANT: - ---------- - * This module could break some warnings as the ones implemented by "warning" module - * If you dont disable warning and give a user availbility to see only "true/false" on sale order stock, he can see stock if the warning is raised +Stock availability in sales order line +====================================== +* Add two groups. One for seeing stock on sale orders and other to see only if or not available +* Add an option in warehouse to disable stock warning + +IMPORTANT: +---------- + * This module could break some warnings as the ones implemented by "warning" module + * If you dont disable warning and give a user availbility to see only "true/false" on sale order stock, he can see stock if the warning is raised """, 'author': 'Moldeo Interactive & Ingenieria Adhoc', 'website': 'http://business.moldeo.coop http://ingadhoc.com/',
4d8193640498d5eb82876c245a80f5b41c51b8dd
wallace/app.py
wallace/app.py
from flask import Flask import experiments import db app = Flask(__name__) session = db.init_db(drop_all=True) @app.route('/') def index(): return 'Index page' @app.route('/demo2') def start(): experiment = experiments.Demo2(session) experiment.add_and_trigger_sources() # Add any sources process = experiment.process # Step through the process for i in xrange(experiment.num_steps): process.step() if __name__ == "__main__": app.debug = True app.run()
from flask import Flask import experiments import db app = Flask(__name__) session = db.init_db(drop_all=True) @app.route('/') def index(): return 'Index page' @app.route('/demo2') def start(): experiment = experiments.Demo2(session) experiment.add_and_trigger_sources() # Add any sources process = experiment.process # Step through the process for i in xrange(experiment.num_steps): process.step() return "Demo 2 complete." if __name__ == "__main__": app.debug = True app.run()
Return a value when Flask view function completes
Return a value when Flask view function completes
Python
mit
Dallinger/Dallinger,Dallinger/Dallinger,suchow/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,suchow/Wallace,suchow/Wallace,Dallinger/Dallinger,berkeley-cocosci/Wallace,jcpeterson/Dallinger,berkeley-cocosci/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger
--- +++ @@ -19,7 +19,7 @@ process = experiment.process # Step through the process for i in xrange(experiment.num_steps): process.step() - + return "Demo 2 complete." if __name__ == "__main__": app.debug = True
6ec97d78930b7ed77af34869face1a45895950f1
sensor/core/models/event.py
sensor/core/models/event.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 django.db import models VALUE_MAX_LEN = 128 class GenericEvent(models.Model): """Represents a measurement event abstracting away what exactly is measured. """ sensor = models.ForeignKey('core.GenericSensor') datetime = models.DateTimeField() value = models.CharField(max_length=VALUE_MAX_LEN) class Event(models.Model): """Base class for sensor-specific event types""" generic_event = models.OneToOneField('core.GenericEvent') datetime = models.DateTimeField() def value_to_string(self): """Event.value_to_string() -> unicode Returns a string representation of the """ raise NotImplementedError(self.__class__.value_to_string) class Meta: abstract = True
# 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 django.db import models VALUE_MAX_LEN = 128 class GenericEvent(models.Model): """Represents a measurement event abstracting away what exactly is measured. """ sensor = models.ForeignKey('core.GenericSensor') datetime = models.DateTimeField() value = models.CharField(max_length=VALUE_MAX_LEN) class Event(models.Model): """Base class for sensor-specific event types""" generic_event = models.OneToOneField('core.GenericEvent') sensor = models.ForeignKey('core.Sensor') datetime = models.DateTimeField() def value_to_string(self): """Event.value_to_string() -> unicode Returns a string representation of the """ raise NotImplementedError(self.__class__.value_to_string) class Meta: abstract = True
Add sensor field to Event model in sensor.core
Add sensor field to Event model in sensor.core
Python
mpl-2.0
HeisenbergPeople/weather-station-site,HeisenbergPeople/weather-station-site,HeisenbergPeople/weather-station-site
--- +++ @@ -22,7 +22,10 @@ """Base class for sensor-specific event types""" generic_event = models.OneToOneField('core.GenericEvent') + + sensor = models.ForeignKey('core.Sensor') datetime = models.DateTimeField() + def value_to_string(self): """Event.value_to_string() -> unicode
3a87b03ed42232f7daa96242142f48872bf26634
readthedocs/gold/models.py
readthedocs/gold/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ LEVEL_CHOICES = ( ('v1-org-5', '$5/mo'), ('v1-org-10', '$10/mo'), ('v1-org-15', '$15/mo'), ('v1-org-20', '$20/mo'), ('v1-org-50', '$50/mo'), ('v1-org-100', '$100/mo'), ) class GoldUser(models.Model): pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True) modified_date = models.DateTimeField(_('Modified date'), auto_now=True) user = models.ForeignKey('auth.User', verbose_name=_('User'), unique=True, related_name='gold') level = models.CharField(_('Level'), max_length=20, choices=LEVEL_CHOICES, default='supporter') last_4_digits = models.CharField(max_length=4) stripe_id = models.CharField(max_length=255) subscribed = models.BooleanField(default=False)
from django.db import models from django.utils.translation import ugettext_lazy as _ LEVEL_CHOICES = ( ('v1-org-5', '$5/mo'), ('v1-org-10', '$10/mo'), ('v1-org-15', '$15/mo'), ('v1-org-20', '$20/mo'), ('v1-org-50', '$50/mo'), ('v1-org-100', '$100/mo'), ) class GoldUser(models.Model): pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True) modified_date = models.DateTimeField(_('Modified date'), auto_now=True) user = models.ForeignKey('auth.User', verbose_name=_('User'), unique=True, related_name='gold') level = models.CharField(_('Level'), max_length=20, choices=LEVEL_CHOICES, default='supporter') last_4_digits = models.CharField(max_length=4) stripe_id = models.CharField(max_length=255) subscribed = models.BooleanField(default=False) def __unicode__(self): return 'Gold Level %s for %s' % (self.level, self.user)
Add nicer string rep for gold user
Add nicer string rep for gold user
Python
mit
jerel/readthedocs.org,CedarLogic/readthedocs.org,sunnyzwh/readthedocs.org,sils1297/readthedocs.org,rtfd/readthedocs.org,espdev/readthedocs.org,raven47git/readthedocs.org,sunnyzwh/readthedocs.org,safwanrahman/readthedocs.org,takluyver/readthedocs.org,fujita-shintaro/readthedocs.org,sid-kap/readthedocs.org,laplaceliu/readthedocs.org,espdev/readthedocs.org,jerel/readthedocs.org,hach-que/readthedocs.org,laplaceliu/readthedocs.org,nikolas/readthedocs.org,raven47git/readthedocs.org,soulshake/readthedocs.org,attakei/readthedocs-oauth,cgourlay/readthedocs.org,pombredanne/readthedocs.org,istresearch/readthedocs.org,wijerasa/readthedocs.org,espdev/readthedocs.org,techtonik/readthedocs.org,kdkeyser/readthedocs.org,laplaceliu/readthedocs.org,kdkeyser/readthedocs.org,atsuyim/readthedocs.org,stevepiercy/readthedocs.org,mhils/readthedocs.org,asampat3090/readthedocs.org,sunnyzwh/readthedocs.org,wijerasa/readthedocs.org,sunnyzwh/readthedocs.org,gjtorikian/readthedocs.org,GovReady/readthedocs.org,nikolas/readthedocs.org,jerel/readthedocs.org,LukasBoersma/readthedocs.org,sils1297/readthedocs.org,Tazer/readthedocs.org,davidfischer/readthedocs.org,dirn/readthedocs.org,emawind84/readthedocs.org,sid-kap/readthedocs.org,fujita-shintaro/readthedocs.org,attakei/readthedocs-oauth,fujita-shintaro/readthedocs.org,VishvajitP/readthedocs.org,Tazer/readthedocs.org,wanghaven/readthedocs.org,mhils/readthedocs.org,nikolas/readthedocs.org,takluyver/readthedocs.org,soulshake/readthedocs.org,kenshinthebattosai/readthedocs.org,michaelmcandrew/readthedocs.org,safwanrahman/readthedocs.org,GovReady/readthedocs.org,singingwolfboy/readthedocs.org,tddv/readthedocs.org,Tazer/readthedocs.org,wanghaven/readthedocs.org,rtfd/readthedocs.org,singingwolfboy/readthedocs.org,cgourlay/readthedocs.org,SteveViss/readthedocs.org,tddv/readthedocs.org,gjtorikian/readthedocs.org,dirn/readthedocs.org,emawind84/readthedocs.org,kenshinthebattosai/readthedocs.org,agjohnson/readthedocs.org,sid-kap/readthedocs.org,istresearch/readthedocs.org,asampat3090/readthedocs.org,asampat3090/readthedocs.org,clarkperkins/readthedocs.org,wijerasa/readthedocs.org,atsuyim/readthedocs.org,kenwang76/readthedocs.org,kdkeyser/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,rtfd/readthedocs.org,singingwolfboy/readthedocs.org,dirn/readthedocs.org,agjohnson/readthedocs.org,kenwang76/readthedocs.org,mhils/readthedocs.org,LukasBoersma/readthedocs.org,clarkperkins/readthedocs.org,VishvajitP/readthedocs.org,takluyver/readthedocs.org,gjtorikian/readthedocs.org,cgourlay/readthedocs.org,stevepiercy/readthedocs.org,agjohnson/readthedocs.org,michaelmcandrew/readthedocs.org,istresearch/readthedocs.org,Tazer/readthedocs.org,titiushko/readthedocs.org,safwanrahman/readthedocs.org,pombredanne/readthedocs.org,davidfischer/readthedocs.org,sils1297/readthedocs.org,VishvajitP/readthedocs.org,raven47git/readthedocs.org,emawind84/readthedocs.org,royalwang/readthedocs.org,atsuyim/readthedocs.org,stevepiercy/readthedocs.org,royalwang/readthedocs.org,SteveViss/readthedocs.org,d0ugal/readthedocs.org,d0ugal/readthedocs.org,VishvajitP/readthedocs.org,jerel/readthedocs.org,michaelmcandrew/readthedocs.org,CedarLogic/readthedocs.org,emawind84/readthedocs.org,CedarLogic/readthedocs.org,espdev/readthedocs.org,kdkeyser/readthedocs.org,techtonik/readthedocs.org,soulshake/readthedocs.org,fujita-shintaro/readthedocs.org,singingwolfboy/readthedocs.org,titiushko/readthedocs.org,attakei/readthedocs-oauth,hach-que/readthedocs.org,wijerasa/readthedocs.org,takluyver/readthedocs.org,GovReady/readthedocs.org,asampat3090/readthedocs.org,sils1297/readthedocs.org,soulshake/readthedocs.org,atsuyim/readthedocs.org,istresearch/readthedocs.org,titiushko/readthedocs.org,titiushko/readthedocs.org,raven47git/readthedocs.org,d0ugal/readthedocs.org,hach-que/readthedocs.org,GovReady/readthedocs.org,stevepiercy/readthedocs.org,kenwang76/readthedocs.org,hach-que/readthedocs.org,dirn/readthedocs.org,LukasBoersma/readthedocs.org,techtonik/readthedocs.org,SteveViss/readthedocs.org,LukasBoersma/readthedocs.org,agjohnson/readthedocs.org,mhils/readthedocs.org,kenwang76/readthedocs.org,clarkperkins/readthedocs.org,CedarLogic/readthedocs.org,cgourlay/readthedocs.org,royalwang/readthedocs.org,techtonik/readthedocs.org,pombredanne/readthedocs.org,safwanrahman/readthedocs.org,davidfischer/readthedocs.org,royalwang/readthedocs.org,laplaceliu/readthedocs.org,nikolas/readthedocs.org,attakei/readthedocs-oauth,sid-kap/readthedocs.org,kenshinthebattosai/readthedocs.org,wanghaven/readthedocs.org,gjtorikian/readthedocs.org,d0ugal/readthedocs.org,clarkperkins/readthedocs.org,SteveViss/readthedocs.org,kenshinthebattosai/readthedocs.org,davidfischer/readthedocs.org,wanghaven/readthedocs.org,michaelmcandrew/readthedocs.org,espdev/readthedocs.org
--- +++ @@ -21,3 +21,6 @@ last_4_digits = models.CharField(max_length=4) stripe_id = models.CharField(max_length=255) subscribed = models.BooleanField(default=False) + + def __unicode__(self): + return 'Gold Level %s for %s' % (self.level, self.user)
bc6d8d6789fb6275587e119eea7d39941ea4c749
loadFeatures.py
loadFeatures.py
from numpy import * from mnist import * from util import Counter # def loadData(): # images, labels = load_mnist('training') def defineFeatures(imageList, n): imageList = imageList[0:] featureList = [] for image in imageList: imgFeature = Counter() for i in range(len(image)): for j in range(len(image[i])): if image[i][j] == 0: imgFeature[(i, j)] = 0 else: imgFeature[(i, j)] = 1 # imgFeature[(i, j)] = image[i][j] featureList.append(imgFeature) return featureList def main(): images, labels = load_mnist('training') featureList = defineFeatures(images) if __name__=="__main__": main()
from mnist import * from util import Counter def loadData(): """ loadData() pulls data from MNIST training set, splits it into training and validation data, then parses the data into features """ # load data from MNIST files images, labels = load_mnist('training') # find out where to split so that 5/6 of data is training # and 1/6 is validation split = float(len(labels) * 5 / 6) # split training and validation images/labels trainingImages, trainingLabels = images[:split], labels[:split] validationImages, validationLabels = images[split:], labels[split:] # get features for data trainingData = defineFeatures(trainingImages) validationData = defineFeatures(validationImages) return trainingData, trainingLabels, validationData, validationLabels def defineFeatures(imageList): """ defineFeatures() defines a simple feature of a pixel either being white (0) or not (1) for a list of images and pixel values """ featureList = [] for image in imageList: # create feature of on/off for (x, y) positions in image imgFeature = Counter() for x in range(len(image)): for y in range(len(image[x])): if image[x][y] == 0: imgFeature[(x, y)] = 0 else: imgFeature[(x, y)] = 1 featureList.append(imgFeature) return featureList def main(): loadData() if __name__=="__main__": main()
Split training and validation data
Split training and validation data
Python
mit
chetaldrich/MLOCR,chetaldrich/MLOCR
--- +++ @@ -1,29 +1,48 @@ -from numpy import * from mnist import * from util import Counter -# def loadData(): -# images, labels = load_mnist('training') +def loadData(): + """ + loadData() pulls data from MNIST training set, splits it into training and + validation data, then parses the data into features + """ + # load data from MNIST files + images, labels = load_mnist('training') + # find out where to split so that 5/6 of data is training + # and 1/6 is validation + split = float(len(labels) * 5 / 6) -def defineFeatures(imageList, n): - imageList = imageList[0:] + # split training and validation images/labels + trainingImages, trainingLabels = images[:split], labels[:split] + validationImages, validationLabels = images[split:], labels[split:] + + # get features for data + trainingData = defineFeatures(trainingImages) + validationData = defineFeatures(validationImages) + + return trainingData, trainingLabels, validationData, validationLabels + +def defineFeatures(imageList): + """ + defineFeatures() defines a simple feature of a pixel either being white (0) + or not (1) for a list of images and pixel values + """ featureList = [] for image in imageList: + # create feature of on/off for (x, y) positions in image imgFeature = Counter() - for i in range(len(image)): - for j in range(len(image[i])): - if image[i][j] == 0: - imgFeature[(i, j)] = 0 + for x in range(len(image)): + for y in range(len(image[x])): + if image[x][y] == 0: + imgFeature[(x, y)] = 0 else: - imgFeature[(i, j)] = 1 - # imgFeature[(i, j)] = image[i][j] + imgFeature[(x, y)] = 1 featureList.append(imgFeature) + return featureList def main(): - images, labels = load_mnist('training') - featureList = defineFeatures(images) + loadData() if __name__=="__main__": - main()
178b39611ec6bc32e4bb0ccd481660a0364872d7
src/tests/test_utils.py
src/tests/test_utils.py
import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure
import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure def generate_blob(): """ Generate a blob by drawing from the normal distribution across two axes and binning it to the required size """ mean = [0,0] cov = [[1,1],[10,100]] # diagonal covariance, points lie on x or y-axis x,y = np.random.multivariate_normal(mean,cov,5000).T h, xedges, yedges = np.histogram2d(x,y, bins=100) return h
Add testing function for blobs
Add testing function for blobs
Python
mit
samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project
--- +++ @@ -13,3 +13,14 @@ linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure + + +def generate_blob(): + """ Generate a blob by drawing from the normal distribution across two axes + and binning it to the required size + """ + mean = [0,0] + cov = [[1,1],[10,100]] # diagonal covariance, points lie on x or y-axis + x,y = np.random.multivariate_normal(mean,cov,5000).T + h, xedges, yedges = np.histogram2d(x,y, bins=100) + return h
f10d443eda1e8727c48439cc7c9491178a1ac4c8
performance_testing/result.py
performance_testing/result.py
import os from datetime import datetime from time import time class Result: def __init__(self, directory): date = datetime.fromtimestamp(time()) name = '%d-%d-%d_%d-%d-%d' % ( date.year, date.month, date.day, date.hour, date.minute, date.second) self.file = File(directory, name) class File: def __init__(self, directory, name): if not os.path.exists(directory): os.makedirs(directory) self.path = os.path.join(directory, name) if not os.path.exists(self.path): open(self.path, 'w').close() def write_line(self, text): stream = open(self.path, 'a') stream.write('%s\n' % text) stream.close()
import os from datetime import datetime from time import time class Result: def __init__(self, directory): date = datetime.fromtimestamp(time()) self.file = File(directory, date.strftime('%Y-%m-%d_%H-%M-%S')) class File: def __init__(self, directory, name): if not os.path.exists(directory): os.makedirs(directory) self.path = os.path.join(directory, name) if not os.path.exists(self.path): open(self.path, 'w').close() def write_line(self, text): stream = open(self.path, 'a') stream.write('%s\n' % text) stream.close()
Use date-format function for file-name
Use date-format function for file-name
Python
mit
BakeCode/performance-testing,BakeCode/performance-testing
--- +++ @@ -6,14 +6,7 @@ class Result: def __init__(self, directory): date = datetime.fromtimestamp(time()) - name = '%d-%d-%d_%d-%d-%d' % ( - date.year, - date.month, - date.day, - date.hour, - date.minute, - date.second) - self.file = File(directory, name) + self.file = File(directory, date.strftime('%Y-%m-%d_%H-%M-%S')) class File:
a3975cc9d4a388789fcdaf07ece011b01801f162
hilbert/decorators.py
hilbert/decorators.py
from functools import wraps from django import http from django.conf import settings from django.contrib.auth.decorators import login_required from django.utils.decorators import available_attrs from django.utils.log import getLogger logger = getLogger('django-hilbert') def ajax_login_required(view_func): @wraps(view_func, assigned=available_attrs(view_func)) def _wrapped_view(request, *args, **kwargs): if request.is_ajax(): if request.user.is_authenticated(): return view_func(request, *args, **kwargs) else: response = http.HttpResponse() response['X-Django-Requires-Auth'] = True response['X-Django-Login-Url'] = settings.LOGIN_URL return response else: return login_required(view_func)(request, *args, **kwargs) return _wrapped_view def ajax_only(view_func): @wraps(view_func, assigned=available_attrs(view_func)) def _wrapped_view(request, *args, **kwargs): if request.is_ajax(): return view_func(request, *args, **kwargs) else: logger.warning(u'AJAX required: %s' % request.path, extra={'request': request}) return http.HttpResponseBadRequest() return _wrapped_view
from functools import wraps from django import http from django.conf import settings from django.contrib.auth.decorators import login_required from django.utils.decorators import available_attrs def ajax_login_required(view_func): @wraps(view_func, assigned=available_attrs(view_func)) def _wrapped_view(request, *args, **kwargs): if request.is_ajax(): if request.user.is_authenticated(): return view_func(request, *args, **kwargs) else: response = http.HttpResponse() response['X-Django-Requires-Auth'] = True response['X-Django-Login-Url'] = settings.LOGIN_URL return response else: return login_required(view_func)(request, *args, **kwargs) return _wrapped_view def ajax_only(view_func): @wraps(view_func, assigned=available_attrs(view_func)) def _wrapped_view(request, *args, **kwargs): if request.is_ajax(): return view_func(request, *args, **kwargs) else: return http.HttpResponseBadRequest() return _wrapped_view
Remove logging to preserve 1.2 compatability.
Remove logging to preserve 1.2 compatability.
Python
bsd-2-clause
mlavin/django-hilbert,mlavin/django-hilbert
--- +++ @@ -4,10 +4,6 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.utils.decorators import available_attrs -from django.utils.log import getLogger - - -logger = getLogger('django-hilbert') def ajax_login_required(view_func): @@ -32,6 +28,5 @@ if request.is_ajax(): return view_func(request, *args, **kwargs) else: - logger.warning(u'AJAX required: %s' % request.path, extra={'request': request}) return http.HttpResponseBadRequest() return _wrapped_view
19d5f6eb29e5940f6df77140009737d581ae5048
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup(name='programmabletuple', version='0.4.0', description='Python metaclass for making named tuples with programmability', long_description=open('README.rst').read(), author='Tschijnmo TSCHAU', author_email='tschijnmotschau@gmail.com', url='https://github.com/tschijnmo/programmabletuple', license='MIT', packages=['programmabletuple', ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
#!/usr/bin/env python from setuptools import setup setup(name='programmabletuple', version='0.5.0', description='Python metaclass for making named tuples with programmability', long_description=open('README.rst').read(), author='Tschijnmo TSCHAU', author_email='tschijnmotschau@gmail.com', url='https://github.com/tschijnmo/programmabletuple', license='MIT', packages=['programmabletuple', ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Bump version number to 0.5
Bump version number to 0.5
Python
mit
tschijnmo/programmabletuple
--- +++ @@ -3,7 +3,7 @@ from setuptools import setup setup(name='programmabletuple', - version='0.4.0', + version='0.5.0', description='Python metaclass for making named tuples with programmability', long_description=open('README.rst').read(), author='Tschijnmo TSCHAU',
ad03af8550e35de2e3184ac9fb11bc9cb88508bf
setup.py
setup.py
from setuptools import setup install_requires = ('django-admin-sso',) setup( name='incuna-auth-urls', version='0.1', url='http://github.com/incuna/incuna-auth-urls', py_modules=('backends', 'middleware', 'urls'), include_package_data=True, install_requires=install_requires, description='Provides authentication parts.', long_description=open('README.rst').read(), author='Incuna Ltd', author_email='admin@incuna.com', )
from setuptools import find_packages, setup install_requires = ('django-admin-sso',) setup( name='incuna-auth', version='0.1', url='http://github.com/incuna/incuna-auth', packages=find_packages(), include_package_data=True, install_requires=install_requires, description='Provides authentication parts.', long_description=open('README.rst').read(), author='Incuna Ltd', author_email='admin@incuna.com', )
Rename project & include package
Rename project & include package
Python
bsd-2-clause
incuna/incuna-auth,ghickman/incuna-auth,incuna/incuna-auth,ghickman/incuna-auth
--- +++ @@ -1,13 +1,13 @@ -from setuptools import setup +from setuptools import find_packages, setup install_requires = ('django-admin-sso',) setup( - name='incuna-auth-urls', + name='incuna-auth', version='0.1', - url='http://github.com/incuna/incuna-auth-urls', - py_modules=('backends', 'middleware', 'urls'), + url='http://github.com/incuna/incuna-auth', + packages=find_packages(), include_package_data=True, install_requires=install_requires, description='Provides authentication parts.',
52dc4fe9618aef6434f8f7d5fdaf592bb81c1fbe
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='gallerize', version='0.3.1', description='Create a static HTML/CSS image gallery from a bunch of images.', author='Jochen Kupperschmidt', author_email='homework@nwsnet.de', url='http://homework.nwsnet.de/releases/cc0e/#gallerize', )
# -*- coding: utf-8 -*- from setuptools import setup def read_readme(): with open('README.rst') as f: return f.read() setup( name='gallerize', version='0.3.1', description='Create a static HTML/CSS image gallery from a bunch of images.', long_description=read_readme(), license='MIT', author='Jochen Kupperschmidt', author_email='homework@nwsnet.de', url='http://homework.nwsnet.de/releases/cc0e/#gallerize', )
Include README as long package description. Specified license.
Include README as long package description. Specified license.
Python
mit
homeworkprod/gallerize,homeworkprod/gallerize
--- +++ @@ -1,12 +1,19 @@ -#!/usr/bin/env python +# -*- coding: utf-8 -*- from setuptools import setup + + +def read_readme(): + with open('README.rst') as f: + return f.read() setup( name='gallerize', version='0.3.1', description='Create a static HTML/CSS image gallery from a bunch of images.', + long_description=read_readme(), + license='MIT', author='Jochen Kupperschmidt', author_email='homework@nwsnet.de', url='http://homework.nwsnet.de/releases/cc0e/#gallerize',
22bf97e0860682919d731c622a282a0191508c5a
setup.py
setup.py
from setuptools import setup from Cython.Build import cythonize import numpy as np setup( name='ism', version='0.1', description="Implementation of Image Source Method.", #long_description=open('README').read(), author='Frederik Rietdijk', author_email='fridh@fridh.nl', license='LICENSE', packages=['ism'], scripts=[], zip_safe=False, install_requires=[ 'geometry', 'numpy', 'matplotlib' 'cython', ], include_dirs = [np.get_include()], ext_modules = cythonize('ism/*.pyx'), )
from setuptools import setup from Cython.Build import cythonize import numpy as np setup( name='ism', version='0.1', description="Implementation of Image Source Method.", #long_description=open('README').read(), author='Frederik Rietdijk', author_email='fridh@fridh.nl', license='LICENSE', packages=['ism'], scripts=[], zip_safe=False, install_requires=[ 'geometry', 'numpy', 'matplotlib', 'cython', 'cytoolz' ], include_dirs = [np.get_include()], ext_modules = cythonize('ism/*.pyx'), )
Update dependencies and fix missing comma
Update dependencies and fix missing comma
Python
bsd-3-clause
FRidh/ism
--- +++ @@ -16,8 +16,9 @@ install_requires=[ 'geometry', 'numpy', - 'matplotlib' + 'matplotlib', 'cython', + 'cytoolz' ], include_dirs = [np.get_include()], ext_modules = cythonize('ism/*.pyx'),
398d16aaa8f1239c2bb08c45af9cde218f21ab68
was/photo/views.py
was/photo/views.py
from django.shortcuts import render from .forms import UploadPhotoForm from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from .models import Photo @login_required def upload_photo_artist(request): if request.method == 'POST': print('nsm') form = UploadPhotoForm(data=request.POST, request=request) if form.is_valid(): print('nsm2') form.clean() form.save() return HttpResponseRedirect('/') else: form = UploadPhotoForm() return render(request, 'upload_photo.html', {'form': form}) @login_required def delete_photo_artist(request, photo_id): photo = Photo.objects.get(id=photo_id) photo.delete()
from django.shortcuts import render from .forms import UploadPhotoForm from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from .models import Photo @login_required def upload_photo_artist(request): if request.method == 'POST': form = UploadPhotoForm(request.POST, request.FILES, request=request) if form.is_valid(): form.clean() form.save() return HttpResponseRedirect('/photo/upload') else: form = UploadPhotoForm() return render(request, 'upload_photo.html', {'form': form}) @login_required def delete_photo_artist(request, photo_id): photo = Photo.objects.get(id=photo_id) photo.delete()
Add request.FILES in form construction in order to pass it to the form.
Add request.FILES in form construction in order to pass it to the form.
Python
mit
KeserOner/where-artists-share,KeserOner/where-artists-share
--- +++ @@ -8,13 +8,11 @@ @login_required def upload_photo_artist(request): if request.method == 'POST': - print('nsm') - form = UploadPhotoForm(data=request.POST, request=request) + form = UploadPhotoForm(request.POST, request.FILES, request=request) if form.is_valid(): - print('nsm2') form.clean() form.save() - return HttpResponseRedirect('/') + return HttpResponseRedirect('/photo/upload') else: form = UploadPhotoForm()
d99e294e6d322d5e5084f961886748e0d4391b29
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = 'certain', version = '0.1.0', description = 'X509 Certificate Management & Distribution Service', author = 'Matthew Richardson', author_email = 'm.richardson@ed.ac.uk', url = 'http://www.example.com/certain', packages = ['certain', 'certain.StoreHandler', 'certain.StoreServer', 'certain.ExpiryHandler'], install_requires = ['dulwich', 'M2Crypto', 'git'], scripts = ['bin/certain', 'bin/storeserver'], data_files = [ ('/etc/init.d', ['etc/init.d/certain']), ('/etc/certain', ['etc/certain.cfg.example']) ] )
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = 'certain', version = '0.1.0', description = 'X509 Certificate Management & Distribution Service', author = 'Matthew Richardson', author_email = 'm.richardson@ed.ac.uk', url = 'http://www.example.com/certain', packages = find_packages(), install_requires = ['dulwich', 'M2Crypto', 'git'], scripts = ['bin/certain', 'bin/storeserver'], data_files = [ ('/etc/init.d', ['etc/init.d/certain']), ('/etc/certain', ['etc/certain.cfg.example']) ] )
Use find_packages() to auto-generate package tree
Use find_packages() to auto-generate package tree
Python
agpl-3.0
certain/certain,certain/certain
--- +++ @@ -9,10 +9,7 @@ author = 'Matthew Richardson', author_email = 'm.richardson@ed.ac.uk', url = 'http://www.example.com/certain', - packages = ['certain', - 'certain.StoreHandler', - 'certain.StoreServer', - 'certain.ExpiryHandler'], + packages = find_packages(), install_requires = ['dulwich', 'M2Crypto', 'git'], scripts = ['bin/certain', 'bin/storeserver'], data_files = [
126a0bc97bfbe466ca34a7b22934fa6a4ce13f6a
setup.py
setup.py
#!/usr/bin/env python """ sentry-ldap-auth ============== An extension for Sentry which authenticates users from an LDAP server and auto-adds them to the an organization in sentry. """ from setuptools import setup, find_packages install_requires = [ 'django-auth-ldap>=1.2.5', 'sentry>=8.0.0', ] setup( name='sentry-ldap-auth', version='2.2', author='Chad Killingsworth - Jack Henry and Associates, Inc.', author_email='chad.killingsworth@banno.com', url='http://github.com/banno/getsentry-ldap-auth', description='A Sentry extension to add an LDAP server as an authention source.', long_description=__doc__, packages=find_packages(), license='Apache-2.0', zip_safe=False, install_requires=install_requires, include_package_data=True, download_url='https://github.com/banno/getsentry-ldap-auth/tarball/1.1', classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development' ], )
#!/usr/bin/env python """ sentry-ldap-auth ============== An extension for Sentry which authenticates users from an LDAP server and auto-adds them to the an organization in sentry. """ from setuptools import setup, find_packages install_requires = [ 'django-auth-ldap>=1.2.5', 'sentry>=8.0.0', ] setup( name='sentry-ldap-auth', version='2.2', author='Chad Killingsworth <chad.killingsworth@banno.com>, Barron Hagerman <barron.hagerman@banno.com>', author_email='chad.killingsworth@banno.com', url='http://github.com/banno/getsentry-ldap-auth', description='A Sentry extension to add an LDAP server as an authention source.', long_description=__doc__, packages=find_packages(), license='Apache-2.0', zip_safe=False, install_requires=install_requires, include_package_data=True, download_url='https://github.com/banno/getsentry-ldap-auth/tarball/1.1', classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development' ], )
Add Barron Hagerman as author
Add Barron Hagerman as author
Python
apache-2.0
kmlebedev/getsentry-ldap-auth,Banno/getsentry-ldap-auth
--- +++ @@ -16,7 +16,7 @@ setup( name='sentry-ldap-auth', version='2.2', - author='Chad Killingsworth - Jack Henry and Associates, Inc.', + author='Chad Killingsworth <chad.killingsworth@banno.com>, Barron Hagerman <barron.hagerman@banno.com>', author_email='chad.killingsworth@banno.com', url='http://github.com/banno/getsentry-ldap-auth', description='A Sentry extension to add an LDAP server as an authention source.',
0bfb4b7f82ec92c0c6d6b455dc82427e0e317370
setup.py
setup.py
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', download_url='http://www.github.com/debrouwere/google-analytics/tarball/master', version='0.14.2', license='ISC', packages=find_packages(), keywords='data analytics api wrapper google', scripts=[ 'bin/googleanalytics' ], install_requires=[ 'oauth2client==1.3', 'google-api-python-client==1.3', 'python-dateutil==1.5', 'addressable>=1.3', 'inspect-it>=0.2', 'flask==0.10', 'keyring==4', 'click==3.3', 'pyyaml>=3', ], test_suite='googleanalytics.tests', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Scientific/Engineering :: Information Analysis', ], )
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', download_url='http://www.github.com/debrouwere/google-analytics/tarball/master', version='0.14.2', license='ISC', packages=find_packages(), keywords='data analytics api wrapper google', scripts=[ 'bin/googleanalytics' ], install_requires=[ 'oauth2client>=1.4.6', 'google-api-python-client==1.4', 'python-dateutil==1.5', 'addressable>=1.4', 'inspect-it>=0.2', 'flask==0.10', 'keyring==5', 'click==3.3', 'pyyaml>=3', ], test_suite='googleanalytics.tests', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Scientific/Engineering :: Information Analysis', ], )
Update dependencies to ones compatible with Python 3.
Update dependencies to ones compatible with Python 3.
Python
isc
debrouwere/google-analytics
--- +++ @@ -15,13 +15,13 @@ 'bin/googleanalytics' ], install_requires=[ - 'oauth2client==1.3', - 'google-api-python-client==1.3', - 'python-dateutil==1.5', - 'addressable>=1.3', + 'oauth2client>=1.4.6', + 'google-api-python-client==1.4', + 'python-dateutil==1.5', + 'addressable>=1.4', 'inspect-it>=0.2', 'flask==0.10', - 'keyring==4', + 'keyring==5', 'click==3.3', 'pyyaml>=3', ],
22c193419008a3f1facc53502c1f8d26f2f3ccfa
setup.py
setup.py
import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages with open('README.md') as f: description = f.read() setup(name='WebShack', version='0.0.1', description='Web Component/Polymer distribution system', author='Alistair Lynn', author_email='arplynn@gmail.com', license="MIT", long_description=description, url='https://github.com/prophile/webshack', entry_points = { 'console_scripts': [ 'webshack = webshack.cli:main' ] }, zip_safe=True, package_data = { 'webshack': ['*.yaml'] }, install_requires=[ 'tinycss >=0.3, <0.4', 'PyYAML >=3.11, <4', 'docopt >=0.6.2, <0.7', 'termcolor >=1.1.0, <2' ], packages=find_packages())
import sys if sys.version < '3.4': print('Sorry, this is not a compatible version of Python. Use 3.4 or later.') exit(1) import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages with open('README.md') as f: description = f.read() setup(name='WebShack', version='0.0.1', description='Web Component/Polymer distribution system', author='Alistair Lynn', author_email='arplynn@gmail.com', license="MIT", long_description=description, url='https://github.com/prophile/webshack', entry_points = { 'console_scripts': [ 'webshack = webshack.cli:main' ] }, zip_safe=True, package_data = { 'webshack': ['*.yaml'] }, install_requires=[ 'tinycss >=0.3, <0.4', 'PyYAML >=3.11, <4', 'docopt >=0.6.2, <0.7', 'termcolor >=1.1.0, <2' ], packages=find_packages())
Add a version sanity check
Add a version sanity check
Python
mit
prophile/webshack
--- +++ @@ -1,3 +1,9 @@ +import sys + +if sys.version < '3.4': + print('Sorry, this is not a compatible version of Python. Use 3.4 or later.') + exit(1) + import ez_setup ez_setup.use_setuptools()
12b36e9ffd30a0453d702c5f8b2f9adb6280ee67
setup.py
setup.py
from setuptools import setup, find_packages setup( name="SimpleES", version="0.11.1", description='A simple Event Sourcing library for Python', packages=find_packages('src'), package_dir={'': 'src'} )
from setuptools import setup, find_packages setup( name="simple-es", version="0.12.0", description='A simple Event Sourcing library for Python', packages=find_packages('src'), package_dir={'': 'src'} )
Rename project to match package name
Rename project to match package name
Python
apache-2.0
OnShift/simple-es
--- +++ @@ -2,8 +2,8 @@ setup( - name="SimpleES", - version="0.11.1", + name="simple-es", + version="0.12.0", description='A simple Event Sourcing library for Python', packages=find_packages('src'), package_dir={'': 'src'}
e131ea4917ce85bba2c188c366cc6fb599695059
setup.py
setup.py
from setuptools import setup from codecs import open from os import path from sys import version_info here = path.abspath(path.dirname(__file__)) about = {} with open(path.join(here, "README.rst"), encoding="utf-8") as file: long_description = file.read() with open(path.join(here, "malaffinity", "__about__.py")) as file: exec(file.read(), about) settings = { "name": about["__title__"], "version": about["__version__"], "description": about["__summary__"], "long_description": long_description, "url": about["__uri__"], "author": about["__author__"], "author_email": about["__email__"], "license": about["__license__"], "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "keywords": "affinity mal myanimelist", "packages": ["malaffinity"], "install_requires": [ "bs4", "lxml", "requests" ] } # `statistics` is only included in Py3. Will need this for Py2. # Tried adding to `extras_require` but that doesn't seem to be working... if version_info[0] == 2: # Push the dep settings["install_requires"].append("statistics") setup(**settings)
from setuptools import setup from codecs import open from os import path from sys import version_info here = path.abspath(path.dirname(__file__)) about = {} with open(path.join(here, "README.rst"), encoding="utf-8") as file: long_description = file.read() with open(path.join(here, "malaffinity", "__about__.py")) as file: exec(file.read(), about) settings = { "name": about["__title__"], "version": about["__version__"], "description": about["__summary__"], "long_description": long_description, "url": about["__uri__"], "author": about["__author__"], "author_email": about["__email__"], "license": about["__license__"], "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "keywords": "affinity mal myanimelist", "packages": ["malaffinity"], "install_requires": [ "bs4", "lxml", "requests", # Meh, fuck it. Should just default to the inbuilt # if it exists, otherwise it'll use this "statistics" ] } setup(**settings)
Make the `statistics` pypi package a requirement for all py versions
Make the `statistics` pypi package a requirement for all py versions It'll get installed for all py versions, but will only be used when the inbuilt doesn't exist
Python
mit
erkghlerngm44/malaffinity
--- +++ @@ -45,16 +45,12 @@ "install_requires": [ "bs4", "lxml", - "requests" + "requests", + # Meh, fuck it. Should just default to the inbuilt + # if it exists, otherwise it'll use this + "statistics" ] } -# `statistics` is only included in Py3. Will need this for Py2. -# Tried adding to `extras_require` but that doesn't seem to be working... -if version_info[0] == 2: - # Push the dep - settings["install_requires"].append("statistics") - - setup(**settings)
56ae49ec5f3ab447e25fe4706e04e85e64c175d1
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='OpenFisca-Country-Template', version='0.1.0', author='OpenFisca Team', author_email='contact@openfisca.fr', description=u'Template of a tax and benefit system for OpenFisca', keywords='benefit microsimulation social tax', license='http://www.fsf.org/licensing/licenses/agpl-3.0.html', include_package_data = True, # Will read MANIFEST.in install_requires=[ 'OpenFisca-Core >= 6.1.0, < 11.0', ], extras_require = { 'api': [ 'OpenFisca-Web-API >= 4.0.0, < 6.0', ], 'test': [ 'flake8', 'flake8-print', 'nose', ] }, packages=find_packages(), test_suite='nose.collector', )
#! /usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='OpenFisca-Country-Template', version='0.1.0', author='OpenFisca Team', author_email='contact@openfisca.fr', description=u'Template of a tax and benefit system for OpenFisca', keywords='benefit microsimulation social tax', license='http://www.fsf.org/licensing/licenses/agpl-3.0.html', url='https://github.com/openfisca/openfisca-country-template', include_package_data = True, # Will read MANIFEST.in install_requires=[ 'OpenFisca-Core >= 6.1.0, < 11.0', ], extras_require = { 'api': [ 'OpenFisca-Web-API >= 4.0.0, < 6.0', ], 'test': [ 'flake8', 'flake8-print', 'nose', ] }, packages=find_packages(), test_suite='nose.collector', )
Add url to pypi package
Add url to pypi package
Python
agpl-3.0
openfisca/country-template,openfisca/country-template
--- +++ @@ -13,6 +13,7 @@ description=u'Template of a tax and benefit system for OpenFisca', keywords='benefit microsimulation social tax', license='http://www.fsf.org/licensing/licenses/agpl-3.0.html', + url='https://github.com/openfisca/openfisca-country-template', include_package_data = True, # Will read MANIFEST.in install_requires=[ 'OpenFisca-Core >= 6.1.0, < 11.0',
515e979d726af9031a4689dae899c6f87cc22e65
setup.py
setup.py
"""Setup file for SciUnit""" import sys import os from pip.req import parse_requirements from pip.download import PipSession try: from setuptools import setup except ImportError: from distutils.core import setup # IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2 if sys.version_info < (3,3): ipython = "ipython>=5.1,<6.0" else: ipython = "ipython>=5.1" def read_requirements(): '''parses requirements from requirements.txt''' reqs_path = os.path.join('.', 'requirements.txt') install_reqs = parse_requirements(reqs_path, session=PipSession()) reqs = [str(ir.req) for ir in install_reqs] return reqs setup( name='sciunit', version='0.19', author='Rick Gerkin', author_email='rgerkin@asu.edu', packages=['sciunit', 'sciunit.scores', 'sciunit.unit_test'], url='http://sciunit.scidash.org', license='MIT', description='A test-driven framework for formally validating scientific models against data.', long_description="", test_suite="sciunit.unit_test.core_tests", install_requires=read_requirements(), entry_points={ 'console_scripts': [ 'sciunit = sciunit.__main__:main' ] } )
"""Setup file for SciUnit""" import sys import os from pip.req import parse_requirements from pip.download import PipSession from setuptools import setup, find_packages # IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2 if sys.version_info < (3,3): ipython = "ipython>=5.1,<6.0" else: ipython = "ipython>=5.1" def read_requirements(): '''parses requirements from requirements.txt''' reqs_path = os.path.join('.', 'requirements.txt') install_reqs = parse_requirements(reqs_path, session=PipSession()) reqs = [str(ir.req) for ir in install_reqs] return reqs setup( name='sciunit', version='0.19', author='Rick Gerkin', author_email='rgerkin@asu.edu', packages=find_packages(), url='http://sciunit.scidash.org', license='MIT', description='A test-driven framework for formally validating scientific models against data.', long_description="", test_suite="sciunit.unit_test.core_tests", install_requires=read_requirements(), entry_points={ 'console_scripts': [ 'sciunit = sciunit.__main__:main' ] } )
Use find_packages() to determine packages to install
Use find_packages() to determine packages to install
Python
mit
scidash/sciunit,scidash/sciunit
--- +++ @@ -6,10 +6,7 @@ from pip.req import parse_requirements from pip.download import PipSession -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup, find_packages # IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2 if sys.version_info < (3,3): @@ -29,9 +26,7 @@ version='0.19', author='Rick Gerkin', author_email='rgerkin@asu.edu', - packages=['sciunit', - 'sciunit.scores', - 'sciunit.unit_test'], + packages=find_packages(), url='http://sciunit.scidash.org', license='MIT', description='A test-driven framework for formally validating scientific models against data.',
a95814afa175d7cd047f35dbf77ca2492d810598
setup.py
setup.py
#!/usr/bin/env python # from setuptools import setup, find_packages import sys, os from distutils import versionpredicate here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README')).read() version = '0.1dev' install_requires = [ 'pyhsm >= 1.0.3', 'ndnkdf >= 0.1', 'py-bcrypt >= 0.3', 'cherrypy >= 3.2.0', 'simplejson >= 2.6.2', 'pyserial >= 2.6', 'pymongo >= 2.4.2', ] setup(name='VCCS', version=version, description="Very Complicated Credential System", long_description=README, classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers ], keywords='security password hashing bcrypt PBKDF2', author='Fredrik Thulin', author_email='fredrik@thulin.net', license='BSD', packages=find_packages('src'), package_dir = {'': 'src'}, include_package_data=True, package_data = { }, zip_safe=False, install_requires=install_requires, entry_points={ 'console_scripts': ['vccs_authbackend=vccs_auth.vccs_auth.vccs_authbackend:main', ] } )
#!/usr/bin/env python # from setuptools import setup, find_packages import sys, os from distutils import versionpredicate here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README')).read() version = '0.1dev' install_requires = [ 'pyhsm >= 1.0.3', 'ndnkdf >= 0.1', 'py-bcrypt >= 0.3', 'cherrypy >= 3.2.0', 'simplejson >= 2.6.2', 'pyserial >= 2.6', 'pymongo >= 2.4.2', ] setup(name='vccs_auth', version=version, description="Very Complicated Credential System - authentication backend", long_description=README, classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers ], keywords='security password hashing bcrypt PBKDF2', author='Fredrik Thulin', author_email='fredrik@thulin.net', license='BSD', packages=['vccs_auth',], package_dir = {'': 'src'}, #include_package_data=True, #package_data = { }, zip_safe=False, install_requires=install_requires, entry_points={ 'console_scripts': ['vccs_authbackend=vccs_auth.vccs_auth.vccs_authbackend:main', ] } )
Change package name from VCCS to vccs_auth.
Change package name from VCCS to vccs_auth. There will be a separate package containing the authentication client, and it does not appear possible to (cleanly) generate two packages from the same setup.py/same repository.
Python
bsd-3-clause
SUNET/VCCS
--- +++ @@ -19,9 +19,9 @@ 'pymongo >= 2.4.2', ] -setup(name='VCCS', +setup(name='vccs_auth', version=version, - description="Very Complicated Credential System", + description="Very Complicated Credential System - authentication backend", long_description=README, classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -30,10 +30,10 @@ author='Fredrik Thulin', author_email='fredrik@thulin.net', license='BSD', - packages=find_packages('src'), + packages=['vccs_auth',], package_dir = {'': 'src'}, - include_package_data=True, - package_data = { }, + #include_package_data=True, + #package_data = { }, zip_safe=False, install_requires=install_requires, entry_points={
64c684b2adf44decf19f60e801fc2e280cfc8342
setup.py
setup.py
#!/usr/bin/env python """ Prestapyt :copyright: (c) 2011-2013 Guewen Baconnier :copyright: (c) 2011 Camptocamp SA :license: AGPLv3, see LICENSE for more details """ import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( # Basic package information. name = 'prestapyt', use_scm_version=True, # Packaging options. include_package_data = True, # Package dependencies. install_requires = ['requests','future'], setup_requires=[ 'setuptools_scm', ], # Metadata for PyPI. author = 'Guewen Baconnier', author_email = 'guewen.baconnier@gmail.com', license = 'GNU AGPL-3', url = 'http://github.com/prestapyt/prestapyt', packages=['prestapyt'], keywords = 'prestashop api client rest', description = 'A library to access Prestashop Web Service from Python.', long_description = read('README.md'), classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Internet' ] )
#!/usr/bin/env python """ Prestapyt :copyright: (c) 2011-2013 Guewen Baconnier :copyright: (c) 2011 Camptocamp SA :license: AGPLv3, see LICENSE for more details """ import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( # Basic package information. name = 'prestapyt', use_scm_version=True, # Packaging options. include_package_data = True, # Package dependencies. install_requires = ['requests','future'], setup_requires=[ 'setuptools_scm', ], # Metadata for PyPI. author = 'Guewen Baconnier', author_email = 'guewen.baconnier@gmail.com', license = 'GNU AGPL-3', url = 'http://github.com/prestapyt/prestapyt', packages=['prestapyt'], keywords = 'prestashop api client rest', description = 'A library to access Prestashop Web Service from Python.', long_description_content_type='text/markdown', long_description = read('README.md'), classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Internet' ] )
Set long description content type to be pypi friendly
Set long description content type to be pypi friendly
Python
agpl-3.0
prestapyt/prestapyt,prestapyt/prestapyt
--- +++ @@ -39,6 +39,7 @@ packages=['prestapyt'], keywords = 'prestashop api client rest', description = 'A library to access Prestashop Web Service from Python.', + long_description_content_type='text/markdown', long_description = read('README.md'), classifiers = [ 'Development Status :: 4 - Beta',
114e2e877898f351bbb388cac7df5811b322c48f
setup.py
setup.py
from setuptools import find_packages, setup from shorty.version import __VERSION__ dependencies=[ 'django', 'django-autoconfig', 'django-nuit', ] test_dependencies=[ 'django-setuptest', ] setup( name='djshorty', version=__VERSION__, description='A Django URL shortening app', author='Ben Cardy', author_email='ben.cardy@ocado.com', packages=find_packages(), install_requires=dependencies, # To run tests via python setup.py test tests_require=test_dependencies, test_suite='setuptest.setuptest.SetupTestSuite', include_package_data=True, )
from setuptools import find_packages, setup from shorty.version import __VERSION__ dependencies=[ 'django', 'django-autoconfig', 'django-nuit >= 1.0.0, < 2.0.0', ] test_dependencies=[ 'django-setuptest', ] setup( name='djshorty', version=__VERSION__, description='A Django URL shortening app', author='Ben Cardy', author_email='ben.cardy@ocado.com', packages=find_packages(), install_requires=dependencies, # To run tests via python setup.py test tests_require=test_dependencies, test_suite='setuptest.setuptest.SetupTestSuite', include_package_data=True, )
Fix version dependency on nuit
Fix version dependency on nuit
Python
apache-2.0
benbacardi/djshorty,benbacardi/djshorty,ocadotechnology/djshorty,ocadotechnology/djshorty,ocadotechnology/djshorty,benbacardi/djshorty
--- +++ @@ -5,7 +5,7 @@ dependencies=[ 'django', 'django-autoconfig', - 'django-nuit', + 'django-nuit >= 1.0.0, < 2.0.0', ] test_dependencies=[ 'django-setuptest',
a95abc176867a49985d4acd8625dc803cba045fc
setup.py
setup.py
#!/usr/bin/env python from os import environ from setuptools import Extension, find_packages, setup # Opt-in to building the C extensions for Python 2 by setting the # ENABLE_DJB_HASH_CEXT environment variable if environ.get('ENABLE_DJB_HASH_CEXT'): ext_modules = [ Extension('cdblib._djb_hash', sources=['cdblib/_djb_hash.c']), ] else: ext_modules = [] setup( author='David Wilson', author_email='dw@botanicus.net', description="Pure Python reader/writer for Dan J. Berstein's CDB format.", download_url='https://github.com/dw/python-pure-cdb', keywords='cdb file format appengine database db', license='MIT', name='pure-cdb', version='2.1.0', packages=find_packages(include=['cdblib']), ext_modules=ext_modules, install_requires=['six>=1.0.0,<2.0.0'], test_suite='tests', tests_require=['flake8'], entry_points={ 'console_scripts': ['python-pure-cdbmake=cdblib.cdbmake:main'], }, )
#!/usr/bin/env python from os import environ from setuptools import Extension, find_packages, setup # Opt-in to building the C extensions for Python 2 by setting the # ENABLE_DJB_HASH_CEXT environment variable if environ.get('ENABLE_DJB_HASH_CEXT'): ext_modules = [ Extension('cdblib._djb_hash', sources=['cdblib/_djb_hash.c']), ] else: ext_modules = [] description = "Pure Python reader/writer for Dan J. Berstein's CDB format." setup( author='David Wilson', author_email='dw@botanicus.net', description=description, long_description=description, download_url='https://github.com/dw/python-pure-cdb', keywords='cdb file format appengine database db', license='MIT', name='pure-cdb', version='2.1.0', packages=find_packages(include=['cdblib']), ext_modules=ext_modules, install_requires=['six>=1.0.0,<2.0.0'], test_suite='tests', tests_require=['flake8'], entry_points={ 'console_scripts': ['python-pure-cdbmake=cdblib.cdbmake:main'], }, )
Add long description for PyPI
Add long description for PyPI
Python
mit
pombredanne/python-pure-cdb,pombredanne/python-pure-cdb,dw/python-pure-cdb,dw/python-pure-cdb
--- +++ @@ -12,10 +12,14 @@ else: ext_modules = [] + +description = "Pure Python reader/writer for Dan J. Berstein's CDB format." + setup( author='David Wilson', author_email='dw@botanicus.net', - description="Pure Python reader/writer for Dan J. Berstein's CDB format.", + description=description, + long_description=description, download_url='https://github.com/dw/python-pure-cdb', keywords='cdb file format appengine database db', license='MIT',
fd23a4656c3d55f87549a82af64c0a172cec41c1
setup.py
setup.py
from setuptools import setup import csvlib def readme(): with open('README.rst') as f: return f.read() setup(name='csvlib', version=csvlib.__version__, description='A tiny library for handling CSV files.', long_description=readme(), classifiers=[ 'Programming Language :: Python :: 2.7', 'Topic :: Utilities', ], author='Taurus Olson', author_email=u'taurusolson@gmail.com', maintainer='Taurus Olson', url='https://github.com/TaurusOlson/csvlib', packages=['csvlib'], keywords='csv tools', license=fntools.__license__, include_package_data=True, zip_safe=False )
from setuptools import setup import csvlib def readme(): with open('README.rst') as f: return f.read() setup(name='csvlib', version=csvlib.__version__, description='A tiny library for handling CSV files.', long_description=readme(), classifiers=[ 'Programming Language :: Python :: 2.7', 'Topic :: Utilities', ], author='Taurus Olson', author_email=u'taurusolson@gmail.com', maintainer='Taurus Olson', url='https://github.com/TaurusOlson/csvlib', packages=['csvlib'], keywords='csv tools', license=csvlib.__license__, include_package_data=True, zip_safe=False )
Fix stupid copy paste error
Fix stupid copy paste error
Python
mit
TaurusOlson/incisive
--- +++ @@ -21,7 +21,7 @@ url='https://github.com/TaurusOlson/csvlib', packages=['csvlib'], keywords='csv tools', - license=fntools.__license__, + license=csvlib.__license__, include_package_data=True, zip_safe=False )
927dd6e667c76ac7a42e386ea49dd5678d11325b
setup.py
setup.py
import os from setuptools import setup, find_packages classifiers = """\ Intended Audience :: Developers License :: OSI Approved :: MIT License Programming Language :: Python Topic :: Utilities Operating System :: Unix """ def read(*rel_names): return open(os.path.join(os.path.dirname(__file__), *rel_names)).read() setup( name='crammit', version='0.1', url='https://github.com/rspivak/crammit.git', license='MIT', description='Crammit - CSS/JavaScript minifier. Asset packaging library', author='Ruslan Spivak', author_email='ruslan.spivak@gmail.com', packages=find_packages('src'), package_dir={'': 'src'}, install_requires=[''], zip_safe=False, entry_points="""\ [console_scripts] crammit = crammit:main """, classifiers=filter(None, classifiers.split('\n')), long_description=read('README.rst') + '\n\n' + read('CHANGES.rst'), extras_require={'test': []} )
import os from setuptools import setup, find_packages classifiers = """\ Intended Audience :: Developers License :: OSI Approved :: MIT License Programming Language :: Python Topic :: Utilities Operating System :: Unix """ def read(*rel_names): return open(os.path.join(os.path.dirname(__file__), *rel_names)).read() setup( name='crammit', version='0.1', url='https://github.com/rspivak/crammit.git', license='MIT', description='Crammit - CSS/JavaScript minifier. Asset packaging library', author='Ruslan Spivak', author_email='ruslan.spivak@gmail.com', packages=find_packages('src'), package_dir={'': 'src'}, install_requires=['slimit'], zip_safe=False, entry_points="""\ [console_scripts] crammit = crammit:main """, classifiers=filter(None, classifiers.split('\n')), long_description=read('README.rst') + '\n\n' + read('CHANGES.rst'), extras_require={'test': []} )
Add Slimit as a dependency
Add Slimit as a dependency
Python
mit
rspivak/crammit,rspivak/crammit
--- +++ @@ -25,7 +25,7 @@ author_email='ruslan.spivak@gmail.com', packages=find_packages('src'), package_dir={'': 'src'}, - install_requires=[''], + install_requires=['slimit'], zip_safe=False, entry_points="""\ [console_scripts]
c46389dabb4c6f0d1a8868f1114d35ff11e1bfce
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = 'django-jinja', version = "0.13", description = "Jinja2 templating language integrated in Django.", long_description = "", keywords = 'django, jinja2', author = 'Andrey Antukh', author_email = 'niwi@niwi.be', url = 'https://github.com/niwibe/django-jinja', license = 'BSD', include_package_data = True, packages = find_packages(), install_requires=[ 'distribute', 'jinja2', ], classifiers = [ 'Development Status :: 4 - Beta', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Topic :: Internet :: WWW/HTTP', ] )
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "django-jinja", version = "0.13", description = "Jinja2 templating language integrated in Django.", long_description = "", keywords = "django, jinja2", author = "Andrey Antukh", author_email = "niwi@niwi.be", url = "https://github.com/niwibe/django-jinja", license = "BSD", include_package_data = True, packages = find_packages(), install_requires=[ "distribute", "jinja2", ], classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Internet :: WWW/HTTP", ] )
Set up new classifiers. Now production ready.
Set up new classifiers. Now production ready.
Python
bsd-3-clause
niwinz/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,akx/django-jinja,akx/django-jinja,niwinz/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,akx/django-jinja,glogiotatidis/django-jinja
--- +++ @@ -4,33 +4,33 @@ from setuptools import setup, find_packages setup( - name = 'django-jinja', + name = "django-jinja", version = "0.13", description = "Jinja2 templating language integrated in Django.", long_description = "", - keywords = 'django, jinja2', - author = 'Andrey Antukh', - author_email = 'niwi@niwi.be', - url = 'https://github.com/niwibe/django-jinja', - license = 'BSD', + keywords = "django, jinja2", + author = "Andrey Antukh", + author_email = "niwi@niwi.be", + url = "https://github.com/niwibe/django-jinja", + license = "BSD", include_package_data = True, packages = find_packages(), install_requires=[ - 'distribute', - 'jinja2', + "distribute", + "jinja2", ], classifiers = [ - 'Development Status :: 4 - Beta', - 'Framework :: Django', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', - 'Topic :: Internet :: WWW/HTTP', + "Development Status :: 5 - Production/Stable", + "Framework :: Django", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Topic :: Internet :: WWW/HTTP", ] )
76b5d00a4f936c38036270ef37465fd2621db71c
TelegramLogHandler/handler.py
TelegramLogHandler/handler.py
import logging class TelegramHandler(logging.Handler): """ A handler class which sends a Telegram message for each logging event. """ def __init__(self, token, ids): """ Initialize the handler. Initialize the instance with the bot's token and a list of chat_id(s) of the conversations that should be notified by the handler. """ logging.Handler.__init__(self) self.token = token self.ids = ids def emit(self, record): """ Emit a record. Format the record and send it to the specified chats. """ try: import requests url = 'https://api.telegram.org/bot{}/sendMessage'.format(self.token) for chat_id in self.ids: payload = { 'chat_id':chat_id, 'text': self.format(record) } requests.post(url, data=payload) except: self.handleError(record)
import logging class TelegramHandler(logging.Handler): """ A handler class which sends a Telegram message for each logging event. """ def __init__(self, token, ids): """ Initialize the handler. Initialize the instance with the bot's token and a list of chat_id(s) of the conversations that should be notified by the handler. """ logging.Handler.__init__(self) self.token = token self.ids = ids def emit(self, record): """ Emit a record. Format the record and send it to the specified chats. """ try: import requests requests_handler = logging.getLogger("requests") url = 'https://api.telegram.org/bot{}/sendMessage'.format(self.token) requests_handler.propagate = False for chat_id in self.ids: payload = { 'chat_id':chat_id, 'text': self.format(record) } requests.post(url, data=payload) requests_handler.propagate = True except: self.handleError(record)
Fix infinite loop caused by requests library's logging
Fix infinite loop caused by requests library's logging
Python
mit
simonacca/TelegramLogHandler
--- +++ @@ -23,12 +23,18 @@ """ try: import requests + requests_handler = logging.getLogger("requests") + url = 'https://api.telegram.org/bot{}/sendMessage'.format(self.token) + + requests_handler.propagate = False for chat_id in self.ids: payload = { 'chat_id':chat_id, 'text': self.format(record) } + requests.post(url, data=payload) + requests_handler.propagate = True except: self.handleError(record)
3e126dbba13ba95bb087d1d61b6d083dff8b3656
setup.py
setup.py
from setuptools import setup, find_packages from wagtailnetlify import __version__ setup( name='wagtailnetlify', version=__version__, description='Deploy Wagtail sites to Netlify', long_description='See https://github.com/tomdyson/wagtail-netlify for details', url='https://github.com/tomdyson/wagtail-netlify', author='Tom Dyson', author_email='tom+wagtailnetlify@torchbox.com', license='MIT', classifiers=[ "Environment :: Web Environment", "Framework :: Django", "Framework :: Wagtail", "Framework :: Wagtail :: 1", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ], keywords='development', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ "wagtail>=1.6", "wagtail-bakery>=0.1.0" ], )
from setuptools import setup, find_packages from wagtailnetlify import __version__ with open('README.md', 'r') as fh: long_description = fh.read() setup( name='wagtailnetlify', version=__version__, description='Deploy Wagtail sites to Netlify', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/tomdyson/wagtail-netlify', author='Tom Dyson', author_email='tom+wagtailnetlify@torchbox.com', license='MIT', classifiers=[ "Environment :: Web Environment", "Framework :: Django", "Framework :: Wagtail", "Framework :: Wagtail :: 1", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ], keywords='development', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ "wagtail>=1.6", "wagtail-bakery>=0.1.0" ], )
Set README as the project long description
Set README as the project long description
Python
mit
tomdyson/wagtail-netlify
--- +++ @@ -1,11 +1,15 @@ from setuptools import setup, find_packages from wagtailnetlify import __version__ + +with open('README.md', 'r') as fh: + long_description = fh.read() setup( name='wagtailnetlify', version=__version__, description='Deploy Wagtail sites to Netlify', - long_description='See https://github.com/tomdyson/wagtail-netlify for details', + long_description=long_description, + long_description_content_type="text/markdown", url='https://github.com/tomdyson/wagtail-netlify', author='Tom Dyson', author_email='tom+wagtailnetlify@torchbox.com',
0748838525cb2c2ee838da3a3e906ebf8dd25a3b
setup.py
setup.py
from setuptools import setup import curtsies setup(name='curtsies', version=curtsies.__version__, description='Curses-like terminal wrapper, with colored strings!', url='https://github.com/thomasballinger/curtsies', author='Thomas Ballinger', author_email='thomasballinger@gmail.com', license='MIT', packages=['curtsies'], install_requires = [ 'blessings==1.5.1' ], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Programming Language :: Python', ], zip_safe=False)
from setuptools import setup import ast import os def version(): """Return version string.""" with open(os.path.join('curtsies', '__init__.py')) as input_file: for line in input_file: if line.startswith('__version__'): return ast.parse(line).body[0].value.s setup(name='curtsies', version=version(), description='Curses-like terminal wrapper, with colored strings!', url='https://github.com/thomasballinger/curtsies', author='Thomas Ballinger', author_email='thomasballinger@gmail.com', license='MIT', packages=['curtsies'], install_requires = [ 'blessings==1.5.1' ], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Programming Language :: Python', ], zip_safe=False)
Fix installation, broken since started doing import in __init__
Fix installation, broken since started doing import in __init__ Thanks @myint for the catch and code suggestion
Python
mit
sebastinas/curtsies,thomasballinger/curtsies,spthaolt/curtsies
--- +++ @@ -1,8 +1,16 @@ from setuptools import setup -import curtsies +import ast +import os + +def version(): + """Return version string.""" + with open(os.path.join('curtsies', '__init__.py')) as input_file: + for line in input_file: + if line.startswith('__version__'): + return ast.parse(line).body[0].value.s setup(name='curtsies', - version=curtsies.__version__, + version=version(), description='Curses-like terminal wrapper, with colored strings!', url='https://github.com/thomasballinger/curtsies', author='Thomas Ballinger',
cdf78b63d018d767853c1488ead451c61a2ecf4d
setup.py
setup.py
from setuptools import setup, find_packages requires = [ 'amaasutils', 'configparser', 'python-dateutil', 'pytz', 'requests', 'warrant' ] setup( name='amaascore', version='0.3.6', description='Asset Management as a Service - Core SDK', license='Apache License 2.0', url='https://github.com/amaas-fintech/amaas-core-sdk-python', author='AMaaS', author_email='tech@amaas.com', classifiers=[ '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', 'Programming Language :: Python :: 3.6', ], packages=find_packages(exclude=['tests']), # Very annoying that this doesnt work - I have to include a MANIFEST install_requires=requires, )
from setuptools import setup, find_packages requires = [ 'amaasutils', 'configparser', 'python-dateutil', 'pytz', 'requests', 'warrant' ] setup( name='amaascore', version='0.4.0', description='Asset Management as a Service - Core SDK', license='Apache License 2.0', url='https://github.com/amaas-fintech/amaas-core-sdk-python', author='AMaaS', author_email='tech@amaas.com', classifiers=[ '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', 'Programming Language :: Python :: 3.6', ], packages=find_packages(exclude=['tests']), # Very annoying that this doesnt work - I have to include a MANIFEST install_requires=requires, )
Increment version now we connect to prod by default
Increment version now we connect to prod by default
Python
apache-2.0
nedlowe/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python
--- +++ @@ -11,7 +11,7 @@ setup( name='amaascore', - version='0.3.6', + version='0.4.0', description='Asset Management as a Service - Core SDK', license='Apache License 2.0', url='https://github.com/amaas-fintech/amaas-core-sdk-python',
9faf5faf93e466ee952e03048c829eaf5fea5eca
setup.py
setup.py
#!/usr/bin/python from setuptools import setup, find_packages from colorful import VERSION github_url = 'https://github.com/charettes/django-colorful' setup( name='django-colorful', version='.'.join(str(v) for v in VERSION), description='An extension to the Django web framework that provides database and form color fields', long_description=open('README.markdown').read(), url=github_url, author='Simon Charette', author_email='charette.s@gmail.com', install_requires=[ 'Django>=1.2', ], packages=find_packages(), include_package_data=True, license='MIT License', classifiers=[ 'Development Status :: 1 - Planning', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules' ], )
#!/usr/bin/python from setuptools import setup, find_packages from colorful import VERSION github_url = 'https://github.com/charettes/django-colorful' setup( name='django-colorful', version='.'.join(str(v) for v in VERSION), description='An extension to the Django web framework that provides database and form color fields', long_description=open('README.markdown').read(), url=github_url, author='Simon Charette', author_email='charette.s@gmail.com', install_requires=[ 'Django>=1.2', ], packages=find_packages(), include_package_data=True, zip_safe=False, license='MIT License', classifiers=[ 'Development Status :: 1 - Planning', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules' ], )
Package data is not zip-safe
Package data is not zip-safe
Python
mit
charettes/django-colorful,Vitagene1/django-colorful,Vitagene1/django-colorful,charettes/django-colorful
--- +++ @@ -19,6 +19,7 @@ ], packages=find_packages(), include_package_data=True, + zip_safe=False, license='MIT License', classifiers=[ 'Development Status :: 1 - Planning',
e95a2306eaf875f8349ac0e3638292851fd3cbf5
setup.py
setup.py
#!/usr/bin/env python3 import os from setuptools import setup, find_packages def get_readme(): return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() setup( author="Julio Gonzalez Altamirano", author_email='devjga@gmail.com', classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3 :: Only', ], description="ETL for CapMetro raw data.", entry_points={ 'console_scripts': [ 'capmetrics=capmetrics_etl.cli:etl', 'capmetrics-tables=capmetrics_etl.cli.tables' ], }, install_requires=['click', 'pytz', 'sqlalchemy', 'xlrd'], keywords="python etl transit", license="MIT", long_description=get_readme(), name='capmetrics-etl', package_data={ 'capmetrics_etl': ['templates/*.html'], }, packages=find_packages(include=['capmetrics_etl', 'capmetrics_etl.*'], exclude=['tests', 'tests.*']), platforms=['any'], url='https://github.com/jga/capmetrics-etl', version='0.1.0' )
#!/usr/bin/env python3 import os from setuptools import setup, find_packages def get_readme(): return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() setup( author="Julio Gonzalez Altamirano", author_email='devjga@gmail.com', classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3 :: Only', ], description="ETL for CapMetro raw data.", entry_points={ 'console_scripts': [ 'capmetrics=capmetrics_etl.cli:etl', 'capmetrics-tables=capmetrics_etl.cli.tables' ], }, install_requires=['click', 'python-dateutil', 'pytz', 'sqlalchemy', 'xlrd'], keywords="python etl transit", license="MIT", long_description=get_readme(), name='capmetrics-etl', package_data={ 'capmetrics_etl': ['templates/*.html'], }, packages=find_packages(include=['capmetrics_etl', 'capmetrics_etl.*'], exclude=['tests', 'tests.*']), platforms=['any'], url='https://github.com/jga/capmetrics-etl', version='0.1.0' )
Add python-dateutil as a project dependency. We need its handy "parse" function.
Add python-dateutil as a project dependency. We need its handy "parse" function.
Python
mit
jga/capmetrics-etl,jga/capmetrics-etl
--- +++ @@ -23,7 +23,7 @@ 'capmetrics-tables=capmetrics_etl.cli.tables' ], }, - install_requires=['click', 'pytz', 'sqlalchemy', 'xlrd'], + install_requires=['click', 'python-dateutil', 'pytz', 'sqlalchemy', 'xlrd'], keywords="python etl transit", license="MIT", long_description=get_readme(),
6311aaa8793e06e2fa6e869c2d788dca48a54734
setup.py
setup.py
from setuptools import setup, find_packages setup(name='instana', version='0.0.1', url='https://github.com/instana/python-sensor', license='MIT', author='Instana Inc.', author_email='peter.lombardo@instana.com', description='Metrics sensor and trace collector for Instana', packages=find_packages(exclude=['tests', 'examples']), long_description=open('README.md').read(), zip_safe=False, setup_requires=['nose>=1.0', 'fysom>=2.1.2', 'opentracing>=1.2.1,<1.3', 'basictracer>=2.2.0', 'psutil>=5.1.3'], test_suite='nose.collector', keywords=['performance', 'opentracing', 'metrics', 'monitoring'])
from setuptools import setup, find_packages setup(name='instana', version='0.0.1.2', download_url='https://github.com/instana/python-sensor', url='https://www.instana.com/', license='MIT', author='Instana Inc.', author_email='peter.lombardo@instana.com', description='Metrics sensor and trace collector for Instana', packages=find_packages(exclude=['tests', 'examples']), long_description="The instana package provides Python metrics and traces for Instana.", zip_safe=False, setup_requires=['nose>=1.0', 'fysom>=2.1.2', 'opentracing>=1.2.1,<1.3', 'basictracer>=2.2.0', 'psutil>=5.1.3'], test_suite='nose.collector', keywords=['performance', 'opentracing', 'metrics', 'monitoring'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: System :: Monitoring', 'Topic :: System :: Networking :: Monitoring', 'Topic :: Software Development :: Libraries :: Python Modules'])
Fix URLs, a simple description and add classifiers
Fix URLs, a simple description and add classifiers
Python
mit
instana/python-sensor,instana/python-sensor
--- +++ @@ -1,14 +1,15 @@ from setuptools import setup, find_packages setup(name='instana', - version='0.0.1', - url='https://github.com/instana/python-sensor', + version='0.0.1.2', + download_url='https://github.com/instana/python-sensor', + url='https://www.instana.com/', license='MIT', author='Instana Inc.', author_email='peter.lombardo@instana.com', description='Metrics sensor and trace collector for Instana', packages=find_packages(exclude=['tests', 'examples']), - long_description=open('README.md').read(), + long_description="The instana package provides Python metrics and traces for Instana.", zip_safe=False, setup_requires=['nose>=1.0', 'fysom>=2.1.2', @@ -16,4 +17,19 @@ 'basictracer>=2.2.0', 'psutil>=5.1.3'], test_suite='nose.collector', - keywords=['performance', 'opentracing', 'metrics', 'monitoring']) + keywords=['performance', 'opentracing', 'metrics', 'monitoring'], + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: Information Technology', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Topic :: System :: Monitoring', + 'Topic :: System :: Networking :: Monitoring', + 'Topic :: Software Development :: Libraries :: Python Modules'])
9e80fe787f196b8a96bdbe79e0f7366dfa5f9e45
setup.py
setup.py
from setuptools import setup setup( name='asr_evaluation', version='2.0.3', author='Ben Lambert', author_email='blambert@gmail.com', packages=['asr_evaluation'], license='LICENSE.txt', description='Evaluating ASR (automatic speech recognition) hypotheses, i.e. computing word error rate.', install_requires=['edit_distance', 'termcolor'], test_suite='test.test.TestASREvaluation', long_description=open('README.md').read(), long_description_content_type="text/markdown", entry_points={ 'console_scripts': [ 'wer = asr_evaluation.__main__:main' ] }, keywords=['word', 'error', 'rate', 'asr', 'speech', 'recognition'], classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Text Processing", "Topic :: Utilities", "License :: OSI Approved :: Apache Software License" ] )
from setuptools import setup setup( name='asr_evaluation', version='2.0.4', author='Ben Lambert', author_email='blambert@gmail.com', packages=['asr_evaluation'], license='LICENSE.txt', description='Evaluating ASR (automatic speech recognition) hypotheses, i.e. computing word error rate.', install_requires=['edit_distance', 'termcolor'], test_suite='test.test.TestASREvaluation', long_description=open('README.md').read(), long_description_content_type="text/markdown", entry_points={ 'console_scripts': [ 'wer = asr_evaluation.__main__:main' ] }, keywords=['word', 'error', 'rate', 'asr', 'speech', 'recognition'], classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Text Processing", "Topic :: Utilities", "License :: OSI Approved :: Apache Software License" ] )
Increment version number so PyPi will load the README.
Increment version number so PyPi will load the README.
Python
apache-2.0
belambert/asr_evaluation,belambert/asr-evaluation,belambert/asr-evaluation
--- +++ @@ -2,7 +2,7 @@ setup( name='asr_evaluation', - version='2.0.3', + version='2.0.4', author='Ben Lambert', author_email='blambert@gmail.com', packages=['asr_evaluation'],
9830db0388855f129b3c1f31b5a2c7fe06b471c1
setup.py
setup.py
#!/usr/bin/env python import os import sys import setuptools.command.egg_info as egg_info_cmd import shutil from setuptools import setup, find_packages SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, 'README.rst') try: import gittaggers tagger = gittaggers.EggInfoFromGit except ImportError: tagger = egg_info_cmd.egg_info setup(name='schema-salad', version='1.0.3', description='Schema Annotations for Linked Avro Data (SALAD)', long_description=open(README).read(), author='Common workflow language working group', author_email='common-workflow-language@googlegroups.com', url="https://github.com/common-workflow-language/common-workflow-language", download_url="https://github.com/common-workflow-language/common-workflow-language", license='Apache 2.0', packages=["schema_salad"], package_data={'schema_salad': ['metaschema.yml']}, install_requires=[ 'requests', 'PyYAML', 'avro', 'rdflib >= 4.2.0', 'rdflib-jsonld >= 0.3.0', 'mistune' ], test_suite='tests', tests_require=[], entry_points={ 'console_scripts': [ "schema-salad-tool=schema_salad.main:main" ] }, zip_safe=True, cmdclass={'egg_info': tagger}, )
#!/usr/bin/env python import os import sys import setuptools.command.egg_info as egg_info_cmd import shutil from setuptools import setup, find_packages SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, 'README.rst') try: import gittaggers tagger = gittaggers.EggInfoFromGit except ImportError: tagger = egg_info_cmd.egg_info setup(name='schema-salad', version='1.0.4', description='Schema Annotations for Linked Avro Data (SALAD)', long_description=open(README).read(), author='Common workflow language working group', author_email='common-workflow-language@googlegroups.com', url="https://github.com/common-workflow-language/common-workflow-language", download_url="https://github.com/common-workflow-language/common-workflow-language", license='Apache 2.0', packages=["schema_salad"], package_data={'schema_salad': ['metaschema.yml']}, install_requires=[ 'requests', 'PyYAML', 'avro', 'rdflib >= 4.2.0', 'rdflib-jsonld >= 0.3.0', 'mistune' ], test_suite='tests', tests_require=[], entry_points={ 'console_scripts': [ "schema-salad-tool=schema_salad.main:main" ] }, zip_safe=True, cmdclass={'egg_info': tagger}, )
Bump up to version 1.0.4
Bump up to version 1.0.4
Python
apache-2.0
common-workflow-language/schema_salad,common-workflow-language/schema_salad,common-workflow-language/schema_salad,hmenager/common-workflow-language,common-workflow-language/common-workflow-language,stain/common-workflow-language,ohsu-computational-biology/common-workflow-language,common-workflow-language/schema_salad,mr-c/common-workflow-language,dleehr/common-workflow-language,common-workflow-language/cwltool,common-workflow-language/cwltool,dleehr/common-workflow-language,dleehr/cwltool,hmenager/common-workflow-language,hmenager/common-workflow-language,common-workflow-language/schema_salad,jeremiahsavage/cwltool,StarvingMarvin/common-workflow-language,common-workflow-language/schema_salad,jeremiahsavage/cwltool,dleehr/common-workflow-language,SciDAP/cwltool,mr-c/common-workflow-language,curoverse/common-workflow-language,SciDAP/cwltool,StarvingMarvin/common-workflow-language,chapmanb/cwltool,stain/common-workflow-language,manu-chroma/schema_salad,common-workflow-language/common-workflow-language,ohsu-computational-biology/common-workflow-language,jeremiahsavage/cwltool,SciDAP/cwltool,mr-c/common-workflow-language,common-workflow-language/cwltool,StarvingMarvin/common-workflow-language,SciDAP/cwltool,dleehr/cwltool,manu-chroma/schema_salad,common-workflow-language/common-workflow-language,dleehr/cwltool,ohsu-computational-biology/common-workflow-language,common-workflow-language/schema_salad,dleehr/common-workflow-language,chapmanb/cwltool,chapmanb/cwltool,jeremiahsavage/cwltool,hmenager/common-workflow-language,chapmanb/cwltool,dleehr/cwltool,stain/common-workflow-language,common-workflow-language/common-workflow-language,curoverse/common-workflow-language,stain/common-workflow-language,StarvingMarvin/common-workflow-language
--- +++ @@ -17,7 +17,7 @@ tagger = egg_info_cmd.egg_info setup(name='schema-salad', - version='1.0.3', + version='1.0.4', description='Schema Annotations for Linked Avro Data (SALAD)', long_description=open(README).read(), author='Common workflow language working group',
cc7aaa66a68d043b084f4cb1d54f3acc63c9aca3
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 README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( # Application name: name="blynkapi", # Version number (initial): version="0.1.1", description="This is a simple blynk API wrapper.", long_description=long_description, #URL url='https://github.com/xandr2/python-blynk-api', download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.1.tar.gz', # Application author details: author="Alexandr Borysov", author_email="xandr2@gmail.com", # License license='MIT', keywords=['python', 'blynk', 'API', 'wrapper'], # Packages packages=["blynkapi"], # Include additional files into the package #include_package_data=True, # # license="LICENSE.txt", # long_description=open("README.txt").read(), # Dependent packages (distributions) #install_requires=[ # "urllib2", #], classifiers = [], )
# 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 README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( # Application name: name="blynkapi", # Version number (initial): version="0.1.2", description="This is a simple blynk HTTP/HTTPS API wrapper.", long_description=long_description, #URL url='https://github.com/xandr2/blynkapi', download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.2.tar.gz', # Application author details: author="Alexandr Borysov", author_email="xandr2@gmail.com", # License license='MIT', keywords=['python', 'blynk', 'HTTP/HTTPS', 'API', 'wrapper'], # Packages packages=["blynkapi"], # Include additional files into the package #include_package_data=True, # # license="LICENSE.txt", # long_description=open("README.txt").read(), # Dependent packages (distributions) #install_requires=[ # "urllib2", #], classifiers = [], )
Update link to repo and description
Update link to repo and description
Python
mit
xandr2/blynkapi
--- +++ @@ -15,14 +15,14 @@ name="blynkapi", # Version number (initial): - version="0.1.1", + version="0.1.2", - description="This is a simple blynk API wrapper.", + description="This is a simple blynk HTTP/HTTPS API wrapper.", long_description=long_description, #URL - url='https://github.com/xandr2/python-blynk-api', - download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.1.tar.gz', + url='https://github.com/xandr2/blynkapi', + download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.2.tar.gz', # Application author details: author="Alexandr Borysov", @@ -31,7 +31,7 @@ # License license='MIT', - keywords=['python', 'blynk', 'API', 'wrapper'], + keywords=['python', 'blynk', 'HTTP/HTTPS', 'API', 'wrapper'], # Packages packages=["blynkapi"],
eb16a12bd8f5e9896f48e6dfb23df64cfe5fb4cf
setup.py
setup.py
#! /usr/bin/env python """Setup information of demandlib. """ from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='demandlib', version='0.1.7dev', author='oemof developer group', url='https://oemof.org/', license='GPL3', author_email='oemof@rl-institut.de', description='Demandlib of the open energy modelling framework', long_description=read('README.rst'), packages=find_packages(), install_requires=['numpy >= 1.7.0, < 1.17', 'pandas >= 0.18.0, < 1.2'], package_data={ 'demandlib': [os.path.join('bdew_data', '*.csv')], 'demandlib.examples': ['*.csv']}, )
#! /usr/bin/env python """Setup information of demandlib. """ from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='demandlib', version='0.1.7dev', author='oemof developer group', url='https://oemof.org/', license='GPL3', author_email='oemof@rl-institut.de', description='Demandlib of the open energy modelling framework', long_description=read('README.rst'), packages=find_packages(), install_requires=['numpy >= 1.7.0, < 1.17', 'pandas >= 0.18.0'], package_data={ 'demandlib': [os.path.join('bdew_data', '*.csv')], 'demandlib.examples': ['*.csv']}, )
Allow any newer pandas version
Allow any newer pandas version Co-authored-by: Sabine Haas <7a4a302f5a1f49bb6bebf9ec4d25cae6930e4972@rl-institut.de>
Python
mit
oemof/demandlib
--- +++ @@ -21,7 +21,7 @@ long_description=read('README.rst'), packages=find_packages(), install_requires=['numpy >= 1.7.0, < 1.17', - 'pandas >= 0.18.0, < 1.2'], + 'pandas >= 0.18.0'], package_data={ 'demandlib': [os.path.join('bdew_data', '*.csv')], 'demandlib.examples': ['*.csv']},
911a30b21285895b6f45a5b6fc051397ce409a8f
setup.py
setup.py
from setuptools import setup, find_packages setup(name='logs-analyzer', version='0.5', description='Logs-analyzer is a library containing functions that can help you extract usable data from logs.', url='https://github.com/ddalu5/logs-analyzer', author='Salah OSFOR', author_email='osfor.salah@gmail.com', license='Apache V2', packages=find_packages(exclude=['docs', 'tests']), test_suite='tests', tests_require=['unittest'], classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Information Technology', 'Topic :: System :: Logging', 'Topic :: System :: Monitoring', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], zip_safe=False)
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup(name='logs-analyzer', version='0.5.1', description='Logs-analyzer is a library containing functions that can help you extract usable data from logs.', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/ddalu5/logs-analyzer', author='Salah OSFOR', author_email='osfor.salah@gmail.com', license='Apache V2', packages=find_packages(exclude=['docs', 'tests']), test_suite='tests', tests_require=['unittest'], classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Information Technology', 'Topic :: System :: Logging', 'Topic :: System :: Monitoring', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], zip_safe=False)
Add long description to the project
Add long description to the project
Python
apache-2.0
ddalu5/logs-analyzer
--- +++ @@ -1,9 +1,13 @@ from setuptools import setup, find_packages +with open("README.md", "r") as fh: + long_description = fh.read() setup(name='logs-analyzer', - version='0.5', + version='0.5.1', description='Logs-analyzer is a library containing functions that can help you extract usable data from logs.', + long_description=long_description, + long_description_content_type="text/markdown", url='https://github.com/ddalu5/logs-analyzer', author='Salah OSFOR', author_email='osfor.salah@gmail.com',
acc7b768ee6f8bb356811839d8d5c0cdcd088cc6
setup.py
setup.py
#!/usr/bin/env python import json import os from setuptools import setup, find_packages def get_requirements_from_pipfile_lock(pipfile_lock=None): if pipfile_lock is None: pipfile_lock = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Pipfile.lock') lock_data = json.load(open(pipfile_lock)) return [package_name for package_name in lock_data.get('default', {}).keys()] pipfile_lock_requirements = get_requirements_from_pipfile_lock() setup( name='dmpy', version='0.13.2', description=open('README.rst').read(), author='Kiran Garimella and Warren Kretzschmar', author_email='kiran.garimella@gmail.com', packages=find_packages(), install_requires=pipfile_lock_requirements, url='https://github.com/kvg/dmpy', )
#!/usr/bin/env python import json import os from setuptools import setup, find_packages def get_requirements_from_pipfile_lock(pipfile_lock=None): if pipfile_lock is None: pipfile_lock = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Pipfile.lock') lock_data = json.load(open(pipfile_lock)) return [package_name for package_name in lock_data.get('default', {}).keys()] pipfile_lock_requirements = get_requirements_from_pipfile_lock() setup( name='dmpy', version='0.13.3', description='Distributed Make for Python', long_description=open('README.rst').read(), author='Kiran Garimella and Warren Kretzschmar', author_email='kiran.garimella@gmail.com', packages=find_packages(), install_requires=pipfile_lock_requirements, url='https://github.com/kvg/dmpy', )
Fix README.rst in wrong place
Fix README.rst in wrong place
Python
mit
kvg/dmpy
--- +++ @@ -15,8 +15,9 @@ pipfile_lock_requirements = get_requirements_from_pipfile_lock() setup( name='dmpy', - version='0.13.2', - description=open('README.rst').read(), + version='0.13.3', + description='Distributed Make for Python', + long_description=open('README.rst').read(), author='Kiran Garimella and Warren Kretzschmar', author_email='kiran.garimella@gmail.com', packages=find_packages(),
a81dac4d89b38aed4f40f3c459a1690832c43449
setup.py
setup.py
from setuptools import find_packages, setup import yolapy setup( name='yolapy', version=yolapy.__version__, description='Python client for the Yola API', author='Yola', author_email='engineers@yola.com', license='MIT (Expat)', url='https://github.com/yola/yolapy', packages=find_packages(), classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Topic :: Internet :: WWW/HTTP', ], )
from setuptools import find_packages, setup import yolapy with open('README.rst') as readme_file: readme = readme_file.read() with open('CHANGELOG.rst') as changelog_file: changelog = changelog_file.read() setup( name='yolapy', version=yolapy.__version__, description='Python client for the Yola API', long_description='%s\n\n%s' % (readme, changelog), author='Yola', author_email='engineers@yola.com', license='MIT (Expat)', url='https://github.com/yola/yolapy', packages=find_packages(), classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Topic :: Internet :: WWW/HTTP', ], )
Use readme and changelog as long_description
Use readme and changelog as long_description This is so it shows up on the pypi package homepage
Python
mit
yola/yolapy
--- +++ @@ -3,10 +3,17 @@ import yolapy +with open('README.rst') as readme_file: + readme = readme_file.read() + +with open('CHANGELOG.rst') as changelog_file: + changelog = changelog_file.read() + setup( name='yolapy', version=yolapy.__version__, description='Python client for the Yola API', + long_description='%s\n\n%s' % (readme, changelog), author='Yola', author_email='engineers@yola.com', license='MIT (Expat)',
52e7077ed05de7a7379f99f2a5ed71a07de79fa9
setup.py
setup.py
from setuptools import setup, find_packages BUILDBOTVERSION = '2.8.2' setup( name='autobuilder', version='2.6.95', packages=find_packages(), license='MIT', author='Matt Madison', author_email='matt@madison.systems', include_package_data=True, package_data={ 'autobuilder': ['templates/*.txt'] }, install_requires=['aws-secretsmanager-caching', 'buildbot[tls]>=' + BUILDBOTVERSION, 'buildbot-www>=' + BUILDBOTVERSION, 'buildbot-console-view>=' + BUILDBOTVERSION, 'buildbot-grid-view>=' + BUILDBOTVERSION, 'buildbot-waterfall-view>=' + BUILDBOTVERSION, 'buildbot-badges>=' + BUILDBOTVERSION, 'boto3', 'botocore', 'treq', 'twisted', 'python-dateutil', 'jinja2'] )
from setuptools import setup, find_packages BUILDBOTVERSION = '2.8.4' setup( name='autobuilder', version='2.7.0', packages=find_packages(), license='MIT', author='Matt Madison', author_email='matt@madison.systems', include_package_data=True, package_data={ 'autobuilder': ['templates/*.txt'] }, install_requires=['aws-secretsmanager-caching', 'buildbot[tls]>=' + BUILDBOTVERSION, 'buildbot-www>=' + BUILDBOTVERSION, 'buildbot-console-view>=' + BUILDBOTVERSION, 'buildbot-grid-view>=' + BUILDBOTVERSION, 'buildbot-waterfall-view>=' + BUILDBOTVERSION, 'buildbot-badges>=' + BUILDBOTVERSION, 'boto3', 'botocore', 'treq', 'twisted', 'python-dateutil', 'jinja2'] )
Update version number to 2.7.0
Update version number to 2.7.0 and bump buildbot required version to 2.8.4.
Python
mit
madisongh/autobuilder
--- +++ @@ -1,10 +1,10 @@ from setuptools import setup, find_packages -BUILDBOTVERSION = '2.8.2' +BUILDBOTVERSION = '2.8.4' setup( name='autobuilder', - version='2.6.95', + version='2.7.0', packages=find_packages(), license='MIT', author='Matt Madison',
5caba564232afc6a193042dc9701a978b75138dd
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup from setuputils import find_version, read setup( name='astor', version=find_version('astor/__init__.py'), description='Read/rewrite/write Python ASTs', long_description=read('README.rst'), author='Patrick Maupin', author_email='pmaupin@gmail.com', platforms='Independent', url='https://github.com/berkerpeksag/astor', packages=['astor'], py_modules=['setuputils'], license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', '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', 'Topic :: Software Development :: Code Generators', 'Topic :: Software Development :: Compilers', ], keywords='ast', )
#!/usr/bin/env python from setuptools import setup from setuputils import find_version, read setup( name='astor', version=find_version('astor/__init__.py'), description='Read/rewrite/write Python ASTs', long_description=read('README.rst'), author='Patrick Maupin', author_email='pmaupin@gmail.com', platforms='Independent', url='https://github.com/berkerpeksag/astor', packages=['astor'], py_modules=['setuputils'], license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', '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 :: Implementation', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Code Generators', 'Topic :: Software Development :: Compilers', ], keywords='ast', )
Update trove classifiers for CPython and PyPy.
Update trove classifiers for CPython and PyPy.
Python
bsd-3-clause
zackmdavis/astor,berkerpeksag/astor
--- +++ @@ -31,6 +31,9 @@ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: Implementation', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Code Generators', 'Topic :: Software Development :: Compilers', ],
728ca409a6534f1d5e398013bc6ca846d3fcd93b
setup.py
setup.py
from setuptools import setup, find_packages install_requires = ['redis', 'motor', 'jinja2', 'yuicompressor', 'webassets', 'cssmin', 'PyYAML'] # 'Routes' setup(name='scheduler', version='0.1', author='Sviatoslav Sydorenko', author_email='wk@sydorenko.org.ua', package_dir={'': 'src'}, packages=find_packages('src', exclude=["test**"]), install_requires=install_requires, zip_safe=False)
from setuptools import setup, find_packages install_requires = ['redis', 'motor', 'jinja2', 'yuicompressor', 'webassets', 'cssmin', 'PyYAML'] # 'Routes' if sys.version_info == (3,3): # Python 3.4 introduced `asyncio` in standard library, install_requires.append('asyncio') # it was backported for 3.3 as a pypi module setup(name='scheduler', version='0.1', author='Sviatoslav Sydorenko', author_email='wk@sydorenko.org.ua', package_dir={'': 'src'}, packages=find_packages('src', exclude=["test**"]), install_requires=install_requires, zip_safe=False)
Install asyncio if we are dealing w/ Python 3.3
Install asyncio if we are dealing w/ Python 3.3
Python
mit
kyiv-team-hacktbilisi/web-app,kyiv-team-hacktbilisi/web-app
--- +++ @@ -3,6 +3,9 @@ install_requires = ['redis', 'motor', 'jinja2', 'yuicompressor', 'webassets', 'cssmin', 'PyYAML'] # 'Routes' + +if sys.version_info == (3,3): # Python 3.4 introduced `asyncio` in standard library, + install_requires.append('asyncio') # it was backported for 3.3 as a pypi module setup(name='scheduler', version='0.1',
6e2e4dfd800a55f14a86a1ddc03b809c98f0a462
setup.py
setup.py
#! /usr/bin/env python ''' This file is part of RTSLib Community Edition. Copyright (c) 2011 by RisingTide Systems LLC This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 (AGPLv3). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' import re from distutils.core import setup import rtslib setup ( name = 'rtslib', version = '2.1.fb30', description = 'API for Linux kernel SCSI target (aka LIO)', license='AGPLv3', maintainer='Andy Grover', maintainer_email='agrover@redhat.com', url='http://github.com/agrover/rtslib-fb', packages=['rtslib'], )
#! /usr/bin/env python ''' This file is part of RTSLib Community Edition. Copyright (c) 2011 by RisingTide Systems LLC This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 (AGPLv3). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' import re from distutils.core import setup import rtslib setup ( name = 'rtslib-fb', version = '2.1.31', description = 'API for Linux kernel SCSI target (aka LIO)', license='AGPLv3', maintainer='Andy Grover', maintainer_email='agrover@redhat.com', url='http://github.com/agrover/rtslib-fb', packages=['rtslib'], )
Fix PyPi version to be compliant
Fix PyPi version to be compliant see https://github.com/agrover/rtslib-fb/issues/22 We can't use fb* in the name I guess, so change the name of the package to rtslib-fb and use a more normal version. Signed-off-by: Andy Grover <b7d524d2f5cc5aebadb6b92b08d3ab26911cde33@redhat.com>
Python
apache-2.0
mikenawrocki/rtslib-fb,cvubrugier/rtslib-fb,mikenawrocki/rtslib-fb,agrover/rtslib-fb
--- +++ @@ -21,8 +21,8 @@ import rtslib setup ( - name = 'rtslib', - version = '2.1.fb30', + name = 'rtslib-fb', + version = '2.1.31', description = 'API for Linux kernel SCSI target (aka LIO)', license='AGPLv3', maintainer='Andy Grover',
285cd06243fdd7aacb65628f390876be3b7ca098
setup.py
setup.py
#!/usr/bin/env python """Setup for cppclean.""" from __future__ import unicode_literals from distutils import core with open('README') as readme: core.setup(name='cppclean', description='Find problems in C++ source that slow development ' 'of large code bases.', long_description=readme.read(), packages=['cpp'], scripts=['cppclean'])
#!/usr/bin/env python """Setup for cppclean.""" from distutils import core with open('README') as readme: core.setup(name='cppclean', description='Find problems in C++ source that slow development ' 'of large code bases.', long_description=readme.read(), packages=['cpp'], scripts=['cppclean'])
Make this work on Python 2
Make this work on Python 2 http://bugs.python.org/issue13943
Python
apache-2.0
myint/cppclean,myint/cppclean,myint/cppclean,myint/cppclean
--- +++ @@ -1,8 +1,6 @@ #!/usr/bin/env python """Setup for cppclean.""" - -from __future__ import unicode_literals from distutils import core
d83c9cd2633f08c75a3f1a6767984d663c6f6f28
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-sensible-caching', url="https://chris-lamb.co.uk/projects/django-sensible-caching", version='2.0.1', description="Non-magical object caching for Django.", author="Chris Lamb", author_email="chris@chris-lamb.co.uk", license="BSD", packages=find_packages(), )
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-sensible-caching', url="https://chris-lamb.co.uk/projects/django-sensible-caching", version='2.0.1', description="Non-magical object caching for Django.", author="Chris Lamb", author_email="chris@chris-lamb.co.uk", license="BSD", packages=find_packages(), install_requires=( 'Django>=1.8', ), )
Update Django requirement to latest LTS
Update Django requirement to latest LTS
Python
bsd-3-clause
lamby/django-sensible-caching
--- +++ @@ -14,4 +14,8 @@ license="BSD", packages=find_packages(), + + install_requires=( + 'Django>=1.8', + ), )
8882230d88839d5f4bd253c78350b6b8621a5f3a
setup.py
setup.py
from setuptools import setup, find_packages setup( name='knitty-gritty', version='0.0.1', description='Pattern uploader/downloader for Brother knitting machines', url='https://github.com/mhallin/knitty-gritty', author='Magnus Hallin', author_email='mhallin@gmail.com', license='BSD', packages=find_packages(), install_requires=[ 'click>=2.4,<2.5', 'Pillow>=2.5,<2.6', 'pyserial>=2.7,<2.8', ], extras_require={ 'dev': [ 'flake8>=2.2,<2.3', 'mccabe>=0.2,<0.3', 'pep8>=1.5,<1.6', 'pip-tools>=0.3,<0.4', 'pyflakes>=0.8.1,<0.9', ], }, entry_points={ 'console_scripts': [ 'knitty-gritty = knittygritty.main:cli' ], }, )
from setuptools import setup, find_packages with open('README.rst') as f: description = f.read() setup( name='knitty-gritty', version='0.0.1', description=description, url='https://github.com/mhallin/knitty-gritty', author='Magnus Hallin', author_email='mhallin@gmail.com', license='BSD', packages=find_packages(), install_requires=[ 'click>=2.4,<2.5', 'Pillow>=2.5,<2.6', 'pyserial>=2.7,<2.8', ], extras_require={ 'dev': [ 'flake8>=2.2,<2.3', 'mccabe>=0.2,<0.3', 'pep8>=1.5,<1.6', 'pip-tools>=0.3,<0.4', 'pyflakes>=0.8.1,<0.9', 'wheel>=0.24,<0.25', ], }, entry_points={ 'console_scripts': [ 'knitty-gritty = knittygritty.main:cli' ], }, )
Add wheel dependency, read PyPI description from readme file
Add wheel dependency, read PyPI description from readme file
Python
bsd-3-clause
mhallin/knitty-gritty
--- +++ @@ -1,9 +1,12 @@ from setuptools import setup, find_packages + +with open('README.rst') as f: + description = f.read() setup( name='knitty-gritty', version='0.0.1', - description='Pattern uploader/downloader for Brother knitting machines', + description=description, url='https://github.com/mhallin/knitty-gritty', author='Magnus Hallin', @@ -26,6 +29,7 @@ 'pep8>=1.5,<1.6', 'pip-tools>=0.3,<0.4', 'pyflakes>=0.8.1,<0.9', + 'wheel>=0.24,<0.25', ], },
557eaa0d0c15ab57f9b8773486098b14a9bcc89f
setup.py
setup.py
#! /usr/bin/env python import os, glob from distutils.core import setup NAME = 'bacula_configuration' VERSION = '0.1' WEBSITE = 'http://gallew.org/bacula_configuration' LICENSE = 'GPLv3 or later' DESCRIPTION = 'Bacula configuration management tool' LONG_DESCRIPTION = 'Bacula is a great backup tool, but ships with no way to manage the configuration. This suite will help you solve the management problem' AUTHOR = 'Brian Gallew' EMAIL = 'bacula_configuration@gallew.org' setup(name=NAME, version=VERSION, description=DESCRIPTION, long_description=LONG_DESCRIPTION, author=AUTHOR, author_email=EMAIL, url=WEBSITE, scripts = glob.glob('bin/*'), package_data = {'bacula_configuration': ['data/*']}, packages=['bacula_configuration',], classifiers=['Development Status :: 5 - Alpha', 'Environment :: Console', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Programming Language :: Python', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Topic :: Utilities'], )
#! /usr/bin/env python import os, glob from distutils.core import setup NAME = 'bacula_configuration' VERSION = '0.1' WEBSITE = 'http://gallew.org/bacula_configuration' LICENSE = 'GPLv3 or later' DESCRIPTION = 'Bacula configuration management tool' LONG_DESCRIPTION = 'Bacula is a great backup tool, but ships with no way to manage the configuration. This suite will help you solve the management problem' AUTHOR = 'Brian Gallew' EMAIL = 'bacula_configuration@gallew.org' setup(name=NAME, version=VERSION, description=DESCRIPTION, long_description=LONG_DESCRIPTION, author=AUTHOR, author_email=EMAIL, url=WEBSITE, install_requires = ['mysql-python'], extras_require = { 'parsing': ['pyparsing']}, scripts = glob.glob('bin/*'), package_data = {'bacula_tools': ['data/*']}, packages=['bacula_tools',], classifiers=['Development Status :: 5 - Alpha', 'Environment :: Console', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Programming Language :: Python', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Topic :: Utilities'], )
Add dependencies, update for module name change
Add dependencies, update for module name change
Python
bsd-3-clause
BrianGallew/bacula_configuration
--- +++ @@ -18,9 +18,11 @@ author=AUTHOR, author_email=EMAIL, url=WEBSITE, + install_requires = ['mysql-python'], + extras_require = { 'parsing': ['pyparsing']}, scripts = glob.glob('bin/*'), - package_data = {'bacula_configuration': ['data/*']}, - packages=['bacula_configuration',], + package_data = {'bacula_tools': ['data/*']}, + packages=['bacula_tools',], classifiers=['Development Status :: 5 - Alpha', 'Environment :: Console', 'Intended Audience :: System Administrators',
b7adf26adfef1b3c1c474b2395b63525043cbd6f
setup.py
setup.py
# Copyright (c) 2011, SD Elements. See LICENSE.txt for details. import os from distutils.core import setup f = open(os.path.join(os.path.dirname(__file__), 'README')) readme = f.read() f.close() setup(name="django-security", description='A collection of tools to help secure a Django project.', long_description=readme, maintainer="SD Elements", maintainer_email="django-security@sdelements.com", version="0.1.2", packages=["security", "security.migrations", "security.auth_throttling"], url='https://github.com/sdelements/django-security', classifiers=[ 'Framework :: Django', 'Environment :: Web Environment', 'Programming Language :: Python', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=['django>=1.3,<1.4',], )
# Copyright (c) 2011, SD Elements. See LICENSE.txt for details. import os from distutils.core import setup f = open(os.path.join(os.path.dirname(__file__), 'README')) readme = f.read() f.close() setup(name="django-security", description='A collection of tools to help secure a Django project.', long_description=readme, maintainer="SD Elements", maintainer_email="django-security@sdelements.com", version="0.1.3", packages=["security", "security.migrations", "security.auth_throttling"], url='https://github.com/sdelements/django-security', classifiers=[ 'Framework :: Django', 'Environment :: Web Environment', 'Programming Language :: Python', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=['django>=1.3,<1.4',], )
Increment version number to 0.1.3.
Increment version number to 0.1.3.
Python
bsd-3-clause
barseghyanartur/django-security,MartinPetkov/django-security,MartinPetkov/django-security,issackelly/django-security,issackelly/django-security,barseghyanartur/django-security
--- +++ @@ -12,7 +12,7 @@ long_description=readme, maintainer="SD Elements", maintainer_email="django-security@sdelements.com", - version="0.1.2", + version="0.1.3", packages=["security", "security.migrations", "security.auth_throttling"], url='https://github.com/sdelements/django-security', classifiers=[
e26e845a6f3793cee5e464919d70aa0bf9dd98f6
setup.py
setup.py
from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install import os dependencies = [ 'requests~=2.7' ] class PostDevelopCommand(develop): def run(self): make_director_executable() class PostInstallCommand(install): def run(self): make_director_executable() _DIRECTOR_DIR = os.path.join(os.path.dirname(__file__), 'eclipsegen', 'director') def make_director_executable(): print("Making director executable") os.chmod(os.path.join(_DIRECTOR_DIR, 'director'), 0o744) os.chmod(os.path.join(_DIRECTOR_DIR, 'director.bat'), 0o744) setup( name='eclipsegen', version='0.4.2', description='Generate Eclipse instances in Python', url='http://github.com/Gohla/eclipsegen', author='Gabriel Konat', author_email='gabrielkonat@gmail.com', license='Apache 2.0', packages=['eclipsegen'], install_requires=dependencies, test_suite='nose.collector', tests_require=['nose>=1.3.7'] + dependencies, include_package_data=True, zip_safe=False, cmdclass={ 'install': PostInstallCommand, 'develop': PostDevelopCommand } )
from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install import os dependencies = [ 'requests~=2.7' ] class PostDevelopCommand(develop): def run(self): make_director_executable() develop.run(self) class PostInstallCommand(install): def run(self): make_director_executable() install.run(self) _DIRECTOR_DIR = os.path.join(os.path.dirname(__file__), 'eclipsegen', 'director') def make_director_executable(): director_path = os.path.join(_DIRECTOR_DIR, 'director') print("Making {} executable".format(director_path)) os.chmod(director_path, 0o744) director_bat_path = os.path.join(_DIRECTOR_DIR, 'director.bat') print("Making {} executable".format(director_bat_path)) os.chmod(director_bat_path, 0o744) setup( name='eclipsegen', version='0.4.2', description='Generate Eclipse instances in Python', url='http://github.com/Gohla/eclipsegen', author='Gabriel Konat', author_email='gabrielkonat@gmail.com', license='Apache 2.0', packages=['eclipsegen'], install_requires=dependencies, test_suite='nose.collector', tests_require=['nose>=1.3.7'] + dependencies, include_package_data=True, zip_safe=False, cmdclass={ 'install': PostInstallCommand, 'develop': PostDevelopCommand } )
Make executable before develop/install, print what is made executable, and also run the actual develop/install.
Make executable before develop/install, print what is made executable, and also run the actual develop/install.
Python
apache-2.0
Gohla/eclipsegen,Gohla/eclipsegen,Gohla/eclipsegen,Gohla/eclipsegen
--- +++ @@ -10,17 +10,22 @@ class PostDevelopCommand(develop): def run(self): make_director_executable() + develop.run(self) class PostInstallCommand(install): def run(self): make_director_executable() - + install.run(self) + _DIRECTOR_DIR = os.path.join(os.path.dirname(__file__), 'eclipsegen', 'director') def make_director_executable(): - print("Making director executable") - os.chmod(os.path.join(_DIRECTOR_DIR, 'director'), 0o744) - os.chmod(os.path.join(_DIRECTOR_DIR, 'director.bat'), 0o744) + director_path = os.path.join(_DIRECTOR_DIR, 'director') + print("Making {} executable".format(director_path)) + os.chmod(director_path, 0o744) + director_bat_path = os.path.join(_DIRECTOR_DIR, 'director.bat') + print("Making {} executable".format(director_bat_path)) + os.chmod(director_bat_path, 0o744) setup( name='eclipsegen',
ff664b9731d6fdcbbd3eadf02595a35ccac402f6
markups/common.py
markups/common.py
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.expanduser('~/.config')) MATHJAX_LOCAL_URL = 'file:///usr/share/javascript/mathjax/MathJax.js' MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js' PYGMENTS_STYLE = 'default' def get_pygments_stylesheet(selector, style=None): if style is None: style = PYGMENTS_STYLE if style == '': return '' try: from pygments.formatters import HtmlFormatter except ImportError: return '' else: return HtmlFormatter(style=style).get_style_defs(selector) + '\n' def get_mathjax_url(webenv): if os.path.exists(MATHJAX_LOCAL_URL[7:]) and not webenv: return MATHJAX_LOCAL_URL else: return MATHJAX_WEB_URL
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.expanduser('~/.config')) MATHJAX_LOCAL_URL = 'file:///usr/share/javascript/mathjax/MathJax.js' MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js' PYGMENTS_STYLE = 'default' def get_pygments_stylesheet(selector, style=None): if style is None: style = PYGMENTS_STYLE if style == '': return '' try: from pygments.formatters import HtmlFormatter except ImportError: return '' else: return HtmlFormatter(style=style).get_style_defs(selector) + '\n' def get_mathjax_url(webenv): if os.path.exists(MATHJAX_LOCAL_URL[7:]) and not webenv: return MATHJAX_LOCAL_URL else: return MATHJAX_WEB_URL
Update MathJax URL to 2.7.1
Update MathJax URL to 2.7.1
Python
bsd-3-clause
retext-project/pymarkups,mitya57/pymarkups
--- +++ @@ -9,7 +9,7 @@ CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.expanduser('~/.config')) MATHJAX_LOCAL_URL = 'file:///usr/share/javascript/mathjax/MathJax.js' -MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js' +MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js' PYGMENTS_STYLE = 'default'
39d7ea31c3c51958ee9b0fc05fa4b057a6bc532a
setup.py
setup.py
from setuptools import setup, Extension setup( name='asyncpg', version='0.0.1', description='An asyncio PosgtreSQL driver', classifiers=[ 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Development Status :: 4 - Beta', ], platforms=['POSIX'], author='MagicStack Inc', author_email='hello@magic.io', license='MIT', packages=['asyncpg'], provides=['asyncpg'], include_package_data=True, ext_modules=[ Extension("asyncpg.protocol.protocol", ["asyncpg/protocol/record/recordobj.c", "asyncpg/protocol/protocol.c"], extra_compile_args=['-O3']) ] )
from setuptools import setup, Extension setup( name='asyncpg', version='0.0.1', description='An asyncio PosgtreSQL driver', classifiers=[ 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Development Status :: 4 - Beta', ], platforms=['POSIX'], author='MagicStack Inc', author_email='hello@magic.io', license='MIT', packages=['asyncpg'], provides=['asyncpg'], include_package_data=True, ext_modules=[ Extension("asyncpg.protocol.protocol", ["asyncpg/protocol/record/recordobj.c", "asyncpg/protocol/protocol.c"], extra_compile_args=['-O2']) ] )
Switch optimization back to -O2
Switch optimization back to -O2
Python
apache-2.0
MagicStack/asyncpg,MagicStack/asyncpg
--- +++ @@ -24,6 +24,6 @@ Extension("asyncpg.protocol.protocol", ["asyncpg/protocol/record/recordobj.c", "asyncpg/protocol/protocol.c"], - extra_compile_args=['-O3']) + extra_compile_args=['-O2']) ] )
f622569041c3aae25a243029609d63606b29015f
start.py
start.py
try: import rc except ImportError: import vx # which keybinding do we want from keybindings import hopscotch vx.default_start()
try: import rc except ImportError: import vx # which keybinding do we want from keybindings import concat vx.default_keybindings = concat.load vx.default_start()
Change default keybindings to concat since these are the only ones that work
Change default keybindings to concat since these are the only ones that work At least for now
Python
mit
philipdexter/vx,philipdexter/vx
--- +++ @@ -4,6 +4,7 @@ import vx # which keybinding do we want - from keybindings import hopscotch + from keybindings import concat + vx.default_keybindings = concat.load vx.default_start()
5ab07a72a5a9e9e147e782301d55ed5c7c844978
tasks.py
tasks.py
import invoke def run(*args, **kwargs): kwargs.update(echo=True) return invoke.run(*args, **kwargs) @invoke.task def clean(): run("rm -rf .tox/") run("rm -rf dist/") run("rm -rf pyservice.egg-info/") run("find . -name '*.pyc' -delete") run("find . -name '__pycache__' -delete") @invoke.task('clean') def build(): run("python setup.py develop") pass @invoke.task('clean') def test(): run('tox')
import invoke def run(*args, **kwargs): kwargs.update(echo=True) return invoke.run(*args, **kwargs) @invoke.task def clean(): run("rm -rf .tox/") run("rm -rf dist/") run("rm -rf pyservice.egg-info/") run("find . -name '*.pyc' -delete") run("find . -name '__pycache__' -delete") run("rm -f .coverage") @invoke.task('clean') def build(): run("python setup.py develop") pass @invoke.task('clean') def test(): run('tox')
Add .coverage to clean task
Add .coverage to clean task
Python
mit
numberoverzero/pyservice
--- +++ @@ -11,6 +11,7 @@ run("rm -rf pyservice.egg-info/") run("find . -name '*.pyc' -delete") run("find . -name '__pycache__' -delete") + run("rm -f .coverage") @invoke.task('clean') def build():
63c4997dbe712a4260c0ebe1f2c4c82416b39901
account_import_line_multicurrency_extension/__openerp__.py
account_import_line_multicurrency_extension/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Vincent Renaville (Camptocamp) # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## {'name': 'Bank Statement Multi currency Extension', 'summary': 'Add an improved view for move line import in bank statement', 'version': '1.1', 'author': "Camptocamp,Odoo Community Association (OCA)", 'maintainter': 'Camptocamp', 'category': 'Accounting', 'depends': ['account'], 'website': 'http://www.camptocamp.com', 'data': ['view/account_statement_from_invoice_view.xml', 'view/bank_statement_view.xml', ], 'tests': [], 'installable': True, 'license': 'AGPL-3', 'conflicts': [ 'account_banking_payment_export', ], }
# -*- coding: utf-8 -*- ############################################################################## # # Author: Vincent Renaville (Camptocamp) # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## {'name': 'Bank Statement Multi currency Extension', 'summary': 'Add an improved view for move line import in bank statement', 'version': '1.1', 'author': "Camptocamp,Odoo Community Association (OCA)", 'maintainter': 'Camptocamp', 'category': 'Accounting', 'depends': ['account'], 'website': 'http://www.camptocamp.com', 'data': ['view/account_statement_from_invoice_view.xml', 'view/bank_statement_view.xml', ], 'tests': [], 'installable': True, 'license': 'AGPL-3', }
Remove list of conflicting module. Both modules can be installed and will work in parallele. Thought the workflow logic is different.
Remove list of conflicting module. Both modules can be installed and will work in parallele. Thought the workflow logic is different.
Python
agpl-3.0
syci/bank-payment,sergiocorato/bank-payment,ndtran/bank-payment,CompassionCH/bank-payment,Antiun/bank-payment,damdam-s/bank-payment,syci/bank-payment,sergiocorato/bank-payment,David-Amaro/bank-payment,diagramsoftware/bank-payment,acsone/bank-payment,Antiun/bank-payment,damdam-s/bank-payment,CompassionCH/bank-payment,David-Amaro/bank-payment,ndtran/bank-payment,incaser/bank-payment,hbrunn/bank-payment,open-synergy/bank-payment
--- +++ @@ -32,7 +32,4 @@ 'tests': [], 'installable': True, 'license': 'AGPL-3', - 'conflicts': [ - 'account_banking_payment_export', - ], }
5fc569c3f44747dc6d1301515152c6a670257790
bluebottle/payments_pledge/adapters.py
bluebottle/payments_pledge/adapters.py
from bluebottle.payments.adapters import BasePaymentAdapter from bluebottle.payments.exception import PaymentException from .models import PledgeStandardPayment class PledgePaymentAdapter(BasePaymentAdapter): def create_payment(self): try: can_pledge = self.order_payment.order.user.can_pledge except AttributeError as e: can_pledge = False if not can_pledge: raise PaymentException('User does not have permission to pledge') # A little hacky but we can set the status to pledged here self.order_payment.pledged() self.order_payment.save() def get_authorization_action(self): # Return type success to indicate no further authorization is required. return {'type': 'success'} def check_payment_status(self): pass
from bluebottle.payments.adapters import BasePaymentAdapter from bluebottle.payments.exception import PaymentException from .models import PledgeStandardPayment class PledgePaymentAdapter(BasePaymentAdapter): def create_payment(self): try: can_pledge = self.order_payment.user.can_pledge except AttributeError as e: can_pledge = False if not can_pledge: raise PaymentException('User does not have permission to pledge') # A little hacky but we can set the status to pledged here self.order_payment.pledged() self.order_payment.save() def get_authorization_action(self): # Return type success to indicate no further authorization is required. return {'type': 'success'} def check_payment_status(self): pass
Fix pledge while loging in in donation flow
Fix pledge while loging in in donation flow BB-7015 #resolve
Python
bsd-3-clause
jfterpstra/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
--- +++ @@ -8,7 +8,7 @@ def create_payment(self): try: - can_pledge = self.order_payment.order.user.can_pledge + can_pledge = self.order_payment.user.can_pledge except AttributeError as e: can_pledge = False
2c92d844b01458e74bd7163d755518f7947e87ec
31-trinity/tf-31.py
31-trinity/tf-31.py
#!/usr/bin/env python import sys, re, operator, collections # # Model # class WordFrequenciesModel: """ Models the data. In this case, we're only interested in words and their frequencies as an end result """ freqs = {} def __init__(self, path_to_file): stopwords = set(open('../stop_words.txt').read().split(',')) words = re.findall('[a-z]{2,}', open(path_to_file).read().lower()) self.freqs = collections.Counter(w for w in words if w not in stopwords) # # View # class WordFrequenciesView: def __init__(self, model): self._model = model def render(self): sorted_freqs = sorted(self._model.freqs.iteritems(), key=operator.itemgetter(1), reverse=True) for (w, c) in sorted_freqs[:25]: print w, '-', c # # Controller # class WordFrequencyController: def __init__(self, model, view): self._model = model self._view = view view.render() # # Main # m = WordFrequenciesModel(sys.argv[1]) v = WordFrequenciesView(m) c = WordFrequencyController(m, v)
#!/usr/bin/env python import sys, re, operator, collections class WordFrequenciesModel: """ Models the data. In this case, we're only interested in words and their frequencies as an end result """ freqs = {} def __init__(self, path_to_file): self.update(path_to_file) def update(self, path_to_file): try: stopwords = set(open('../stop_words.txt').read().split(',')) words = re.findall('[a-z]{2,}', open(path_to_file).read().lower()) self.freqs = collections.Counter(w for w in words if w not in stopwords) except IOError: print "File not found" self.freqs = {} class WordFrequenciesView: def __init__(self, model): self._model = model def render(self): sorted_freqs = sorted(self._model.freqs.iteritems(), key=operator.itemgetter(1), reverse=True) for (w, c) in sorted_freqs[:25]: print w, '-', c class WordFrequencyController: def __init__(self, model, view): self._model, self._view = model, view view.render() def run(self): while True: print "Next file: " sys.stdout.flush() filename = sys.stdin.readline().strip() self._model.update(filename) self._view.render() m = WordFrequenciesModel(sys.argv[1]) v = WordFrequenciesView(m) c = WordFrequencyController(m, v) c.run()
Make the mvc example interactive
Make the mvc example interactive
Python
mit
placrosse/exercises-in-programming-style,aaron-goshine/exercises-in-programming-style,jw0201/exercises-in-programming-style,bgamwell/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,bgamwell/exercises-in-programming-style,aaron-goshine/exercises-in-programming-style,emil-mi/exercises-in-programming-style,halagoing/exercises-in-programming-style,placrosse/exercises-in-programming-style,matk86/exercises-in-programming-style,GabrielNicolasAvellaneda/exercises-in-programming-style,kranthikumar/exercises-in-programming-style,mathkann/exercises-in-programming-style,jim-thisplace/exercises-in-programming-style,placrosse/exercises-in-programming-style,panesofglass/exercises-in-programming-style,crista/exercises-in-programming-style,matk86/exercises-in-programming-style,aaron-goshine/exercises-in-programming-style,aaron-goshine/exercises-in-programming-style,GabrielNicolasAvellaneda/exercises-in-programming-style,emil-mi/exercises-in-programming-style,GabrielNicolasAvellaneda/exercises-in-programming-style,emil-mi/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,matk86/exercises-in-programming-style,halagoing/exercises-in-programming-style,placrosse/exercises-in-programming-style,panesofglass/exercises-in-programming-style,Drooids/exercises-in-programming-style,bgamwell/exercises-in-programming-style,GabrielNicolasAvellaneda/exercises-in-programming-style,jim-thisplace/exercises-in-programming-style,halagoing/exercises-in-programming-style,jw0201/exercises-in-programming-style,jw0201/exercises-in-programming-style,Drooids/exercises-in-programming-style,bgamwell/exercises-in-programming-style,wolfhesse/exercises-in-programming-style,mathkann/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,crista/exercises-in-programming-style,jim-thisplace/exercises-in-programming-style,emil-mi/exercises-in-programming-style,folpindo/exercises-in-programming-style,panesofglass/exercises-in-programming-style,folpindo/exercises-in-programming-style,Drooids/exercises-in-programming-style,crista/exercises-in-programming-style,jw0201/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,wolfhesse/exercises-in-programming-style,placrosse/exercises-in-programming-style,folpindo/exercises-in-programming-style,mathkann/exercises-in-programming-style,matk86/exercises-in-programming-style,Drooids/exercises-in-programming-style,wolfhesse/exercises-in-programming-style,folpindo/exercises-in-programming-style,emil-mi/exercises-in-programming-style,kranthikumar/exercises-in-programming-style,halagoing/exercises-in-programming-style,mathkann/exercises-in-programming-style,panesofglass/exercises-in-programming-style,jim-thisplace/exercises-in-programming-style,rajanvenkataguru/exercises-in-programming-style,GabrielNicolasAvellaneda/exercises-in-programming-style,kranthikumar/exercises-in-programming-style,jim-thisplace/exercises-in-programming-style,kranthikumar/exercises-in-programming-style,halagoing/exercises-in-programming-style,crista/exercises-in-programming-style,jw0201/exercises-in-programming-style,Drooids/exercises-in-programming-style,aaron-goshine/exercises-in-programming-style,folpindo/exercises-in-programming-style,kranthikumar/exercises-in-programming-style,bgamwell/exercises-in-programming-style,crista/exercises-in-programming-style,wolfhesse/exercises-in-programming-style,mathkann/exercises-in-programming-style,panesofglass/exercises-in-programming-style,matk86/exercises-in-programming-style,wolfhesse/exercises-in-programming-style
--- +++ @@ -1,23 +1,21 @@ #!/usr/bin/env python - import sys, re, operator, collections -# -# Model -# class WordFrequenciesModel: """ Models the data. In this case, we're only interested in words and their frequencies as an end result """ freqs = {} def __init__(self, path_to_file): - stopwords = set(open('../stop_words.txt').read().split(',')) - words = re.findall('[a-z]{2,}', open(path_to_file).read().lower()) - self.freqs = collections.Counter(w for w in words if w not in stopwords) + self.update(path_to_file) - -# -# View -# + def update(self, path_to_file): + try: + stopwords = set(open('../stop_words.txt').read().split(',')) + words = re.findall('[a-z]{2,}', open(path_to_file).read().lower()) + self.freqs = collections.Counter(w for w in words if w not in stopwords) + except IOError: + print "File not found" + self.freqs = {} class WordFrequenciesView: def __init__(self, model): self._model = model @@ -27,18 +25,21 @@ for (w, c) in sorted_freqs[:25]: print w, '-', c -# -# Controller -# class WordFrequencyController: def __init__(self, model, view): - self._model = model - self._view = view + self._model, self._view = model, view view.render() -# -# Main -# + def run(self): + while True: + print "Next file: " + sys.stdout.flush() + filename = sys.stdin.readline().strip() + self._model.update(filename) + self._view.render() + + m = WordFrequenciesModel(sys.argv[1]) v = WordFrequenciesView(m) c = WordFrequencyController(m, v) +c.run()
3bf8790a0a8bd5464cedcb4f2acb92f758bc01b4
apgl/data/ExamplesGenerator.py
apgl/data/ExamplesGenerator.py
''' A simple class which can be used to generate test sets of examples. ''' #import numpy import numpy.random class ExamplesGenerator(): def __init__(self): pass def generateBinaryExamples(self, numExamples=100, numFeatures=10, noise=0.4): """ Generate a certain number of examples with a uniform distribution between 0 and 1. Create binary -/+ 1 labels. Must have more than 1 example and feature. """ if numExamples == 0 or numFeatures == 0: raise ValueError("Cannot generate empty dataset") X = numpy.random.rand(numExamples, numFeatures) c = numpy.random.rand(numFeatures) y = numpy.sign((X.dot(c)) - numpy.mean(X.dot(c)) + numpy.random.randn(numExamples)*noise) return X, y def generateRandomBinaryExamples(self, numExamples=100, numFeatures=10): """ Generate a certain number of examples with a uniform distribution between 0 and 1. Create binary -/+ 1 labels """ X = numpy.random.rand(numExamples, numFeatures) y = (numpy.random.rand(numExamples)>0.5)*2 - 1 return X, y
''' A simple class which can be used to generate test sets of examples. ''' #import numpy import numpy.random class ExamplesGenerator(): def __init__(self): pass def generateBinaryExamples(self, numExamples=100, numFeatures=10, noise=0.4): """ Generate a certain number of examples with a uniform distribution between 0 and 1. Create binary -/+ 1 labels. Must have more than 1 example and feature. """ if numExamples == 0 or numFeatures == 0: raise ValueError("Cannot generate empty dataset") X = numpy.random.rand(numExamples, numFeatures) c = numpy.random.rand(numFeatures) y = numpy.sign((X.dot(c)) - numpy.mean(X.dot(c)) + numpy.random.randn(numExamples)*noise) y = numpy.array(y, numpy.int) return X, y def generateRandomBinaryExamples(self, numExamples=100, numFeatures=10): """ Generate a certain number of examples with a uniform distribution between 0 and 1. Create binary -/+ 1 labels """ X = numpy.random.rand(numExamples, numFeatures) y = (numpy.random.rand(numExamples)>0.5)*2 - 1 return X, y
Make sure labels are ints.
Make sure labels are ints.
Python
bsd-3-clause
charanpald/APGL
--- +++ @@ -20,6 +20,7 @@ X = numpy.random.rand(numExamples, numFeatures) c = numpy.random.rand(numFeatures) y = numpy.sign((X.dot(c)) - numpy.mean(X.dot(c)) + numpy.random.randn(numExamples)*noise) + y = numpy.array(y, numpy.int) return X, y
f2baef5e4b3b1c1d64f62a84625136befd4772ba
osOps.py
osOps.py
import os def createDirectory(directoryPath): return None def createFile(filePath): try: createdFile = open(filePath, 'w+') createdFile.close() except IOError: print "Error: could not create file at location: " + filePath def getFileContents(filePath): return None def deleteFile(filePath): return None def deleteDirectory(directoryPath): return None
import os def createDirectory(directoryPath): if os.path.isdir(directoryPath) is False and os.path.exists(directoryPath) is False: try: os.makedirs(directoryPath) except OSError: print 'Error: Could not create directory at location: ' + directoryPath def createFile(filePath): try: createdFile = open(filePath, 'w+') createdFile.close() except IOError: print "Error: could not create file at location: " + filePath def getFileContents(filePath): return None def deleteFile(filePath): return None def deleteDirectory(directoryPath): return None
Implement logic for directory creation
Implement logic for directory creation
Python
apache-2.0
AmosGarner/PyInventory
--- +++ @@ -1,7 +1,11 @@ import os def createDirectory(directoryPath): - return None + if os.path.isdir(directoryPath) is False and os.path.exists(directoryPath) is False: + try: + os.makedirs(directoryPath) + except OSError: + print 'Error: Could not create directory at location: ' + directoryPath def createFile(filePath): try:
775d9a5d1b38b8973357a1a861da04848a7f39ad
osOps.py
osOps.py
import os def createDirectory(directoryPath): if os.path.isdir(directoryPath) is False and os.path.exists(directoryPath) is False: try: os.makedirs(directoryPath) except OSError: print 'Error: Could not create directory at location: ' + directoryPath def createFile(filePath): try: createdFile = open(filePath, 'w+') createdFile.close() except IOError: print "Error: could not create file at location: " + filePath def removeFile(filePath): try: os.remove(filePath) except OSError: print "Error: could not remove file at location: " + filePath def removeDirectory(directoryPath): try: os.removedirs(directoryPath) except OSError: print "Error: could not remove directory at location: " + directoryPath def getFileContents(filePath): return None
import os def createDirectory(directoryPath): if os.path.isdir(directoryPath) is False and os.path.exists(directoryPath) is False: try: os.makedirs(directoryPath) except OSError: print 'Error: Could not create directory at location: ' + directoryPath def createFile(filePath): try: createdFile = open(filePath, 'w+') createdFile.close() except IOError: print "Error: could not create file at location: " + filePath def openFile(filePath): try: fileEntity = open(filePath, 'r') return fileEntity except IOError: print "Error: could not open file at location: " + filePath return False def removeFile(filePath): try: os.remove(filePath) except OSError: print "Error: could not remove file at location: " + filePath def removeDirectory(directoryPath): try: os.removedirs(directoryPath) except OSError: print "Error: could not remove directory at location: " + directoryPath def getFileContents(filePath): try: fileData = openFile(filePath).read() return fileData except IOError: print "Error: could find file data located in file at location: " + filePath return False
Implement open file and get file contents functionality
Implement open file and get file contents functionality
Python
apache-2.0
AmosGarner/PyInventory
--- +++ @@ -14,6 +14,14 @@ except IOError: print "Error: could not create file at location: " + filePath +def openFile(filePath): + try: + fileEntity = open(filePath, 'r') + return fileEntity + except IOError: + print "Error: could not open file at location: " + filePath + return False + def removeFile(filePath): try: os.remove(filePath) @@ -27,4 +35,9 @@ print "Error: could not remove directory at location: " + directoryPath def getFileContents(filePath): - return None + try: + fileData = openFile(filePath).read() + return fileData + except IOError: + print "Error: could find file data located in file at location: " + filePath + return False