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
12ecdd10f2d7974ede043584dadc3a6f1b9c8b8f
lib/xslt/tree/text_element.py
lib/xslt/tree/text_element.py
######################################################################## # amara/xslt/tree/text_element.py """ Implementation of the `xsl:text` element. """ from amara.xslt.tree import xslt_element, content_model, attribute_types class text_element(xslt_element): content_model = content_model.text attribute_types = { 'disable-output-escaping': attribute_types.yesno(default='no'), } _value = None def setup(self): if self.children: self._value = self.children[0].data return def instantiate(self, context): value = self._value if value: if self._disable_output_escaping: context.text(value, False) else: context.text(value) return
######################################################################## # amara/xslt/tree/text_element.py """ Implementation of the `xsl:text` element. """ from amara.xslt.tree import xslt_element, content_model, attribute_types class text_element(xslt_element): content_model = content_model.text attribute_types = { 'disable-output-escaping': attribute_types.yesno(default='no'), } _value = None def setup(self): if self.children: self._value = self.children[0].data return def instantiate(self, context): value = self._value if value: if self._disable_output_escaping: context.text(value, True) else: context.text(value) return
Use correct value for disable_escaping parameter
Use correct value for disable_escaping parameter
Python
apache-2.0
zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara
--- +++ @@ -24,7 +24,7 @@ value = self._value if value: if self._disable_output_escaping: - context.text(value, False) + context.text(value, True) else: context.text(value) return
45275a48fb434e6a9d895da03e290b84c52694f6
orbitdeterminator/kep_determination/least_squares.py
orbitdeterminator/kep_determination/least_squares.py
"""Computes the least-squares optimal Keplerian elements for a sequence of cartesian position observations. """ import numpy as np import matplotlib.pyplot as plt # convention: # a: semi-major axis # e: eccentricity # eps: mean longitude at epoch # Euler angles: # I: inclination # Omega: longitude of ascending node # omega: argument of pericenter
"""Computes the least-squares optimal Keplerian elements for a sequence of cartesian position observations. """ import math import numpy as np import matplotlib.pyplot as plt # convention: # a: semi-major axis # e: eccentricity # eps: mean longitude at epoch # Euler angles: # I: inclination # Omega: longitude of ascending node # omega: argument of pericenter #rotation about the z-axis about an angle `ang` def rotz(ang): cos_ang = math.cos(ang) sin_ang = math.sin(ang) return np.array(((cos_ang,-sin_ang,0.0), (sin_ang, cos_ang,0.0), (0.0,0.0,1.0))) #rotation about the x-axis about an angle `ang` def rotx(ang): cos_ang = math.cos(ang) sin_ang = math.sin(ang) return np.array(((1.0,0.0,0.0), (0.0,cos_ang,-sin_ang), (0.0,sin_ang,cos_ang))) #rotation from the orbital plane to the inertial frame #it is composed of the following rotations, in that order: #1) rotation about the z axis about an angle `omega` (argument of pericenter) #2) rotation about the x axis about an angle `I` (inclination) #3) rotation about the z axis about an angle `Omega` (longitude of ascending node) def op2if(omega,I,Omega): P2_mul_P3 = np.matmul(rotx(I),rotz(omega)) return np.matmul(rotz(Omega),P2_mul_P3) omega = math.radians(31.124) I = math.radians(75.0) Omega = math.radians(60.0) # rotation matrix from orbital plane to inertial frame # two ways to compute it; result should be the same P_1 = rotz(omega) #rotation about z axis by an angle `omega` P_2 = rotx(I) #rotation about x axis by an angle `I` P_3 = rotz(Omega) #rotation about z axis by an angle `Omega` Rot1 = np.matmul(P_3,np.matmul(P_2,P_1)) Rot2 = op2if(omega,I,Omega) v = np.array((3.0,-2.0,1.0)) print(I) print(omega) print(Omega) print(Rot1) print(np.matmul(Rot1,v)) print(Rot2)
Add rotation matrix, from orbital plane to inertial frame
Add rotation matrix, from orbital plane to inertial frame
Python
mit
aerospaceresearch/orbitdeterminator
--- +++ @@ -2,6 +2,7 @@ cartesian position observations. """ +import math import numpy as np import matplotlib.pyplot as plt @@ -13,3 +14,49 @@ # I: inclination # Omega: longitude of ascending node # omega: argument of pericenter + +#rotation about the z-axis about an angle `ang` +def rotz(ang): + cos_ang = math.cos(ang) + sin_ang = math.sin(ang) + return np.array(((cos_ang,-sin_ang,0.0), (sin_ang, cos_ang,0.0), (0.0,0.0,1.0))) + +#rotation about the x-axis about an angle `ang` +def rotx(ang): + cos_ang = math.cos(ang) + sin_ang = math.sin(ang) + return np.array(((1.0,0.0,0.0), (0.0,cos_ang,-sin_ang), (0.0,sin_ang,cos_ang))) + +#rotation from the orbital plane to the inertial frame +#it is composed of the following rotations, in that order: +#1) rotation about the z axis about an angle `omega` (argument of pericenter) +#2) rotation about the x axis about an angle `I` (inclination) +#3) rotation about the z axis about an angle `Omega` (longitude of ascending node) +def op2if(omega,I,Omega): + P2_mul_P3 = np.matmul(rotx(I),rotz(omega)) + return np.matmul(rotz(Omega),P2_mul_P3) + +omega = math.radians(31.124) +I = math.radians(75.0) +Omega = math.radians(60.0) + +# rotation matrix from orbital plane to inertial frame +# two ways to compute it; result should be the same +P_1 = rotz(omega) #rotation about z axis by an angle `omega` +P_2 = rotx(I) #rotation about x axis by an angle `I` +P_3 = rotz(Omega) #rotation about z axis by an angle `Omega` + +Rot1 = np.matmul(P_3,np.matmul(P_2,P_1)) +Rot2 = op2if(omega,I,Omega) + +v = np.array((3.0,-2.0,1.0)) + +print(I) +print(omega) +print(Omega) + +print(Rot1) + +print(np.matmul(Rot1,v)) + +print(Rot2)
181def887fb6604aa1cee63cc918d899270c45c3
otrme/jabdaemon/management/commands/run_jabdaemon.py
otrme/jabdaemon/management/commands/run_jabdaemon.py
from django.core.management.base import BaseCommand from jabdaemon.client import OTRMeClient import logging class Command(BaseCommand): args = '' help = 'Start the JabDaemon' def handle(self, *args, **options): logging.basicConfig(level=logging.DEBUG) self.stdout.write('Start JabDaemon') client = OTRMeClient('otr@jabme.de', '123') client.connect() client.process(block=True)
import json import logging from django.core.management.base import BaseCommand from jabdaemon.client import OTRMeClient from events.pgnotify import pg_listen class Command(BaseCommand): args = '' help = 'Start the JabDaemon' def handle(self, *args, **options): self.logger = logging.getLogger('jabdaemon') logging.basicConfig(level=logging.DEBUG) self.clients = {} for event in pg_listen('jab-control'): if not event.payload: self.logger.error("Notify event doesn't contains payload") continue try: event = json.loads(event.payload) except Exception: self.logger.exception("Error while parsing event json") continue if event.get('type') == 'shutdown': self.logger.info("JabDaemon goes down!") break try: self.process_event(event) except Exception: self.logger.exception("Error while processing") for client in self.clients.values(): client.disconnect() def process_event(self, event): if event.get('type') == 'connect': jid = event['jid'] password = event['password'] if jid in self.clients: self.logger.debug("JID %s is already connected", jid) return self.logger.debug("Create client for %s") self.clients[jid] = OTRMeClient(jid, password) self.clients[jid].connect() self.clients[jid].process(block=False) elif event.get('type') == 'disconnect': jid = event['jid'] if jid not in self.clients: self.logger.debug("JID %s wasn't connected", jid) return self.logger.debug("Close client for %s") self.clients[jid].disconnect() else: self.logger.error("Unknown event: %s", event)
Add control events to control jabber clients
Add control events to control jabber clients
Python
bsd-3-clause
mfa/djangodash2013,mfa/djangodash2013,mfa/djangodash2013
--- +++ @@ -1,16 +1,66 @@ +import json +import logging + from django.core.management.base import BaseCommand from jabdaemon.client import OTRMeClient -import logging +from events.pgnotify import pg_listen class Command(BaseCommand): args = '' help = 'Start the JabDaemon' def handle(self, *args, **options): + self.logger = logging.getLogger('jabdaemon') logging.basicConfig(level=logging.DEBUG) - self.stdout.write('Start JabDaemon') - client = OTRMeClient('otr@jabme.de', '123') - client.connect() - client.process(block=True) + self.clients = {} + + for event in pg_listen('jab-control'): + if not event.payload: + self.logger.error("Notify event doesn't contains payload") + continue + + try: + event = json.loads(event.payload) + except Exception: + self.logger.exception("Error while parsing event json") + continue + + if event.get('type') == 'shutdown': + self.logger.info("JabDaemon goes down!") + break + + try: + self.process_event(event) + except Exception: + self.logger.exception("Error while processing") + + for client in self.clients.values(): + client.disconnect() + + def process_event(self, event): + if event.get('type') == 'connect': + jid = event['jid'] + password = event['password'] + + if jid in self.clients: + self.logger.debug("JID %s is already connected", jid) + return + + self.logger.debug("Create client for %s") + self.clients[jid] = OTRMeClient(jid, password) + self.clients[jid].connect() + self.clients[jid].process(block=False) + + elif event.get('type') == 'disconnect': + jid = event['jid'] + + if jid not in self.clients: + self.logger.debug("JID %s wasn't connected", jid) + return + + self.logger.debug("Close client for %s") + self.clients[jid].disconnect() + else: + self.logger.error("Unknown event: %s", event)
e5a7c7a7c163047f35af6f6f06fa58ca71757aa2
ExposedAccessKeys/lambda_functions/delete_access_key_pair.py
ExposedAccessKeys/lambda_functions/delete_access_key_pair.py
import boto3 iam = boto3.client('iam') def lambda_handler(event, context): details = event['check-item-detail'] username = details['User Name (IAM or Root)'] access_key_id = details['Access Key ID'] exposed_location = details['Location'] print('Deleting exposed access key pair...') delete_exposed_key_pair(username, access_key_id) return { "username": username, "deleted_key": access_key_id, "exposed_location": exposed_location } def delete_exposed_key_pair(username, access_key_id): try: iam.delete_access_key( UserName=username, AccessKeyId=access_key_id ) except Exception as e: print(e) print('Unable to delete access key "{}" for user "{}".'.format(access_key_id, username)) raise(e)
import boto3 iam = boto3.client('iam') def lambda_handler(event, context): details = event['detail']['check-item-detail'] username = details['User Name (IAM or Root)'] access_key_id = details['Access Key ID'] exposed_location = details['Location'] print('Deleting exposed access key pair...') delete_exposed_key_pair(username, access_key_id) return { "username": username, "deleted_key": access_key_id, "exposed_location": exposed_location } def delete_exposed_key_pair(username, access_key_id): try: iam.delete_access_key( UserName=username, AccessKeyId=access_key_id ) except Exception as e: print(e) print('Unable to delete access key "{}" for user "{}".'.format(access_key_id, username)) raise(e)
Fix event detail variable key lookup
Fix event detail variable key lookup
Python
apache-2.0
robperc/Trusted-Advisor-Tools,robperc/Trusted-Advisor-Tools
--- +++ @@ -4,7 +4,7 @@ def lambda_handler(event, context): - details = event['check-item-detail'] + details = event['detail']['check-item-detail'] username = details['User Name (IAM or Root)'] access_key_id = details['Access Key ID'] exposed_location = details['Location']
4fb54ac1b06f368d788526a7400c377c715f594c
epf.py
epf.py
from __future__ import division # for Python 2.x compatibility import numpy class EuclidField(object): p = 5.0 r = 30.0 @staticmethod def dist(x, y): return numpy.hypot(x[0]-y[0], x[1]-y[1]) def __init__(self, size, dst, obstacles): w, h = size self.shape = (h, w) self.dst = dst self.obstacles = obstacles def __getitem__(self, q): i, j = q h, w = self.shape if not (i in range(h) and j in range(w)): raise IndexError base = self.dist(q, self.dst) k = 0.0 p = self.p for obj in self.obstacles: dist_to_obj = self.dist(q, obj) if dist_to_obj <= p: k += (1/dist_to_obj - 1/p)**2 return (1.0 + k) * base**2 + self.r*k def __array__(self): h, w = self.shape return numpy.array([[self[i, j] for j in range(w)] for i in range(h)]) f = EuclidField((3, 3), (0, 0), [(1,1)])
from __future__ import division # for Python 2.x compatibility import numpy class EuclidField(object): p = 5.0 r = 30.0 @staticmethod def dist(x, y): return numpy.hypot(x[0]-y[0], x[1]-y[1]) def __init__(self, size, dst, obstacles): w, h = size self.shape = (h, w) self.dst = dst self.obstacles = obstacles def __getitem__(self, q): i, j = q h, w = self.shape if not (i in range(h) and j in range(w)): raise IndexError base = self.dist(q, self.dst) k = 0.0 p = self.p for obj in self.obstacles: dist_to_obj = self.dist(q, obj) if dist_to_obj <= p: k += (1/dist_to_obj - 1/p)**2 return (1.0 + k) * base**2 + self.r*k def __array__(self): h, w = self.shape return numpy.array([[self[i, j] for j in range(w)] for i in range(h)])
Remove a line of debugging code
Remove a line of debugging code
Python
bsd-2-clause
z-rui/pf
--- +++ @@ -28,5 +28,3 @@ def __array__(self): h, w = self.shape return numpy.array([[self[i, j] for j in range(w)] for i in range(h)]) - -f = EuclidField((3, 3), (0, 0), [(1,1)])
ff39d53b3892477ac7fa690471afbd3099cbd5bd
modules/urlparser/__init__.py
modules/urlparser/__init__.py
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible urls. If a url is found then route the url to a corresponding module to handle. """ def __init__(self, *args, **kwargs): """Constructor.""" Module.__init__(self, kwargs=kwargs) self.url_patterns = [ Twitter, Youtube, Bitly, ] self.url_pattern = re.compile("http://(.*?)") def _register_events(self): self.add_event('pubmsg', 'parse_message') def parse_message(self, event): nick = event['nick'] # make sure the message contains a url before checking # the other handlers patterns try: for handler in self.url_patterns: m = handler.pattern.search(event['message']) if m: handler_instance = handler() msg = handler_instance.handle(event=event, match=m) if msg: self.server.privmsg(event['target'], msg.encode('ascii', 'ignore')) break except: print "<<Error>> in Urlparser (%s)" % (event['message']) print traceback.print_exc()
from modules import * import re import urllib2 import traceback try: import simplejson as json except ImportError: import json from unidecode import unidecode from twitter import Twitter from bitly import Bitly from youtube import Youtube class Urlparser(Module): """Checks incoming messages for possible urls. If a url is found then route the url to a corresponding module to handle. """ def __init__(self, *args, **kwargs): """Constructor.""" Module.__init__(self, kwargs=kwargs) self.url_patterns = [ Twitter, Youtube, Bitly, ] self.url_pattern = re.compile("http://(.*?)") def _register_events(self): self.add_event('pubmsg', 'parse_message') def parse_message(self, event): nick = event['nick'] # make sure the message contains a url before checking # the other handlers patterns try: for handler in self.url_patterns: m = handler.pattern.search(event['message']) if m: handler_instance = handler() msg = handler_instance.handle(event=event, match=m) if msg: self.reply(msg) break except: print "<<Error>> in Urlparser (%s)" % (event['message']) print traceback.print_exc()
Change urlparser to use reply
Change urlparser to use reply
Python
mit
billyvg/piebot
--- +++ @@ -48,7 +48,7 @@ handler_instance = handler() msg = handler_instance.handle(event=event, match=m) if msg: - self.server.privmsg(event['target'], msg.encode('ascii', 'ignore')) + self.reply(msg) break except: print "<<Error>> in Urlparser (%s)" % (event['message'])
16aa537ff01ff36c5ff3f2de9beaf45ec2d93823
setup.py
setup.py
from __future__ import absolute_import import sys from setuptools import setup _PY2 = sys.version_info.major == 2 # add __version__, __author__, __authoremail__, __description__ to this namespace # equivalent to: if _PY2: execfile("./dimod/package_info.py") else: exec(open("./dimod/package_info.py").read()) install_requires = ['decorator==4.1.2', 'enum34==1.1.6'] tests_require = ['numpy'] extras_require = {'tests': tests_require, 'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'], 'all': ['numpy']} packages = ['dimod', 'dimod.responses', 'dimod.composites', 'dimod.samplers'] setup( name='dimod', version=__version__, author=__author__, author_email=__authoremail__, description=__description__, url='https://github.com/dwavesystems/dimod', download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz', license='Apache 2.0', packages=packages, install_requires=install_requires, extras_require=extras_require, tests_require=tests_require )
from __future__ import absolute_import import sys from setuptools import setup _PY2 = sys.version_info.major == 2 # add __version__, __author__, __authoremail__, __description__ to this namespace # equivalent to: if _PY2: execfile("./dimod/package_info.py") else: exec(open("./dimod/package_info.py").read()) install_requires = ['decorator==4.1.2', 'enum34==1.1.6'] tests_require = ['numpy==1.13.3', 'networkx==2.0'] extras_require = {'tests': tests_require, 'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'], 'all': ['numpy']} packages = ['dimod', 'dimod.responses', 'dimod.composites', 'dimod.samplers'] setup( name='dimod', version=__version__, author=__author__, author_email=__authoremail__, description=__description__, url='https://github.com/dwavesystems/dimod', download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz', license='Apache 2.0', packages=packages, install_requires=install_requires, extras_require=extras_require, tests_require=tests_require )
Add networkx to test dependencies
Add networkx to test dependencies
Python
apache-2.0
oneklc/dimod,oneklc/dimod
--- +++ @@ -15,7 +15,8 @@ install_requires = ['decorator==4.1.2', 'enum34==1.1.6'] -tests_require = ['numpy'] +tests_require = ['numpy==1.13.3', + 'networkx==2.0'] extras_require = {'tests': tests_require, 'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'], 'all': ['numpy']}
e89b79a7308247ac7bea251b28674274460ed424
setup.py
setup.py
from setuptools import setup, find_packages setup( name = "django-test-utils", version = "0.3", packages = find_packages(), author = "Eric Holscher", author_email = "eric@ericholscher.com", description = "A package to help testing in Django", url = "http://github.com/ericholscher/django-test-utils/tree/master", download_url='http://www.github.com/ericholscher/django-test-utils/tarball/0.3.0', test_suite = "test_project.run_tests.run_tests", include_package_data = True, install_requires=[ 'BeautifulSoup', ] )
from setuptools import setup, find_packages setup( name = "django-test-utils", version = "0.3", packages = find_packages(), author = "Eric Holscher", author_email = "eric@ericholscher.com", description = "A package to help testing in Django", url = "http://github.com/ericholscher/django-test-utils/tree/master", download_url='http://www.github.com/ericholscher/django-test-utils/tarball/0.3.0', test_suite = "test_project.run_tests.run_tests", include_package_data = True, install_requires=[ 'BeautifulSoup', 'twill', ] )
Add twill to install requires.
Add twill to install requires.
Python
mit
ericholscher/django-test-utils,ericholscher/django-test-utils
--- +++ @@ -13,5 +13,6 @@ include_package_data = True, install_requires=[ 'BeautifulSoup', + 'twill', ] )
2ed692aeed1fd56f0990efe47021202a4336102c
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup from beastling import __version__ as version requires = [ 'six', 'newick>=0.6.0', 'appdirs', 'clldutils~=2.0', 'pycldf', ] setup( name='beastling', version=version, description='Command line tool to help mortal linguists use BEAST', author='Luke Maurits', author_email='luke@maurits.id.au', license="BSD (3 clause)", classifiers=[ 'Programming Language :: Python', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'License :: OSI Approved :: BSD License', ], packages=['beastling','beastling.clocks','beastling.fileio','beastling.models'], install_requires=requires, tests_require=['mock==1.0.0', 'nose'], entry_points={ 'console_scripts': ['beastling=beastling.cli:main'], }, package_data={'beastling': ['data/*']}, )
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup from beastling import __version__ as version requires = [ 'six', 'newick>=0.6.0', 'appdirs', 'clldutils~=2.0', 'pycldf', ] setup( name='beastling', version=version, description='Command line tool to help mortal linguists use BEAST', author='Luke Maurits', author_email='luke@maurits.id.au', license="BSD (3 clause)", classifiers=[ 'Programming Language :: Python', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'License :: OSI Approved :: BSD License', ], packages=['beastling','beastling.clocks','beastling.fileio','beastling.models','beastling.treepriors'], install_requires=requires, tests_require=['mock==1.0.0', 'nose'], entry_points={ 'console_scripts': ['beastling=beastling.cli:main'], }, package_data={'beastling': ['data/*']}, )
Install the treepriors package along with everything else. Feels very wrong that these need to be manually declared one-by-one, but oh well.
Install the treepriors package along with everything else. Feels very wrong that these need to be manually declared one-by-one, but oh well.
Python
bsd-2-clause
lmaurits/BEASTling
--- +++ @@ -32,7 +32,7 @@ 'Programming Language :: Python :: 3.5', 'License :: OSI Approved :: BSD License', ], - packages=['beastling','beastling.clocks','beastling.fileio','beastling.models'], + packages=['beastling','beastling.clocks','beastling.fileio','beastling.models','beastling.treepriors'], install_requires=requires, tests_require=['mock==1.0.0', 'nose'], entry_points={
4128c784bc1e169085219f201b3ed326a3259e53
setup.py
setup.py
from setuptools import setup, find_packages requires = [ 'amaasutils', 'configparser', 'python-dateutil', 'pytz', 'requests', 'warrant' ] setup( name='amaascore', version='0.3.1', 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.3.2', 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 for the new ‘local’ mode.
Increment version for the new ‘local’ mode.
Python
apache-2.0
amaas-fintech/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,nedlowe/amaas-core-sdk-python,paul-rs/amaas-core-sdk-python,amaas-fintech/amaas-core-sdk-python
--- +++ @@ -11,7 +11,7 @@ setup( name='amaascore', - version='0.3.1', + version='0.3.2', description='Asset Management as a Service - Core SDK', license='Apache License 2.0', url='https://github.com/amaas-fintech/amaas-core-sdk-python',
378176a741339f4790bc74978cbefac12e89ffa1
setup.py
setup.py
from setuptools import setup setup(name='cycli', version='0.0.1', description='A Command Line Interface for Cypher.', long_description='Syntax highlighting and autocomplete.', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Topic :: Neo4j :: Cypher', ], keywords='neo4j cypher cli syntax autocomplete', url='https://github.com/nicolewhite/cycli', author='Nicole White', author_email='nicole@neotechnology.com', license='MIT', packages=['cycli'], install_requires=[ 'prompt-toolkit==0.43', 'py2neo==2.0.7', 'requests==2.7.0', ], include_package_data=True, zip_safe=False, entry_points={ 'console_scripts': [ 'cycli = cycli.main:run' ] })
from setuptools import setup setup(name='cycli', version='0.0.1', description='A Command Line Interface for Cypher.', long_description='Syntax highlighting and autocomplete.', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Topic :: Neo4j :: Cypher', ], keywords='neo4j cypher cli syntax autocomplete', url='https://github.com/nicolewhite/cycli', author='Nicole White', author_email='nicole@neotechnology.com', license='MIT', packages=['cycli'], install_requires=[ 'prompt-toolkit==0.43', 'Pygments==2.0.2', 'py2neo==2.0.7', 'requests==2.7.0', ], include_package_data=True, zip_safe=False, entry_points={ 'console_scripts': [ 'cycli = cycli.main:run' ] })
Add Pygments to install requirements
Add Pygments to install requirements
Python
mit
nicolewhite/cycli,ikwattro/cycli,nicolewhite/cycli
--- +++ @@ -18,6 +18,7 @@ packages=['cycli'], install_requires=[ 'prompt-toolkit==0.43', + 'Pygments==2.0.2', 'py2neo==2.0.7', 'requests==2.7.0', ],
f1a791590e49ed12f6d56df3eb1240c5409175de
setup.py
setup.py
from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() setup(name='subvenv', version='1.0.0', description=('A tool for creating virtualenv-friendly ' 'Sublime Text project files'), long_description=readme(), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', ], url='http://github.com/Railslide/subvenv', author='Giulia Vergottini', author_email='hello@railslide.io', license='MIT', packages=find_packages(), install_requires=[ 'click', ], test_suite='subvenv.tests', tests_require='nose', entry_points={ 'virtualenvwrapper.project.post_mkproject': [ 'subvenv = subvenv.core:post_mkproject', ], 'console_scripts': [ 'subvenv = subvenv.core:cli' ], }, include_package_data=True, zip_safe=False)
#!/usr/bin/env python from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() setup(name='subvenv', version='1.0.0', description=('A tool for creating virtualenv-friendly ' 'Sublime Text project files'), long_description=readme(), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', ], url='http://github.com/Railslide/subvenv', author='Giulia Vergottini', author_email='hello@railslide.io', license='MIT', packages=find_packages('subvenv', exclude=['tests']), install_requires=[ 'click', ], test_suite='subvenv.tests', tests_require='nose', entry_points={ 'virtualenvwrapper.project.post_mkproject': [ 'subvenv = subvenv.core:post_mkproject', ], 'console_scripts': [ 'subvenv = subvenv.core:cli' ], }, include_package_data=True, zip_safe=False)
Exclude tests and devtools when packaging
Exclude tests and devtools when packaging
Python
mit
Railslide/subvenv,Railslide/subvenv
--- +++ @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from setuptools import setup, find_packages @@ -26,7 +28,7 @@ author='Giulia Vergottini', author_email='hello@railslide.io', license='MIT', - packages=find_packages(), + packages=find_packages('subvenv', exclude=['tests']), install_requires=[ 'click', ],
d468993dc3cac11cefdf090506b3f9122d248046
setup.py
setup.py
from setuptools import setup setup( name='tangled.mako', version='0.1a4.dev0', description='Tangled Mako integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.mako/tags', author='Wyatt Baldwin', author_email='self@wyattbaldwin.com', include_package_data=True, packages=[ 'tangled', 'tangled.mako', 'tangled.mako.tests', ], install_requires=[ 'tangled.web>=0.1a10', 'Mako>=1.0', ], extras_require={ 'dev': [ 'tangled.web[dev]>=0.1a10', ], }, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], )
from setuptools import setup setup( name='tangled.mako', version='0.1a4.dev0', description='Tangled Mako integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.mako/tags', author='Wyatt Baldwin', author_email='self@wyattbaldwin.com', include_package_data=True, packages=[ 'tangled', 'tangled.mako', 'tangled.mako.tests', ], install_requires=[ 'tangled.web>=0.1a10', 'Mako>=1.0', ], extras_require={ 'dev': [ 'tangled[dev]>=0.1a9', 'tangled.web[dev]>=0.1a10', ], }, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], )
Add tangled to dev requirements
Add tangled to dev requirements Although `tangled.web[dev]` is already in the dev requirements and `tangled.web`'s dev requirememts include `tangled[dev]`, it seems that `tangled`'s dev requirements aren't being pulled in via `tangled.web`. Not sure if this intentional on the part of pip/setuptools or what.
Python
mit
TangledWeb/tangled.mako
--- +++ @@ -22,6 +22,7 @@ ], extras_require={ 'dev': [ + 'tangled[dev]>=0.1a9', 'tangled.web[dev]>=0.1a10', ], },
0d26a4163fff1107c322eaa206b8221d73f38b20
setup.py
setup.py
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-speedbar', version='0.1', packages = find_packages(), include_package_data=True, license='MIT License', description='Provides a break down of page loading time', long_description=README, url='http://github.com/theospears/django-speedbar', author='Theo Spears', author_email='theo@mixcloud.com', classifiers=[ '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', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], install_requires = [ 'ProxyTypes>=0.9', 'Django >=1.5, <1.6a0', ], )
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as file_handle: README = file_handle.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-speedbar', version='0.1', packages = find_packages(), include_package_data=True, license='MIT License', description='Provides a break down of page loading time', long_description=README, url='http://github.com/theospears/django-speedbar', author='Theo Spears', author_email='theo@mixcloud.com', classifiers=[ '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', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], install_requires = [ 'ProxyTypes>=0.9', 'Django >=1.5, <1.6a0', ], )
Use with statement to ensure file is closed afterwards
Use with statement to ensure file is closed afterwards
Python
mit
mixcloud/django-speedbar,theospears/django-speedbar,theospears/django-speedbar,theospears/django-speedbar,mixcloud/django-speedbar,mixcloud/django-speedbar
--- +++ @@ -1,7 +1,8 @@ import os from setuptools import setup, find_packages -README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() +with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as file_handle: + README = file_handle.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
ff9c10368dcee1ed1f8ba5a978c99d9eae71b752
setup.py
setup.py
import os import setuptools setuptools.setup( name='factory_djoy', version='0.1', description="Wrappers over Factory Boy's Django Factories", url='http://github.com/jamescooke/factory_djoy', author='James Cooke', author_email='github@jamescooke.info', license='MIT', packages=setuptools.find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Framework :: Django', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3.4', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os import setuptools setuptools.setup( name='factory_djoy', version='0.1', description="Wrappers over Factory Boy's Django Factories", url='http://github.com/jamescooke/factory_djoy', author='James Cooke', author_email='github@jamescooke.info', license='MIT', packages=setuptools.find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), install_requires=[ 'Django>=1.6', 'factory_boy>=2', ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Framework :: Django', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3.4', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Install relies on Django and factory boy
Install relies on Django and factory boy
Python
mit
jamescooke/factory_djoy
--- +++ @@ -5,12 +5,20 @@ setuptools.setup( name='factory_djoy', version='0.1', + description="Wrappers over Factory Boy's Django Factories", url='http://github.com/jamescooke/factory_djoy', author='James Cooke', author_email='github@jamescooke.info', + license='MIT', + packages=setuptools.find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), + install_requires=[ + 'Django>=1.6', + 'factory_boy>=2', + ], + classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',
8337a3912533dfb7d686a453c53adcda783a50a4
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages from sys import version_info version = "1.3" deps = ["pbs", "requests>=0.12.1"] # require argparse on Python <2.7 and <3.2 if (version_info[0] == 2 and version_info[1] < 7) or \ (version_info[0] == 3 and version_info[1] < 2): deps.append("argparse") setup(name="livestreamer", version=version, description="CLI program that launches streams from various streaming services in a custom video player", url="https://github.com/chrippa/livestreamer", author="Christopher Rosell", author_email="chrippa@tanuki.se", license="BSD", packages=["livestreamer", "livestreamer/plugins"], package_dir={'': 'src'}, entry_points={ "console_scripts": ['livestreamer=livestreamer.cli:main'] }, install_requires=deps, classifiers=["Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Environment :: Console", "Development Status :: 5 - Production/Stable", "Topic :: Internet :: WWW/HTTP", "Topic :: Multimedia :: Sound/Audio", "Topic :: Utilities"] )
#!/usr/bin/env python from setuptools import setup, find_packages from sys import version_info version = "1.3" deps = ["pbs", "requests>=0.12.1"] # require argparse on Python <2.7 and <3.2 if (version_info[0] == 2 and version_info[1] < 7) or \ (version_info[0] == 3 and version_info[1] < 2): deps.append("argparse") setup(name="livestreamer", version=version, description="CLI program that launches streams from various streaming services in a custom video player", url="https://github.com/chrippa/livestreamer", author="Christopher Rosell", author_email="chrippa@tanuki.se", license="BSD", packages=["livestreamer", "livestreamer.stream", "livestreamer.plugins"], package_dir={'': 'src'}, entry_points={ "console_scripts": ['livestreamer=livestreamer.cli:main'] }, install_requires=deps, classifiers=["Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Environment :: Console", "Development Status :: 5 - Production/Stable", "Topic :: Internet :: WWW/HTTP", "Topic :: Multimedia :: Sound/Audio", "Topic :: Utilities"] )
Add .stream to packages list.
Add .stream to packages list.
Python
bsd-2-clause
gravyboat/streamlink,javiercantero/streamlink,melmorabity/streamlink,asermax/livestreamer,lyhiving/livestreamer,chhe/livestreamer,derrod/livestreamer,gravyboat/streamlink,okaywit/livestreamer,Dobatymo/livestreamer,fishscene/streamlink,sbstp/streamlink,programming086/livestreamer,melmorabity/streamlink,fishscene/streamlink,wolftankk/livestreamer,Dobatymo/livestreamer,blxd/livestreamer,chrisnicholls/livestreamer,Masaz-/livestreamer,gtmanfred/livestreamer,wolftankk/livestreamer,okaywit/livestreamer,breunigs/livestreamer,blxd/livestreamer,beardypig/streamlink,streamlink/streamlink,sbstp/streamlink,Klaudit/livestreamer,charmander/livestreamer,Feverqwe/livestreamer,lyhiving/livestreamer,beardypig/streamlink,intact/livestreamer,gtmanfred/livestreamer,bastimeyer/streamlink,wlerin/streamlink,ethanhlc/streamlink,flijloku/livestreamer,chhe/streamlink,flijloku/livestreamer,jtsymon/livestreamer,back-to/streamlink,derrod/livestreamer,programming086/livestreamer,hmit/livestreamer,bastimeyer/streamlink,streamlink/streamlink,Feverqwe/livestreamer,caorong/livestreamer,ethanhlc/streamlink,intact/livestreamer,chhe/streamlink,chhe/livestreamer,mmetak/streamlink,chrippa/livestreamer,hmit/livestreamer,javiercantero/streamlink,jtsymon/livestreamer,back-to/streamlink,charmander/livestreamer,Saturn/livestreamer,Masaz-/livestreamer,breunigs/livestreamer,caorong/livestreamer,Saturn/livestreamer,Klaudit/livestreamer,mmetak/streamlink,chrippa/livestreamer,wlerin/streamlink
--- +++ @@ -18,7 +18,7 @@ author="Christopher Rosell", author_email="chrippa@tanuki.se", license="BSD", - packages=["livestreamer", "livestreamer/plugins"], + packages=["livestreamer", "livestreamer.stream", "livestreamer.plugins"], package_dir={'': 'src'}, entry_points={ "console_scripts": ['livestreamer=livestreamer.cli:main']
6278551c5d3a206231aae5ae810e3d7eef2d839e
setup.py
setup.py
import setuptools # How do we keep this in sync with requirements.pip? # REQUIREMENTS = [ "nose==1.3.0", "python-dateutil==1.5", ] if __name__ == "__main__": setuptools.setup( name="jsond", version="0.0.1", author="Sujay Mansingh", author_email="sujay.mansingh@gmail.com", packages=setuptools.find_packages(), scripts=[], url="https://github.com/sujaymansingh/jsond", license="LICENSE.txt", description="JSON (with dates)", long_description="View the github page (https://github.com/sujaymansingh/jsond) for more details.", install_requires=REQUIREMENTS )
import setuptools # How do we keep this in sync with requirements.pip? # REQUIREMENTS = [ "nose==1.3.0", "python-dateutil==1.5", ] if __name__ == "__main__": setuptools.setup( name="jsond", version="0.0.1", author="EDITD", author_email="engineering@editd.com", packages=setuptools.find_packages(), scripts=[], url="https://github.com/EDITD/jsond", license="LICENSE.txt", description="JSON (with dates)", long_description="View the github page (https://github.com/EDITD/jsond) for more details.", install_requires=REQUIREMENTS )
Update README with new owner.
Update README with new owner.
Python
mit
EDITD/jsond
--- +++ @@ -13,13 +13,13 @@ setuptools.setup( name="jsond", version="0.0.1", - author="Sujay Mansingh", - author_email="sujay.mansingh@gmail.com", + author="EDITD", + author_email="engineering@editd.com", packages=setuptools.find_packages(), scripts=[], - url="https://github.com/sujaymansingh/jsond", + url="https://github.com/EDITD/jsond", license="LICENSE.txt", description="JSON (with dates)", - long_description="View the github page (https://github.com/sujaymansingh/jsond) for more details.", + long_description="View the github page (https://github.com/EDITD/jsond) for more details.", install_requires=REQUIREMENTS )
a0d565f425f61186c8087aba5a9b87450455a360
setup.py
setup.py
from setuptools import setup def readme(): with open('README.md') as file: return file.read() setup( name='ppb-vector', version='0.4.0rc1', packages=['ppb_vector'], url='http://github.com/pathunstrom/ppb-vector', license='', author='Piper Thunstrom', author_email='pathunstrom@gmail.com', description='A basic game development Vector2 class.', long_description=readme(), long_description_content_type="text/markdown", classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Libraries', 'Topic :: Scientific/Engineering :: Mathematics', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], zip_safe=True, )
from setuptools import setup def readme(): with open('README.md') as file: return file.read() setup( name='ppb-vector', version='0.4.0rc1', packages=['ppb_vector'], url='http://github.com/pathunstrom/ppb-vector', license='', author='Piper Thunstrom', author_email='pathunstrom@gmail.com', description='A basic game development Vector2 class.', install_requires=[ "dataclasses; python_version < '3.7'", ], long_description=readme(), long_description_content_type="text/markdown", classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Topic :: Software Development :: Libraries', 'Topic :: Scientific/Engineering :: Mathematics', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], zip_safe=True, )
Add dependency on the dataclasses library
Add dependency on the dataclasses library This dependency is optional in Python 3.7 or later, as [PEP 557] made it part of the standard library. [PEP 557]: https://www.python.org/dev/peps/pep-0557/
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
--- +++ @@ -15,6 +15,9 @@ author='Piper Thunstrom', author_email='pathunstrom@gmail.com', description='A basic game development Vector2 class.', + install_requires=[ + "dataclasses; python_version < '3.7'", + ], long_description=readme(), long_description_content_type="text/markdown", classifiers=[
bb8bd0cd51dd74de492beb785eca4d5ff31a2867
setup.py
setup.py
from setuptools import setup setup( name="shinkengen", version='0.1', author="Yuvi Panda", author_email="yuvipanda@gmail.com", description=("A shinken config generator for Wikimedia Labs"), license="Apache2", url="https://github.com/halfak/MediaWiki-OAuth", packages=['shingen'], install_requires=[ 'jinja2', 'pyyaml', ], )
from setuptools import setup setup( name="shinkengen", version='0.1', author="Yuvi Panda", author_email="yuvipanda@gmail.com", description=("A shinken config generator for Wikimedia Labs"), license="Apache2", url="https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen", packages=['shingen'], install_requires=[ 'jinja2', 'pyyaml', ], )
Fix URL to point to the proper git repository
Fix URL to point to the proper git repository Change-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115
Python
apache-2.0
wikimedia/operations-software-shinkengen
--- +++ @@ -7,7 +7,7 @@ author_email="yuvipanda@gmail.com", description=("A shinken config generator for Wikimedia Labs"), license="Apache2", - url="https://github.com/halfak/MediaWiki-OAuth", + url="https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/shinkengen", packages=['shingen'], install_requires=[ 'jinja2',
142d999797bd1fe723c159f9fd6379414cee537c
setup.py
setup.py
"""Setup script for admin-tools-zinnia""" from setuptools import setup from setuptools import find_packages import admin_tools_zinnia setup( name='admin_tools_zinnia', version=admin_tools_zinnia.__version__, description='Admin tools for django-blog-zinnia', long_description=open('README.rst').read(), keywords='django, blog, weblog, zinnia, admin, dashboard', author=admin_tools_zinnia.__author__, author_email=admin_tools_zinnia.__email__, url=admin_tools_zinnia.__url__, packages=find_packages(exclude=['demo_admin_tools_zinnia']), classifiers=[ 'Framework :: Django', 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules'], license=admin_tools_zinnia.__license__, include_package_data=True, zip_safe=False )
"""Setup script for admin-tools-zinnia""" from setuptools import setup from setuptools import find_packages import admin_tools_zinnia setup( name='admin-tools-zinnia', version=admin_tools_zinnia.__version__, description='Admin tools for django-blog-zinnia', long_description=open('README.rst').read(), keywords='django, blog, weblog, zinnia, admin, dashboard', author=admin_tools_zinnia.__author__, author_email=admin_tools_zinnia.__email__, url=admin_tools_zinnia.__url__, packages=find_packages(exclude=['demo_admin_tools_zinnia']), classifiers=[ 'Framework :: Django', 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules'], license=admin_tools_zinnia.__license__, include_package_data=True, zip_safe=False )
Change name of the package from admin_tools_zinnia to admin-tools-zinnia
Change name of the package from admin_tools_zinnia to admin-tools-zinnia
Python
bsd-3-clause
django-blog-zinnia/admin-tools-zinnia,django-blog-zinnia/admin-tools-zinnia
--- +++ @@ -5,7 +5,7 @@ import admin_tools_zinnia setup( - name='admin_tools_zinnia', + name='admin-tools-zinnia', version=admin_tools_zinnia.__version__, description='Admin tools for django-blog-zinnia',
069c11f5db1dc3bc6de88a14bd1ae573c5853f00
setup.py
setup.py
#!/usr/bin/env python """ Install wagtailnews using setuptools """ from wagtailnews import __version__ with open('README.rst', 'r') as f: readme = f.read() try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='wagtailnews', version=__version__, description='News / blog plugin for the Wagtail CMS', long_description=readme, author='Tim Heap', author_email='tim@takeflight.com.au', url='https://bitbucket.org/takeflight/wagtailnews', install_requires=['wagtail>=0.7'], zip_safe=False, license='BSD License', packages=find_packages(), include_package_data=True, package_data={ }, classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', ], )
#!/usr/bin/env python """ Install wagtailnews using setuptools """ from wagtailnews import __version__ with open('README.rst', 'r') as f: readme = f.read() try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='wagtailnews', version=__version__, description='News / blog plugin for the Wagtail CMS', long_description=readme, author='Tim Heap', author_email='tim@takeflight.com.au', url='https://bitbucket.org/takeflight/wagtailnews', install_requires=['wagtail>=0.9'], zip_safe=False, license='BSD License', packages=find_packages(), include_package_data=True, package_data={}, classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', ], )
Edit handler fix is backwards incompatible with Wagtail <= 0.8
Edit handler fix is backwards incompatible with Wagtail <= 0.8
Python
bsd-3-clause
SableWalnut/wagtailjobs,SableWalnut/wagtailinvoices,takeflight/wagtailnews,takeflight/wagtailnews,SableWalnut/wagtailjobs,takeflight/wagtailnews,SableWalnut/wagtailinvoices,takeflight/wagtailnews
--- +++ @@ -24,14 +24,14 @@ author_email='tim@takeflight.com.au', url='https://bitbucket.org/takeflight/wagtailnews', - install_requires=['wagtail>=0.7'], + install_requires=['wagtail>=0.9'], zip_safe=False, license='BSD License', packages=find_packages(), include_package_data=True, - package_data={ }, + package_data={}, classifiers=[ 'Environment :: Web Environment',
7eb57a623b4f915dac0cdf7fdd0eb74d77c51b5c
setup.py
setup.py
# coding: utf-8 import sys from setuptools import setup install_requires = [] if sys.version_info < (2, 7): raise DeprecationWarning('Python 2.6 and older are no longer supported by PAY.JP. ') install_requires.append('requests >= 2.7.0') install_requires.append('six >= 1.9.0') setup( name="payjp", version="0.0.1", description='PAY.JP python bindings', author="PAY.JP", author_email='support@pay.jp', packages=['payjp', 'payjp.test'], url='https://github.com/payjp/payjp-python', install_requires=install_requires, test_suite='payjp.test.all', )
# coding: utf-8 import sys from setuptools import setup install_requires = [] if sys.version_info < (2, 7): raise DeprecationWarning('Python 2.6 and older are no longer supported by PAY.JP. ') install_requires.append('requests >= 2.7.0') install_requires.append('six >= 1.9.0') setup( name="payjp", version="0.0.1", description='PAY.JP python bindings', author="PAY.JP", author_email='support@pay.jp', packages=['payjp', 'payjp.test'], url='https://github.com/payjp/payjp-python', install_requires=install_requires, tests_require=[ 'mock >= 1.3.0' ], test_suite='payjp.test.all', )
Add missing dependency required to run tests.
Add missing dependency required to run tests.
Python
mit
payjp/payjp-python
--- +++ @@ -21,5 +21,8 @@ packages=['payjp', 'payjp.test'], url='https://github.com/payjp/payjp-python', install_requires=install_requires, + tests_require=[ + 'mock >= 1.3.0' + ], test_suite='payjp.test.all', )
f9af01b416246edfa002c22b5664f7c2e8a66b22
setup.py
setup.py
import os from setuptools import setup, find_packages overview = file('docs/overview.txt') data = overview.read() overview.close() setup( name='dinette', description='Dinette is a forum application in the spirit of PunBB.', keywords='django, forum', packages=find_packages(), include_package_data=True, zip_safe=False, version="1.2", author="Agiliq Solutions", author_email="hello@agiliq.com", long_description= data, classifiers = ['Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Internet :: WWW/HTTP :: WSGI', 'Topic :: Software Development :: Libraries :: Application Frameworks', 'Topic :: Software Development :: Libraries :: Python Modules', ], url="http://www.agiliq.com/", license="GPL", platforms=["all"], )
import os from setuptools import setup, find_packages overview = file('docs/overview.txt') data = overview.read() overview.close() setup( name='dinette', description='Dinette is a forum application in the spirit of PunBB.', keywords='django, forum', packages=find_packages(exclude=["forum", "forum.*"]), include_package_data=True, zip_safe=False, version="1.2", author="Agiliq Solutions", author_email="hello@agiliq.com", long_description= data, classifiers = ['Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Internet :: WWW/HTTP :: WSGI', 'Topic :: Software Development :: Libraries :: Application Frameworks', 'Topic :: Software Development :: Libraries :: Python Modules', ], url="http://www.agiliq.com/", license="GPL", platforms=["all"], )
Stop installing the 'forum' demo project (but still ship it in the release tarball).
Stop installing the 'forum' demo project (but still ship it in the release tarball).
Python
bsd-3-clause
agiliq/Dinette,agiliq/Dinette,agiliq/Dinette
--- +++ @@ -9,7 +9,7 @@ name='dinette', description='Dinette is a forum application in the spirit of PunBB.', keywords='django, forum', - packages=find_packages(), + packages=find_packages(exclude=["forum", "forum.*"]), include_package_data=True, zip_safe=False, version="1.2",
309fcf2b4a429396016716545a9982cf62a2a089
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup from distutils.extension import Extension #from Cython.Distutils import build_ext import numpy from numpy.distutils.system_info import get_info mpfit_sources = [ 'mpyfit/mpyfit.c', 'mpyfit/cmpfit/mpfit.c', ] # Avoid some numpy warnings, dependent on the numpy version npy_api_version = "NPY_{0}_{1}_API_VERSION".format( *(numpy.__version__.split('.')[:2])) setup( name='mpyfit', version='0.9.0', license='BSD 2 part license', maintainer='Evert Rol', maintainer_email='e.rol@sron.nl', packages=['mpyfit'], url='https://github.com/evertrol/mpyfit', classifiers=[ 'Intentended Audience :: Science/Research', 'Topic :: Scientific/Engineering', 'Programing Language :: Python', 'Licence :: OSI Approved :: BSD License', ], ext_modules=[ Extension( 'mpyfit.mpfit', sources=mpfit_sources, include_dirs=['mpyfit/cmpfit', numpy.get_include()], extra_compile_args=['-std=c99 ' '-DNPY_NO_DEPRECATED_API={0}'.format( npy_api_version)] ), ] )
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup from distutils.core import Extension #from Cython.Distutils import build_ext import numpy from numpy.distutils.system_info import get_info mpfit_sources = [ 'mpyfit/mpyfit.c', 'mpyfit/cmpfit/mpfit.c', ] # Avoid some numpy warnings, dependent on the numpy version npy_api_version = "NPY_{0}_{1}_API_VERSION".format( *(numpy.__version__.split('.')[:2])) setup( name='mpyfit', version='0.9.0', license='BSD 2 part license', maintainer='Evert Rol', maintainer_email='e.rol@sron.nl', packages=['mpyfit'], url='https://github.com/evertrol/mpyfit', classifiers=[ 'Intentended Audience :: Science/Research', 'Topic :: Scientific/Engineering', 'Programing Language :: Python', 'Licence :: OSI Approved :: BSD License', ], ext_modules=[ Extension( 'mpyfit.mpfit', sources=mpfit_sources, include_dirs=['mpyfit/cmpfit', numpy.get_include()], extra_compile_args=['-std=c99', '-Wno-declaration-after-statement', '-DNPY_NO_DEPRECATED_API={0}'.format( npy_api_version)] ), ] )
Fix for Python 3.4 extension compilation.
Fix for Python 3.4 extension compilation. An extra extension compilation option introduced in Python 3.4 collided with -std=c99; added -Wno-declaration-after-statement negates this.
Python
bsd-2-clause
evertrol/mpyfit,evertrol/mpyfit
--- +++ @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup -from distutils.extension import Extension +from distutils.core import Extension #from Cython.Distutils import build_ext import numpy from numpy.distutils.system_info import get_info @@ -34,7 +34,8 @@ 'mpyfit.mpfit', sources=mpfit_sources, include_dirs=['mpyfit/cmpfit', numpy.get_include()], - extra_compile_args=['-std=c99 ' + extra_compile_args=['-std=c99', + '-Wno-declaration-after-statement', '-DNPY_NO_DEPRECATED_API={0}'.format( npy_api_version)] ),
d0bba10a15863b1353e07ca1a467684d7e9e1f26
setup.py
setup.py
# coding=utf-8 from setuptools import setup setup( name='imboclient', version='0.0.1', author='Andreas Søvik', author_email='arsovik@gmail.com', packages=['imboclient'], scripts=[], url='http://www.imbo-project.org', license='LICENSE.txt', description='Python client for Imbo', long_description=open('README.md').read(), install_requires=['requests', 'nose', 'mock', 'coverage'], )
# coding=utf-8 from setuptools import setup setup( name='imboclient', version='0.0.1', author='Andreas Søvik', author_email='arsovik@gmail.com', packages=['imboclient'], scripts=[], url='http://www.imbo-project.org', license='LICENSE.txt', description='Python client for Imbo', long_description=open('README.md').read(), install_requires=['requests', 'nose', 'mock', 'coverage'], package_data={'imboclient': ['header/*', 'url/*'], }, )
Add header and url to package_data to fix pip installs from VCS
Add header and url to package_data to fix pip installs from VCS pip installations directly from VCS does not include the `header` and `url` modules by default, so they have to be included in the `package_data` dependency in setup.py.
Python
mit
imbo/imboclient-python,imbo/imboclient-python,imbo/imboclient-python
--- +++ @@ -13,5 +13,6 @@ description='Python client for Imbo', long_description=open('README.md').read(), install_requires=['requests', 'nose', 'mock', 'coverage'], + package_data={'imboclient': ['header/*', 'url/*'], }, )
73db41caecde2e9ea33f1f260a76f917b700e0b4
setup.py
setup.py
import os from setuptools import setup, find_packages def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() setup( name='utinypass', version='0.1.0', description='Parse and split PEM files painlessly.', long_description=(read('README.rst') + '\n\n' + read('HISTORY.rst') + '\n\n' + read('AUTHORS.rst') + '\n\n' + read(('TODO.rst')), url='http://github.com/gfranxman/utinypass/', license='MIT', author='Glenn Franxman', author_email='gfranxman@gmail.com', py_modules=['utinypass'], include_package_data=True, packages=find_packages(exclude=['tests*']), install_requires=['pprp',], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT 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.3', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os from setuptools import setup, find_packages def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() setup( name='utinypass', version='0.1.0', description='Parse and split PEM files painlessly.', long_description=(read('README.rst') + '\n\n' + read('HISTORY.rst') + '\n\n' + read('AUTHORS.rst') + '\n\n' + read('TODO.rst')), url='http://github.com/gfranxman/utinypass/', license='MIT', author='Glenn Franxman', author_email='gfranxman@gmail.com', py_modules=['utinypass'], include_package_data=True, packages=find_packages(exclude=['tests*']), install_requires=['pprp',], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT 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.3', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Fix the inclusion of the TODO.rst file.
Fix the inclusion of the TODO.rst file.
Python
mit
gfranxman/utinypass
--- +++ @@ -14,7 +14,7 @@ long_description=(read('README.rst') + '\n\n' + read('HISTORY.rst') + '\n\n' + read('AUTHORS.rst') + '\n\n' + - read(('TODO.rst')), + read('TODO.rst')), url='http://github.com/gfranxman/utinypass/', license='MIT', author='Glenn Franxman',
88767427f4f3215f2aafe579c84c55457706e011
setup.py
setup.py
from distutils.core import setup setup( author = 'Simon Whitaker', author_email = 'simon@goosoftware.co.uk', description = 'A python library for interacting with the Apple Push Notification Service', download_url = 'http://github.com/simonwhitaker/PyAPNs', license = 'unlicense.org', name = 'apns', py_modules = ['apns'], scripts = ['apns-send'], url = 'http://www.goosoftware.co.uk/', version = '2.0.0', )
from distutils.core import setup setup( author = 'Simon Whitaker', author_email = 'simon@goosoftware.co.uk', description = 'A python library for interacting with the Apple Push Notification Service', download_url = 'http://github.com/simonwhitaker/PyAPNs', license = 'unlicense.org', name = 'apns', py_modules = ['apns'], scripts = ['apns-send'], url = 'http://www.goosoftware.co.uk/', version = '2.0.1', )
Prepare package for v2.0.1 release
Prepare package for v2.0.1 release The most important change in this release is the fix for the `apns-send` error when attempting to `pip install` this package.
Python
mit
postmates/PyAPNs,RatenGoods/PyAPNs,miraculixx/PyAPNs,korhner/PyAPNs,tenmalin/PyAPNs,duanhongyi/PyAPNs,AlexKordic/PyAPNs
--- +++ @@ -10,5 +10,5 @@ py_modules = ['apns'], scripts = ['apns-send'], url = 'http://www.goosoftware.co.uk/', - version = '2.0.0', + version = '2.0.1', )
b4cf2ba407859705c9b0c5faa20d28b743aefeb9
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django<1.9rc1', 'django-compressor', 'django_mobileesp', 'uw-restclients==1.1', 'django-htmlmin', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django<1.9rc1', 'django-compressor', 'django_mobileesp', 'uw-restclients', 'django-htmlmin', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
Revert "Pinning restclients to 1.1."
Revert "Pinning restclients to 1.1." This reverts commit 0d33ddd392d33c7eca57289554feedd25b851ca2.
Python
apache-2.0
charlon/mdot,uw-it-aca/mdot,charlon/mdot,uw-it-aca/mdot,uw-it-aca/mdot,charlon/mdot,uw-it-aca/mdot
--- +++ @@ -16,7 +16,7 @@ 'django<1.9rc1', 'django-compressor', 'django_mobileesp', - 'uw-restclients==1.1', + 'uw-restclients', 'django-htmlmin', ], license='Apache License, Version 2.0',
5eabea682317fe53d89fcf1b2ec98a1f44de51d3
rt/syslog/simpleConfig.py
rt/syslog/simpleConfig.py
# capture executables on all nodes hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ]
# capture executables on all nodes hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['PKGS', r'.*\/python[0-9][^/][^/]*'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ] python_pkg_patterns = [ { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"^[^/]" }, # SKIP all built-in packages { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r"^_" }, # SKIP names that start with a underscore { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r".*\." }, # SKIP all names that are divided with periods: a.b.c { 'k_s' : 'KEEP', 'kind' : 'path', 'patt' : r".*/.local/" }, # KEEP all packages installed by users { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"/home" }, # SKIP all other packages in user locations ]
Add in python patterns for py pkg test
Add in python patterns for py pkg test
Python
lgpl-2.1
xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt
--- +++ @@ -3,7 +3,8 @@ ['KEEP', '.*'] ] path_patterns = [ - ['PKGS', r'.*\/test_record_pkg'], + ['PKGS', r'.*\/test_record_pkg'], + ['PKGS', r'.*\/python[0-9][^/][^/]*'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], @@ -12,3 +13,11 @@ ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ] + +python_pkg_patterns = [ + { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"^[^/]" }, # SKIP all built-in packages + { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r"^_" }, # SKIP names that start with a underscore + { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r".*\." }, # SKIP all names that are divided with periods: a.b.c + { 'k_s' : 'KEEP', 'kind' : 'path', 'patt' : r".*/.local/" }, # KEEP all packages installed by users + { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"/home" }, # SKIP all other packages in user locations +]
079240a28c648a56fd30cbf3b0b4115a7f2259bc
example.py
example.py
import requests ACCOUNT_SID = None AUTH_TOKEN = None FROM_NUMBER = None response = requests.post( 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages'.format( account_sid=ACCOUNT_SID, auth_token=AUTH_TOKEN, ), data={'From': FROM_NUMBER, 'To': '+14083945058', 'Body': "Hello!"}, ) print response.status_code
import requests ACCOUNT_SID = None AUTH_TOKEN = None FROM_NUMBER = None # Send text message response = requests.post( 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json'.format( account_sid=ACCOUNT_SID, auth_token=AUTH_TOKEN, ), data={'From': FROM_NUMBER, 'To': 'PHONE_NUMBER_GOES_HERE', 'Body': "Hello!"}, ) print response.status_code print response.content # Get message details #response = requests.get( # 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages/{message_sid}.json'.format( # account_sid=ACCOUNT_SID, # auth_token=AUTH_TOKEN, # message_sid='MESSAGE_SID_GOES_HERE', # ), #) #print response.status_code #print response.content
Add get message details code.
Add get message details code.
Python
mit
richardxia/twilio-tutorial
--- +++ @@ -4,13 +4,26 @@ AUTH_TOKEN = None FROM_NUMBER = None +# Send text message response = requests.post( - 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages'.format( + 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json'.format( account_sid=ACCOUNT_SID, auth_token=AUTH_TOKEN, ), data={'From': FROM_NUMBER, - 'To': '+14083945058', + 'To': 'PHONE_NUMBER_GOES_HERE', 'Body': "Hello!"}, ) print response.status_code +print response.content + +# Get message details +#response = requests.get( +# 'https://{account_sid}:{auth_token}@api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages/{message_sid}.json'.format( +# account_sid=ACCOUNT_SID, +# auth_token=AUTH_TOKEN, +# message_sid='MESSAGE_SID_GOES_HERE', +# ), +#) +#print response.status_code +#print response.content
88be5325c3d006b822c8d8ee2db4512ea538c800
rapidsms/views.py
rapidsms/views.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.contrib.auth.decorators import login_required from django.contrib.auth.views import login as django_login from django.contrib.auth.views import logout as django_logout from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.http import require_GET @login_required @require_GET def dashboard(req): return render_to_response( "dashboard.html", context_instance=RequestContext(req)) def login(req, template_name="rapidsms/login.html"): return django_login(req, **{"template_name": template_name}) def logout(req, template_name="rapidsms/loggedout.html"): return django_logout(req, **{"template_name": template_name})
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.contrib.auth.decorators import login_required from django.contrib.auth.views import login as django_login from django.contrib.auth.views import logout as django_logout from django.shortcuts import render from django.template import RequestContext from django.views.decorators.http import require_GET @login_required @require_GET def dashboard(request): return render(request, "dashboard.html") def login(req, template_name="rapidsms/login.html"): return django_login(req, **{"template_name": template_name}) def logout(req, template_name="rapidsms/loggedout.html"): return django_logout(req, **{"template_name": template_name})
Use render, rather than render_to_response
Use render, rather than render_to_response
Python
bsd-3-clause
lsgunth/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms
--- +++ @@ -4,17 +4,16 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth.views import login as django_login from django.contrib.auth.views import logout as django_logout -from django.shortcuts import render_to_response +from django.shortcuts import render from django.template import RequestContext from django.views.decorators.http import require_GET @login_required @require_GET -def dashboard(req): - return render_to_response( - "dashboard.html", - context_instance=RequestContext(req)) +def dashboard(request): + return render(request, + "dashboard.html") def login(req, template_name="rapidsms/login.html"):
e98a6f5b0bc2fcf925c293ea2c66d5c4a49c4ab8
txzmq/__init__.py
txzmq/__init__.py
""" ZeroMQ integration into Twisted reactor. """ from txzmq.connection import ZmqConnection, ZmqEndpoint, ZmqEndpointType from txzmq.factory import ZmqFactory from txzmq.pubsub import ZmqPubConnection, ZmqSubConnection from txzmq.pushpull import ZmqPushConnection, ZmqPullConnection from txzmq.xreq_xrep import ZmqXREQConnection __all__ = ['ZmqConnection', 'ZmqEndpoint', 'ZmqEndpointType', 'ZmqFactory', 'ZMQPushConnection', 'ZMQPullConnection', 'ZmqPubConnection', 'ZmqSubConnection', 'ZmqXREQConnection']
""" ZeroMQ integration into Twisted reactor. """ from txzmq.connection import ZmqConnection, ZmqEndpoint, ZmqEndpointType from txzmq.factory import ZmqFactory from txzmq.pubsub import ZmqPubConnection, ZmqSubConnection from txzmq.pushpull import ZmqPushConnection, ZmqPullConnection from txzmq.xreq_xrep import ZmqXREQConnection __all__ = ['ZmqConnection', 'ZmqEndpoint', 'ZmqEndpointType', 'ZmqFactory', 'ZmqPushConnection', 'ZmqPullConnection', 'ZmqPubConnection', 'ZmqSubConnection', 'ZmqXREQConnection']
Fix misprint after adding push/pull sockets.
Fix misprint after adding push/pull sockets.
Python
mpl-2.0
smira/txZMQ
--- +++ @@ -9,5 +9,5 @@ __all__ = ['ZmqConnection', 'ZmqEndpoint', 'ZmqEndpointType', 'ZmqFactory', - 'ZMQPushConnection', 'ZMQPullConnection', 'ZmqPubConnection', + 'ZmqPushConnection', 'ZmqPullConnection', 'ZmqPubConnection', 'ZmqSubConnection', 'ZmqXREQConnection']
41bdb951e61f5601c380fd81690d74d35136455f
django_evolution/builtin_evolutions/__init__.py
django_evolution/builtin_evolutions/__init__.py
from django.contrib.sessions.models import Session BUILTIN_SEQUENCES = { 'django.contrib.auth': [], 'django.contrib.contenttypes': [], 'django.contrib.sessions': [], } # Starting in Django 1.3 alpha, Session.expire_date has a db_index set. # This needs to be reflected in the evolutions. Rather than hard-coding # a specific version to check for, we check the actual value in the field. if Session._meta.get_field_by_name('expire_date')[0].db_index: BUILTIN_SEQUENCES['django.contrib.sessions'].append( 'session_expire_date_db_index') # Starting in Django 1.4 alpha, the Message model was deleted. try: from django.contrib.auth.models import Message except ImportError: BUILTIN_SEQUENCES['django.contrib.auth'].append('auth_delete_message') # Starting with Django Evolution 0.7.0, we explicitly need ChangeMetas for # unique_together. BUILTIN_SEQUENCES['django.contrib.auth'].append( 'auth_unique_together_baseline') BUILTIN_SEQUENCES['django.contrib.contenttypes'].append( 'contenttypes_unique_together_baseline')
from django.contrib.sessions.models import Session BUILTIN_SEQUENCES = { 'django.contrib.auth': [], 'django.contrib.contenttypes': [], 'django.contrib.sessions': [], } # Starting in Django 1.3 alpha, Session.expire_date has a db_index set. # This needs to be reflected in the evolutions. Rather than hard-coding # a specific version to check for, we check the actual value in the field. if Session._meta.get_field('expire_date').db_index: BUILTIN_SEQUENCES['django.contrib.sessions'].append( 'session_expire_date_db_index') # Starting in Django 1.4 alpha, the Message model was deleted. try: from django.contrib.auth.models import Message except ImportError: BUILTIN_SEQUENCES['django.contrib.auth'].append('auth_delete_message') # Starting with Django Evolution 0.7.0, we explicitly need ChangeMetas for # unique_together. BUILTIN_SEQUENCES['django.contrib.auth'].append( 'auth_unique_together_baseline') BUILTIN_SEQUENCES['django.contrib.contenttypes'].append( 'contenttypes_unique_together_baseline')
Fix a field lookup to be compatible with all versions of Django.
Fix a field lookup to be compatible with all versions of Django. Recent versions of Django removed Meta.get_field_by_name(), which our built-in evolutions were trying to use. Fortunately, all supported versions have Meta.get_field(), which works just as well. This change switches over to that. We'll want to revisit the built-in evolutions before release in order to prevent possible conflicts with Django's migrations.
Python
bsd-3-clause
beanbaginc/django-evolution
--- +++ @@ -11,7 +11,7 @@ # Starting in Django 1.3 alpha, Session.expire_date has a db_index set. # This needs to be reflected in the evolutions. Rather than hard-coding # a specific version to check for, we check the actual value in the field. -if Session._meta.get_field_by_name('expire_date')[0].db_index: +if Session._meta.get_field('expire_date').db_index: BUILTIN_SEQUENCES['django.contrib.sessions'].append( 'session_expire_date_db_index')
54683555997032cccf97f5fedf88b7a2402f0449
sponsorship_tracking/migrations/10.0.2.0.0/post-migration.py
sponsorship_tracking/migrations/10.0.2.0.0/post-migration.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # ############################################################################## from openupgradelib import openupgrade @openupgrade.migrate(use_env=True) def migrate(env, version): if not version: return cr = env.cr # Remove end reason on active sponsorships cr.execute(""" UPDATE recurring_contract SET end_reason = NULL WHERE STATE NOT IN ('terminated', 'cancelled'); """)
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # ############################################################################## from openupgradelib import openupgrade @openupgrade.migrate(use_env=True) def migrate(env, version): if not version: return cr = env.cr # Remove end reason on active sponsorships cr.execute(""" UPDATE recurring_contract SET end_reason = NULL WHERE STATE NOT IN ('terminated', 'cancelled'); """) # Remove waiting_welcome state of non sponsorship contracts # or old contracts cr.execute(""" UPDATE recurring_contract SET sds_state = 'active' WHERE sds_state = 'waiting_welcome' AND (type not in ('S', 'SC') OR sds_state_date < current_date - INTERVAL '15 days'); """)
FIX only sponsorships can go through waiting_welcome state
FIX only sponsorships can go through waiting_welcome state
Python
agpl-3.0
eicher31/compassion-modules,CompassionCH/compassion-modules,ecino/compassion-modules,ecino/compassion-modules,maxime-beck/compassion-modules,eicher31/compassion-modules,maxime-beck/compassion-modules,maxime-beck/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-modules,ecino/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-modules,CompassionCH/compassion-modules,ecino/compassion-modules,maxime-beck/compassion-modules,eicher31/compassion-modules,ecino/compassion-modules
--- +++ @@ -25,3 +25,12 @@ WHERE STATE NOT IN ('terminated', 'cancelled'); """) + # Remove waiting_welcome state of non sponsorship contracts + # or old contracts + cr.execute(""" + UPDATE recurring_contract + SET sds_state = 'active' + WHERE sds_state = 'waiting_welcome' + AND (type not in ('S', 'SC') + OR sds_state_date < current_date - INTERVAL '15 days'); + """)
80f4c7404272b5cc00caa0e7cb041fb9811d988e
tests/test_checkREADME.py
tests/test_checkREADME.py
import os def test_README(): thisDir = os.path.dirname(os.path.realpath(__file__)) parentDir = os.path.dirname(thisDir) readmePath = os.path.join(parentDir,'README.rst') readmeTestPath = os.path.join(thisDir,'README.py') with open(readmePath) as readmeF,open(readmeTestPath,'w') as testF: for line in readmeF: if line.startswith('>>> '): testF.write(line[4:]) import README
import os def _README(): thisDir = os.path.dirname(os.path.realpath(__file__)) parentDir = os.path.dirname(thisDir) readmePath = os.path.join(parentDir,'README.rst') readmeTestPath = os.path.join(thisDir,'README.py') with open(readmePath) as readmeF,open(readmeTestPath,'w') as testF: for line in readmeF: if line.startswith('>>> '): testF.write(line[4:]) import README
Disable README test (too long)
Disable README test (too long)
Python
mit
jakelever/kindred,jakelever/kindred
--- +++ @@ -1,7 +1,7 @@ import os -def test_README(): +def _README(): thisDir = os.path.dirname(os.path.realpath(__file__)) parentDir = os.path.dirname(thisDir) readmePath = os.path.join(parentDir,'README.rst')
e9c6b22ffaf498dc64f590689cc637a152444665
forms.py
forms.py
from flask_wtf import Form from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField from wtforms.validators import DataRequired, Email, Length class AddUserForm(Form): name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")]) username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")]) role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')]) password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")]) submit = SubmitField('Add User') class LoginForm(Form): username = StringField('Username', validators=[DataRequired("Please enter a usename")]) password = PasswordField('Password', validators=[DataRequired('Please enter a password')]) remember = BooleanField('Remember me') submit = SubmitField("Login") class RetrievalForm(Form): amount = StringField('Input the amount taken', validators=[validators.input_required()]) submit = SubmitField("Enter Quantity")
from flask_wtf import Form from wtforms import StringField, PasswordField, SubmitField, RadioField, validators, IntegerField, BooleanField from wtforms.validators import DataRequired, Email, Length class AddUserForm(Form): name = StringField('Name of User', validators=[DataRequired("Please enter the name of the newcomer.")]) username= StringField('Create a Username', validators=[DataRequired("Please enter a username.")]) role = RadioField('Role of User', choices=[('attendent','Room Attendant'),('supervisor','Supervisor')],validators=[DataRequired('Input Choice')]) password = PasswordField('Password', validators=[DataRequired("Please enter a password."), Length(min=6, message="Passwords must be 6 characters or more.")]) submit = SubmitField('Add User') class LoginForm(Form): username = StringField('Username', validators=[DataRequired("Please enter a username")]) password = PasswordField('Password', validators=[DataRequired('Please enter a password')]) remember = BooleanField() submit = SubmitField("Login") class RetrievalForm(Form): amount = StringField('Input the amount taken', validators=[validators.input_required()]) submit = SubmitField("Enter Quantity")
Change LoginForm parameter for BooleanField
Change LoginForm parameter for BooleanField
Python
mit
jinjiaho/project57,jinjiaho/project57,jinjiaho/project57,jinjiaho/project57
--- +++ @@ -10,9 +10,9 @@ submit = SubmitField('Add User') class LoginForm(Form): - username = StringField('Username', validators=[DataRequired("Please enter a usename")]) + username = StringField('Username', validators=[DataRequired("Please enter a username")]) password = PasswordField('Password', validators=[DataRequired('Please enter a password')]) - remember = BooleanField('Remember me') + remember = BooleanField() submit = SubmitField("Login") class RetrievalForm(Form):
4af8f60598e216adb04e4ed04394e8835beedcac
src/som/vmobjects/object_without_fields.py
src/som/vmobjects/object_without_fields.py
from rlib.jit import promote from som.vmobjects.abstract_object import AbstractObject class ObjectWithoutFields(AbstractObject): _immutable_fields_ = ["_object_layout?"] def __init__(self, layout): # pylint: disable=W self._object_layout = layout def get_class(self, universe): assert self._object_layout is not None return self._object_layout.for_class def get_object_layout(self, _universe): return promote(self._object_layout) def set_class(self, clazz): layout = clazz.get_layout_for_instances() assert layout is not None self._object_layout = layout def get_number_of_fields(self): # pylint: disable=no-self-use return 0
from rlib.jit import promote from som.vmobjects.abstract_object import AbstractObject class ObjectWithoutFields(AbstractObject): _immutable_fields_ = ["_object_layout?"] def __init__(self, layout): # pylint: disable=W self._object_layout = layout def get_class(self, universe): assert self._object_layout is not None return self._object_layout.for_class def get_object_layout(self, _universe): return promote(self._object_layout) def set_class(self, clazz): layout = clazz.get_layout_for_instances() assert layout is not None self._object_layout = layout def get_number_of_fields(self): # pylint: disable=no-self-use return 0 def __str__(self): from som.vm.globals import nilObject, trueObject, falseObject if self is nilObject: return "nil" if self is trueObject: return "true" if self is falseObject: return "false" return AbstractObject.__str__(self)
Improve ObjectWithoutField.__str__ to idenfify singleton values
Improve ObjectWithoutField.__str__ to idenfify singleton values Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
Python
mit
smarr/PySOM,smarr/PySOM,SOM-st/PySOM,SOM-st/PySOM
--- +++ @@ -24,3 +24,14 @@ def get_number_of_fields(self): # pylint: disable=no-self-use return 0 + + def __str__(self): + from som.vm.globals import nilObject, trueObject, falseObject + + if self is nilObject: + return "nil" + if self is trueObject: + return "true" + if self is falseObject: + return "false" + return AbstractObject.__str__(self)
eec47f7a6988d4472bc99789fcc7ba894b74c17b
files/install_workflow.py
files/install_workflow.py
#!/usr/bin/env python import argparse from bioblend import galaxy import json def main(): """ This script uses bioblend to import .ga workflow files into a running instance of Galaxy """ parser = argparse.ArgumentParser() parser.add_argument("-w", "--workflow_path", help='Path to workflow file') parser.add_argument("-g", "--galaxy", dest="galaxy_url", help="Target Galaxy instance URL/IP address (required " "if not defined in the tools list file)",) parser.add_argument("-a", "--apikey", dest="api_key", help="Galaxy admin user API key (required if not " "defined in the tools list file)",) args = parser.parse_args() gi = galaxy.GalaxyInstance(url=args.galaxy_url, key=args.api_key) import_uuid = json.load(open(args.workflow_path, 'r'))['uuid'] existing_uuids = [d['latest_workflow_uuid'] for d in gi.workflows.get_workflows()] if import_uuid not in existing_uuids: gi.workflows.import_workflow_from_local_path(args.workflow_path) if __name__ == '__main__': main()
#!/usr/bin/env python import argparse from bioblend import galaxy import json def main(): """ This script uses bioblend to import .ga workflow files into a running instance of Galaxy """ parser = argparse.ArgumentParser() parser.add_argument("-w", "--workflow_path", help='Path to workflow file') parser.add_argument("-g", "--galaxy", dest="galaxy_url", help="Target Galaxy instance URL/IP address (required " "if not defined in the tools list file)",) parser.add_argument("-a", "--apikey", dest="api_key", help="Galaxy admin user API key (required if not " "defined in the tools list file)",) args = parser.parse_args() gi = galaxy.GalaxyInstance(url=args.galaxy_url, key=args.api_key) import_uuid = json.load(open(args.workflow_path, 'r')).get('uuid') existing_uuids = [d.get('latest_workflow_uuid') for d in gi.workflows.get_workflows()] if import_uuid not in existing_uuids: gi.workflows.import_workflow_from_local_path(args.workflow_path) if __name__ == '__main__': main()
Use .get methods when retrieving uuid keys
Use .get methods when retrieving uuid keys
Python
mit
anmoljh/ansible-galaxy-tools,galaxyproject/ansible-galaxy-tools,galaxyproject/ansible-tools,nuwang/ansible-galaxy-tools
--- +++ @@ -2,6 +2,7 @@ import argparse from bioblend import galaxy import json + def main(): """ @@ -21,8 +22,8 @@ gi = galaxy.GalaxyInstance(url=args.galaxy_url, key=args.api_key) - import_uuid = json.load(open(args.workflow_path, 'r'))['uuid'] - existing_uuids = [d['latest_workflow_uuid'] for d in gi.workflows.get_workflows()] + import_uuid = json.load(open(args.workflow_path, 'r')).get('uuid') + existing_uuids = [d.get('latest_workflow_uuid') for d in gi.workflows.get_workflows()] if import_uuid not in existing_uuids: gi.workflows.import_workflow_from_local_path(args.workflow_path)
a3a2ad5099663bb92a04db41e531c776b9e02d41
dxtbx/tst_dxtbx.py
dxtbx/tst_dxtbx.py
def tst_dxtbx(): import libtbx.load_env import os dials_regression = libtbx.env.dist_path('dials_regression') from boost.python import streambuf from dxtbx import read_uint16 from dxtbx.format.Registry import Registry for directory, image in [('SLS_X06SA', 'mar225_2_001.img')]: file_path = os.path.join(dials_regression, 'image_examples', directory, image) format = Registry.find(file_path) i = format(file_path) size = i.get_detector().get_image_size() print 'OK' tst_dxtbx()
def tst_dxtbx(): import libtbx.load_env import os dials_regression = libtbx.env.dist_path('dials_regression') from boost.python import streambuf from dxtbx import read_uint16 from dxtbx.format.Registry import Registry from dials_regression.image_examples.get_all_working_images import \ get_all_working_images for directory, image in get_all_working_images(): file_path = os.path.join(dials_regression, 'image_examples', directory, image) format = Registry.find(file_path) i = format(file_path) size = i.get_detector().get_image_size() print 'OK' tst_dxtbx()
Use from dials_regression.image_examples.get_all_working_images import get_all_working_images method to get list of images
Use from dials_regression.image_examples.get_all_working_images import get_all_working_images method to get list of images
Python
bsd-3-clause
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
--- +++ @@ -6,7 +6,10 @@ from dxtbx import read_uint16 from dxtbx.format.Registry import Registry - for directory, image in [('SLS_X06SA', 'mar225_2_001.img')]: + from dials_regression.image_examples.get_all_working_images import \ + get_all_working_images + + for directory, image in get_all_working_images(): file_path = os.path.join(dials_regression, 'image_examples', directory, image) format = Registry.find(file_path)
66e67e53360a9f49ae73c8c8f2de49991525363b
txircd/modules/cmode_t.py
txircd/modules/cmode_t.py
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(self.ircd.servconfig["channel_minimum_level"]["TOPIC"], targetChannel.name): user.sendMessage(irc.ERR_CHANOPRIVSNEEDED, targetChannel.name, ":You do not have access to change the topic on this channel") return {} return data class Spawner(object): def __init__(self, ircd): self.ircd = ircd def spawn(self): if "channel_minimum_level" not in self.ircd.servconfig: self.ircd.servconfig["channel_minimum_level"] = {} if "TOPIC" not in self.ircd.servconfig["channel_minimum_level"]: self.ircd.servconfig["channel_minimum_level"]["TOPIC"] = "o" return { "modes": { "cnt": TopiclockMode() } } def cleanup(self): self.ircd.removeMode("cnt")
from twisted.words.protocols import irc from txircd.modbase import Mode class TopiclockMode(Mode): def checkPermission(self, user, cmd, data): if cmd != "TOPIC": return data if "topic" not in data: return data targetChannel = data["targetchan"] if "t" in targetChannel.mode and not user.hasAccess(targetChannel.name, self.ircd.servconfig["channel_minimum_level"]["TOPIC"]): user.sendMessage(irc.ERR_CHANOPRIVSNEEDED, targetChannel.name, ":You do not have access to change the topic on this channel") return {} return data class Spawner(object): def __init__(self, ircd): self.ircd = ircd def spawn(self): if "channel_minimum_level" not in self.ircd.servconfig: self.ircd.servconfig["channel_minimum_level"] = {} if "TOPIC" not in self.ircd.servconfig["channel_minimum_level"]: self.ircd.servconfig["channel_minimum_level"]["TOPIC"] = "o" return { "modes": { "cnt": TopiclockMode() } } def cleanup(self): self.ircd.removeMode("cnt")
Fix the order of parameters to hasAccess, which broke all topic changing when +t was set
Fix the order of parameters to hasAccess, which broke all topic changing when +t was set
Python
bsd-3-clause
Heufneutje/txircd,DesertBus/txircd,ElementalAlchemist/txircd
--- +++ @@ -8,7 +8,7 @@ if "topic" not in data: return data targetChannel = data["targetchan"] - if "t" in targetChannel.mode and not user.hasAccess(self.ircd.servconfig["channel_minimum_level"]["TOPIC"], targetChannel.name): + if "t" in targetChannel.mode and not user.hasAccess(targetChannel.name, self.ircd.servconfig["channel_minimum_level"]["TOPIC"]): user.sendMessage(irc.ERR_CHANOPRIVSNEEDED, targetChannel.name, ":You do not have access to change the topic on this channel") return {} return data
61e8b679c64c7c2155c1c3f5077cf058dd6610d3
forms.py
forms.py
""" JP-specific Form helpers """ from django.utils.translation import ugettext_lazy as _ from django.forms.fields import RegexField, Select class JPPostalCodeField(RegexField): """ A form field that validates its input is a Japanese postcode. Accepts 7 digits, with or without a hyphen. """ default_error_messages = { 'invalid': _('Enter a postal code in the format XXXXXXX or XXX-XXXX.'), } def __init__(self, max_length=None, min_length=None, *args, **kwargs): super(JPPostalCodeField, self).__init__(r'^\d{3}-\d{4}$|^\d{7}$', max_length, min_length, *args, **kwargs) def clean(self, value): """ Validates the input and returns a string that contains only numbers. Returns an empty string for empty values. """ v = super(JPPostalCodeField, self).clean(value) return v.replace('-', '') class JPPrefectureSelect(Select): """ A Select widget that uses a list of Japanese prefectures as its choices. """ def __init__(self, attrs=None): from jp_prefectures import JP_PREFECTURES super(JPPrefectureSelect, self).__init__(attrs, choices=JP_PREFECTURES)
""" JP-specific Form helpers """ from __future__ import absolute_import from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ class JPPostalCodeField(RegexField): """ A form field that validates its input is a Japanese postcode. Accepts 7 digits, with or without a hyphen. """ default_error_messages = { 'invalid': _('Enter a postal code in the format XXXXXXX or XXX-XXXX.'), } def __init__(self, max_length=None, min_length=None, *args, **kwargs): super(JPPostalCodeField, self).__init__(r'^\d{3}-\d{4}$|^\d{7}$', max_length, min_length, *args, **kwargs) def clean(self, value): """ Validates the input and returns a string that contains only numbers. Returns an empty string for empty values. """ v = super(JPPostalCodeField, self).clean(value) return v.replace('-', '') class JPPrefectureSelect(Select): """ A Select widget that uses a list of Japanese prefectures as its choices. """ def __init__(self, attrs=None): super(JPPrefectureSelect, self).__init__(attrs, choices=JP_PREFECTURES)
Remove all relative imports. We have always been at war with relative imports.
Remove all relative imports. We have always been at war with relative imports. git-svn-id: 4f9f921b081c523744c7bf24d959a0db39629563@17009 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Python
bsd-3-clause
luyikei/django-localflavor-jp
--- +++ @@ -2,8 +2,12 @@ JP-specific Form helpers """ +from __future__ import absolute_import + +from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES +from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ -from django.forms.fields import RegexField, Select + class JPPostalCodeField(RegexField): """ @@ -32,5 +36,4 @@ A Select widget that uses a list of Japanese prefectures as its choices. """ def __init__(self, attrs=None): - from jp_prefectures import JP_PREFECTURES super(JPPrefectureSelect, self).__init__(attrs, choices=JP_PREFECTURES)
8164d048b47299377b4db7d9fc0198e24b07bdb3
engine/geometry.py
engine/geometry.py
from math import cos, sin, pi, hypot def rotate(polygon, angle): rotated_points = [] cos_result = cos(angle) sin_result = sin(angle) for point in polygon: x = point[0] * cos_result - point[1] * sin_result y = point[0] * sin_result + point[1] * cos_result rotated_points.append((x, y)) return rotated_points def move(point, direction, amount): return [point[0] + amount * cos(direction), point[1] + amount * sin(direction)] def distance(point1, point2): return hypot(point1[0] - point2[0], point1[1] - point2[1])
from math import cos, sin, pi, hypot def rotate(polygon, angle): rotated_points = [] cos_result = cos(angle) sin_result = sin(angle) for point in polygon: x = point[0] * cos_result - point[1] * sin_result y = point[0] * sin_result + point[1] * cos_result rotated_points.append((x, y)) return rotated_points def move(point, direction, amount): return [int(point[0] + amount * cos(direction)), int(point[1] + amount * sin(direction))] def distance(point1, point2): return hypot(point1[0] - point2[0], point1[1] - point2[1])
Fix move to return only int, draw functions cannot handle floats as coordinates
Fix move to return only int, draw functions cannot handle floats as coordinates
Python
apache-2.0
PGHM/spacebattle
--- +++ @@ -11,8 +11,8 @@ return rotated_points def move(point, direction, amount): - return [point[0] + amount * cos(direction), - point[1] + amount * sin(direction)] + return [int(point[0] + amount * cos(direction)), + int(point[1] + amount * sin(direction))] def distance(point1, point2): return hypot(point1[0] - point2[0], point1[1] - point2[1])
e292705df44ba511a0650e5b4d70ab5f2404e412
ghutil/cli/pr/__init__.py
ghutil/cli/pr/__init__.py
import click from ghutil.util import default_command, package_group @package_group(__package__, __file__, invoke_without_command=True) @click.pass_context def cli(ctx): """ Manage pull requests """ default_command(ctx, 'list')
import click from ghutil.util import default_command, package_group @package_group(__package__, __file__, invoke_without_command=True) @click.pass_context def cli(ctx): """ Manage pull requests GitHub pull requests may be specified on the command line using any of the following formats: \b $OWNER/$REPO/$NUMBER $REPO/$NUMBER # for repositories owned by the current user $NUMBER # for PRs of the locally-cloned repository https://github.com/$OWNER/$REPO/pull/$NUMBER https://api.github.com/repos/$OWNER/$REPO/pulls/$NUMBER """ default_command(ctx, 'list')
Document PR command line syntax
Document PR command line syntax
Python
mit
jwodder/ghutil
--- +++ @@ -4,5 +4,17 @@ @package_group(__package__, __file__, invoke_without_command=True) @click.pass_context def cli(ctx): - """ Manage pull requests """ + """ + Manage pull requests + + GitHub pull requests may be specified on the command line using any of the + following formats: + + \b + $OWNER/$REPO/$NUMBER + $REPO/$NUMBER # for repositories owned by the current user + $NUMBER # for PRs of the locally-cloned repository + https://github.com/$OWNER/$REPO/pull/$NUMBER + https://api.github.com/repos/$OWNER/$REPO/pulls/$NUMBER + """ default_command(ctx, 'list')
a45042c504fcb1b11741fb9ce786c5afb94219a7
qual/tests/test_iso.py
qual/tests/test_iso.py
import unittest from hypothesis import given from hypothesis.extra.datetime import datetimes import qual from datetime import date class TestIsoUtils(unittest.TestCase): @given(datetimes(timezones=[])) def test_round_trip_date(self, dt): d = dt.date() self.assertEqual(qual.iso_to_gregorian(*d.isocalendar()), d)
import unittest from hypothesis import given from hypothesis.strategies import integers from hypothesis.extra.datetime import datetimes import qual from datetime import date, MINYEAR, MAXYEAR class TestIsoUtils(unittest.TestCase): @given(datetimes(timezones=[])) def test_round_trip_date(self, dt): d = dt.date() self.assertEqual(qual.iso_to_gregorian(*d.isocalendar()), d) @given(integers(MINYEAR, MAXYEAR), integers(1, 52), integers(1, 7)) def test_round_trip_iso_date(self, year, week, day): y, w, d = qual.iso_to_gregorian(year, week, day).isocalendar() self.assertEqual(year, y) self.assertEqual(week, w) self.assertEqual(day, d)
Add a new test for roundtripping in the opposite direction.
Add a new test for roundtripping in the opposite direction.
Python
apache-2.0
jwg4/qual,jwg4/calexicon
--- +++ @@ -1,10 +1,11 @@ import unittest from hypothesis import given +from hypothesis.strategies import integers from hypothesis.extra.datetime import datetimes import qual -from datetime import date +from datetime import date, MINYEAR, MAXYEAR class TestIsoUtils(unittest.TestCase): @given(datetimes(timezones=[])) @@ -12,3 +13,10 @@ d = dt.date() self.assertEqual(qual.iso_to_gregorian(*d.isocalendar()), d) + @given(integers(MINYEAR, MAXYEAR), integers(1, 52), integers(1, 7)) + def test_round_trip_iso_date(self, year, week, day): + y, w, d = qual.iso_to_gregorian(year, week, day).isocalendar() + self.assertEqual(year, y) + self.assertEqual(week, w) + self.assertEqual(day, d) +
9749cdaaebacd7316b581c5d368a5082fb6d3789
test_projects/test_module_b/test_feat_4.py
test_projects/test_module_b/test_feat_4.py
import unittest class TestG(unittest.TestCase): def test_feat_1_case_1(self): pass def test_feat_1_case_2(self): pass def test_feat_1_case_3(self): pass def test_feat_1_case_4(self): pass class TestH(unittest.TestCase): def test_feat_1_case_1(self): pass def test_feat_1_case_2(self): pass def test_feat_1_case_3(self): pass def test_feat_1_case_4(self): pass
import time import unittest class TestG(unittest.TestCase): def test_feat_1_case_1(self): pass def test_feat_1_case_2(self): pass def test_feat_1_case_3(self): pass def test_feat_1_case_4(self): pass class TestH(unittest.TestCase): def test_feat_1_case_1(self): time.sleep(0.1) def test_feat_1_case_2(self): time.sleep(0.1) def test_feat_1_case_3(self): time.sleep(0.1) def test_feat_1_case_4(self): time.sleep(0.1) def test_feat_1_case_5(self): time.sleep(0.1) def test_feat_1_case_6(self): time.sleep(0.1) def test_feat_1_case_7(self): time.sleep(0.1) def test_feat_1_case_8(self): time.sleep(0.1) def test_feat_1_case_9(self): time.sleep(0.1) def test_feat_1_case_10(self): time.sleep(0.1) def test_feat_1_case_11(self): time.sleep(0.1) def test_feat_1_case_12(self): time.sleep(0.1)
Add empty time tests (for ui testing)
Add empty time tests (for ui testing)
Python
mit
martinsmid/pytest-ui
--- +++ @@ -1,3 +1,4 @@ +import time import unittest @@ -17,13 +18,37 @@ class TestH(unittest.TestCase): def test_feat_1_case_1(self): - pass + time.sleep(0.1) def test_feat_1_case_2(self): - pass + time.sleep(0.1) def test_feat_1_case_3(self): - pass + time.sleep(0.1) def test_feat_1_case_4(self): - pass + time.sleep(0.1) + + def test_feat_1_case_5(self): + time.sleep(0.1) + + def test_feat_1_case_6(self): + time.sleep(0.1) + + def test_feat_1_case_7(self): + time.sleep(0.1) + + def test_feat_1_case_8(self): + time.sleep(0.1) + + def test_feat_1_case_9(self): + time.sleep(0.1) + + def test_feat_1_case_10(self): + time.sleep(0.1) + + def test_feat_1_case_11(self): + time.sleep(0.1) + + def test_feat_1_case_12(self): + time.sleep(0.1)
6603657df4626a9e2c82a3658c63314c7a9537f4
src/experimental/os_walk_with_filechecker.py
src/experimental/os_walk_with_filechecker.py
#!/usr/bin/python3 # THIS FILE IS AN EXPERIMENTAL PROGRAM TO LEARN ABOUT OS_WALK import os, sys walk_dir = sys.argv[1] print("walk directory: " + walk_dir) print("Walk directory (absolute) = " + os.path.abspath(walk_dir)) print("\n\n\n\n\n\n\n\n\n") for root, subdirs, files in os.walk(walk_dir): print(root) #list_file_path = os.path.join(root, "dirlist.txt") #print("dirlist = ", list_file_path) #for subdir in subdirs: # print(subdir) for filename in files: file_path = os.path.join(root, filename) print(file_path + filename)
#!/usr/bin/python3 # THIS FILE IS AN EXPERIMENTAL PROGRAM TO LEARN ABOUT OS_WALK import os, sys, datetime #dt = datetime.datetime(1970,1,1).total_seconds() # print(dt) walk_dir = sys.argv[1] with open("fsscan.scan", "w") as f: print("SCANFROM" + walk_dir) for root, subdirs, files in os.walk(walk_dir): f.write(root + "\n") for filename in files: file_path = os.path.join(root, filename) f.write(file_path + filename + "\n")
Add write dump to file
Add write dump to file
Python
bsd-3-clause
paulkramme/btsoot
--- +++ @@ -1,23 +1,20 @@ #!/usr/bin/python3 # THIS FILE IS AN EXPERIMENTAL PROGRAM TO LEARN ABOUT OS_WALK -import os, sys +import os, sys, datetime + +#dt = datetime.datetime(1970,1,1).total_seconds() +# print(dt) walk_dir = sys.argv[1] -print("walk directory: " + walk_dir) +with open("fsscan.scan", "w") as f: -print("Walk directory (absolute) = " + os.path.abspath(walk_dir)) -print("\n\n\n\n\n\n\n\n\n") + print("SCANFROM" + walk_dir) -for root, subdirs, files in os.walk(walk_dir): - print(root) - #list_file_path = os.path.join(root, "dirlist.txt") - #print("dirlist = ", list_file_path) - - #for subdir in subdirs: - # print(subdir) + for root, subdirs, files in os.walk(walk_dir): + f.write(root + "\n") for filename in files: file_path = os.path.join(root, filename) - print(file_path + filename) + f.write(file_path + filename + "\n")
fbb5addbb6b61a127066fd443d70f1cfe94f7c03
marshmallow/__init__.py
marshmallow/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import __version__ = '1.0.0-dev' __author__ = 'Steven Loria' __license__ = 'MIT' from marshmallow.schema import ( Schema, SchemaOpts, MarshalResult, UnmarshalResult, Serializer, ) from marshmallow.utils import pprint from marshmallow.exceptions import MarshallingError, UnmarshallingError __all__ = [ 'Schema', 'Serializer', 'SchemaOpts', 'pprint', 'MarshalResult', 'UnmarshalResult', 'MarshallingError', 'UnmarshallingError', ]
# -*- coding: utf-8 -*- from __future__ import absolute_import __version__ = '1.0.0-dev' __author__ = 'Steven Loria' __license__ = 'MIT' from marshmallow.schema import ( Schema, SchemaOpts, MarshalResult, UnmarshalResult, Serializer, ) from marshmallow.utils import pprint from marshmallow.exceptions import MarshallingError, UnmarshallingError, ValidationError __all__ = [ 'Schema', 'Serializer', 'SchemaOpts', 'pprint', 'MarshalResult', 'UnmarshalResult', 'MarshallingError', 'UnmarshallingError', 'ValidationError', ]
Put ValidationError on top-level namespace
Put ValidationError on top-level namespace
Python
mit
0xDCA/marshmallow,dwieeb/marshmallow,bartaelterman/marshmallow,maximkulkin/marshmallow,Tim-Erwin/marshmallow,mwstobo/marshmallow,VladimirPal/marshmallow,daniloakamine/marshmallow,xLegoz/marshmallow,marshmallow-code/marshmallow,0xDCA/marshmallow,etataurov/marshmallow,quxiaolong1504/marshmallow,Bachmann1234/marshmallow
--- +++ @@ -13,7 +13,7 @@ Serializer, ) from marshmallow.utils import pprint -from marshmallow.exceptions import MarshallingError, UnmarshallingError +from marshmallow.exceptions import MarshallingError, UnmarshallingError, ValidationError __all__ = [ @@ -25,4 +25,5 @@ 'UnmarshalResult', 'MarshallingError', 'UnmarshallingError', + 'ValidationError', ]
c55dbf067d85c3a060a6ffeff2aad24991e95eae
pandas/tests/series/test_validate.py
pandas/tests/series/test_validate.py
import pytest from pandas.core.series import Series class TestSeriesValidate(object): """Tests for error handling related to data types of method arguments.""" s = Series([1, 2, 3, 4, 5]) def test_validate_bool_args(self): # Tests for error handling related to boolean arguments. invalid_values = [1, "True", [1, 2, 3], 5.0] for value in invalid_values: with pytest.raises(ValueError): self.s.reset_index(inplace=value) with pytest.raises(ValueError): self.s._set_name(name='hello', inplace=value) with pytest.raises(ValueError): self.s.sort_values(inplace=value) with pytest.raises(ValueError): self.s.sort_index(inplace=value) with pytest.raises(ValueError): self.s.sort_index(inplace=value) with pytest.raises(ValueError): self.s.rename(inplace=value) with pytest.raises(ValueError): self.s.dropna(inplace=value)
import pytest from pandas.core.series import Series class TestSeriesValidate(object): """Tests for error handling related to data types of method arguments.""" s = Series([1, 2, 3, 4, 5]) def test_validate_bool_args(self): # Tests for error handling related to boolean arguments. invalid_values = [1, "True", [1, 2, 3], 5.0] for value in invalid_values: with pytest.raises(ValueError): self.s.reset_index(inplace=value) with pytest.raises(ValueError): self.s._set_name(name='hello', inplace=value) with pytest.raises(ValueError): self.s.sort_values(inplace=value) with pytest.raises(ValueError): self.s.sort_index(inplace=value) with pytest.raises(ValueError): self.s.rename(inplace=value) with pytest.raises(ValueError): self.s.dropna(inplace=value)
Remove duplicate Series sort_index check
MAINT: Remove duplicate Series sort_index check Duplicate boolean validation check for sort_index in series/test_validate.py
Python
bsd-3-clause
pratapvardhan/pandas,rs2/pandas,winklerand/pandas,jorisvandenbossche/pandas,zfrenchee/pandas,winklerand/pandas,TomAugspurger/pandas,pandas-dev/pandas,harisbal/pandas,jmmease/pandas,pratapvardhan/pandas,TomAugspurger/pandas,DGrady/pandas,jorisvandenbossche/pandas,cython-testbed/pandas,zfrenchee/pandas,nmartensen/pandas,louispotok/pandas,dsm054/pandas,Winand/pandas,gfyoung/pandas,MJuddBooth/pandas,gfyoung/pandas,jorisvandenbossche/pandas,rs2/pandas,cbertinato/pandas,zfrenchee/pandas,DGrady/pandas,DGrady/pandas,louispotok/pandas,harisbal/pandas,pratapvardhan/pandas,jmmease/pandas,harisbal/pandas,cython-testbed/pandas,cython-testbed/pandas,Winand/pandas,dsm054/pandas,MJuddBooth/pandas,jreback/pandas,pandas-dev/pandas,toobaz/pandas,winklerand/pandas,jmmease/pandas,nmartensen/pandas,Winand/pandas,winklerand/pandas,datapythonista/pandas,amolkahat/pandas,gfyoung/pandas,MJuddBooth/pandas,dsm054/pandas,louispotok/pandas,jmmease/pandas,toobaz/pandas,dsm054/pandas,MJuddBooth/pandas,winklerand/pandas,pratapvardhan/pandas,jreback/pandas,cbertinato/pandas,pandas-dev/pandas,kdebrab/pandas,cbertinato/pandas,GuessWhoSamFoo/pandas,amolkahat/pandas,toobaz/pandas,harisbal/pandas,DGrady/pandas,kdebrab/pandas,pratapvardhan/pandas,kdebrab/pandas,jmmease/pandas,jmmease/pandas,DGrady/pandas,amolkahat/pandas,GuessWhoSamFoo/pandas,toobaz/pandas,DGrady/pandas,zfrenchee/pandas,gfyoung/pandas,GuessWhoSamFoo/pandas,cython-testbed/pandas,Winand/pandas,GuessWhoSamFoo/pandas,rs2/pandas,Winand/pandas,Winand/pandas,nmartensen/pandas,datapythonista/pandas,louispotok/pandas,amolkahat/pandas,harisbal/pandas,jreback/pandas,cbertinato/pandas,kdebrab/pandas,jorisvandenbossche/pandas,nmartensen/pandas,datapythonista/pandas,amolkahat/pandas,winklerand/pandas,jreback/pandas,jreback/pandas,TomAugspurger/pandas,cython-testbed/pandas,MJuddBooth/pandas,GuessWhoSamFoo/pandas,datapythonista/pandas,pandas-dev/pandas,rs2/pandas,kdebrab/pandas,dsm054/pandas,louispotok/pandas,TomAugspurger/pandas,nmartensen/pandas,nmartensen/pandas,zfrenchee/pandas,cbertinato/pandas,gfyoung/pandas,toobaz/pandas
--- +++ @@ -24,9 +24,6 @@ self.s.sort_index(inplace=value) with pytest.raises(ValueError): - self.s.sort_index(inplace=value) - - with pytest.raises(ValueError): self.s.rename(inplace=value) with pytest.raises(ValueError):
3acd7d885e6c660c3acb0b584b7ed07c8a1a4df3
docs/source/_examples/myclient.py
docs/source/_examples/myclient.py
import socket, ssl import h11 class MyHttpClient: def __init__(self, host, port): self.sock = socket.create_connection((host, port)) if port == 443: self.sock = ssl.wrap_socket(self.sock) self.conn = h11.Connection(our_role=h11.CLIENT) def send(self, *events): for event in events: data = self.conn.send(event) if data is None: # event was a ConnectionClosed(), meaning that we won't be # sending any more data: self.sock.shutdown(socket.SHUT_WR) else: self.sock.sendall(data) # max_bytes_per_recv intentionally set low for pedagogical purposes def next_event(self, max_bytes_per_recv=200): while True: # If we already have a complete event buffered internally, just # return that. Otherwise, read some data, add it to the internal # buffer, and then try again. event = self.conn.next_event() if event is h11.NEED_DATA: self.conn.receive_data(self.sock.recv(max_bytes_per_recv)) continue return event
import socket, ssl import h11 class MyHttpClient: def __init__(self, host, port): self.sock = socket.create_connection((host, port)) if port == 443: ctx = ssl.create_default_context() self.sock = ctx.wrap_socket(self.sock, server_hostname=host) self.conn = h11.Connection(our_role=h11.CLIENT) def send(self, *events): for event in events: data = self.conn.send(event) if data is None: # event was a ConnectionClosed(), meaning that we won't be # sending any more data: self.sock.shutdown(socket.SHUT_WR) else: self.sock.sendall(data) # max_bytes_per_recv intentionally set low for pedagogical purposes def next_event(self, max_bytes_per_recv=200): while True: # If we already have a complete event buffered internally, just # return that. Otherwise, read some data, add it to the internal # buffer, and then try again. event = self.conn.next_event() if event is h11.NEED_DATA: self.conn.receive_data(self.sock.recv(max_bytes_per_recv)) continue return event
Support SNI in the example client
Support SNI in the example client Fixes: gh-36
Python
mit
python-hyper/h11,njsmith/h11
--- +++ @@ -5,7 +5,8 @@ def __init__(self, host, port): self.sock = socket.create_connection((host, port)) if port == 443: - self.sock = ssl.wrap_socket(self.sock) + ctx = ssl.create_default_context() + self.sock = ctx.wrap_socket(self.sock, server_hostname=host) self.conn = h11.Connection(our_role=h11.CLIENT) def send(self, *events):
23d92f1a24e919bd1b232cb529dbe022f6cdd463
gwv/gwv.py
gwv/gwv.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from gwv import version from validator import validate def main(args=None): if args is None: args = sys.argv[1:] import argparse parser = argparse.ArgumentParser(description="GlyphWiki data validator") parser.add_argument("dumpfile") parser.add_argument("-o", "--out", help="File to write the output JSON to") parser.add_argument("-n", "--names", nargs="*", help="Names of validators") parser.add_argument("-v", "--version", action="store_true", help="Names of validators") opts = parser.parse_args(args) if opts.version: print(version) return outpath = opts.out or os.path.join(os.path.dirname(opts.dumpfile), "gwv_result.json") dumpfile = open(opts.dumpfile) result = validate(dumpfile, opts.names or None) with open(outpath, "w") as outfile: outfile.write(result) if __name__ == '__main__': main()
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from gwv import version from validator import validate def open_dump(filename): dump = {} with open(filename) as f: if filename[-4:] == ".csv": for l in f: row = l.rstrip("\n").split(",") if len(row) != 3: continue dump[row[0]] = (row[1], row[2]) else: # dump_newest_only.txt line = f.readline() # header line = f.readline() # ------ while line: l = [x.strip() for x in line.split("|")] if len(l) != 3: line = f.readline() continue dump[row[0]] = (row[1], row[2]) line = f.readline() return dump def main(args=None): if args is None: args = sys.argv[1:] import argparse parser = argparse.ArgumentParser(description="GlyphWiki data validator") parser.add_argument("dumpfile") parser.add_argument("-o", "--out", help="File to write the output JSON to") parser.add_argument("-n", "--names", nargs="*", help="Names of validators") parser.add_argument("-v", "--version", action="store_true", help="Names of validators") opts = parser.parse_args(args) if opts.version: print(version) return outpath = opts.out or os.path.join( os.path.dirname(opts.dumpfile), "gwv_result.json") dump = open_dump(opts.dumpfile) result = validate(dump, opts.names or None) with open(outpath, "w") as outfile: outfile.write(result) if __name__ == '__main__': main()
Use dict for dump data format
Use dict for dump data format
Python
mit
kurgm/gwv
--- +++ @@ -6,6 +6,29 @@ from gwv import version from validator import validate + + +def open_dump(filename): + dump = {} + with open(filename) as f: + if filename[-4:] == ".csv": + for l in f: + row = l.rstrip("\n").split(",") + if len(row) != 3: + continue + dump[row[0]] = (row[1], row[2]) + else: + # dump_newest_only.txt + line = f.readline() # header + line = f.readline() # ------ + while line: + l = [x.strip() for x in line.split("|")] + if len(l) != 3: + line = f.readline() + continue + dump[row[0]] = (row[1], row[2]) + line = f.readline() + return dump def main(args=None): @@ -17,17 +40,19 @@ parser.add_argument("dumpfile") parser.add_argument("-o", "--out", help="File to write the output JSON to") parser.add_argument("-n", "--names", nargs="*", help="Names of validators") - parser.add_argument("-v", "--version", action="store_true", help="Names of validators") + parser.add_argument("-v", "--version", action="store_true", + help="Names of validators") opts = parser.parse_args(args) if opts.version: print(version) return - outpath = opts.out or os.path.join(os.path.dirname(opts.dumpfile), "gwv_result.json") - dumpfile = open(opts.dumpfile) + outpath = opts.out or os.path.join( + os.path.dirname(opts.dumpfile), "gwv_result.json") + dump = open_dump(opts.dumpfile) - result = validate(dumpfile, opts.names or None) + result = validate(dump, opts.names or None) with open(outpath, "w") as outfile: outfile.write(result)
d3f8c8639462feffe15c457d0009b36816fd3264
HOME/bin/lib/setup/__init__.py
HOME/bin/lib/setup/__init__.py
from pathlib import Path SETTINGS_PATH = 'conf/settings.py' PARTIALS_PATH = 'conf/partials.txt' def load_config(path=SETTINGS_PATH): settings = eval(open(path).read()) return settings def root(): # this program lives in $repo/HOME/bin/lib, so $repo/HOME/bin/../../.. will # get the root of the repository. Use resolve() to resolve symlink since # $repo/HOME/bin is symlinked to ~/bin. return Path(__file__).resolve().parents[3] def home(): return root() / 'HOME' def home_path(path): """Get the path within setup's HOME for the given path Note: no valid setup path for anything outside of $HOME, so throws exception """ return home() / Path(path).resolve().relative_to(Path.home())
from pathlib import Path SETTINGS_PATH = 'conf/settings.py' PARTIALS_PATH = 'conf/partials.txt' HOME_DIR = 'HOME' def load_config(path=SETTINGS_PATH): settings = eval(open(path).read()) return settings def root(): # this file is under HOME_DIR, which is directly under the repo root path = Path(__file__).resolve() # resolve symlinks (~/bin=setup/HOME/bin) return path.parents[path.parts[::-1].index(HOME_DIR)] def home(): return root() / HOME_DIR def home_path(path): """Get the path within setup's HOME for the given path Note: no valid setup path for anything outside of $HOME, so throws exception """ return home() / Path(path).resolve().relative_to(Path.home())
Refactor setup.root to never again need to be changed if the file moves
Refactor setup.root to never again need to be changed if the file moves
Python
mit
kbd/setup,kbd/setup,kbd/setup,kbd/setup,kbd/setup
--- +++ @@ -2,6 +2,7 @@ SETTINGS_PATH = 'conf/settings.py' PARTIALS_PATH = 'conf/partials.txt' +HOME_DIR = 'HOME' def load_config(path=SETTINGS_PATH): @@ -10,14 +11,13 @@ def root(): - # this program lives in $repo/HOME/bin/lib, so $repo/HOME/bin/../../.. will - # get the root of the repository. Use resolve() to resolve symlink since - # $repo/HOME/bin is symlinked to ~/bin. - return Path(__file__).resolve().parents[3] + # this file is under HOME_DIR, which is directly under the repo root + path = Path(__file__).resolve() # resolve symlinks (~/bin=setup/HOME/bin) + return path.parents[path.parts[::-1].index(HOME_DIR)] def home(): - return root() / 'HOME' + return root() / HOME_DIR def home_path(path):
571cb7f14d3ea2fe1ae77e419a3d71d6f9987b25
virtualbox/library_ext/progress.py
virtualbox/library_ext/progress.py
from virtualbox import library """ Add helper code to the default IProgress class. """ # Helper function for IProgress to print out a current progress state # in __str__ _progress_template = """\ (%(o)s/%(oc)s) %(od)s %(p)-3s%% (%(tr)s s remaining)""" class IProgress(library.IProgress): __doct__ = library.IProgress.__doc__ def __str__(self): return _progress_template % dict(o=self.operation, p=self.percent, oc=self.operation_count, od=self.operation_description, tr=self.time_remaining) def wait_for_completion(self, timeout=-1): super(IProgress, self).wait_for_completion(timeout) wait_for_completion.__doc__ = library.IProgress.wait_for_completion.__doc__
from virtualbox import library """ Add helper code to the default IProgress class. """ # Helper function for IProgress to print out a current progress state # in __str__ _progress_template = """\ (%(o)s/%(oc)s) %(od)s %(p)-3s%% (%(tr)s s remaining)""" class IProgress(library.IProgress): __doc__ = library.IProgress.__doc__ def __str__(self): return _progress_template % dict(o=self.operation, p=self.percent, oc=self.operation_count, od=self.operation_description, tr=self.time_remaining) def wait_for_completion(self, timeout=-1): super(IProgress, self).wait_for_completion(timeout) wait_for_completion.__doc__ = library.IProgress.wait_for_completion.__doc__
Fix __doc__ not being replaced
Fix __doc__ not being replaced
Python
apache-2.0
mjdorma/pyvbox
--- +++ @@ -10,7 +10,7 @@ _progress_template = """\ (%(o)s/%(oc)s) %(od)s %(p)-3s%% (%(tr)s s remaining)""" class IProgress(library.IProgress): - __doct__ = library.IProgress.__doc__ + __doc__ = library.IProgress.__doc__ def __str__(self): return _progress_template % dict(o=self.operation, p=self.percent,
58620934b0a49cdde573ed7090053e3316fcf215
xpserver_api/serializers.py
xpserver_api/serializers.py
from django.contrib.auth.models import User from rest_framework import serializers, viewsets class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('url', 'email') class UserViewSet(viewsets.ModelViewSet): queryset = User.objects.all() serializer_class = UserSerializer
from django.contrib.auth.models import User from rest_framework import serializers, viewsets class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('url', 'email') def create(self, validated_data): user = User.objects.create(**validated_data) user.username = validated_data['email'] user.save() return user class UserViewSet(viewsets.ModelViewSet): queryset = User.objects.all() serializer_class = UserSerializer
Add user registration via api
Add user registration via api
Python
mit
xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server
--- +++ @@ -7,6 +7,12 @@ model = User fields = ('url', 'email') + def create(self, validated_data): + user = User.objects.create(**validated_data) + user.username = validated_data['email'] + user.save() + return user + class UserViewSet(viewsets.ModelViewSet): queryset = User.objects.all()
4a0569d129d770fead45f3b0d9069ff54e8ddc56
xoinvader/game.py
xoinvader/game.py
#! /usr/bin/env python3 """Main XOInvader module, that is entry point to game. Prepare environment for starting game and start it.""" import curses from xoinvader.menu import MainMenuState from xoinvader.ingame import InGameState from xoinvader.render import Renderer from xoinvader.common import Settings from xoinvader.application import Application from xoinvader.curses_utils import create_curses_window, style class XOInvader(Application): def __init__(self, startup_args={}): super(XOInvader, self).__init__(startup_args) self._update_settings(startup_args) self.screen = create_curses_window( ncols=Settings.layout.field.border.x, nlines=Settings.layout.field.border.y) # Ms per frame self._mspf = 16 style.init_styles(curses) Settings.renderer = Renderer(Settings.layout.field.border) def _update_settings(self, args): for arg, val in args.items(): if arg in Settings.system: Settings.system[arg] = val else: raise KeyError("No such argument: '%s'." % arg) def create_game(args={}): app = XOInvader(args) app.register_state(InGameState) app.register_state(MainMenuState) return app
#! /usr/bin/env python3 """Main XOInvader module, that is entry point to game. Prepare environment for starting game and start it.""" import curses from xoinvader.menu import MainMenuState from xoinvader.ingame import InGameState from xoinvader.render import Renderer from xoinvader.common import Settings from xoinvader.application import Application from xoinvader.curses_utils import create_curses_window from xoinvader.curses_utils import deinit_curses from xoinvader.curses_utils import style class XOInvader(Application): def __init__(self, startup_args={}): super(XOInvader, self).__init__(startup_args) self._update_settings(startup_args) self.screen = create_curses_window( ncols=Settings.layout.field.border.x, nlines=Settings.layout.field.border.y) # Ms per frame self._mspf = 16 style.init_styles(curses) Settings.renderer = Renderer(Settings.layout.field.border) def _update_settings(self, args): for arg, val in args.items(): if arg in Settings.system: Settings.system[arg] = val else: raise KeyError("No such argument: '%s'." % arg) def stop(self): deinit_curses(self.screen) super(XOInvader, self).stop() def create_game(args=None): """Create XOInvader game instance.""" app = XOInvader(args or dict()) app.register_state(InGameState) app.register_state(MainMenuState) return app
Add stop method, fix dangerous args.
Add stop method, fix dangerous args.
Python
mit
pkulev/xoinvader,pankshok/xoinvader
--- +++ @@ -12,7 +12,9 @@ from xoinvader.render import Renderer from xoinvader.common import Settings from xoinvader.application import Application -from xoinvader.curses_utils import create_curses_window, style +from xoinvader.curses_utils import create_curses_window +from xoinvader.curses_utils import deinit_curses +from xoinvader.curses_utils import style class XOInvader(Application): @@ -36,9 +38,14 @@ else: raise KeyError("No such argument: '%s'." % arg) + def stop(self): + deinit_curses(self.screen) + super(XOInvader, self).stop() -def create_game(args={}): - app = XOInvader(args) + +def create_game(args=None): + """Create XOInvader game instance.""" + app = XOInvader(args or dict()) app.register_state(InGameState) app.register_state(MainMenuState) return app
ca7b50920a90e335b4cebe124ec3160aafada824
apitestcase/__init__.py
apitestcase/__init__.py
from apitestcase.testcase import TestCase __version__ = ("0", "1", "0") __all__ = [ "TestCase", "__version__", ]
from apitestcase.testcase import TestCase __version__ = ("0", "1", "0") __all__ = ( "TestCase", "__version__", )
Make apitestcase __all__ a tuple
Make apitestcase __all__ a tuple
Python
mit
bramwelt/apitestcase
--- +++ @@ -3,7 +3,7 @@ __version__ = ("0", "1", "0") -__all__ = [ +__all__ = ( "TestCase", "__version__", -] +)
c6d042ee5d4867750a54ab9f6c3576928e4ba457
yarn_api_client/__init__.py
yarn_api_client/__init__.py
# -*- coding: utf-8 -*- __version__ = '1.0.0' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
# -*- coding: utf-8 -*- __version__ = '2.0.0.dev0' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster from .history_server import HistoryServer from .node_manager import NodeManager from .resource_manager import ResourceManager
Prepare for next development iteration
Prepare for next development iteration
Python
bsd-3-clause
toidi/hadoop-yarn-api-python-client
--- +++ @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -__version__ = '1.0.0' +__version__ = '2.0.0.dev0' __all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager'] from .application_master import ApplicationMaster
b8656ae21ab494b49013a7cd67facff7bdbd7cf5
index.py
index.py
from flask import Flask from flask_redis import FlaskRedis from config import BaseConfig app = Flask(__name__) app.config.from_object(BaseConfig) db = FlaskRedis(app)
from flask import Flask from flask_redis import FlaskRedis from redis import StrictRedis from config import BaseConfig class DecodedRedis(StrictRedis): @classmethod def from_url(cls, url, db=None, **kwargs): kwargs['decode_responses'] = True return StrictRedis.from_url(url, db, **kwargs) app = Flask(__name__) app.config.from_object(BaseConfig) db = FlaskRedis.from_custom_provider(DecodedRedis, app)
Add decode_responses option to redis
Add decode_responses option to redis
Python
mit
tferreira/Flask-Redis
--- +++ @@ -1,7 +1,17 @@ from flask import Flask from flask_redis import FlaskRedis +from redis import StrictRedis from config import BaseConfig + + +class DecodedRedis(StrictRedis): + @classmethod + def from_url(cls, url, db=None, **kwargs): + kwargs['decode_responses'] = True + return StrictRedis.from_url(url, db, **kwargs) + app = Flask(__name__) app.config.from_object(BaseConfig) -db = FlaskRedis(app) +db = FlaskRedis.from_custom_provider(DecodedRedis, app) +
5cadb19aec67945efa5c4367ee4d1aab6bbc66e7
git-issues/git-handler.py
git-issues/git-handler.py
import os import re import subprocess import requests GITHUB_API_ADDRESS = "https://api.github.com/" def get_git_address(): response = subprocess.check_output(['git', 'remote', '-v']) dirty = response.split('\n') repos = {} for repo in dirty: rep = repo.split('\t') if len(rep) > 1: repos[rep[0]] = rep[1].replace(' (fetch)', '').replace(' (push)', '') return repos def get_issues(repos): issues = [] import re for k, v in repos.items(): repo_slug_match = re.search("\:(.*\/.*)\.git", v) if repo_slug_match is not None: repo_slug = repo_slug_match.group(1) response = requests.get(GITHUB_API_ADDRESS + "repos/" +repo_slug + "/issues") issues += response.json() git_issues_dir = os.path.expanduser("~/.git-issues/") if not os.path.exists(git_issues_dir): os.makedirs(git_issues_dir) with open(git_issues_dir + "%s.json" % re.search("\:.*\/(.*)\.git", repos['origin']).group(1), 'w') as f: import json f.write(json.dumps(issues)) if __name__ == '__main__': repos = get_git_address() get_issues(repos)
import os import re import subprocess import requests GITHUB_API_ADDRESS = "https://api.github.com/" def get_git_address(): response = subprocess.check_output(['git', 'remote', '-v']) dirty = response.split('\n') repos = {} for repo in dirty: rep = repo.split('\t') if len(rep) > 1: repos[rep[0]] = rep[1].replace(' (fetch)', '').replace(' (push)', '') return repos def get_issues(repos): issues = [] import re for k, v in repos.items(): repo_slug_match = re.search("\:(.*\/.*)\.git", v) if repo_slug_match is not None: repo_slug = repo_slug_match.group(1) response = requests.get(GITHUB_API_ADDRESS + "repos/" +repo_slug + "/issues") issues += response.json() write_issues_to_disk(issues) def write_issues_to_disk(issues) git_issues_dir = os.path.expanduser("~/.git-issues/") if not os.path.exists(git_issues_dir): os.makedirs(git_issues_dir) with open(git_issues_dir + "%s.json" % re.search("\:.*\/(.*)\.git", repos['origin']).group(1), 'w') as f: import json f.write(json.dumps(issues)) if __name__ == '__main__': repos = get_git_address() get_issues(repos)
Split out writing to disk into it's own mfunction
Split out writing to disk into it's own mfunction
Python
apache-2.0
AutomatedTester/git-issues,AutomatedTester/git-issues,AutomatedTester/git-issues
--- +++ @@ -29,6 +29,10 @@ repo_slug = repo_slug_match.group(1) response = requests.get(GITHUB_API_ADDRESS + "repos/" +repo_slug + "/issues") issues += response.json() + + write_issues_to_disk(issues) + +def write_issues_to_disk(issues) git_issues_dir = os.path.expanduser("~/.git-issues/") if not os.path.exists(git_issues_dir): os.makedirs(git_issues_dir)
bc6af25366aacf394f96b5a93008109904a89e93
wlauto/common/android/resources.py
wlauto/common/android/resources.py
# Copyright 2014-2015 ARM Limited # # 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 wlauto.common.resources import FileResource class ReventFile(FileResource): name = 'revent' def __init__(self, owner, stage): super(ReventFile, self).__init__(owner) self.stage = stage class JarFile(FileResource): name = 'jar' class ApkFile(FileResource): name = 'apk' def __init__(self, owner, platform=None): super(ApkFile, self).__init__(owner) self.platform = platform def __str__(self): return '<{}\'s {} APK>'.format(self.owner, self.platform)
# Copyright 2014-2015 ARM Limited # # 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 wlauto.common.resources import FileResource class ReventFile(FileResource): name = 'revent' def __init__(self, owner, stage): super(ReventFile, self).__init__(owner) self.stage = stage class JarFile(FileResource): name = 'jar' class ApkFile(FileResource): name = 'apk' def __init__(self, owner, platform=None): super(ApkFile, self).__init__(owner) self.platform = platform def __str__(self): return '<{}\'s {} APK>'.format(self.owner, self.platform) class UiautoApkFile(FileResource): name = 'uiautoapk' def __init__(self, owner, platform=None): super(UiautoApkFile, self).__init__(owner) self.platform = platform def __str__(self): return '<{}\'s {} UiAuto APK>'.format(self.owner, self.platform)
Add a UiautoApk resource type.
AndroidResource: Add a UiautoApk resource type. When moving to Uiautomation 2, tests are now complied into apk files rather than jar files. To avoid conflicts with regular workload apks a new resource type is added to retrieve the test files which will be renamed to have the extension .uiautoapk
Python
apache-2.0
bjackman/workload-automation,bjackman/workload-automation,bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation
--- +++ @@ -41,3 +41,15 @@ def __str__(self): return '<{}\'s {} APK>'.format(self.owner, self.platform) + + +class UiautoApkFile(FileResource): + + name = 'uiautoapk' + + def __init__(self, owner, platform=None): + super(UiautoApkFile, self).__init__(owner) + self.platform = platform + + def __str__(self): + return '<{}\'s {} UiAuto APK>'.format(self.owner, self.platform)
15c58fb05a9bfb06b87d8d00a1b26d50ee68c1f7
django/publicmapping/redistricting/management/commands/makelanguagefiles.py
django/publicmapping/redistricting/management/commands/makelanguagefiles.py
#!/usr/bin/python from django.core.management.base import BaseCommand from redistricting.utils import * class Command(BaseCommand): """ This command prints creates and compiles language message files """ args = None help = 'Create and compile language message files' def handle(self, *args, **options): """ Create and compile language message files """ # Make messages for each language defined in settings for language in settings.LANGUAGES: management.call_command('makemessages', locale=language[0], interactive=False) # Compile all message files management.call_command('compilemessages', interactive=False)
#!/usr/bin/python from django.core.management.base import BaseCommand from redistricting.utils import * class Command(BaseCommand): """ This command prints creates and compiles language message files """ args = None help = 'Create and compile language message files' def handle(self, *args, **options): """ Create and compile language message files """ # Make messages for each language defined in settings for language in settings.LANGUAGES: # For django templates management.call_command('makemessages', locale=language[0], interactive=False) # For javascript files management.call_command('makemessages', domain='djangojs', locale=language[0], interactive=False) # Compile all message files management.call_command('compilemessages', interactive=False)
Add creation of js message files to management command
Add creation of js message files to management command
Python
apache-2.0
JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder
--- +++ @@ -15,7 +15,11 @@ """ # Make messages for each language defined in settings for language in settings.LANGUAGES: + # For django templates management.call_command('makemessages', locale=language[0], interactive=False) + + # For javascript files + management.call_command('makemessages', domain='djangojs', locale=language[0], interactive=False) # Compile all message files management.call_command('compilemessages', interactive=False)
8ddcabe29dfaa6716578664224620fc5a0116a2b
tests/test_cli_eigenvals.py
tests/test_cli_eigenvals.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import os import pytest import tempfile import numpy as np import bands_inspect as bi from click.testing import CliRunner import tbmodels from tbmodels._cli import cli def test_cli_eigenvals(sample): samples_dir = sample('cli_eigenvals') runner = CliRunner() with tempfile.NamedTemporaryFile() as out_file: run = runner.invoke( cli, [ 'eigenvals', '-o', out_file.name, '-k', os.path.join(samples_dir, 'kpoints.hdf5'), '-i', os.path.join(samples_dir, 'silicon_model.hdf5') ], catch_exceptions=False ) print(run.output) res = bi.io.load(out_file.name) reference = bi.io.load(os.path.join(samples_dir, 'silicon_eigenvals.hdf5')) np.testing.assert_allclose(bi.compare.difference.calculate(res, reference), 0, atol=1e-10)
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'eigenvals' command. """ import os import tempfile import numpy as np import bands_inspect as bi from click.testing import CliRunner from tbmodels._cli import cli def test_cli_eigenvals(sample): """ Test the 'eigenvals' command. """ samples_dir = sample('cli_eigenvals') runner = CliRunner() with tempfile.NamedTemporaryFile() as out_file: run = runner.invoke( cli, [ 'eigenvals', '-o', out_file.name, '-k', os.path.join(samples_dir, 'kpoints.hdf5'), '-i', os.path.join(samples_dir, 'silicon_model.hdf5') ], catch_exceptions=False ) print(run.output) res = bi.io.load(out_file.name) reference = bi.io.load(os.path.join(samples_dir, 'silicon_eigenvals.hdf5')) np.testing.assert_allclose(bi.compare.difference.calculate(res, reference), 0, atol=1e-10)
Fix pre-commit issue for the cli_eigenvals test.
Fix pre-commit issue for the cli_eigenvals test.
Python
apache-2.0
Z2PackDev/TBmodels,Z2PackDev/TBmodels
--- +++ @@ -3,20 +3,24 @@ # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> +""" +Tests for the 'eigenvals' command. +""" import os +import tempfile -import pytest -import tempfile import numpy as np import bands_inspect as bi from click.testing import CliRunner -import tbmodels from tbmodels._cli import cli def test_cli_eigenvals(sample): + """ + Test the 'eigenvals' command. + """ samples_dir = sample('cli_eigenvals') runner = CliRunner() with tempfile.NamedTemporaryFile() as out_file:
842ab1d53224117fc750d963b6c5f3b6f5af5f1d
hakoblog/db.py
hakoblog/db.py
import MySQLdb import MySQLdb.cursors from hakoblog.config import CONFIG class DB(): def __init__(self): self.conn = MySQLdb.connect( db=CONFIG.DATABASE, host=CONFIG.DATABASE_HOST, user=CONFIG.DATABASE_USER, password=CONFIG.DATABASE_PASS, cursorclass=MySQLdb.cursors.DictCursor, ) self.conn.autocommit(True) def cursor(self): return self.conn.cursor() def close(self): self.conn.close() def uuid_short(self): with self.conn.cursor() as cursor: cursor.execute('SELECT UUID_SHORT() as uuid') return cursor.fetchone().get('uuid')
import MySQLdb import MySQLdb.cursors from hakoblog.config import CONFIG class DB(): def __init__(self): self.conn = MySQLdb.connect( db=CONFIG.DATABASE, host=CONFIG.DATABASE_HOST, user=CONFIG.DATABASE_USER, password=CONFIG.DATABASE_PASS, cursorclass=MySQLdb.cursors.DictCursor, charset='utf-8', ) self.conn.autocommit(True) def cursor(self): return self.conn.cursor() def close(self): self.conn.close() def uuid_short(self): with self.conn.cursor() as cursor: cursor.execute('SELECT UUID_SHORT() as uuid') return cursor.fetchone().get('uuid')
Add charset to connect mysql
Add charset to connect mysql
Python
mit
hakobe/hakoblog-python,hakobe/hakoblog-python,hakobe/hakoblog-python
--- +++ @@ -11,6 +11,7 @@ user=CONFIG.DATABASE_USER, password=CONFIG.DATABASE_PASS, cursorclass=MySQLdb.cursors.DictCursor, + charset='utf-8', ) self.conn.autocommit(True)
d478c966192241cccf53ac665820fd9a62ebcdeb
huxley/api/permissions.py
huxley/api/permissions.py
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from rest_framework import permissions class IsSuperuserOrReadOnly(permissions.BasePermission): '''Allow writes if superuser, read-only otherwise.''' def has_permission(self, request, view): return (request.user.is_superuser or request.method in permissions.SAFE_METHODS) class IsUserOrSuperuser(permissions.BasePermission): '''Accept only the users themselves or superusers.''' def has_object_permission(self, request, view, obj): return request.user.is_superuser or request.user == obj class IsAdvisorOrSuperuser(permissions.BasePermission): '''Accept only the school's advisor or superusers.''' def has_object_permission(self, request, view, obj): return request.user.is_superuser or request.user == obj.advisor class IsPostOrSuperuserOnly(permissions.BasePermission): '''Accept POST (create) requests, superusers-only otherwise.''' def has_object_permissions(self, request, view, obj): return request.method == 'POST' or request.user.is_superuser
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from rest_framework import permissions class IsSuperuserOrReadOnly(permissions.BasePermission): '''Allow writes if superuser, read-only otherwise.''' def has_permission(self, request, view): return (request.user.is_superuser or request.method in permissions.SAFE_METHODS) class IsUserOrSuperuser(permissions.BasePermission): '''Accept only the users themselves or superusers.''' def has_object_permission(self, request, view, obj): return request.user.is_superuser or request.user == obj class IsAdvisorOrSuperuser(permissions.BasePermission): '''Accept only the school's advisor or superusers.''' def has_object_permission(self, request, view, obj): return request.user.is_superuser or request.user == obj.advisor class IsPostOrSuperuserOnly(permissions.BasePermission): '''Accept POST (create) requests, superusers-only otherwise.''' def has_permission(self, request, view): return request.method == 'POST' or request.user.is_superuser
Make IsPostOrSuperuserOnly a non-object-level permission.
Make IsPostOrSuperuserOnly a non-object-level permission.
Python
bsd-3-clause
nathanielparke/huxley,bmun/huxley,bmun/huxley,nathanielparke/huxley,bmun/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,bmun/huxley,ctmunwebmaster/huxley,ctmunwebmaster/huxley
--- +++ @@ -29,5 +29,5 @@ class IsPostOrSuperuserOnly(permissions.BasePermission): '''Accept POST (create) requests, superusers-only otherwise.''' - def has_object_permissions(self, request, view, obj): + def has_permission(self, request, view): return request.method == 'POST' or request.user.is_superuser
f88d747f7959808884451245aeba65edf7c490bf
synapse/replication/slave/storage/filtering.py
synapse/replication/slave/storage/filtering.py
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 ._base import BaseSlavedStore from synapse.storage.filtering import FilteringStore class SlavedFilteringStore(BaseSlavedStore): def __init__(self, db_conn, hs): super(SlavedFilteringStore, self).__init__(db_conn, hs) get_user_filter = FilteringStore.__dict__["get_user_filter"]
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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 ._base import BaseSlavedStore from synapse.storage.filtering import FilteringStore class SlavedFilteringStore(BaseSlavedStore): def __init__(self, db_conn, hs): super(SlavedFilteringStore, self).__init__(db_conn, hs) # Filters are immutable so this cache doesn't need to be expired get_user_filter = FilteringStore.__dict__["get_user_filter"]
Add a comment explaining why the filter cache doesn't need exipiring
Add a comment explaining why the filter cache doesn't need exipiring
Python
apache-2.0
TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,TribeMedia/synapse
--- +++ @@ -21,4 +21,5 @@ def __init__(self, db_conn, hs): super(SlavedFilteringStore, self).__init__(db_conn, hs) + # Filters are immutable so this cache doesn't need to be expired get_user_filter = FilteringStore.__dict__["get_user_filter"]
9346e9750dee78484766d912919cfacc2e6b4b7e
wagtail/search/management/commands/search_garbage_collect.py
wagtail/search/management/commands/search_garbage_collect.py
from django.core.management.base import BaseCommand from wagtail.search import models class Command(BaseCommand): def handle(self, **options): # Clean daily hits self.stdout.write("Cleaning daily hits records... ") models.QueryDailyHits.garbage_collect() self.stdout.write("Done") # Clean queries self.stdout.write("Cleaning query records... ") models.Query.garbage_collect() self.stdout.write("Done")
from django.core.management.base import BaseCommand from wagtail.search import models class Command(BaseCommand): def handle(self, **options): # Clean daily hits self.stdout.write("Cleaning daily hits records…") models.QueryDailyHits.garbage_collect() self.stdout.write("Done") # Clean queries self.stdout.write("Cleaning query records…") models.Query.garbage_collect() self.stdout.write("Done")
Replace triple dots with ellipsis in search commands
Replace triple dots with ellipsis in search commands
Python
bsd-3-clause
mixxorz/wagtail,FlipperPA/wagtail,mixxorz/wagtail,zerolab/wagtail,mixxorz/wagtail,thenewguy/wagtail,wagtail/wagtail,gasman/wagtail,rsalmaso/wagtail,takeflight/wagtail,nealtodd/wagtail,gasman/wagtail,FlipperPA/wagtail,gasman/wagtail,rsalmaso/wagtail,takeflight/wagtail,kaedroho/wagtail,kaedroho/wagtail,timorieber/wagtail,rsalmaso/wagtail,FlipperPA/wagtail,nimasmi/wagtail,thenewguy/wagtail,nimasmi/wagtail,kaedroho/wagtail,zerolab/wagtail,torchbox/wagtail,kaedroho/wagtail,takeflight/wagtail,timorieber/wagtail,nimasmi/wagtail,zerolab/wagtail,rsalmaso/wagtail,wagtail/wagtail,timorieber/wagtail,thenewguy/wagtail,mixxorz/wagtail,nimasmi/wagtail,kaedroho/wagtail,nealtodd/wagtail,takeflight/wagtail,torchbox/wagtail,mikedingjan/wagtail,jnns/wagtail,torchbox/wagtail,gasman/wagtail,thenewguy/wagtail,zerolab/wagtail,wagtail/wagtail,mikedingjan/wagtail,torchbox/wagtail,mikedingjan/wagtail,wagtail/wagtail,nealtodd/wagtail,jnns/wagtail,gasman/wagtail,timorieber/wagtail,rsalmaso/wagtail,wagtail/wagtail,zerolab/wagtail,mixxorz/wagtail,jnns/wagtail,nealtodd/wagtail,mikedingjan/wagtail,jnns/wagtail,thenewguy/wagtail,FlipperPA/wagtail
--- +++ @@ -6,11 +6,11 @@ class Command(BaseCommand): def handle(self, **options): # Clean daily hits - self.stdout.write("Cleaning daily hits records... ") + self.stdout.write("Cleaning daily hits records…") models.QueryDailyHits.garbage_collect() self.stdout.write("Done") # Clean queries - self.stdout.write("Cleaning query records... ") + self.stdout.write("Cleaning query records…") models.Query.garbage_collect() self.stdout.write("Done")
6e724725fca65d3e63b1bfe44f9c2bcb22ae862d
banana/maya/__init__.py
banana/maya/__init__.py
# __ # | |--.---.-.-----.---.-.-----.---.-. .--------.---.-.--.--.---.-. # | _ | _ | | _ | | _ |__| | _ | | | _ | # |_____|___._|__|__|___._|__|__|___._|__|__|__|__|___._|___ |___._| # |_____| # """ banana.maya ~~~~~~~~~~~ Set of extensions for the Python API of Autodesk Maya. :copyright: Copyright 2014 by Christopher Crouzet. :license: MIT, see LICENSE for details. """ __version__ = '0.0.1' __all__ = [ 'utils' ] def patch(): from gorilla.extensionsregistrar import ExtensionsRegistrar from banana.maya import extensions ExtensionsRegistrar.register_extensions(extensions, patch=True)
# __ # | |--.---.-.-----.---.-.-----.---.-. .--------.---.-.--.--.---.-. # | _ | _ | | _ | | _ |__| | _ | | | _ | # |_____|___._|__|__|___._|__|__|___._|__|__|__|__|___._|___ |___._| # |_____| # """ banana.maya ~~~~~~~~~~~ Set of extensions for the Python API of Autodesk Maya. :copyright: Copyright 2014 by Christopher Crouzet. :license: MIT, see LICENSE for details. """ __version__ = '0.0.1' __all__ = [ ] def patch(): from gorilla.extensionsregistrar import ExtensionsRegistrar from banana.maya import extensions ExtensionsRegistrar.register_extensions(extensions, patch=True)
Remove a leftover module from the `__all__` attribute.
Remove a leftover module from the `__all__` attribute.
Python
mit
christophercrouzet/bana,christophercrouzet/banana.maya
--- +++ @@ -18,7 +18,6 @@ __version__ = '0.0.1' __all__ = [ - 'utils' ]
dcc4a0682befae9e6fccbdb18a517789249259ec
test_project/urls.py
test_project/urls.py
try: from django.conf.urls.defaults import patterns, include, url except ImportError: from django.conf.urls import patterns, url, include import settings import os from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'} ), url(r'^test/', 'test_app.views.test_index'), url(r'^admin/', include(admin.site.urls)), ) if settings.DEBUG: urlpatterns += patterns( '', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join( os.path.dirname(settings.__file__), 'static')}))
from django.views.generic.base import TemplateView from django.conf.urls import patterns, url, include import settings import os from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_name="index.html")), url(r'^test/', 'test_app.views.test_index'), url(r'^admin/', include(admin.site.urls)), ) if settings.DEBUG: urlpatterns += patterns( '', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join( os.path.dirname(settings.__file__), 'static')}))
Fix for 1.6 & 1.7
Fix for 1.6 & 1.7
Python
mit
nikolas/django-interval-field,mpasternak/django-interval-field,mpasternak/django-interval-field,nikolas/django-interval-field
--- +++ @@ -1,7 +1,6 @@ -try: - from django.conf.urls.defaults import patterns, include, url -except ImportError: - from django.conf.urls import patterns, url, include +from django.views.generic.base import TemplateView + +from django.conf.urls import patterns, url, include import settings import os @@ -11,10 +10,7 @@ urlpatterns = patterns('', - url(r'^$', - 'django.views.generic.simple.direct_to_template', - {'template': 'index.html'} - ), + url(r'^$', TemplateView.as_view(template_name="index.html")), url(r'^test/', 'test_app.views.test_index'),
e6c9ceb3f838a613d182a3fdea961ca1f73e90c4
translator/models.py
translator/models.py
# coding=utf-8 from django.conf import settings from django.core.cache import cache from django.db import models from django.utils.decorators import classproperty from taggit.managers import TaggableManager from translator.util import get_key class TranslationBase(models.Model): key = models.CharField(max_length=255, unique=True) description = models.TextField() tags = TaggableManager(blank=True) class Meta: abstract = True def __unicode__(self): return self.key def save(self, force_insert=False, force_update=False, using=None, update_fields=None): all_translation_keys = self.__class__.objects.all().values_list('key', flat=True) for l in settings.LANGUAGES: cache.delete_many([get_key(l[0], k, self.cache_key_prefix) for k in all_translation_keys]) return super().save(force_insert, force_update, using, update_fields) @classproperty def cache_key_prefix(self): """To separate cache keys, we need to specify a unique prefix per model.""" return self._meta.db_table class Translation(TranslationBase): pass
# coding=utf-8 from django.conf import settings from django.core.cache import cache from django.db import models from taggit.managers import TaggableManager from translator.util import get_key try: # Django 3.1 and above from django.utils.functional import classproperty except ImportError: from django.utils.decorators import classproperty class TranslationBase(models.Model): key = models.CharField(max_length=255, unique=True) description = models.TextField() tags = TaggableManager(blank=True) class Meta: abstract = True def __unicode__(self): return self.key def save(self, force_insert=False, force_update=False, using=None, update_fields=None): all_translation_keys = self.__class__.objects.all().values_list('key', flat=True) for l in settings.LANGUAGES: cache.delete_many([get_key(l[0], k, self.cache_key_prefix) for k in all_translation_keys]) return super().save(force_insert, force_update, using, update_fields) @classproperty def cache_key_prefix(self): """To separate cache keys, we need to specify a unique prefix per model.""" return self._meta.db_table class Translation(TranslationBase): pass
Update import for classproperty in django 3.1 and above
Update import for classproperty in django 3.1 and above
Python
mit
dreipol/django-translator
--- +++ @@ -2,10 +2,15 @@ from django.conf import settings from django.core.cache import cache from django.db import models -from django.utils.decorators import classproperty from taggit.managers import TaggableManager from translator.util import get_key + +try: + # Django 3.1 and above + from django.utils.functional import classproperty +except ImportError: + from django.utils.decorators import classproperty class TranslationBase(models.Model):
b19eb216f1f1e9c059b083af7ff72864994f5920
project_name/project_name/urls.py
project_name/project_name/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # include urls from your app like so # url(r'^', include('my_app.urls')), url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), # include urls from your app like so # url(r'^', include('my_app.urls')), )
Put admin at the top of the default URLs
Put admin at the top of the default URLs
Python
mit
jimray/django-project-skeleton,jimray/django-project-skeleton
--- +++ @@ -4,7 +4,8 @@ admin.autodiscover() urlpatterns = patterns('', + url(r'^admin/', include(admin.site.urls)), + # include urls from your app like so # url(r'^', include('my_app.urls')), - url(r'^admin/', include(admin.site.urls)), )
000bf4d3942c19facd254fcff2df8b2b35a8fd75
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup from setuptools.dist import Distribution with open(os.path.join(os.path.dirname(__file__), 'README')) as f: doc = f.read() class BinaryDistribution(Distribution): def is_pure(self): return False setup( name='json-stream', version='1.0.1', url='http://fireteam.net/', license='BSD', author='Fireteam Ltd.', author_email='armin@fireteam.net', description='A small wrapper around YAJL\'s lexer', long_description=doc, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', ], packages=['jsonstream'], include_package_data=True, distclass=BinaryDistribution, )
# -*- coding: utf-8 -*- import os from setuptools import setup from setuptools.dist import Distribution with open(os.path.join(os.path.dirname(__file__), 'README')) as f: doc = f.read() class BinaryDistribution(Distribution): def is_pure(self): return False setup( name='json-stream', version='1.0.1', url='http://fireteam.net/', license='BSD', author='Fireteam Ltd.', author_email='info@fireteam.net', description='A small wrapper around YAJL\'s lexer', long_description=doc, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', ], packages=['jsonstream'], include_package_data=True, distclass=BinaryDistribution, )
Change to fireteam email address.
Change to fireteam email address.
Python
bsd-3-clause
fireteam/python-json-stream
--- +++ @@ -20,7 +20,7 @@ url='http://fireteam.net/', license='BSD', author='Fireteam Ltd.', - author_email='armin@fireteam.net', + author_email='info@fireteam.net', description='A small wrapper around YAJL\'s lexer', long_description=doc, classifiers=[
b2593ea8f4a8e98b2a92ccebae69376516fb860c
setup.py
setup.py
from setuptools import setup install_requires = [ 'Flask', 'Flask-Babel', ] with open('README') as f: readme = f.read() setup( name='Flask-Table', packages=['flask_table'], version='0.3.1', author='Andrew Plummer', author_email='plummer574@gmail.com', url='https://github.com/plumdog/flask_table', description='HTML tables for use with the Flask micro-framework', install_requires=install_requires, test_suite='tests', tests_require=['flask-testing'], long_description=readme, classifiers=[ 'Development Status :: 3 - Alpha', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Operating System :: OS Independent', 'Framework :: Flask', ])
import os from setuptools import setup install_requires = [ 'Flask', 'Flask-Babel', ] if os.path.exists('README'): with open('README') as f: readme = f.read() else: readme = None setup( name='Flask-Table', packages=['flask_table'], version='0.3.1', author='Andrew Plummer', author_email='plummer574@gmail.com', url='https://github.com/plumdog/flask_table', description='HTML tables for use with the Flask micro-framework', install_requires=install_requires, test_suite='tests', tests_require=['flask-testing'], long_description=readme, classifiers=[ 'Development Status :: 3 - Alpha', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Operating System :: OS Independent', 'Framework :: Flask', ])
Fix for non-existent rst README
Fix for non-existent rst README
Python
bsd-3-clause
plumdog/flask_table,plumdog/flask_table,plumdog/flask_table
--- +++ @@ -1,3 +1,5 @@ +import os + from setuptools import setup install_requires = [ @@ -5,8 +7,11 @@ 'Flask-Babel', ] -with open('README') as f: - readme = f.read() +if os.path.exists('README'): + with open('README') as f: + readme = f.read() +else: + readme = None setup( name='Flask-Table',
f41c05f7579b42300e8e202218657f4eeb37a3a6
setup.py
setup.py
from setuptools import setup setup( name = "voltron", version = "0.1", author = "snare", author_email = "snare@ho.ax", description = ("A UI for GDB & LLDB"), license = "Buy snare a beer", keywords = "voltron gdb lldb", url = "https://github.com/snarez/voltron", packages=['voltron'], install_requires = [], data_files=['voltron.gdb', 'dbgentry.py'], package_data = {'voltron': ['config/*']}, install_package_data = True, entry_points = { 'console_scripts': ['voltron = voltron:main'] }, zip_safe = False )
from setuptools import setup setup( name = "voltron", version = "0.1", author = "snare", author_email = "snare@ho.ax", description = ("A UI for GDB & LLDB"), license = "Buy snare a beer", keywords = "voltron gdb lldb", url = "https://github.com/snarez/voltron", packages=['voltron'], install_requires = ['rl'], data_files=['voltron.gdb', 'dbgentry.py'], package_data = {'voltron': ['config/*']}, install_package_data = True, entry_points = { 'console_scripts': ['voltron = voltron:main'] }, zip_safe = False )
Install rl when installing voltron
Install rl when installing voltron
Python
mit
snare/voltron,snare/voltron,snare/voltron,snare/voltron
--- +++ @@ -10,7 +10,7 @@ keywords = "voltron gdb lldb", url = "https://github.com/snarez/voltron", packages=['voltron'], - install_requires = [], + install_requires = ['rl'], data_files=['voltron.gdb', 'dbgentry.py'], package_data = {'voltron': ['config/*']}, install_package_data = True,
e121493b7bab8f4cdd8485248a9acd7babb643c8
setup.py
setup.py
# -*- coding: utf-8 -*- # # setup.py # colorific # """ Package information for colorific. """ import sys # check for the supported Python version version = tuple(sys.version_info[:2]) if version != (2, 7): sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' %\ version) sys.stderr.flush() sys.exit(1) import os from setuptools import setup readme = os.path.join(os.path.dirname(__file__), 'README.md') setup( name='colorific', version='0.2.0', description='Automatic color palette detection', long_description=open(readme).read(), author='Lars Yencken', author_email='lars@yencken.org', url='http://github.com/99designs/colorific', py_modules=['colorific'], install_requires=[ 'Pillow==1.7.8', 'colormath>=1.0.8', 'numpy>=1.6.1', ], dependency_links=[ 'http://github.com/larsyencken/Pillow/tarball/master#egg=Pillow-1.7.8', ], license='ISC', entry_points={ 'console_scripts': [ 'colorific = colorific:main', ], }, )
# -*- coding: utf-8 -*- # # setup.py # colorific # """ Package information for colorific. """ import sys # check for the supported Python version version = tuple(sys.version_info[:2]) if version != (2, 7): sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' % version) sys.stderr.flush() sys.exit(1) import os from setuptools import setup readme = os.path.join(os.path.dirname(__file__), 'README.md') setup( name='colorific', version='0.2.0', description='Automatic color palette detection', long_description=open(readme).read(), author='Lars Yencken', author_email='lars@yencken.org', url='http://github.com/99designs/colorific', py_modules=['colorific'], install_requires=[ 'Pillow==1.7.8', 'colormath>=1.0.8', 'numpy>=1.6.1', ], dependency_links=[ 'http://github.com/python-imaging/Pillow/tarball/master#egg=Pillow-1.7.8', ], license='ISC', entry_points={ 'console_scripts': [ 'colorific = colorific:main', ], }, )
Use the pillow master branch directly.
Use the pillow master branch directly.
Python
isc
99designs/colorific
--- +++ @@ -13,7 +13,7 @@ # check for the supported Python version version = tuple(sys.version_info[:2]) if version != (2, 7): - sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' %\ + sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' % version) sys.stderr.flush() sys.exit(1) @@ -38,7 +38,7 @@ 'numpy>=1.6.1', ], dependency_links=[ - 'http://github.com/larsyencken/Pillow/tarball/master#egg=Pillow-1.7.8', + 'http://github.com/python-imaging/Pillow/tarball/master#egg=Pillow-1.7.8', ], license='ISC', entry_points={
cb385d0e053078492c467a31cbde3e158e458571
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup, find_packages from setuptools.command.test import test except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from setuptools.command.test import test setup( name='modeldict', version='0.1.1', author='DISQUS', author_email='opensource@disqus.com', url='http://github.com/disqus/modeldict/', description = 'Dictionary-style access to different types of models.', packages=find_packages(), zip_safe=False, tests_require=[ 'Django', 'nose', 'mock', 'redis' ], test_suite = 'nose.collector', include_package_data=True, classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development' ], )
#!/usr/bin/env python import sys from setuptools import setup, find_packages try: import multiprocessing # Seems to fix http://bugs.python.org/issue15881 except ImportError: pass setup_requires = [] if 'nosetests' in sys.argv[1:]: setup_requires.append('nose') setup( name='modeldict', version='0.1.1', author='DISQUS', author_email='opensource@disqus.com', url='http://github.com/disqus/modeldict/', description = 'Dictionary-style access to different types of models.', packages=find_packages(), zip_safe=False, tests_require=[ 'Django', 'nose', 'mock', 'redis' ], test_suite = 'nose.collector', include_package_data=True, classifiers=[ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development' ], )
Fix bug with multiprocessing and Nose.
Fix bug with multiprocessing and Nose.
Python
apache-2.0
disqus/durabledict
--- +++ @@ -1,13 +1,18 @@ #!/usr/bin/env python +import sys + +from setuptools import setup, find_packages + try: - from setuptools import setup, find_packages - from setuptools.command.test import test + import multiprocessing # Seems to fix http://bugs.python.org/issue15881 except ImportError: - from ez_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages - from setuptools.command.test import test + pass + +setup_requires = [] + +if 'nosetests' in sys.argv[1:]: + setup_requires.append('nose') setup( name='modeldict',
911e8df0b58f6c642fc240e042d830b26cb704f9
setup.py
setup.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup setup( name="runner", version="1.9", description="Task runner", author="Chris AtLee", author_email="chris@atlee.ca", packages=[ "runner", "runner.lib" ], entry_points={ "console_scripts": ["runner = runner:main"], }, url="https://github.com/mozilla/runner", install_requires=["argparse>=1.0"], setup_requires=["nose==1.3.1"], )
# 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 setuptools import setup setup( name="runner", version="1.9", description="Task runner", author="Chris AtLee", author_email="chris@atlee.ca", packages=[ "runner", "runner.lib" ], entry_points={ "console_scripts": ["runner = runner:main"], }, url="https://github.com/mozilla/runner", install_requires=["argparse"], setup_requires=["nose==1.3.1"], )
Remove specific argparse version (not necessary); a=bustage
Remove specific argparse version (not necessary); a=bustage
Python
mpl-2.0
mozilla/build-runner,mozilla/build-runner
--- +++ @@ -18,6 +18,6 @@ "console_scripts": ["runner = runner:main"], }, url="https://github.com/mozilla/runner", - install_requires=["argparse>=1.0"], + install_requires=["argparse"], setup_requires=["nose==1.3.1"], )
d024572a21e7e4baa2a72c30b617aafaea84801b
setup.py
setup.py
import setuptools setuptools.setup(name='pytest-cov', version='1.6', description='py.test plugin for coverage reporting with ' 'support for both centralised and distributed testing, ' 'including subprocesses and multiprocessing', long_description=open('README.rst').read().strip(), author='Marc Schlaich', author_email='marc.schlaich@gmail.com', url='https://github.com/schlamar/pytest-cov', py_modules=['pytest_cov'], install_requires=['pytest>=2.5.2', 'cov-core>=1.8'], entry_points={'pytest11': ['pytest_cov = pytest_cov']}, license='MIT License', zip_safe=False, keywords='py.test pytest cover coverage distributed parallel', classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.4', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Topic :: Software Development :: Testing'])
import setuptools setuptools.setup(name='pytest-cov', version='1.6', description='py.test plugin for coverage reporting with ' 'support for both centralised and distributed testing, ' 'including subprocesses and multiprocessing', long_description=open('README.rst').read().strip(), author='Marc Schlaich', author_email='marc.schlaich@gmail.com', url='https://github.com/schlamar/pytest-cov', py_modules=['pytest_cov'], install_requires=['pytest>=2.5.2', 'cov-core>=1.9'], entry_points={'pytest11': ['pytest_cov = pytest_cov']}, license='MIT License', zip_safe=False, keywords='py.test pytest cover coverage distributed parallel', classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.4', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Topic :: Software Development :: Testing'])
Set cov-core dependency to 1.9
Set cov-core dependency to 1.9
Python
mit
opoplawski/pytest-cov,moreati/pytest-cov,pytest-dev/pytest-cov,ionelmc/pytest-cover,wushaobo/pytest-cov,schlamar/pytest-cov
--- +++ @@ -11,7 +11,7 @@ url='https://github.com/schlamar/pytest-cov', py_modules=['pytest_cov'], install_requires=['pytest>=2.5.2', - 'cov-core>=1.8'], + 'cov-core>=1.9'], entry_points={'pytest11': ['pytest_cov = pytest_cov']}, license='MIT License', zip_safe=False,
7413dcbae4c379d9d2fd6baa6de67031b0582e3b
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='relengapi-mapper', version='0.2.2', description='hg to git mapper', author='Chris AtLee', author_email='chris@atlee.ca', url='https://github.com/petemoore/mapper', packages=find_packages(), namespace_packages=['relengapi', 'relengapi.blueprints'], entry_points={ "relengapi.blueprints": [ 'mapper = relengapi.blueprints.mapper:bp', ], }, install_requires=[ 'Flask', 'relengapi>=1.0.0', 'IPy', 'python-dateutil', ], license='MPL2', extras_require={ 'test': [ 'nose', 'mock' ] })
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='relengapi-mapper', version='0.2.2', description='hg to git mapper', author='Chris AtLee', author_email='chris@atlee.ca', url='https://github.com/petemoore/mapper', packages=find_packages(), namespace_packages=['relengapi', 'relengapi.blueprints'], entry_points={ "relengapi.blueprints": [ 'mapper = relengapi.blueprints.mapper:bp', ], }, install_requires=[ 'Flask', 'relengapi>=0.3', 'IPy', 'python-dateutil', ], license='MPL2', extras_require={ 'test': [ 'nose', 'mock' ] })
Revert "Upgrading dependency on relengapi"
Revert "Upgrading dependency on relengapi" This reverts commit fd7d52947b7fe590ce2549aefbbd636b9f416b9d.
Python
mpl-2.0
andrei987/services,djmitche/build-relengapi,Callek/build-relengapi,andrei987/services,lundjordan/build-relengapi,lundjordan/build-relengapi,srfraser/services,andrei987/services,mozilla/build-relengapi,garbas/mozilla-releng-services,lundjordan/build-relengapi,hwine/build-relengapi,hwine/build-relengapi,lundjordan/services,lundjordan/services,garbas/mozilla-releng-services,mozilla-releng/services,mozilla/build-relengapi,hwine/build-relengapi,La0/mozilla-relengapi,lundjordan/services,lundjordan/build-relengapi,lundjordan/services,garbas/mozilla-releng-services,mozilla-releng/services,La0/mozilla-relengapi,mozilla/build-relengapi,srfraser/services,La0/mozilla-relengapi,djmitche/build-relengapi,mozilla/build-relengapi,andrei987/services,srfraser/services,hwine/build-relengapi,garbas/mozilla-releng-services,Callek/build-relengapi,La0/mozilla-relengapi,mozilla-releng/services,srfraser/services,Callek/build-relengapi,djmitche/build-relengapi,Callek/build-relengapi,mozilla-releng/services,djmitche/build-relengapi
--- +++ @@ -17,7 +17,7 @@ }, install_requires=[ 'Flask', - 'relengapi>=1.0.0', + 'relengapi>=0.3', 'IPy', 'python-dateutil', ],
5c929cd84074d9fe17548afec4e6e81ad61416ae
setup.py
setup.py
#!/usr/bin/python from setuptools import setup, find_packages setup( name = "docker-scripts", version = "0.2.2", packages = find_packages(), entry_points={ 'console_scripts': ['docker-scripts=docker_scripts.cli.main:run'], }, )
#!/usr/bin/python from setuptools import setup, find_packages with open('requirements.txt') as f: requirements = f.read().splitlines() setup( name = "docker-scripts", version = "0.3.0", packages = find_packages(), entry_points={ 'console_scripts': ['docker-scripts=docker_scripts.cli.main:run'], }, install_requires=requirements )
Use requirements.txt file for... requirements
Use requirements.txt file for... requirements
Python
mit
lichia/docker-scripts,TomasTomecek/docker-scripts,goldmann/docker-scripts,goldmann/docker-squash,jpopelka/docker-scripts
--- +++ @@ -1,11 +1,16 @@ #!/usr/bin/python from setuptools import setup, find_packages + +with open('requirements.txt') as f: + requirements = f.read().splitlines() + setup( name = "docker-scripts", - version = "0.2.2", + version = "0.3.0", packages = find_packages(), entry_points={ 'console_scripts': ['docker-scripts=docker_scripts.cli.main:run'], }, + install_requires=requirements )
04182bff7a097b8842073f96bac834abb34f7118
setup.py
setup.py
from setuptools import setup, find_packages long_description = ( open('README.rst').read() + '\n' + open('CHANGES.txt').read()) setup( name='more.static', version='0.10.dev0', description="BowerStatic integration for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath bowerstatic bower', 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', 'bowerstatic >= 0.8', ], 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.static', version='0.10.dev0', description="BowerStatic integration for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath bowerstatic bower', 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', 'bowerstatic >= 0.8', ], 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.static
--- +++ @@ -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.static',
c31dea7bb9dc104c23cf6960f61d56af86c8dea6
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup requirements = [ ] test_requirements = [ ] setup( name='adb_android', version='0.1.0', description="Enables android adb in your python script", long_description='This package can be used by everyone who implements some \ android-related stuff on Python and at the same time has to interact with \ android adb. It makes interaction with android adb easier because of proper \ error handling and some useful features.', author='Viktor Malyi', author_email='v.stratus@gmail.com', url='https://github.com/vmalyi/adb', packages=[ 'adb_android', ], package_dir={'adb_android':'adb_android'}, include_package_data=True, install_requires=requirements, license="GNU", keywords='adb, android', #TODO: check compatibitily with >2.7 classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 2.7', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Topic :: Software Development :: Testing', 'Intended Audience :: Developers' ], test_suite='tests', )
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup requirements = [ ] test_requirements = [ ] setup( name='adb_android', version='0.2.0', description="Enables android adb in your python script", long_description='This python package is a wrapper for standard android adb\ implementation. It allows you to execute android adb commands in your \ python script.', author='Viktor Malyi', author_email='v.stratus@gmail.com', url='https://github.com/vmalyi/adb_android', packages=[ 'adb_android', ], package_dir={'adb_android':'adb_android'}, include_package_data=True, install_requires=requirements, license="GNU", keywords='adb, android', #TODO: check compatibitily with >2.7 classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 2.7', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Topic :: Software Development :: Testing', 'Intended Audience :: Developers' ], test_suite='tests', )
Update package description and version
Update package description and version
Python
bsd-3-clause
solarce/adb_android,vmalyi/adb_android
--- +++ @@ -12,15 +12,14 @@ setup( name='adb_android', - version='0.1.0', + version='0.2.0', description="Enables android adb in your python script", - long_description='This package can be used by everyone who implements some \ - android-related stuff on Python and at the same time has to interact with \ - android adb. It makes interaction with android adb easier because of proper \ - error handling and some useful features.', + long_description='This python package is a wrapper for standard android adb\ + implementation. It allows you to execute android adb commands in your \ + python script.', author='Viktor Malyi', author_email='v.stratus@gmail.com', - url='https://github.com/vmalyi/adb', + url='https://github.com/vmalyi/adb_android', packages=[ 'adb_android', ],
bd30c70095c9e0fc4b6a552def45406bef5093e1
setup.py
setup.py
import os, io from setuptools import setup, find_packages long_description = ( io.open('README.rst', encoding='utf-8').read() + '\n' + io.open('CHANGES.txt', encoding='utf-8').read()) setup(name='more.jinja2', version='0.2.dev0', description="Jinja2 template integration for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath jinja2', license="BSD", url="http://pypi.python.org/pypi/more.jinja2", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath > 0.9', 'Jinja2 >= 2.7.3' ], extras_require = dict( test=['pytest >= 2.6.0', 'pytest-cov', 'WebTest'], ), )
import os, io from setuptools import setup, find_packages long_description = ( io.open('README.rst', encoding='utf-8').read() + '\n' + io.open('CHANGES.txt', encoding='utf-8').read()) setup(name='more.jinja2', version='0.2.dev0', description="Jinja2 template integration for Morepath", long_description=long_description, author="Martijn Faassen", author_email="faassen@startifact.com", keywords='morepath jinja2', license="BSD", url="http://pypi.python.org/pypi/more.jinja2", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath >= 0.10', 'Jinja2 >= 2.7.3' ], extras_require = dict( test=['pytest >= 2.6.0', 'pytest-cov', 'WebTest'], ), )
Make version spec more clear.
Make version spec more clear.
Python
bsd-3-clause
morepath/more.jinja2
--- +++ @@ -21,7 +21,7 @@ zip_safe=False, install_requires=[ 'setuptools', - 'morepath > 0.9', + 'morepath >= 0.10', 'Jinja2 >= 2.7.3' ], extras_require = dict(
cd4152a9ea9953e4f6482bd51046fd754ffb7457
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages deps = [ line.strip() for line in open("deps.txt") if line and not line.startswith("#") ] metadata = dict( name='Yaka Core', version='0.1dev', url='http://www.yaka.biz/', license='LGPL', author='Stefane Fermigier', author_email='sf@fermigier.com', description='Enterprise social networking meets CRM', long_description=__doc__, packages=['yaka'], platforms='any', classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], # Unsupported by distutils. #install_requires=deps, #include_package_data=True, #zip_safe=False, ) setup(**metadata)
# -*- coding: utf-8 -*- from setuptools import setup, find_packages def get_deps(): import re deps_raw = [ line.strip() for line in open("deps.txt")] deps = [] for dep in deps_raw: if not dep or dep.startswith("#"): continue m = re.search("#egg=(.*)", dep) if m: dep = m.group(1) deps.append(dep) return deps metadata = dict( name='Yaka Core', version='0.1dev', url='http://www.yaka.biz/', license='LGPL', author='Stefane Fermigier', author_email='sf@fermigier.com', description='Enterprise social networking meets CRM', long_description=__doc__, packages=['yaka'], platforms='any', classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], # Setuptools specific install_requires=get_deps(), include_package_data=True, zip_safe=False, ) setup(**metadata)
Fix build broken by previous commit.
Fix build broken by previous commit.
Python
lgpl-2.1
abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core
--- +++ @@ -2,9 +2,21 @@ from setuptools import setup, find_packages -deps = [ line.strip() - for line in open("deps.txt") - if line and not line.startswith("#") ] + +def get_deps(): + import re + + deps_raw = [ line.strip() for line in open("deps.txt")] + deps = [] + for dep in deps_raw: + if not dep or dep.startswith("#"): + continue + m = re.search("#egg=(.*)", dep) + if m: + dep = m.group(1) + deps.append(dep) + return deps + metadata = dict( name='Yaka Core', @@ -25,10 +37,10 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', ], - # Unsupported by distutils. - #install_requires=deps, - #include_package_data=True, - #zip_safe=False, + # Setuptools specific + install_requires=get_deps(), + include_package_data=True, + zip_safe=False, ) setup(**metadata)
02c20066e4af8fc5c929a19301f0d8e4bbba629b
setup.py
setup.py
from setuptools import setup setup( name='unicode-slugify', version='0.1.3', description='A slug generator that turns strings into unicode slugs.', long_description=open('README.md', encoding='utf-8').read(), author='Jeff Balogh, Dave Dash', author_email='jbalogh@mozilla.com, dd@mozilla.com', url='http://github.com/mozilla/unicode-slugify', license='BSD', packages=['slugify'], include_package_data=True, package_data={'': ['README.md']}, zip_safe=False, install_requires=['six', 'unidecode'], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: Web Environment :: Mozilla', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Libraries :: Python Modules', ] )
from setuptools import setup setup( name='unicode-slugify', version='0.1.3', description='A slug generator that turns strings into unicode slugs.', long_description=open('README.md').read(), author='Jeff Balogh, Dave Dash', author_email='jbalogh@mozilla.com, dd@mozilla.com', url='http://github.com/mozilla/unicode-slugify', license='BSD', packages=['slugify'], include_package_data=True, package_data={'': ['README.md']}, zip_safe=False, install_requires=['six', 'unidecode'], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: Web Environment :: Mozilla', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Libraries :: Python Modules', ] )
Revert "opens README.md in utf-8 encoding"
Revert "opens README.md in utf-8 encoding" This reverts commit f73fd446dc9b953c57c773f21744616265adc754.
Python
bsd-3-clause
DylannCordel/unicode-slugify
--- +++ @@ -4,7 +4,7 @@ name='unicode-slugify', version='0.1.3', description='A slug generator that turns strings into unicode slugs.', - long_description=open('README.md', encoding='utf-8').read(), + long_description=open('README.md').read(), author='Jeff Balogh, Dave Dash', author_email='jbalogh@mozilla.com, dd@mozilla.com', url='http://github.com/mozilla/unicode-slugify',
7d34d5953bbf4f1d8c3fc97c7c8b19b433d52ecd
setup.py
setup.py
""" Flask-MongoKit -------------- Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask applications. Links ````` * `documentation <http://packages.python.org/Flask-MongoKit>`_ * `sourcecode <http://bitbucket.org/Jarus/flask-mongokit/>`_ * `MongoKit <http://namlook.github.com/mongokit/>`_ * `Flask <http://flask.pocoo.org>`_ """ from setuptools import setup setup( name='Flask-MongoKit', version='0.2', url='http://bitbucket.org/Jarus/flask-mongokit', license='BSD', author='Christoph Heer', author_email='Christoph.Heer@googlemail.com', description='A Flask extension simplifies to use MongoKit', long_description=__doc__, packages=['flaskext'], namespace_packages=['flaskext'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'MongoKit' ], test_suite='tests.suite', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
""" Flask-MongoKit -------------- Flask-MongoKit simplifies to use MongoKit, a powerful MongoDB ORM in Flask applications. Links ````` * `documentation <http://packages.python.org/Flask-MongoKit>`_ * `development version <http://github.com/jarus/flask-mongokit/zipball/master#egg=Flask-MongoKit-dev>`_ * `MongoKit <http://namlook.github.com/mongokit/>`_ * `Flask <http://flask.pocoo.org>`_ """ from setuptools import setup setup( name='Flask-MongoKit', version='0.2', url='http://github.com/jarus/flask-mongokit', license='BSD', author='Christoph Heer', author_email='Christoph.Heer@googlemail.com', description='A Flask extension simplifies to use MongoKit', long_description=__doc__, packages=['flaskext'], namespace_packages=['flaskext'], zip_safe=False, platforms='any', install_requires=[ 'Flask', 'MongoKit' ], test_suite='tests.suite', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
Add development version and correct url to github
Add development version and correct url to github
Python
bsd-3-clause
jarus/flask-mongokit,jarus/flask-mongokit,VishvajitP/flask-mongokit,VishvajitP/flask-mongokit
--- +++ @@ -9,7 +9,7 @@ ````` * `documentation <http://packages.python.org/Flask-MongoKit>`_ -* `sourcecode <http://bitbucket.org/Jarus/flask-mongokit/>`_ +* `development version <http://github.com/jarus/flask-mongokit/zipball/master#egg=Flask-MongoKit-dev>`_ * `MongoKit <http://namlook.github.com/mongokit/>`_ * `Flask <http://flask.pocoo.org>`_ @@ -20,7 +20,7 @@ setup( name='Flask-MongoKit', version='0.2', - url='http://bitbucket.org/Jarus/flask-mongokit', + url='http://github.com/jarus/flask-mongokit', license='BSD', author='Christoph Heer', author_email='Christoph.Heer@googlemail.com',
68a6f8361dbc39ffb3b35428c04860178f004b77
setup.py
setup.py
import sys from shutil import rmtree from setuptools import setup, find_packages if sys.argv[:2] == ['setup.py', 'bdist_wheel']: # Remove previous build dir when creating a wheel build, since if files # have been removed from the project, they'll still be cached in the build # dir and end up as part of the build, which is unexpected try: rmtree('build') except: pass setup( name = "django-gnupg-mails", version = __import__("gnupg_mails").__version__, author = "Jan Dittberner", author_email = "jan@dittberner.info", description = ( "A Django reusable app providing the ability to send PGP/MIME signed " "multipart emails." ), long_description = open("README.rst").read(), url = "https://github.com/jandd/django-gnupg-mails", packages = find_packages(), zip_safe = False, include_package_data = True, install_requires = ['python-gnupg', 'sphinx-me'], classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Framework :: Django', 'Topic :: Communications :: Email', 'Topic :: Security :: Cryptography', ] )
import sys from shutil import rmtree from setuptools import setup, find_packages if sys.argv[:2] == ['setup.py', 'bdist_wheel']: # Remove previous build dir when creating a wheel build, since if files # have been removed from the project, they'll still be cached in the build # dir and end up as part of the build, which is unexpected try: rmtree('build') except: pass setup( name = "django-gnupg-mails", version = __import__("gnupg_mails").__version__, author = "Jan Dittberner", author_email = "jan@dittberner.info", description = ( "A Django reusable app providing the ability to send PGP/MIME signed " "multipart emails." ), long_description = open("README.rst").read(), url = "https://github.com/jandd/django-gnupg-mails", packages = find_packages(), zip_safe = False, include_package_data = True, install_requires = ['python-gnupg', 'sphinx-me'], classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', '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', 'Framework :: Django', 'Topic :: Communications :: Email', 'Topic :: Security :: Cryptography', ] )
Add classifier for Python 3.5
Add classifier for Python 3.5
Python
mit
jandd/django-gnupg-mails
--- +++ @@ -37,6 +37,7 @@ 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Framework :: Django', 'Topic :: Communications :: Email', 'Topic :: Security :: Cryptography',
5883ccc3ca5ff073f571fa9cfe363d7a0be59d47
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup import request setup( name='django-request', version='%s' % request.__version__, description='django-request is a statistics module for django. It stores requests in a database for admins to see, it can also be used to get statistics on who is online etc.', author='Kyle Fuller', author_email='inbox@kylefuller.co.uk', url='http://kylefuller.co.uk/projects/django-request/', download_url='http://github.com/kylef/django-request/zipball/master', packages=['request', 'request.templatetags'], package_data={'request': ['templates/admin/request/*.html', 'templates/admin/request/request/*.html']}, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ] )
#!/usr/bin/env python from distutils.core import setup import request setup( name='django-request', version='%s' % request.__version__, description='django-request is a statistics module for django. It stores requests in a database for admins to see, it can also be used to get statistics on who is online etc.', author='Kyle Fuller', author_email='inbox@kylefuller.co.uk', url='http://kylefuller.co.uk/projects/django-request/', download_url='http://github.com/kylef/django-request/zipball/%s' % request.__version__, packages=['request', 'request.templatetags'], package_data={'request': ['templates/admin/request/*.html', 'templates/admin/request/request/*.html']}, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ] )
Set the download link to the current version of django-request, not latest git.
Set the download link to the current version of django-request, not latest git.
Python
bsd-2-clause
kylef/django-request,gnublade/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request,kylef/django-request
--- +++ @@ -9,7 +9,7 @@ author='Kyle Fuller', author_email='inbox@kylefuller.co.uk', url='http://kylefuller.co.uk/projects/django-request/', - download_url='http://github.com/kylef/django-request/zipball/master', + download_url='http://github.com/kylef/django-request/zipball/%s' % request.__version__, packages=['request', 'request.templatetags'], package_data={'request': ['templates/admin/request/*.html', 'templates/admin/request/request/*.html']}, license='BSD',
21220dee455cb51b26a82caa1fbe11c09ac18351
linter.py
linter.py
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): """Provides an interface to markdownlint.""" syntax = ('markdown', 'markdown gfm', 'multimarkdown', 'markdown extended') cmd = 'markdownlint' npm_name = 'markdownlint-cli' version_args = '--version' version_re = r'(?P<version>\d+\.\d+\.\d+)' version_requirement = '>= 0.6.0' check_version = True regex = r'.+?[:]\s(?P<line>\d+)[:]\s(?P<error>MD\d+)?[/]?(?P<message>.+)' multiline = False line_col_base = (1, 1) # '-' == file must be saved to disk first before linting tempfile_suffix = '-' error_stream = util.STREAM_STDERR selectors = {} word_re = None defaults = {} inline_settings = None inline_overrides = None comment_re = r'\s*/[/*]' config_file = ('--config', '.markdownlintrc', '~')
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): """Provides an interface to markdownlint.""" syntax = ('markdown', 'markdown gfm', 'multimarkdown', 'markdown extended') cmd = 'markdownlint' npm_name = 'markdownlint-cli' version_args = '--version' version_re = r'(?P<version>\d+\.\d+\.\d+)' version_requirement = '>= 0.6.0' check_version = True regex = r'.+?[:]\s(?P<line>\d+)[:]\s(?P<error>MD\d+)?[/]?(?P<message>.+)' multiline = False line_col_base = (1, 1) # '-' == file must be saved to disk first before linting tempfile_suffix = '-' error_stream = util.STREAM_STDERR word_re = None comment_re = r'\s*/[/*]' config_file = ('--config', '.markdownlintrc', '~')
Remove empty defaults and deprecated settings
Remove empty defaults and deprecated settings
Python
mit
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
--- +++ @@ -30,10 +30,6 @@ # '-' == file must be saved to disk first before linting tempfile_suffix = '-' error_stream = util.STREAM_STDERR - selectors = {} word_re = None - defaults = {} - inline_settings = None - inline_overrides = None comment_re = r'\s*/[/*]' config_file = ('--config', '.markdownlintrc', '~')
7da1482f93090bcafc420e96aa07515be61c8c50
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Joshua Hagins # Copyright (c) 2015 Joshua Hagins # # License: MIT # """This module exports the RubyLint plugin class.""" from SublimeLinter.lint import RubyLinter class RubyLint(RubyLinter): """Provides an interface to ruby-lint.""" syntax = ('ruby', 'ruby on rails', 'rspec') cmd = 'ruby-lint@ruby' version_args = '--version' version_re = r'(?P<version>\d+\.\d+\.\d+)' version_requirement = '>= 2.0.0' regex = ( r'^.+?: (?:(?P<warning>warning)|(?P<error>error)): ' r'line (?P<line>\d+), column (?P<col>\d+): ' r'(?P<message>.+)' ) tempfile_suffix = 'rb' config_file = ('--config', 'ruby-lint.yml')
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Joshua Hagins # Copyright (c) 2015 Joshua Hagins # # License: MIT # """This module exports the RubyLint plugin class.""" from SublimeLinter.lint import RubyLinter class RubyLint(RubyLinter): """Provides an interface to ruby-lint.""" syntax = ('ruby', 'ruby on rails', 'rspec') cmd = 'ruby -S ruby-lint' version_args = '-S ruby-lint --version' version_re = r'(?P<version>\d+\.\d+\.\d+)' version_requirement = '>= 2.0.0' regex = ( r'^.+?: (?:(?P<warning>warning)|(?P<error>error)): ' r'line (?P<line>\d+), column (?P<col>\d+): ' r'(?P<message>.+)' ) tempfile_suffix = 'rb' config_file = ('--config', 'ruby-lint.yml')
Use 'ruby -S' to find ruby-lint executable
Use 'ruby -S' to find ruby-lint executable
Python
mit
jawshooah/SublimeLinter-contrib-ruby-lint
--- +++ @@ -18,8 +18,8 @@ """Provides an interface to ruby-lint.""" syntax = ('ruby', 'ruby on rails', 'rspec') - cmd = 'ruby-lint@ruby' - version_args = '--version' + cmd = 'ruby -S ruby-lint' + version_args = '-S ruby-lint --version' version_re = r'(?P<version>\d+\.\d+\.\d+)' version_requirement = '>= 2.0.0' regex = (
e6d3d60265db1947b8af2d1c59c575c632ddc20b
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by @kungfusheep # Copyright (c) 2016 @kungfusheep # # License: MIT # """This module exports the Stylelint plugin class.""" import os from SublimeLinter.lint import Linter, util class Stylelint(Linter): """Provides an interface to stylelint.""" syntax = ('css', 'css3', 'sass', 'scss', 'postcss') cmd = ('node', os.path.dirname(os.path.realpath(__file__)) + '/stylelint_wrapper.js', '@') error_stream = util.STREAM_BOTH config_file = ('--config', '.stylelintrc', '~') tempfile_suffix = 'css' regex = ( r'^\s*(?P<line>[0-9]+)\:(?P<col>[0-9]+)\s*(?P<message>.+)' )
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by @kungfusheep # Copyright (c) 2016 @kungfusheep # # License: MIT # """This module exports the Stylelint plugin class.""" import os from SublimeLinter.lint import Linter, util class Stylelint(Linter): """Provides an interface to stylelint.""" syntax = ('css', 'css3', 'sass', 'scss', 'postcss') cmd = ('node', os.path.dirname(os.path.realpath(__file__)) + '/stylelint_wrapper.js', '@') error_stream = util.STREAM_BOTH config_file = ('--config', '.stylelintrc', '~') tempfile_suffix = 'css' regex = ( r'^\s*(?P<line>[0-9]+)\:(?P<col>[0-9]+)\s*(?:(?P<error>✖)|(?P<warning>⚠))\s*(?P<message>.+)' )
Add support for handling errors and warnings
Add support for handling errors and warnings
Python
mit
lzwme/SublimeLinter-contrib-stylelint,lzwme/SublimeLinter-contrib-stylelint,kungfusheep/SublimeLinter-contrib-stylelint
--- +++ @@ -23,5 +23,5 @@ config_file = ('--config', '.stylelintrc', '~') tempfile_suffix = 'css' regex = ( - r'^\s*(?P<line>[0-9]+)\:(?P<col>[0-9]+)\s*(?P<message>.+)' + r'^\s*(?P<line>[0-9]+)\:(?P<col>[0-9]+)\s*(?:(?P<error>✖)|(?P<warning>⚠))\s*(?P<message>.+)' )
71073c238a3cb033183179f51d293c5e3d3eebee
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot-rest', version='0.1', packages=['mdot_rest'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'djangorestframework', 'django-filter', 'Pillow', ], license='Apache License, Version 2.0', description='A RESTful API server for references to mobile resources.', long_description=README, url='', author='Craig M. Stimmel', author_email='cstimmel@uw.edu', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot-rest', version='0.1', packages=['mdot_rest'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'djangorestframework', 'django-filter', 'Pillow', 'mock', ], license='Apache License, Version 2.0', description='A RESTful API server for references to mobile resources.', long_description=README, url='', author='Craig M. Stimmel', author_email='cstimmel@uw.edu', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
Add mock as it's required by the unit tests.
Add mock as it's required by the unit tests.
Python
apache-2.0
uw-it-aca/mdot-rest,uw-it-aca/mdot-rest
--- +++ @@ -17,6 +17,7 @@ 'djangorestframework', 'django-filter', 'Pillow', + 'mock', ], license='Apache License, Version 2.0', description='A RESTful API server for references to mobile resources.',
882ea5cb70f75d51cc0c8305baf7380a1d7d7954
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup import i18n setup( name='edx-i18n-tools', version='0.3.3', description='edX Internationalization Tools', author='edX', author_email='oscm@edx.org', url='https://github.com/edx/i18n-tools', packages=[ 'i18n', ], install_requires=[ 'django>=1.8,<1.11', 'polib', 'path.py', 'pyYaml', 'six', ], entry_points={ 'console_scripts': [ 'i18n_tool = i18n.main:main', ], }, license='Apache License 2.0', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', ], )
#!/usr/bin/env python from setuptools import setup import i18n setup( name='edx-i18n-tools', version=i18n.__version__, description='edX Internationalization Tools', author='edX', author_email='oscm@edx.org', url='https://github.com/edx/i18n-tools', packages=[ 'i18n', ], install_requires=[ 'django>=1.8,<1.11', 'polib', 'path.py', 'pyYaml', 'six', ], entry_points={ 'console_scripts': [ 'i18n_tool = i18n.main:main', ], }, license='Apache License 2.0', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', ], )
Put back the __version__ technique
Put back the __version__ technique
Python
apache-2.0
edx/i18n-tools
--- +++ @@ -6,7 +6,7 @@ setup( name='edx-i18n-tools', - version='0.3.3', + version=i18n.__version__, description='edX Internationalization Tools', author='edX', author_email='oscm@edx.org',
f9d527e34dd06e33933eeb342e430f6b88c97c92
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.9.1", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Information Analysis", ], description = "OpenFisca tax and benefit system for Country-Template", keywords = "benefit microsimulation social tax", license ="http://www.fsf.org/licensing/licenses/agpl-3.0.html", url = "https://github.com/openfisca/country-template", include_package_data = True, # Will read MANIFEST.in data_files = [ ("share/openfisca/openfisca-country-template", ["CHANGELOG.md", "LICENSE", "README.md"]), ], install_requires = [ "OpenFisca-Core[web-api] >=27.0,<32.0", ], extras_require = { "dev": [ "autopep8 == 1.4.0", "flake8 >=3.5.0,<3.8.0", "flake8-print", "pycodestyle >= 2.3.0, < 2.4.0", # To avoid incompatibility with flake ] }, packages=find_packages(), )
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name = "OpenFisca-Country-Template", version = "3.9.1", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Information Analysis", ], description = "OpenFisca tax and benefit system for Country-Template", keywords = "benefit microsimulation social tax", license ="http://www.fsf.org/licensing/licenses/agpl-3.0.html", url = "https://github.com/openfisca/country-template", include_package_data = True, # Will read MANIFEST.in data_files = [ ("share/openfisca/openfisca-country-template", ["CHANGELOG.md", "LICENSE", "README.md"]), ], install_requires = [ "OpenFisca-Core[web-api] >=27.0,<32.0", ], extras_require = { "dev": [ "autopep8 == 1.4.0", "flake8 >=3.5.0,<3.8.0", "flake8-print", "pycodestyle >=2.3.0,<2.6.0", # To avoid incompatibility with flake ] }, packages=find_packages(), )
Update pycodestyle requirement from <2.4.0,>=2.3.0 to >=2.3.0,<2.6.0
Update pycodestyle requirement from <2.4.0,>=2.3.0 to >=2.3.0,<2.6.0 Updates the requirements on [pycodestyle](https://github.com/PyCQA/pycodestyle) to permit the latest version. - [Release notes](https://github.com/PyCQA/pycodestyle/releases) - [Changelog](https://github.com/PyCQA/pycodestyle/blob/master/CHANGES.txt) - [Commits](https://github.com/PyCQA/pycodestyle/compare/2.3.0...2.5.0) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
Python
agpl-3.0
openfisca/country-template,openfisca/country-template
--- +++ @@ -30,7 +30,7 @@ "autopep8 == 1.4.0", "flake8 >=3.5.0,<3.8.0", "flake8-print", - "pycodestyle >= 2.3.0, < 2.4.0", # To avoid incompatibility with flake + "pycodestyle >=2.3.0,<2.6.0", # To avoid incompatibility with flake ] }, packages=find_packages(),
a4e2868ec5fd9c15814897a98e256bf662d1c4e9
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst', 'r') as f: readme = f.read() setup( name='eve-auth-jwt', version='1.0.1', description='Eve JWT authentication', long_description=readme, author='Olivier Poitrey', author_email='rs@dailymotion.com', url='https://github.com/rs/eve-auth-jwt', keywords=["eve", "api", "rest", "oauth", "auth", "jwt"], packages=['eve_auth_jwt'], package_dir={'eve_auth_jwt': 'eve_auth_jwt'}, install_requires=["Eve", "PyJWT == 1.0.1"], test_suite='test', tests_require=['flake8', 'nose'], license="MIT", classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Developers', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: MIT License', 'Operating System :: Unix', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Security', ] )
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst', 'r') as f: readme = f.read() setup( name='eve-auth-jwt', version='1.0.1', description='Eve JWT authentication', long_description=readme, author='Olivier Poitrey', author_email='rs@dailymotion.com', url='https://github.com/rs/eve-auth-jwt', keywords=["eve", "api", "rest", "oauth", "auth", "jwt"], packages=['eve_auth_jwt'], package_dir={'eve_auth_jwt': 'eve_auth_jwt'}, install_requires=["Eve => 0.5.0", "PyJWT == 1.0.1"], test_suite='test', tests_require=['flake8', 'nose'], license="MIT", classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Developers', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: MIT License', 'Operating System :: Unix', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Security', ] )
Tag eve version more precisly
Tag eve version more precisly
Python
mit
rs/eve-auth-jwt
--- +++ @@ -19,7 +19,7 @@ keywords=["eve", "api", "rest", "oauth", "auth", "jwt"], packages=['eve_auth_jwt'], package_dir={'eve_auth_jwt': 'eve_auth_jwt'}, - install_requires=["Eve", "PyJWT == 1.0.1"], + install_requires=["Eve => 0.5.0", "PyJWT == 1.0.1"], test_suite='test', tests_require=['flake8', 'nose'], license="MIT",
cc24fdfe14e0dc65334312893f1cca0d3a879a40
setup.py
setup.py
#!/usr/bin/python # -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup __version__ = "0.13.0" setup( name='pyramid_zipkin', version=__version__, provides=["pyramid_zipkin"], author='Yelp, Inc.', author_email='opensource+pyramid-zipkin@yelp.com', license='Copyright Yelp 2016', url="https://github.com/Yelp/pyramid_zipkin", description='Zipkin instrumentation for the Pyramid framework.', packages=find_packages(exclude=('tests*', 'testing*', 'tools*')), package_data={'': ['*.thrift']}, install_requires=[ 'pyramid', 'six', 'py_zipkin', ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", ], )
#!/usr/bin/python # -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup __version__ = "0.13.0" setup( name='pyramid_zipkin', version=__version__, provides=["pyramid_zipkin"], author='Yelp, Inc.', author_email='opensource+pyramid-zipkin@yelp.com', license='Copyright Yelp 2016', url="https://github.com/Yelp/pyramid_zipkin", description='Zipkin instrumentation for the Pyramid framework.', packages=find_packages(exclude=('tests*',)), package_data={'': ['*.thrift']}, install_requires=[ 'pyramid', 'six', 'py_zipkin', ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", ], )
Remove nonexistent packages from find_packages
Remove nonexistent packages from find_packages
Python
apache-2.0
Yelp/pyramid_zipkin,bplotnick/pyramid_zipkin
--- +++ @@ -15,7 +15,7 @@ license='Copyright Yelp 2016', url="https://github.com/Yelp/pyramid_zipkin", description='Zipkin instrumentation for the Pyramid framework.', - packages=find_packages(exclude=('tests*', 'testing*', 'tools*')), + packages=find_packages(exclude=('tests*',)), package_data={'': ['*.thrift']}, install_requires=[ 'pyramid',
8bc704f6272ccfebd48f7282e02420a56d8e934d
setup.py
setup.py
#!/usr/bin/env python from ez_setup import use_setuptools use_setuptools() from setuptools import setup import re main_py = open('flatcat/__init__.py').read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", main_py)) requires = [ 'morfessor', ] setup(name='Morfessor FlatCat', version=metadata['version'], author=metadata['author'], author_email='morfessor@cis.hut.fi', url='http://www.cis.hut.fi/projects/morpho/', description='Morfessor FlatCat', packages=['flatcat', 'flatcat.tests'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Scientific/Engineering', ], license="BSD", scripts=['scripts/flatcat', 'scripts/flatcat-train', 'scripts/flatcat-segment', 'scripts/flatcat-diagnostics', 'scripts/flatcat-reformat' ], install_requires=requires, extras_require={ 'docs': [l.strip() for l in open('docs/build_requirements.txt')] } )
#!/usr/bin/env python from ez_setup import use_setuptools use_setuptools() from setuptools import setup import re main_py = open('flatcat/__init__.py').read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", main_py)) requires = [ 'morfessor', ] setup(name='Morfessor FlatCat', version=metadata['version'], author=metadata['author'], author_email='morfessor@cis.hut.fi', url='http://www.cis.hut.fi/projects/morpho/', description='Morfessor FlatCat', packages=['flatcat', 'flatcat.tests'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Scientific/Engineering', ], license="BSD", scripts=['scripts/flatcat', 'scripts/flatcat-train', 'scripts/flatcat-segment', 'scripts/flatcat-diagnostics', 'scripts/flatcat-reformat' ], install_requires=requires, #extras_require={ # 'docs': [l.strip() for l in open('docs/build_requirements.txt')] #} )
Fix to improperly disabled docs
Fix to improperly disabled docs
Python
bsd-2-clause
aalto-speech/flatcat
--- +++ @@ -36,7 +36,7 @@ 'scripts/flatcat-reformat' ], install_requires=requires, - extras_require={ - 'docs': [l.strip() for l in open('docs/build_requirements.txt')] - } + #extras_require={ + # 'docs': [l.strip() for l in open('docs/build_requirements.txt')] + #} )
9787f9e446ff42aa64e912e3c34802b803dc6652
setup.py
setup.py
import sys from setuptools import setup, find_packages setup( name='chillin-server', version='2.0.0', description='Chillin AI Game Framework (Python Server)', long_description='', author='Koala', author_email='mdan.hagh@gmail.com', url='https://github.com/koala-team/Chillin-PyServer', keywords='ai game framework chillin', classifiers=[ 'Environment :: Console', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Topic :: Software Development :: Libraries :: Application Frameworks' ], license='AGPL License, Version 3.0', install_requires=[ 'circuits==3.2', 'pydblite==3.0.4', 'koala-serializer==0.6.3', 'configparser==3.5.0', 'enum34==1.1.6' ], packages=find_packages(), package_data={ 'chillin_server': ['default_certs/*'] } )
import sys from setuptools import setup, find_packages setup( name='chillin-server', version='2.0.0', description='Chillin AI Game Framework (Python Server)', long_description='', author='Koala', author_email='mdan.hagh@gmail.com', url='https://github.com/koala-team/Chillin-PyServer', keywords='ai game framework chillin', classifiers=[ 'Environment :: Console', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Topic :: Software Development :: Libraries :: Application Frameworks' ], license='AGPL License, Version 3.0', install_requires=[ 'circuits==3.2', 'pydblite==3.0.4', 'configparser==3.5.0', 'enum34==1.1.6' ], extras_require={ 'dev': ['koala-serializer'] }, packages=find_packages(), package_data={ 'chillin_server': ['default_certs/*'] } )
Move koala-serializer to extra requirements
Move koala-serializer to extra requirements
Python
agpl-3.0
koala-team/Chillin-PyServer
--- +++ @@ -27,10 +27,13 @@ install_requires=[ 'circuits==3.2', 'pydblite==3.0.4', - 'koala-serializer==0.6.3', 'configparser==3.5.0', 'enum34==1.1.6' ], + + extras_require={ + 'dev': ['koala-serializer'] + }, packages=find_packages(),
9c2de54cd8b87a7d247f7c7acab3d0e2b9cecd34
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-ical', version='1.5', description="iCal feeds for Django based on Django's syndication feed " "framework.", long_description=(open('README.rst').read() + '\n' + open('CHANGES.rst').read()), author='Ian Lewis', author_email='IanMLewis@gmail.com', license='MIT License', url='https://github.com/Pinkerton/django-ical', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', 'Framework :: Django :: 2.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=[ 'Django>=1.8', 'icalendar>=4.0', ], tests_require=[ 'django-recurrence', ], packages=find_packages(), test_suite='tests.main', )
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-ical', version='1.5', description="iCal feeds for Django based on Django's syndication feed " "framework.", long_description=(open('README.rst').read() + '\n' + open('CHANGES.rst').read()), author='Ian Lewis', author_email='IanMLewis@gmail.com', license='MIT License', url='https://github.com/jazzband/django-ical', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', 'Framework :: Django :: 2.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=[ 'Django>=1.8', 'icalendar>=4.0', ], tests_require=[ 'django-recurrence', ], packages=find_packages(), test_suite='tests.main', )
Update repo URL for Jazzband ownership transfer
Update repo URL for Jazzband ownership transfer
Python
mit
Pinkerton/django-ical
--- +++ @@ -12,7 +12,7 @@ author='Ian Lewis', author_email='IanMLewis@gmail.com', license='MIT License', - url='https://github.com/Pinkerton/django-ical', + url='https://github.com/jazzband/django-ical', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins',
b555bba2f0b2c275d5d0cb3b55a16b34d2d69047
setup.py
setup.py
import setuptools from eventkit import __version__ setuptools.setup( name='eventkit', version=__version__, packages=setuptools.find_packages(), install_requires=[ 'coverage', 'croniter', 'django-dynamic-fixture', 'django-nose', 'django-polymorphic', 'django-webtest', 'mkdocs', 'nose-progressive', 'pytz', 'tox', 'WebTest', ], )
import setuptools from eventkit import __version__ setuptools.setup( name='eventkit', version=__version__, packages=setuptools.find_packages(), install_requires=[ 'coverage', 'croniter', 'django-dynamic-fixture', 'django-nose', 'django-polymorphic', 'django-webtest', 'mkdocs', 'nose-progressive', 'pytz', 'tox', 'WebTest', ], extras_require={ 'dev': ['ipdb', 'ipython'], 'postgres': ['psycopg2'], }, )
Add dependencies for `dev` and `postgres` extras.
Add dependencies for `dev` and `postgres` extras.
Python
mit
ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit
--- +++ @@ -19,4 +19,8 @@ 'tox', 'WebTest', ], + extras_require={ + 'dev': ['ipdb', 'ipython'], + 'postgres': ['psycopg2'], + }, )
e4bf7d3f5d093a71562799af5e15081b8a0c812c
setup.py
setup.py
from twilio import __version__ from setuptools import setup, find_packages setup( name = "twilio", version = __version__, description = "Twilio API client and TwiML generator", author = "Twilio", author_email = "help@twilio.com", url = "http://github.com/twilio/twilio-python/", keywords = ["twilio","twiml"], install_requires = ["httplib2", "pyjwt"], packages = find_packages(), classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Communications :: Telephony", ], long_description = """\ Python Twilio Helper Library ---------------------------- DESCRIPTION The Twilio REST SDK simplifies the process of makes calls to the Twilio REST. The Twilio REST API lets to you initiate outgoing calls, list previous calls, and much more. See http://www.github.com/twilio/twilio-python for more information. LICENSE The Twilio Python Helper Library is distributed under the MIT License """ )
from twilio import __version__ from setuptools import setup, find_packages setup( name = "twilio", version = __version__, description = "Twilio API client and TwiML generator", author = "Twilio", author_email = "help@twilio.com", url = "http://github.com/twilio/twilio-python/", keywords = ["twilio","twiml"], install_requires = ["httplib2 == 0.7.1", "pyjwt==0.1.2"], packages = find_packages(), classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Communications :: Telephony", ], long_description = """\ Python Twilio Helper Library ---------------------------- DESCRIPTION The Twilio REST SDK simplifies the process of makes calls to the Twilio REST. The Twilio REST API lets to you initiate outgoing calls, list previous calls, and much more. See http://www.github.com/twilio/twilio-python for more information. LICENSE The Twilio Python Helper Library is distributed under the MIT License """ )
Add explicit versions for dependencies
Add explicit versions for dependencies
Python
mit
clearcare/twilio-python,Stackdriver/twilio-python,Mobii/twilio-python,supermanheng21/twilio-python,cinemapub/bright-response,cinemapub/bright-response,bcorwin/twilio-python,tysonholub/twilio-python,Stackdriver/twilio-python,twilio/twilio-python,Rosy-S/twilio-python,johannakate/twilio-python,YeelerG/twilio-python,RobSpectre/twilio-python
--- +++ @@ -9,7 +9,7 @@ author_email = "help@twilio.com", url = "http://github.com/twilio/twilio-python/", keywords = ["twilio","twiml"], - install_requires = ["httplib2", "pyjwt"], + install_requires = ["httplib2 == 0.7.1", "pyjwt==0.1.2"], packages = find_packages(), classifiers = [ "Development Status :: 5 - Production/Stable",
3cbc6bdd5bcc480d105ce53bffd5b350b7dc8179
setup.py
setup.py
from setuptools import setup import os #Function to read README def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='clipboard_memo', version='0.1', description='A command-line clipboard manager', long_description=read('README.md'), url='http://github.com/arafsheikh/clipboard-memo', author='Sheikh Araf', author_email='arafsheikh@rocketmail.com', license='MIT', keywords='clipboard memo manager command-line CLI', include_package_data=True, entry_points=''' [console_scripts] cmemo=clipboard_memo:main cmemo_direct=clipboard_memo:direct_save ''', py_modules=['clipboard_memo'], install_requires=[ 'pyperclip', ], )
from setuptools import setup import os #Function to read README def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='clipboard_memo', version='0.1', description='A command-line clipboard manager', long_description=read('README.rst'), url='http://github.com/arafsheikh/clipboard-memo', author='Sheikh Araf', author_email='arafsheikh@rocketmail.com', license='MIT', keywords='clipboard memo manager command-line CLI', include_package_data=True, entry_points=''' [console_scripts] cmemo=clipboard_memo:main cmemo_direct=clipboard_memo:direct_save ''', py_modules=['clipboard_memo'], install_requires=[ 'pyperclip', ], )
Use README.rst for long description
Use README.rst for long description
Python
mit
arafsheikh/clipboard-memo
--- +++ @@ -9,7 +9,7 @@ name='clipboard_memo', version='0.1', description='A command-line clipboard manager', - long_description=read('README.md'), + long_description=read('README.rst'), url='http://github.com/arafsheikh/clipboard-memo', author='Sheikh Araf', author_email='arafsheikh@rocketmail.com',